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

body {
    font-family: 'Noto Serif SC', serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f5e9;
    background-image: url('../images/paper-texture.jpg');
    background-attachment: fixed;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 修改后的标题样式 */
.vintage-header {
    background: url("../images/header-bg.jpg") center/cover no-repeat, #f5e7d5;
    color: #fff;
    padding: 40px 0 20px;
    text-align: center;
    position: relative;
    border-bottom: 5px solid #5d2e0c;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

@media (max-width: 700px) {
    .vintage-header {
        background-size: cover;
        background-position: center;
    }
}

/* 添加半透明遮罩增强文字可读性 */
.vintage-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(91, 46, 12, 0.6); /* 复古棕色半透明遮罩 */
}

.vintage-header .container {
    position: relative; /* 确保文字在遮罩上方 */
    z-index: 1;
}

/* 调整标题文字颜色和阴影增强可读性 */
.vintage-header h1 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    color: #fff;
}

.vintage-header p {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    font-size: 1.2rem;
}
/* 确保导航栏在最高层级 */
.vintage-nav {
    background-color: rgba(91, 46, 12, 0.9);
    padding: 10px 0;
    position: relative;
    z-index: 100; /* 提高层级确保在最前面 */
}

.vintage-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
}

.vintage-nav li {
    margin: 0 15px;
}

.vintage-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.vintage-nav a:hover {
    background-color: #8b4513;
}

/* 英雄区域样式 */
.hero-section {
    display: flex;
    align-items: center;
    margin: 30px 0;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.hero-text {
    flex: 1;
    padding-right: 20px;
}

.hero-text h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #5d2e0c;
}

.hero-images {
    flex: 1;
}

.hero-images img {
    width: 100%;
    border-radius: 8px;
    border: 3px solid #8b4513;
}

/* 按钮样式 */
.vintage-btn {
    display: inline-block;
    background-color: #8b4513;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 15px;
    transition: background-color 0.3s;
}

.vintage-btn:hover {
    background-color: #5d2e0c;
}

/* 特色商品区域 */
.featured-products {
    margin: 40px 0;
}

.featured-products h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8rem;
    color: #5d2e0c;
    position: relative;
}

.featured-products h2::after {
    content: "";
    display: block;
    width: 100px;
    height: 3px;
    background-color: #8b4513;
    margin: 10px auto;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.product-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.product-images {
    height: 200px;
    overflow: hidden;
}

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

.product-card:hover .product-images img {
    transform: scale(1.1);
}

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

.product-info {
    padding: 15px;
}

.product-info h3 {
    margin-bottom: 10px;
    color: #5d2e0c;
}

.product-price {
    font-weight: bold;
    color: #8b4513;
    font-size: 1.2rem;
    margin: 10px 0;
}

.add-to-cart {
    background-color: #8b4513;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add-to-cart:hover {
    background-color: #5d2e0c;
}

/* 关于我们区域 */
.about-us {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 30px;
    border-radius: 8px;
    margin: 40px 0;
    border: 1px solid #ddd;
}

.about-us h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #5d2e0c;
}

