/* 全局变量 */
:root {
    --primary: #F08237;
    --primary-dark: #D86A20;
    --secondary: #FFCC4A;
    --accent: #FF4B91;
    --text-dark: #333333;
    --text-light: #777777;
    --text-muted: #999999;
    --bg-light: #F8F9FA;
    --bg-white: #FFFFFF;
    --bg-muted: #F5F5F5;
    --border-color: #E5E5E5;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    --radius: 8px;
    --transition-speed: 0.3s ease;
    --header-height: 80px;
    --font-main: 'Poppins', 'Microsoft YaHei', sans-serif;
    --max-width: 1200px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 5rem;
}

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--bg-white);
}

a {
    text-decoration: none;
    color: var(--text-dark);
    transition: var(--transition-speed);
}

a:hover {
    color: var(--primary);
}

button {
    cursor: pointer;
    font-family: var(--font-main);
}

img {
    max-width: 100%;
    height: auto;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

section {
    padding: var(--spacing-lg) 0;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from { 
        transform: translateY(50px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from { 
        transform: translateX(-50px);
        opacity: 0;
    }
    to { 
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from { 
        transform: translateX(50px);
        opacity: 0;
    }
    to { 
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.animate-slide-in {
    animation: slideInUp 0.8s ease forwards;
}

/* 倒计时横幅 */
.countdown-banner {
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    color: white;
    padding: var(--spacing-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    text-align: center;
}

.countdown-text {
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.countdown-timer {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.timer-item {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    padding: 0.3rem 0.5rem;
    min-width: 3rem;
    text-align: center;
}

.timer-value {
    font-weight: 700;
    font-size: 1.2rem;
}

.timer-label {
    font-size: 0.7rem;
    opacity: 0.8;
}

.timer-separator {
    font-weight: 700;
    font-size: 1.2rem;
}

.promo-text {
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* 头部样式 */
header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
    padding: 0 var(--spacing-md);
    max-width: var(--max-width);
    margin: 0 auto;
}

.logo a {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-dark);
}

.logo-image {
    height: 40px;
    margin-right: var(--spacing-xs);
}

nav ul {
    display: flex;
    gap: var(--spacing-md);
}

nav ul li a {
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.login-link {
    font-weight: 500;
    color: var(--primary);
    transition: var(--transition-speed);
}

.login-link:hover {
    color: var(--primary-dark);
}

/* 面包屑导航 */
.breadcrumbs {
    background-color: var(--bg-light);
    padding: var(--spacing-sm) 0;
    margin-bottom: var(--spacing-md);
}

.breadcrumbs ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.breadcrumbs ul li {
    position: relative;
}

.breadcrumbs ul li:not(:last-child)::after {
    content: '/';
    margin-left: 0.5rem;
    color: var(--text-muted);
}

.breadcrumbs ul li a {
    color: var(--text-light);
}

.breadcrumbs ul li:last-child {
    color: var(--text-dark);
    font-weight: 500;
}

/* 按钮样式 */
.buy-now-btn {
    display: block;
    width: 100%;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    margin-top: auto;
    transition: var(--transition-speed);
    text-align: center;
    height: 3rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.buy-now-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(240, 130, 55, 0.3);
}

/* 产品卡片样式 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.product-card {
    background-color: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition-speed);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--secondary);
    color: var(--text-dark);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    z-index: 1;
}

.product-image {
    overflow: hidden;
    position: relative;
    height: 200px;
    background-color: var(--bg-light);
    flex-shrink: 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-card .product-info {
    padding: var(--spacing-sm);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    transition: var(--transition-speed);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.4em;
}

.product-card:hover h3 {
    color: var(--primary);
}

.product-rating {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
}

.stars {
    color: var(--secondary);
    font-size: 0.9rem;
}

.reviews {
    font-size: 0.8rem;
    color: var(--text-light);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
    flex-shrink: 0;
}

.current-price {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent);
}

.original-price {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.discount-badge {
    background-color: var(--accent);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

/* 产品详情页特定样式 */
.product-section {
    padding-top: var(--spacing-md);
}

.product-rating .review-count {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-left: 0.5rem;
}

.product-description {
    margin: var(--spacing-md) 0;
    color: var(--text-light);
}

.product-features {
    margin: var(--spacing-md) 0;
    background-color: var(--bg-light);
    border-radius: var(--radius);
    padding: var(--spacing-md);
}

.product-features h3 {
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

.feature-list {
    list-style: disc;
    margin-left: var(--spacing-md);
}

.feature-list li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.product-options {
    margin: var(--spacing-md) 0;
}

.option-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.options-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: var(--spacing-md);
}

.option-item {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition-speed);
}

.option-item:hover {
    border-color: var(--primary);
}

.option-item.selected {
    border-color: var(--primary);
    background-color: rgba(240, 130, 55, 0.1);
    color: var(--primary);
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    max-width: 150px;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    background-color: var(--bg-light);
    border: none;
    font-size: 1.2rem;
    transition: var(--transition-speed);
}

.quantity-btn:hover {
    background-color: var(--primary);
    color: white;
}

.quantity-input {
    flex: 1;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    -moz-appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.shipping-info {
    margin-top: var(--spacing-md);
    background-color: var(--bg-light);
    border-radius: var(--radius);
    padding: var(--spacing-sm);
}

.shipping-info p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.collection-image {
    border-radius: var(--radius);
    margin-top: var(--spacing-sm);
    max-width: 100%;
}

.collection-preview {
    margin-top: var(--spacing-md);
}

.collection-preview h4 {
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

/* 页脚样式 */
footer {
    background-color: #222;
    color: #fff;
    padding: var(--spacing-lg) 0 var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--spacing-lg);
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.footer-about {
    flex: 1;
    min-width: 250px;
    max-width: 400px;
}

.footer-about h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.footer-about p {
    margin-bottom: var(--spacing-md);
    color: #ccc;
    line-height: 1.8;
}

.social-links {
    margin-top: var(--spacing-sm);
}

.social-links p {
    margin-bottom: var(--spacing-xs);
}

.social-link {
    color: #ccc;
    margin-right: var(--spacing-sm);
    transition: var(--transition-speed);
}

.social-link:hover {
    color: var(--primary);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
}

.footer-section {
    min-width: 150px;
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
    color: #fff;
}

.footer-section ul li {
    margin-bottom: var(--spacing-xs);
}

.footer-section ul li a {
    color: #ccc;
    transition: var(--transition-speed);
}

.footer-section ul li a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid #444;
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
    max-width: var(--max-width);
    margin: 0 auto;
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
}

.copyright {
    color: #999;
    font-size: 0.9rem;
}

.payment-methods {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.payment-methods p {
    color: #999;
    font-size: 0.9rem;
}

.payment-icons {
    display: flex;
    gap: 0.5rem;
}

.payment-icons span {
    display: inline-block;
    background-color: #333;
    color: #fff;
    font-size: 0.7rem;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
}

.powered-by {
    color: #999;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }
    
    .header-container {
        padding: 8px 10px;
        position: relative;
        z-index: 10;
        background-color: white;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
        flex-wrap: nowrap;
        height: auto;
    }
    
    .logo {
        display: flex;
        align-items: center;
    }
    
    .logo-image {
        max-height: 28px;
        margin-right: 5px;
    }
    
    .logo span {
        font-size: 0.9rem;
    }
    
    nav {
        margin-left: auto;
        order: initial;
        width: auto;
        margin-top: 0;
    }
    
    nav ul {
        display: flex;
        gap: 5px;
        justify-content: flex-end;
    }
    
    nav ul li a {
        padding: 5px 8px;
        font-size: 0.8rem;
    }
    
    .header-actions {
        margin-left: 10px;
    }
    
    /* 主内容区域增加顶部边距，避免与导航重叠 */
    main {
        margin-top: 10px;
    }
    
    .product-container {
        flex-direction: column;
    }
    
    .footer-container {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .footer-about {
        max-width: 100%;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    /* 倒计时优化 */
    .countdown-banner {
        padding: 5px 10px;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
    }
    
    .countdown-text {
        font-size: 0.7rem;
        margin-right: 5px;
    }
    
    .countdown-timer {
        margin: 0 5px;
    }
    
    .timer-item {
        width: 32px;
        height: 32px;
    }
    
    .timer-value {
        font-size: 0.9rem;
    }
    
    .timer-label {
        font-size: 0.55rem;
    }
    
    .timer-separator {
        font-size: 1rem;
    }
    
    .promo-text {
        font-size: 0.7rem;
        margin-left: 5px;
    }
    
    /* 导航优化 */
    .header-container {
        padding: 8px 10px;
        position: relative;
        z-index: 10;
        background-color: white;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
        flex-wrap: nowrap;
        height: auto;
    }
    
    .logo {
        display: flex;
        align-items: center;
    }
    
    .logo-image {
        max-height: 28px;
        margin-right: 5px;
    }
    
    .logo span {
        font-size: 0.9rem;
    }
    
    nav {
        margin-left: auto;
        order: initial;
        width: auto;
        margin-top: 0;
    }
    
    nav ul {
        display: flex;
        gap: 5px;
        justify-content: flex-end;
    }
    
    nav ul li a {
        padding: 5px 8px;
        font-size: 0.8rem;
    }
    
    .header-actions {
        margin-left: 10px;
    }
    
    /* 主内容区域增加顶部边距，避免与导航重叠 */
    main {
        margin-top: 10px;
    }
    
    /* 英雄区域调整 */
    .hero-section {
        padding: 3rem 0;
        margin-top: 0;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    /* 修复手机上图片超出视口问题 */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* 产品页响应式优化 */
    .product-container {
        gap: 1rem;
    }
    
    .product-gallery {
        min-width: 100%;
        width: 100%;
        overflow: hidden;
    }
    
    .product-info {
        min-width: 100%;
        width: 100%;
    }
    
    .main-image {
        max-width: 100%;
    }
    
    .product-title {
        font-size: 1.8rem;
    }
    
    /* 选项列表优化 */
    .options-group {
        gap: 0.5rem;
    }
    
    .option-item {
        padding: 0.5rem;
    }
    
    .option-image {
        width: 60px;
        height: 60px;
    }
    
    /* 产品卡片调整 */
    .product-card {
        margin-bottom: 1.5rem;
    }
    
    /* 标题间距调整 */
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    /* 目录页调整 */
    .catalog-header {
        padding: 2rem 0;
    }
    
    .catalog-title {
        font-size: 1.8rem;
    }
    
    .catalog-subtitle {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .countdown-banner {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .preview-item {
        width: 60px;
        height: 60px;
    }
    
    .product-title {
        font-size: 1.8rem;
    }
} 