* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: "Microsoft YaHei", "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }

img { max-width: 100%; display: block; }

/* ========== 顶部导航 ========== */
.top-bar {
    background: #1a1a1a;
    color: #ccc;
    font-size: 12px;
    padding: 6px 0;
}
.top-bar .container { display: flex; justify-content: space-between; }
.top-bar a { margin-left: 15px; color: #ccc; transition: color .2s; }
.top-bar a:hover { color: #c8a165; }

.navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}
.logo {
    font-size: 22px;
    font-weight: bold;
    color: #c8a165;
    letter-spacing: 2px;
}
.logo small {
    font-size: 12px;
    color: #888;
    display: block;
    font-weight: normal;
    letter-spacing: 1px;
}
.nav-links { display: flex; gap: 30px; list-style: none; }
.nav-links a {
    font-size: 15px;
    color: #333;
    padding: 8px 0;
    position: relative;
    transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: #c8a165; }
.nav-links a.active::after,
.nav-links a:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #c8a165;
}

.search-box {
    display: flex;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}
.search-box input {
    border: none;
    padding: 8px 12px;
    width: 200px;
    outline: none;
    font-size: 14px;
}
.search-box button {
    background: #c8a165;
    color: #fff;
    border: none;
    padding: 0 16px;
    cursor: pointer;
    font-size: 14px;
}
.cart-btn {
    background: #c8a165;
    color: #fff;
    padding: 8px 18px;
    border-radius: 4px;
    font-size: 14px;
    transition: background .2s;
}
.cart-btn:hover { background: #b8925a; }
.cart-count {
    background: #e74c3c;
    color: #fff;
    border-radius: 50%;
    padding: 2px 7px;
    font-size: 11px;
    margin-left: 5px;
    font-weight: bold;
}

/* ========== 容器 ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== Banner ========== */
.banner {
    background: linear-gradient(135deg, #2c1810 0%, #c8a165 100%);
    padding: 80px 0;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,.1) 0%, transparent 70%);
    border-radius: 50%;
}
.banner h1 {
    font-size: 42px;
    margin-bottom: 15px;
    letter-spacing: 4px;
}
.banner p {
    font-size: 18px;
    opacity: .9;
    margin-bottom: 30px;
}
.banner .btn {
    display: inline-block;
    background: #fff;
    color: #c8a165;
    padding: 12px 36px;
    border-radius: 4px;
    font-weight: bold;
    transition: transform .2s, box-shadow .2s;
}
.banner .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,.2);
}

/* ========== 通用区块 ========== */
.section {
    padding: 50px 0;
}
.section-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 10px;
    color: #2c1810;
}
.section-subtitle {
    text-align: center;
    color: #888;
    margin-bottom: 40px;
    font-size: 14px;
}

/* ========== 分类导航 ========== */
.category-nav {
    background: #fff;
    padding: 25px 0;
    border-bottom: 1px solid #eee;
}
.category-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}
.category-item {
    text-align: center;
    padding: 20px 10px;
    border-radius: 8px;
    transition: all .3s;
    cursor: pointer;
}
.category-item:hover {
    background: #fdf6ec;
    transform: translateY(-3px);
}
.category-icon {
    font-size: 36px;
    margin-bottom: 8px;
}
.category-name {
    font-size: 14px;
    color: #333;
}

/* ========== 商品网格 ========== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}
.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: transform .3s, box-shadow .3s;
    cursor: pointer;
    position: relative;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,.1);
}
.product-image {
    width: 100%;
    height: 240px;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    color: #c8a165;
    position: relative;
    overflow: hidden;
}
.product-image img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform .3s;
}
.product-image img:not([src]), .product-image img[src=""], .product-image img.error {
    display: none;
}
.product-card:hover .product-image {
    background: #fdf6ec;
}
.product-card:hover .product-image img {
    transform: scale(1.05);
}
.product-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 3px;
}
.product-info {
    padding: 15px;
}
.product-name {
    font-size: 15px;
    color: #333;
    margin-bottom: 8px;
    height: 42px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.product-desc {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}
.product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.price-current {
    color: #e74c3c;
    font-size: 20px;
    font-weight: bold;
}
.price-original {
    color: #bbb;
    font-size: 13px;
    text-decoration: line-through;
}

/* ========== 商品列表页 ========== */
.page-header {
    background: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}