/* 页脚样式 */
.vintage-footer {
    background-color: #5d2e0c;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

.vintage-footer p {
    margin: 5px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-section {
        flex-direction: column;
    }
    
    .hero-text {
        padding-right: 0;
        margin-bottom: 20px;
    }
    
    .vintage-nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    .vintage-nav li {
        margin: 5px 0;
    }
    /* 商品分类标签样式 */
.category-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.category-tab {
    background-color: #f5e7d5;
    border: 1px solid #8b4513;
    color: #5d2e0c;
    padding: 8px 15px;
    margin: 0 5px 10px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.category-tab:hover {
    background-color: #e8d5b9;
}

.category-tab.active {
    background-color: #8b4513;
    color: #fff;
}

/* 商品操作按钮 */
.product-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.product-actions .vintage-btn {
    padding: 5px 10px;
    font-size: 0.9rem;
}

.product-actions .add-to-cart {
    background-color: #5d2e0c;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.product-actions .add-to-cart:hover {
    background-color: #3a1c06;
}
/* 商品详情页样式 */
.breadcrumb {
    padding: 10px 0;
    color: #666;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #8b4513;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.detail-container {
    display: flex;
    flex-wrap: wrap;
    margin: 20px 0;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.product-gallery {
    flex: 1;
    min-width: 300px;
    padding-right: 30px;
}

.main-images {
    margin-bottom: 15px;
}

.main-images img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.thumbnail-images {
    display: flex;
    gap: 10px;
}

.thumbnail-images img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.thumbnail-images img:hover {
    border-color: #8b4513;
}

.product-info {
    flex: 1;
    min-width: 300px;
}

.product-info h1 {
    font-size: 1.8rem;
    color: #5d2e0c;
    margin-bottom: 15px;
}

.product-meta {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.product-price {
    font-size: 1.5rem;
    color: #8b4513;
    font-weight: bold;
    margin-right: 20px;
}

.product-rating {
    color: #666;
}

.product-description {
    margin-bottom: 20px;
    line-height: 1.8;
}

.product-specs {
    margin-bottom: 25px;
}

.product-specs table {
    width: 100%;
    border-collapse: collapse;
}

.product-specs th, .product-specs td {
    padding: 8px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.product-specs th {
    width: 80px;
    color: #666;
}

.product-actions {
    display: flex;
    align-items: center;
    margin-top: 30px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.quantity-selector button {
    width: 30px;
    height: 30px;
    background-color: #f5e7d5;
    border: 1px solid #8b4513;
    color: #5d2e0c;
    font-size: 1rem;
    cursor: pointer;
}

.quantity-selector input {
    width: 50px;
    height: 30px;
    text-align: center;
    margin: 0 5px;
    border: 1px solid #8b4513;
}

#add-to-cart-detail {
    padding: 10px 30px;
    font-size: 1rem;
}

/* 标签页样式 */
.product-tabs {
    margin: 40px 0;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.tabs-header {
    display: flex;
    border-bottom: 1px solid #ddd;
}

.tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    position: relative;
}

.tab-btn.active {
    color: #5d2e0c;
    font-weight: bold;
}

.tab-btn.active::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #8b4513;
}

.tabs-content {
    padding: 20px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* 评价样式 */
.review-item {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.review-user {
    font-weight: bold;
}

.review-date {
    color: #666;
    font-size: 0.9rem;
}

.review-rating {
    color: #ffc107;
    margin-bottom: 5px;
}

.review-comment {
    color: #333;
}

/* 相关商品 */
.related-products {
    margin: 40px 0;
}

.related-products h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8rem;
    color: #5d2e0c;
    position: relative;
}

.related-products h2::after {
    content: "";
    display: block;
    width: 100px;
    height: 3px;
    background-color: #8b4513;
    margin: 10px auto;
}
/* 购物车页面样式 */
.shopping-cart {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin: 20px 0;
}

.shopping-cart h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8rem;
    color: #5d2e0c;
    position: relative;
}

.shopping-cart h2::after {
    content: "";
    display: block;
    width: 100px;
    height: 3px;
    background-color: #8b4513;
    margin: 10px auto;
}

.cart-empty {
    text-align: center;
    padding: 50px 0;
    display: none;
}

.cart-empty p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #666;
}

.cart-items {
    margin-bottom: 30px;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.cart-item-images {
    width: 80px;
    margin-right: 20px;
}

.cart-item-images img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e8d5b9;
    box-shadow: 0 2px 8px #0001;
}

.cart-item-info {
    flex: 2;
}

.cart-item-info h3 {
    margin-bottom: 5px;
    color: #5d2e0c;
}

.cart-item-price {
    color: #666;
    font-size: 0.9rem;
}

.cart-item-quantity {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;

}

.quantity-btn {
    width: 30px;
    height: 30px;
    background-color: #f5e7d5;
    border: 1px solid #8b4513;
    color: #5d2e0c;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 4px;
}

.quantity-btn:hover {
    background-color: #e8d5b9;
}

.quantity {
    margin: 0 10px;
    min-width: 20px;
    text-align: center;
}

.cart-item-total {
    flex: 1;
    text-align: center;
    font-weight: bold;
    color: #8b4513;
}

.cart-item-remove {
    flex: 0 0 50px;
    text-align: center;
}

.remove-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 1.5rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    line-height: 30px;
    border-radius: 50%;
    transition: all 0.3s;
}

.remove-btn:hover {
    color: #ff3333;
    background-color: #f5e7d5;
}

.cart-summary {
    background: #fffbe6;
    border-radius: 14px;
    border: 2px dashed #e8d5b9;
    box-shadow: 0 2px 12px #0001;
    padding: 18px 20px 18px 20px;
    margin-bottom: 24px;
    position: relative;
}

.cart-summary::before {
    content: '✿';
    position: absolute;
    left: 12px;
    top: 8px;
    color: #b8860b;
    font-size: 1.3rem;
    opacity: 0.7;
}

.cart-summary::after {
    content: '✿';
    position: absolute;
    right: 12px;
    bottom: 8px;
    color: #b8860b;
    font-size: 1.3rem;
    opacity: 0.7;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #ddd;
}

.summary-row.total {
    font-size: 1.2rem;
    font-weight: bold;
    color: #5d2e0c;
    border-bottom: none;
    margin-top: 20px;
    margin-bottom: 20px;
}

#checkout-btn {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
}

/* 个性分割线与装饰 */
.section-divider {
    width: 80%;
    margin: 32px auto 24px auto;
    border: none;
    border-top: 3px double #8b4513;
    position: relative;
}

.section-divider::after {
    content: '✦✦✦';
    position: absolute;
    left: 50%;
    top: -18px;
    transform: translateX(-50%);
    color: #b8860b;
    font-size: 1.2rem;
    background: #fffbe6;
    padding: 0 12px;
    letter-spacing: 0.3em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .cart-item {
        flex-wrap: wrap;
        position: relative;
        padding: 15px 0 15px 80px;
    }
    
    .cart-item-images {
        position: absolute;
        left: 0;
        top: 15px;
        width: 70px;
        margin-right: 0;
    }
    
    .cart-item-info {
        flex: 1 0 100%;
        margin-bottom: 10px;
    }
    
    .cart-item-quantity,
    .cart-item-total {
        flex: 1;
    }
    
    .cart-item-remove {
        position: absolute;
        right: 0;
        top: 15px;
    }
    
    .cart-summary {
        max-width: 100%;
    }
}
/* 注册页面样式 */
.register-form {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin: 20px auto;
    max-width: 600px;
}

.register-form h2 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.8rem;
    color: #5d2e0c;
    position: relative;
}

.register-form h2::after {
    content: "";
    display: block;
    width: 100px;
    height: 3px;
    background-color: #8b4513;
    margin: 10px auto 20px;
}

.register-form p {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #5d2e0c;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="tel"]:focus,
.form-group textarea:focus {
    border-color: #8b4513;
    outline: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.error-message {
    color: #ff3333;
    font-size: 0.8rem;
    margin-top: 5px;
    height: 18px;
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: normal;
}

.checkbox-group a {
    color: #8b4513;
    text-decoration: none;
}

.checkbox-group a:hover {
    text-decoration: underline;
}

#registration-form button[type="submit"] {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
    margin-top: 20px;
}

.login-link {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.login-link a {
    color: #8b4513;
    text-decoration: none;
}

.login-link a:hover {
    text-decoration: underline;
}
/* 已登录信息样式 */
.already-logged-in {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin: 20px auto;
    max-width: 600px;
    text-align: center;
}

.already-logged-in h2 {
    color: #5d2e0c;
    margin-bottom: 20px;
}

.user-info {
    text-align: left;
    margin: 20px 0;
    padding: 20px;
    background-color: #f5e7d5;
    border-radius: 8px;
}

.user-info p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.user-info strong {
    color: #5d2e0c;
    display: inline-block;
    width: 80px;
}

#logout-btn {
    padding: 10px 30px;
    margin-top: 20px;
}

/* 登录页面样式调整 */
.login-form {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin: 20px auto;
    max-width: 600px;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.8rem;
    color: #5d2e0c;
    position: relative;
}

.login-form h2::after {
    content: "";
    display: block;
    width: 100px;
    height: 3px;
    background-color: #8b4513;
    margin: 10px auto 20px;
}

.login-form p {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

.register-link {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.register-link a {
    color: #8b4513;
    text-decoration: none;
}

.register-link a:hover {
    text-decoration: underline;
}
/* 音乐播放器样式 */
.music-player {
    display: flex;
    align-items: center;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

#music-toggle {
    padding: 8px 15px;
    font-size: 0.9rem;
    background-color: rgba(139, 69, 19, 0.8);
    border: 1px solid #5d2e0c;
    display: flex;
    align-items: center;
    gap: 5px;
}

#music-toggle .icon {
    font-size: 1.1rem;
}

/* 音频波纹动画 */
.audio-wave {
    display: flex;
    align-items: center;
    height: 32px;
    gap: 3px;
    margin-left: 10px;
}
.audio-wave span {
    width: 3px;
    border-radius: 3px;
    background: linear-gradient(to top, #8b4513, #d4a847);
    animation: wave 1.2s infinite ease-in-out;
    transform-origin: center;
}
.audio-wave span:nth-child(1) { animation-delay: 0s;     height: 8px; }
.audio-wave span:nth-child(2) { animation-delay: 0.15s;  height: 14px; }
.audio-wave span:nth-child(3) { animation-delay: 0.3s;   height: 22px; }
.audio-wave span:nth-child(4) { animation-delay: 0.45s;  height: 28px; }
.audio-wave span:nth-child(5) { animation-delay: 0.6s;   height: 32px; }
.audio-wave span:nth-child(6) { animation-delay: 0.45s;  height: 28px; }
.audio-wave span:nth-child(7) { animation-delay: 0.3s;   height: 22px; }
.audio-wave span:nth-child(8) { animation-delay: 0.15s;  height: 14px; }
.audio-wave span:nth-child(9) { animation-delay: 0s;     height: 8px; }

@keyframes wave {
    0%, 100% { transform: scaleY(1); opacity: 0.9; }
    50%       { transform: scaleY(0.2); opacity: 0.4; }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .music-player {
        bottom: 10px;
        right: 10px;
    }
    
    #music-toggle .text {
        display: none;
    }
}
/* 所有页面都有的播放器（隐藏按钮） */
.music-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

/* 首页特有的控制按钮样式 */
#music-control-container {
    display: none; /* 默认隐藏所有页面的控制按钮 */
}

.index-page #music-control-container {
    display: block; /* 只在首页显示 */
}

/* 其他原有音乐播放器样式保持不变... */
}