/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}
ul { list-style: none; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: transparent; }

/* 通用容器 */
.container {
    width: 92%;
    max-width: 1280px;
    margin: 0 auto;
}

/* 头部导航 */
header {
    background: #1a1a1a;
    color: #fff;
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 999;
}
.header-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-menu {
    display: flex;
    gap: 28px;
}
.nav-menu a {
    font-size: 15px;
    opacity: 0.85;
    transition: 0.2s;
}
.nav-menu a:hover { opacity: 1; color: #ffb700; }
.header-ops {
    display: flex;
    gap: 20px;
}
.icon-btn {
    color: #fff;
    font-size: 18px;
    position: relative;
}
.cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #ff4444;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    font-size: 10px;
    display: grid;
    place-items: center;
}

/* Banner轮播 */
.banner-box {
    width: 100%;
    height: 480px;
    overflow: hidden;
    position: relative;
}
.banner-track {
    display: flex;
    height: 100%;
    transition: transform 0.6s ease;
}
.banner-item {
    min-width: 100%;
    height: 100%;
}
.banner-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    background: rgba(255,255,255,0.3);
    color: #000;
    font-size: 20px;
    border-radius: 50%;
}
.banner-prev { left: 20px; }
.banner-next { right: 20px; }
.banner-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}
.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
}
.dot.active { background: #fff; }

/* 商品卡片通用 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 30px;
    padding: 60px 0;
}
.product-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: 0.3s;
}
.product-card:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}
.card-img {
    height: 220px;
    overflow: hidden;
}
.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.4s;
}
.product-card:hover .card-img img { transform: scale(1.06); }
.card-body {
    padding: 16px;
}
.card-title {
    font-size: 15px;
    margin-bottom: 8px;
    color: #222;
}
.card-price {
    font-size: 18px;
    color: #d00;
    font-weight: bold;
    margin-bottom: 12px;
}
.card-actions {
    display: flex;
    gap: 8px;
}
.btn {
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 14px;
}
.btn-cart {
    background: #1a1a1a;
    color: #fff;
    flex: 1;
}
.btn-fav {
    border: 1px solid #ccc;
    width: 38px;
    display: grid;
    place-items: center;
}
.btn-fav.active { color: #ff4444; }

/* 分页组件 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
}
.page-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    display: grid;
    place-items: center;
    border-radius: 4px;
}
.page-btn.active {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

/* 详情页布局 */
.detail-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    padding: 60px 0;
}
.detail-img-box {
    height: 460px;
}
.detail-info h2 {
    font-size: 26px;
    margin-bottom: 14px;
}
.detail-price {
    font-size: 28px;
    color: #d00;
    margin: 16px 0;
}
.desc-block {
    margin: 24px 0;
    line-height: 1.7;
    color: #444;
}
.quantity-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}
.qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
}
.qty-input {
    width: 60px;
    text-align: center;
    padding: 6px;
    border: 1px solid #ddd;
}
.detail-btns {
    display: flex;
    gap: 14px;
    margin-top: 30px;
}
.btn-add-cart {
    padding: 12px 36px;
    background: #1a1a1a;
    color: #fff;
    font-size: 16px;
}
.btn-wish {
    padding: 12px 24px;
    border: 1px solid #222;
}

/* 页面通用区块 */
.page-section {
    padding: 70px 0;
}
.section-title {
    font-size: 32px;
    text-align: center;
    margin-bottom: 40px;
    color: #1a1a1a;
}
.text-block {
    line-height: 1.8;
    color: #333;
    font-size: 16px;
}
.contact-info li {
    margin: 16px 0;
    font-size: 16px;
}

/* 页脚 */
footer {
    background: #121212;
    color: #bbb;
    padding: 60px 0 30px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col h4 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 17px;
}
.footer-links li {
    margin: 10px 0;
}
.footer-links a:hover { color: #ffb700; }
.payment-img {
    width: 180px;
    margin-top: 12px;
}
.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #282828;
}

/* 弹窗提示 */
.toast {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: #222;
    color: #fff;
    padding: 12px 22px;
    border-radius: 6px;
    z-index: 9999;
    opacity: 0;
    transition: 0.3s;
    pointer-events: none;
}
.toast.show { opacity: 1; }