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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: #f5f5f7;
    color: #333;
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

.container {
    width: 1200px;
    max-width: 92%;
    margin: 0 auto;
}

/* ===== 顶部公告栏 ===== */
.top-bar {
    background: #2c2c2c;
    color: #fff;
    font-size: 13px;
    text-align: center;
    padding: 8px 0;
}

/* ===== 导航栏 ===== */
.header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    gap: 30px;
}

.logo {
    font-size: 26px;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: 1px;
    white-space: nowrap;
}

.logo span {
    color: #e63946;
}

.search-box {
    flex: 1;
    max-width: 560px;
    display: flex;
    border: 2px solid #e63946;
    border-radius: 4px;
    overflow: hidden;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 16px;
    font-size: 14px;
}

.search-box button {
    background: #e63946;
    color: #fff;
    border: none;
    padding: 0 28px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-box button:hover { background: #d12838; }

.nav-icons {
    display: flex;
    gap: 24px;
}

.icon-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    color: #666;
    position: relative;
    transition: color 0.2s;
}

.icon-link:hover { color: #e63946; }

.cart-count {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #e63946;
    color: #fff;
    font-size: 11px;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
    padding: 0 5px;
    font-style: normal;
}

/* ===== 分类菜单 ===== */
.categories {
    display: flex;
    gap: 8px;
    padding: 0 0 14px;
    flex-wrap: wrap;
}

.category-item {
    padding: 6px 18px;
    font-size: 14px;
    color: #555;
    border-radius: 20px;
    transition: all 0.2s;
}

.category-item:hover { color: #e63946; }

.category-item.active {
    background: #e63946;
    color: #fff;
}

/* ===== 轮播图 ===== */
.banner {
    position: relative;
    height: 360px;
    overflow: hidden;
    margin-bottom: 30px;
}

.banner-slides {
    display: flex;
    height: 100%;
    transition: transform 0.6s ease;
}

.slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
}

.slide-content h2 {
    font-size: 40px;
    margin-bottom: 12px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.slide-content p {
    font-size: 18px;
    margin-bottom: 24px;
    opacity: 0.95;
}

.btn {
    display: inline-block;
    background: #fff;
    color: #e63946;
    padding: 12px 36px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.banner-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    transition: background 0.2s;
}

.banner-btn:hover { background: rgba(0, 0, 0, 0.6); }
.banner-btn.prev { left: 20px; }
.banner-btn.next { right: 20px; }

.banner-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.banner-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.2s;
}

.banner-dots span.active { background: #fff; }

/* ===== 特色服务 ===== */
.features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 36px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.feature-item h4 {
    font-size: 15px;
    margin-bottom: 2px;
}

.feature-item p {
    font-size: 12px;
    color: #999;
}

/* ===== 区块标题 ===== */
.section-title {
    text-align: center;
    margin-bottom: 28px;
}

.section-title h2 {
    font-size: 30px;
    color: #1a1a1a;
    position: relative;
    display: inline-block;
    padding-bottom: 12px;
}

.section-title h2::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: #e63946;
    border-radius: 2px;
}

.section-title p {
    color: #999;
    margin-top: 8px;
    font-size: 14px;
}

/* ===== 商品列表 ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.product-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: #f9f9f9;
    transition: transform 0.4s;
}

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

.product-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e63946;
    color: #fff;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 4px;
    z-index: 2;
}

.product-tag.hot { background: #ff6b35; }
.product-tag.new { background: #06b6d4; }

.product-info {
    padding: 14px 16px 18px;
}

.product-name {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-desc {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #ff9500;
    margin-bottom: 10px;
}

.product-rating .stars { color: #ffc107; letter-spacing: 1px; }
.product-rating .sold { color: #999; margin-left: 6px; }

.product-price {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.price-now {
    color: #e63946;
    font-size: 22px;
    font-weight: 700;
    display: block;
    line-height: 1.3;
}

.price-old {
    color: #bbb;
    font-size: 13px;
    text-decoration: line-through;
    display: block;
    margin-top: 2px;
}

.add-cart-btn {
    background: #e63946;
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.add-cart-btn:hover {
    background: #d12838;
    transform: scale(1.05);
}

.no-result {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 0;
    color: #999;
    font-size: 16px;
}

/* ===== 购物车侧边栏 ===== */
.cart-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 200;
}

.cart-overlay.open { opacity: 1; visibility: visible; }

.cart-sidebar {
    position: fixed;
    top: 0; right: 0;
    width: 380px;
    max-width: 90%;
    height: 100%;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.3s;
    z-index: 201;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open { transform: translateX(0); }

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.cart-header h3 { font-size: 18px; }

.close-cart {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.empty-cart {
    text-align: center;
    color: #999;
    padding: 60px 0;
    font-size: 14px;
}

.cart-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cart-item-name {
    font-size: 13px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-item-price {
    color: #e63946;
    font-weight: 600;
    font-size: 14px;
}

.cart-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-qty button {
    width: 24px;
    height: 24px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1;
}

.cart-qty button:hover { border-color: #e63946; color: #e63946; }

.cart-qty span { font-size: 14px; min-width: 20px; text-align: center; }

.cart-remove {
    color: #999;
    font-size: 12px;
    cursor: pointer;
    margin-left: auto;
}

.cart-remove:hover { color: #e63946; }

.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 14px;
    font-size: 15px;
}

.cart-total strong {
    color: #e63946;
    font-size: 22px;
}

.checkout-btn {
    width: 100%;
    background: #e63946;
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.checkout-btn:hover { background: #d12838; }

/* ===== 商品详情弹窗 ===== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
    background: #fff;
    border-radius: 12px;
    width: 720px;
    max-width: 92%;
    max-height: 88vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal-overlay.open .modal { transform: scale(1); }

.modal-close {
    position: absolute;
    top: 14px; right: 14px;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border: none;
    width: 34px; height: 34px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    z-index: 2;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 24px;
}

.modal-img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    border-radius: 8px;
}

.modal-info h2 {
    font-size: 22px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.modal-desc {
    color: #666;
    font-size: 14px;
    margin-bottom: 16px;
}

.modal-price {
    background: #fff8f8;
    padding: 14px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.modal-price .now {
    color: #e63946;
    font-size: 28px;
    font-weight: 700;
    display: block;
    line-height: 1.3;
}

.modal-price .old {
    color: #bbb;
    text-decoration: line-through;
    margin-top: 4px;
    font-size: 14px;
    display: block;
}

.modal-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 16px;
    line-height: 2;
}

.modal-meta span { color: #333; margin-left: 6px; }

.modal-add-cart {
    background: #e63946;
    color: #fff;
    border: none;
    padding: 14px 30px;
    border-radius: 30px;
    font-size: 15px;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
}

.modal-add-cart:hover { background: #d12838; }

/* ===== 页脚 ===== */
.footer {
    background: #1a1a1a;
    color: #aaa;
    padding: 50px 0 0;
    margin-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding-bottom: 36px;
}

.footer-col h4 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    color: #aaa;
    font-size: 13px;
    margin-bottom: 10px;
    transition: color 0.2s;
}

.footer-col a:hover { color: #e63946; }

.footer-bottom {
    border-top: 1px solid #333;
    text-align: center;
    padding: 20px 0;
    font-size: 13px;
    color: #666;
}

/* ===== 提示弹窗 ===== */
.toast {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 14px;
    z-index: 999;
    transition: transform 0.3s;
}

.toast.show { transform: translateX(-50%) translateY(0); }

/* ===== Cookie 同意横幅（GDPR） ===== */
.cookie-banner {
    position: fixed;
    bottom: 0; left: 0;
    width: 100%;
    background: #1a1a1a;
    color: #eee;
    padding: 18px 0;
    z-index: 500;
    transform: translateY(100%);
    transition: transform 0.4s;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.cookie-banner.show { transform: translateY(0); }

.cookie-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1;
    min-width: 280px;
    font-size: 13px;
    line-height: 1.6;
}

.cookie-text a { color: #ff9500; text-decoration: underline; }

.cookie-btns { display: flex; gap: 10px; }

.cookie-btns button {
    border: none;
    padding: 10px 22px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.cookie-btns .accept {
    background: #e63946;
    color: #fff;
}

.cookie-btns .accept:hover { background: #d12838; }

.cookie-btns .decline {
    background: transparent;
    color: #fff;
    border: 1px solid #666;
}

.cookie-btns .decline:hover { border-color: #fff; }

/* ===== 合规页面通用样式 ===== */
.page-hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%);
    color: #fff;
    padding: 60px 0 50px;
    text-align: center;
    margin-bottom: 40px;
}

.page-hero h1 {
    font-size: 36px;
    margin-bottom: 8px;
}

.page-hero p {
    color: #bbb;
    font-size: 14px;
}

.page-body {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 60px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.page-body h2 {
    font-size: 22px;
    color: #1a1a1a;
    margin: 30px 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.page-body h2:first-child { margin-top: 0; }

.page-body h3 {
    font-size: 17px;
    color: #333;
    margin: 20px 0 10px;
}

.page-body p,
.page-body li {
    color: #555;
    line-height: 1.85;
    margin-bottom: 12px;
    font-size: 14px;
}

.page-body ul,
.page-body ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

.page-body a { color: #e63946; }

.page-body strong { color: #1a1a1a; }

.page-body .meta {
    background: #f9f9f9;
    border-left: 4px solid #e63946;
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    color: #444;
}

.page-body .updated {
    color: #999;
    font-size: 13px;
    margin-bottom: 24px;
}

/* ===== 联系页 ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.contact-card {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 28px;
}

.contact-card h3 {
    color: #e63946;
    font-size: 18px;
    margin-bottom: 16px;
}

.contact-card p {
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
    line-height: 1.9;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 14px;
    font-family: inherit;
    outline: none;
    transition: border 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus { border-color: #e63946; }

.contact-form textarea { min-height: 130px; resize: vertical; }

.contact-form button {
    background: #e63946;
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.contact-form button:hover { background: #d12838; }

.map-embed {
    margin-top: 20px;
    border-radius: 12px;
    overflow: hidden;
    background: #eee;
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 14px;
    background-image: linear-gradient(135deg, #e8eef5 0%, #d6e4f0 100%);
}

/* ===== 页脚链接列加强 ===== */
.footer-col a.legal-link {
    color: #ddd;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); }
    .features { grid-template-columns: repeat(2, 1fr); }
    .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav { flex-wrap: wrap; gap: 14px; }
    .search-box { order: 3; max-width: 100%; flex-basis: 100%; }
    .products-grid { grid-template-columns: repeat(2, 1fr); }
    .slide-content h2 { font-size: 26px; }
    .slide-content p { font-size: 14px; }
    .modal-body { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .banner { height: 240px; }
}

@media (max-width: 480px) {
    .products-grid { grid-template-columns: 1fr; }
    .features { grid-template-columns: 1fr; }
}
