/**
 * 折扣码横幅样式 - PASCAL UI风格
 */

.loveful-discount-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
    z-index: 8;
    transform: translateY(0);
    transition: transform 0.3s ease-in-out;
    display: none;
}

.loveful-discount-banner.show {
    display: block;
}

.loveful-discount-banner.hidden {
    transform: translateY(100%);
}

.loveful-discount-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.loveful-discount-banner-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

/* 圆形图标 */
.discount-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.discount-icon .icon-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* 折扣信息 */
.discount-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.discount-label {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
}

.discount-code {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

/* 右侧按钮 */
.loveful-discount-banner-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.loveful-discount-banner-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    background: #000000;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.loveful-discount-banner-button:hover {
    background: #333333;
    transform: translateY(-1px);
}

.loveful-discount-banner-button:active {
    transform: translateY(0);
}

.loveful-discount-banner-button.copied {
    background: #4caf50;
    color: #ffffff;
}

.loveful-discount-banner-button .button-text,
.loveful-discount-banner-button .button-copied {
    transition: opacity 0.2s ease;
}

/* 关闭按钮 */
.loveful-discount-banner-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    color: #666666;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
    flex-shrink: 0;
}

.loveful-discount-banner-close:hover {
    background: #f5f5f5;
    color: #333333;
}

.loveful-discount-banner-close:active {
    background: #eeeeee;
}

.loveful-discount-banner-close svg {
    width: 16px;
    height: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .loveful-discount-banner-content {
        padding: 12px 16px;
        gap: 12px;
    }
    
    .loveful-discount-banner-left {
        gap: 12px;
    }
    
    .discount-icon {
        width: 48px;
        height: 48px;
    }
    
    .discount-label,
    .discount-code {
        font-size: 14px;
    }
    
    .loveful-discount-banner-button {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    /* 移动端隐藏关闭按钮 */
    .loveful-discount-banner-close {
        display: none;
    }
}

@media (max-width: 480px) {
    .loveful-discount-banner-content {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .loveful-discount-banner-left {
        gap: 10px;
    }
    
    .discount-icon {
        width: 42px;
        height: 42px;
    }
    
    .discount-label,
    .discount-code {
        font-size: 13px;
    }
    
    .loveful-discount-banner-button {
        padding: 9px 18px;
        font-size: 12px;
    }
}

/* 动画效果 */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.loveful-discount-banner {
    animation: slideUp 0.4s ease-out;
}

/* 避免底部内容被遮挡 */
body.single-product,
body.post-type-archive-product,
body.woocommerce-shop {
    padding-bottom: 80px;
}

@media (max-width: 768px) {
    body.single-product,
    body.post-type-archive-product,
    body.woocommerce-shop {
        padding-bottom: 70px;
    }
}

@media (max-width: 480px) {
    body.single-product,
    body.post-type-archive-product,
    body.woocommerce-shop {
        padding-bottom: 65px;
    }
}