.breadcrumb {
    font-size: 13px;
    color: #888;
}
.breadcrumb a:hover { color: #c8a165; }
.breadcrumb span { margin: 0 8px; color: #ccc; }
.filter-bar {
    background: #fff;
    padding: 15px 0;
    margin-top: 15px;
    border-radius: 4px;
}
.filter-bar .container {
    display: flex;
    align-items: center;
    gap: 20px;
}
.filter-label {
    font-size: 14px;
    color: #666;
}
.filter-options { display: flex; gap: 15px; }
.filter-btn {
    padding: 6px 14px;
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
}
.filter-btn:hover, .filter-btn.active {
    border-color: #c8a165;
    color: #c8a165;
}

/* ========== 商品详情页 ========== */
.product-detail {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}
.detail-image {
    height: 450px;
    background: #f9f9f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 160px;
    color: #c8a165;
}
.detail-info h1 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #2c1810;
}
.detail-price {
    background: #fdf6ec;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}
.detail-price .price-current {
    font-size: 32px;
}
.detail-price .price-original {
    font-size: 16px;
    margin-left: 10px;
}
.detail-row {
    display: flex;
    margin-bottom: 15px;
    font-size: 14px;
}
.detail-row .label {
    width: 80px;
    color: #888;
    flex-shrink: 0;
}
.detail-row .value {
    color: #333;
}
.detail-desc {
    margin: 20px 0;
}
.detail-desc h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: #2c1810;
    border-left: 3px solid #c8a165;
    padding-left: 10px;
}
.detail-desc p {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.8;
}
.quantity-select {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 20px 0;
}
.quantity-select button {
    width: 36px;
    height: 36px;
    border: 1px solid #e0e0e0;
    background: #f9f9f9;
    font-size: 18px;
    cursor: pointer;
}
.quantity-select input {
    width: 60px;
    height: 36px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    border-left: none;
    border-right: none;
    font-size: 14px;
}
.btn-add-cart, .btn-buy-now {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
    font-weight: bold;
    transition: all .2s;
}
.btn-add-cart {
    background: #fff;
    border: 1px solid #c8a165;
    color: #c8a165;
    margin-right: 15px;
}
.btn-add-cart:hover { background: #fdf6ec; }
.btn-buy-now {
    background: #c8a165;
    color: #fff;
}
.btn-buy-now:hover { background: #b8925a; }

/* ========== 购物车 ========== */
.cart-table {
    width: 100%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 20px;
}
.cart-header, .cart-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 0.5fr;
    gap: 15px;
    padding: 15px 20px;
    align-items: center;
}
.cart-header {
    background: #f9f9f9;
    font-size: 14px;
    color: #666;
    font-weight: bold;
}
.cart-row {
    border-top: 1px solid #eee;
    font-size: 14px;
}
.cart-item-info {
    display: flex;
    align-items: center;
    gap: 15px;
}
.cart-item-img {
    width: 80px;
    height: 80px;
    background: #f9f9f9;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #c8a165;
}
.cart-item-name {
    color: #333;
}
.cart-quantity {
    display: flex;
    align-items: center;
}
.cart-quantity button {
    width: 30px;
    height: 30px;
    border: 1px solid #e0e0e0;
    background: #f9f9f9;
    cursor: pointer;
}
.cart-quantity input {
    width: 50px;
    height: 30px;
    text-align: center;
    border: 1px solid #e0e0e0;
    border-left: none;
    border-right: none;
}
.cart-remove {
    color: #e74c3c;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 14px;
}
.cart-summary {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    margin-top: 20px;
}
.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 14px;
    color: #666;
}
.cart-summary-row.total {
    border-top: 1px solid #eee;
    margin-top: 10px;
    padding-top: 15px;
    font-size: 18px;
    color: #e74c3c;
    font-weight: bold;
}
.btn-checkout {
    display: block;
    width: 100%;
    background: #c8a165;
    color: #fff;
    text-align: center;
    padding: 14px;
    border-radius: 4px;
    margin-top: 20px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background .2s;
}
.btn-checkout:hover { background: #b8925a; }
.empty-cart {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}
.empty-cart-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

/* ========== 结算页 ========== */
.checkout-form {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    margin-top: 20px;
}
.checkout-form h3 {
    font-size: 16px;
    margin-bottom: 20px;
    color: #2c1810;
    border-left: 3px solid #c8a165;
    padding-left: 10px;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 6px;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
}
.form-group input:focus, .form-group textarea:focus {
    border-color: #c8a165;
}
.payment-methods {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}
.payment-option {
    flex: 1;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
}
.payment-option.active {
    border-color: #c8a165;
    background: #fdf6ec;
}
.payment-icon {
    font-size: 32px;
    margin-bottom: 5px;
}
.payment-name {
    font-size: 13px;
    color: #666;
}
.order-items {
    background: #f9f9f9;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}
.order-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    color: #666;
}
.order-item.total {
    border-top: 1px solid #ddd;
    margin-top: 10px;
    padding-top: 12px;
    font-weight: bold;
    color: #e74c3c;
    font-size: 16px;
}

/* ========== 成功页 ========== */
.success-page {
    text-align: center;
    padding: 80px 20px;
}
.success-icon {
    font-size: 100px;
    color: #27ae60;
    margin-bottom: 20px;
}
.success-page h1 {
    font-size: 32px;
    color: #2c1810;
    margin-bottom: 15px;
}
.success-page p {
    color: #888;
    margin-bottom: 30px;
}
.success-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #c8a165;
    color: #fff;
    border-radius: 4px;
    margin: 0 8px;
    font-weight: bold;
    transition: background .2s;
    border: none;
    cursor: pointer;
    font-size: 15px;
}
.success-btn.secondary {
    background: #fff;
    color: #c8a165;
    border: 1px solid #c8a165;
}
.success-btn:hover { background: #b8925a; }
.success-btn.secondary:hover { background: #fdf6ec; }

/* ========== 页脚 ========== */
.footer {
    background: #1a1a1a;
    color: #aaa;
    padding: 50px 0 20px;
    margin-top: 60px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}
.footer-col h4 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 15px;
}
.footer-col p {
    font-size: 13px;
    line-height: 1.8;
    margin-bottom: 6px;
}
.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
    font-size: 12px;
    color: #666;
}

/* ========== 响应式 ========== */
@media (max-width: 992px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); }
    .product-detail { grid-template-columns: 1fr; }
    .category-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .products-grid { grid-template-columns: repeat(2, 1fr); }
    .cart-header { display: none; }
    .cart-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .cart-row > div:not(.cart-item-info) {
        padding-left: 95px;
    }
    .form-row { grid-template-columns: 1fr; }
    .banner h1 { font-size: 28px; }
}

/* ========== Toast 提示 ========== */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(0,0,0,.85);
    color: #fff;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 1000;
    opacity: 0;
    transition: all .3s;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
