/* 响应式设计 - 移动优先 */
:root {
    --primary: #5c6bc0;
    --primary-dark: #3f51b5;
    --primary-light: #7986cb;
    --accent: #ff7043;
    --text: #2c3e50;
    --text-light: #666;
    --text-lighter: #999;
    --border: #e8e8e8;
    --bg: #f5f5f5;
    --white: #ffffff;
    --success: #66bb6a;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --radius: 10px;
}

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

html {
    font-size: 14px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

html {
    overflow-x: hidden;
}

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

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

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

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

/* 顶部导航栏 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--white);
    box-shadow: var(--shadow);
    z-index: 100;
    overflow: visible;
    overflow-x: clip;
}

.header .container {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 20px;
    overflow: visible;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--text);
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    flex-shrink: 0;
}

.logo i {
    font-size: 26px;
}

.search-bar {
    flex: 1;
    min-width: 0;
    max-width: 500px;
    display: flex;
    height: 40px;
    background: var(--bg);
    border-radius: 20px;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.search-bar:focus-within {
    border-color: var(--primary);
    background: var(--white);
}

.search-bar input {
    flex: 1;
    border: none;
    background: none;
    padding: 0 20px;
    font-size: 14px;
    outline: none;
}

.search-bar input::placeholder {
    color: var(--text-lighter);
}

.search-btn {
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 16px;
    flex-shrink: 0;
}

.search-btn:hover {
    color: var(--primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.header-login-btn {
    flex-shrink: 0;
}

.header-icon {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--text);
    border-radius: 50%;
    transition: all 0.2s;
    flex-shrink: 0;
}

.header-icon:hover {
    background: var(--bg);
    color: var(--primary);
}

.badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--accent);
    color: white;
    font-size: 10px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* PC端导航链接 */
.nav-links {
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-link {
    padding: 8px 16px;
    font-size: 14px;
    color: var(--text-light);
    border-radius: 20px;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-link:hover {
    background: var(--bg);
    color: var(--primary);
}

.nav-link.active {
    color: var(--primary);
    font-weight: 500;
}

/* 侧边菜单 */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.side-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background: var(--white);
    z-index: 201;
    transition: left 0.3s;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.side-menu.active {
    left: 0;
}

.menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.menu-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 600;
}

.menu-logo i {
    font-size: 26px;
}

.close-menu {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    border-radius: 50%;
}

.close-menu:hover {
    background: rgba(255,255,255,0.2);
}

.menu-user {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 25px 20px;
    border-bottom: 1px solid var(--border);
}

.user-avatar {
    width: 56px;
    height: 56px;
    background: var(--bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: var(--text-lighter);
}

.user-actions {
    display: flex;
    gap: 10px;
}

.btn-login, .btn-register {
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
}

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

.btn-login:hover {
    background: var(--primary-dark);
}

.btn-register {
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-register:hover {
    background: rgba(92, 107, 192, 0.1);
}

.menu-section {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.menu-section h4 {
    padding: 0 20px 12px;
    font-size: 13px;
    color: var(--text-lighter);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.menu-list {
    list-style: none;
}

.menu-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 15px;
}

.menu-list li:hover {
    background: var(--bg);
    color: var(--primary);
}

.menu-list li i {
    width: 22px;
    text-align: center;
    font-size: 18px;
}

.menu-footer {
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid var(--border);
}

.trust-badges {
    display: flex;
    justify-content: space-around;
}

.trust-badges span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-lighter);
}

.trust-badges i {
    color: var(--success);
    font-size: 16px;
}

/* 轮播图 */
.banner-section {
    margin-top: 75px;
    margin-bottom: 20px;
    padding: 0 24px;
}

.carousel-container {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-slide {
    min-width: 100%;
    position: relative;
    cursor: pointer;
}

.carousel-slide img {
    width: 100%;
    height: auto;
    display: block;
}

.carousel-slide .slide-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 25px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
}

.carousel-slide .slide-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 6px;
}

.carousel-slide .slide-desc {
    font-size: 14px;
    opacity: 0.9;
}

.carousel-dots {
    position: absolute;
    bottom: 15px;
    right: 20px;
    display: flex;
    gap: 8px;
}

.carousel-dot {
    width: 24px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-dot.active {
    background: white;
}

/* 快捷入口 */
.quick-entry {
    margin-bottom: 20px;
    padding: 0 24px;
}

.entry-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    background: var(--white);
    padding: 25px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.entry-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.entry-item:hover {
    background: var(--bg);
    transform: translateY(-2px);
}

.entry-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 26px;
    transition: transform 0.2s;
}

.entry-item:hover .entry-icon {
    transform: scale(1.1);
}

.entry-item span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}

/* 平台保障 */
.trust-section {
    margin-bottom: 20px;
    padding: 0 24px;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    background: var(--white);
    padding: 25px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
}

.trust-item i {
    font-size: 28px;
    color: var(--primary);
    flex-shrink: 0;
}

.trust-item div {
    min-width: 0;
}

.trust-item h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.trust-item p {
    font-size: 12px;
    color: var(--text-lighter);
}

/* 区块通用样式 */
.section-block {
    margin-bottom: 20px;
    padding: 0 24px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--accent);
    font-size: 22px;
}

.section-title h2 {
    font-size: 20px;
    font-weight: 600;
}

.countdown {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-lighter);
}

.countdown .time {
    background: var(--text);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    min-width: 32px;
    text-align: center;
}

.view-all {
    font-size: 14px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 4px;
}

.view-all:hover {
    color: var(--primary);
}

.view-all i {
    font-size: 12px;
}

/* 限时特惠 */
.promo-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.promo-scroll::-webkit-scrollbar {
    display: none;
}

.promo-track {
    display: flex;
    gap: 15px;
    padding-bottom: 5px;
}

.promo-card {
    min-width: 180px;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    flex-shrink: 0;
    transition: all 0.3s;
    cursor: pointer;
}

.promo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.promo-card .promo-img {
    height: 130px;
    overflow: hidden;
    position: relative;
}

.promo-card .promo-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.promo-card .promo-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.promo-card .promo-info {
    padding: 15px;
}

.promo-card .promo-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.promo-card .promo-price {
    color: var(--accent);
    font-size: 20px;
    font-weight: 600;
}

.promo-card .promo-price .symbol {
    font-size: 13px;
}

/* 热门商品 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-card .card-img {
    aspect-ratio: 1;
    overflow: hidden;
}

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

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

.product-card .card-info {
    padding: 15px;
}

.product-card .card-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
    line-height: 1.5;
}

.product-card .card-price {
    color: var(--accent);
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-card .card-price .symbol {
    font-size: 14px;
}

.product-card .card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-lighter);
}

/* 底部导航栏（移动端） */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--white);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 100;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-light);
    font-size: 11px;
    position: relative;
    transition: color 0.2s;
}

.nav-item i {
    font-size: 22px;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item .badge {
    position: absolute;
    top: 6px;
    right: 50%;
    transform: translateX(14px);
    background: var(--accent);
    color: white;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
}

/* 底部信息 */
.footer {
    background: var(--white);
    padding: 30px 20px;
    margin-top: 30px;
    border-top: 1px solid var(--border);
}

.footer-trust {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 25px;
}

.footer-trust .trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-light);
}

.footer-trust i {
    color: var(--success);
    font-size: 18px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.footer-links a {
    font-size: 14px;
    color: var(--text-light);
    transition: color 0.2s;
}

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

.footer-copyright {
    text-align: center;
    font-size: 13px;
    color: var(--text-lighter);
}

.footer-copyright p {
    margin-bottom: 5px;
}

/* 商品详情模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 300;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

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

.modal-content {
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    background: var(--white);
    border-radius: 16px 16px 0 0;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.modal-back {
    display: none;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text);
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-light);
    border-radius: 50%;
}

.modal-close:hover {
    background: var(--bg);
}

.modal-header h3 {
    flex: 1;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.modal-image {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
}

.modal-image img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
}

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

.product-desc {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.6;
}

.price-box {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: #fff8f0;
    border-radius: var(--radius);
}

.price-box .price {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
}

.price-box .original-price {
    font-size: 14px;
    color: var(--text-lighter);
    text-decoration: line-through;
}

.price-box .sales {
    font-size: 13px;
    color: var(--text-lighter);
    margin-left: auto;
}

.specs-section, .quantity-section {
    margin-bottom: 25px;
}

.specs-section h4, .quantity-section h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 15px;
}

.specs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.spec-btn {
    padding: 12px 22px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    transition: all 0.2s;
    min-width: 100px;
    text-align: center;
}

.spec-btn:hover:not(.disabled) {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(92, 107, 192, 0.05);
}

.spec-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.spec-btn.disabled {
    background: var(--bg);
    color: var(--text-lighter);
    cursor: not-allowed;
    border-color: var(--border);
}

.spec-btn .spec-price {
    display: block;
    font-size: 12px;
    margin-top: 4px;
    opacity: 0.8;
}

.spec-btn.active .spec-price {
    color: rgba(255,255,255,0.9);
}

.quantity-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quantity-control {
    display: inline-flex;
    align-items: center;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.qty-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--text);
    transition: all 0.2s;
}

.qty-btn:hover {
    background: var(--bg);
    color: var(--primary);
}

.quantity-control input {
    width: 55px;
    height: 40px;
    text-align: center;
    border: none;
    border-left: 2px solid var(--border);
    border-right: 2px solid var(--border);
    font-size: 16px;
    font-weight: 500;
    outline: none;
}

.stock-info {
    font-size: 13px;
    color: var(--text-lighter);
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
    background: var(--white);
    flex-shrink: 0;
}

.modal-total {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--text-light);
}

.modal-total .total-price {
    font-size: 26px;
    font-weight: 700;
    color: var(--accent);
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.btn-cart, .btn-buy {
    flex: 1;
    height: 48px;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-cart {
    background: var(--primary-light);
    color: white;
}

.btn-cart:hover {
    background: var(--primary);
}

.btn-buy {
    background: var(--accent);
    color: white;
}

.btn-buy:hover {
    background: #f4511e;
}

.btn-cart:disabled, .btn-buy:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 购物车页面 */
.cart-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    z-index: 301;
    transform: translateX(100%);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
}

.cart-page.active {
    transform: translateX(0);
}

.cart-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: var(--white);
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

.cart-back {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.cart-header h3 {
    flex: 1;
    text-align: center;
    font-size: 17px;
    font-weight: 600;
}

.cart-clear {
    font-size: 14px;
    color: var(--text-light);
    padding: 8px;
}

.cart-clear:hover {
    color: var(--accent);
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.cart-item {
    display: flex;
    gap: 15px;
    background: var(--white);
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.cart-item-img {
    width: 90px;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.cart-item-name {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-spec {
    font-size: 13px;
    color: var(--text-lighter);
    margin-bottom: auto;
}

.cart-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-item-price {
    color: var(--accent);
    font-weight: 600;
    font-size: 16px;
}

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

.cart-item-qty button {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s;
}

.cart-item-qty button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.cart-item-qty span {
    font-size: 15px;
    font-weight: 500;
    min-width: 24px;
    text-align: center;
}

.cart-item-remove {
    align-self: flex-start;
    color: var(--text-lighter);
    font-size: 16px;
    padding: 5px;
}

.cart-item-remove:hover {
    color: var(--accent);
}

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: var(--text-lighter);
}

.cart-empty i {
    font-size: 60px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.cart-empty p {
    font-size: 16px;
}

.cart-footer {
    padding: 20px;
    background: var(--white);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    flex-shrink: 0;
}

.cart-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.summary-total {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 15px;
    color: var(--text-light);
}

.summary-total .total-price {
    font-size: 26px;
    font-weight: 700;
    color: var(--accent);
}

.summary-count {
    font-size: 14px;
    color: var(--text-lighter);
}

.btn-checkout {
    width: 100%;
    height: 50px;
    background: var(--accent);
    color: white;
    border-radius: 25px;
    font-size: 17px;
    font-weight: 600;
    transition: background 0.2s;
}

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

/* 分类页面 */
.category-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    z-index: 301;
    transform: translateX(100%);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
}

.category-page.active {
    transform: translateX(0);
}

.category-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: var(--white);
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

.category-back {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.category-header h3 {
    flex: 1;
    text-align: center;
    font-size: 17px;
    font-weight: 600;
}

.category-sort {
    display: flex;
    background: var(--white);
    padding: 0 15px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.sort-btn {
    flex: 1;
    padding: 14px 0;
    font-size: 14px;
    color: var(--text-light);
    position: relative;
    transition: color 0.2s;
}

.sort-btn:hover {
    color: var(--text);
}

.sort-btn.active {
    color: var(--primary);
    font-weight: 600;
}

.sort-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25%;
    right: 25%;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.category-banners {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.cat-banner {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}
.cat-banner:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
.cat-banner img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}
.cat-banner .cat-banner-info {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.65));
    color: #fff;
}
.cat-banner .cat-banner-info h3 {
    font-size: 20px; font-weight: 600; margin-bottom: 4px;
}
.cat-banner .cat-banner-info p {
    font-size: 13px; opacity: 0.85;
}
/* 具体分类下的商品卡片网格 */
.category-products {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

/* 提示消息 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.85);
    color: white;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 15px;
    z-index: 400;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    white-space: nowrap;
}

.toast.active {
    opacity: 1;
    visibility: visible;
}

/* ===== 响应式断点 ===== */

/* 移动端 */
@media (max-width: 768px) {
    .menu-btn {
        display: flex;
    }
    
    .nav-links {
        display: none;
    }
    
    .header .container {
        gap: 8px;
        padding: 0 10px;
    }
    
    .logo {
        font-size: 16px;
    }
    
    .logo i {
        font-size: 20px;
    }
    
    .logo span {
        display: none;
    }
    
    .search-bar {
        flex: 1;
        min-width: 60px;
        max-width: none;
        height: 36px;
        margin-right: 4px;
    }
    
    .search-bar input {
        padding: 0 8px;
        font-size: 13px;
    }
    
    .search-btn {
        width: 36px;
        font-size: 14px;
    }
    
    .header-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .header-right {
        gap: 4px;
        flex-shrink: 0;
    }
    
    .header-login-btn {
        flex-shrink: 0;
    }
    
    .header-left {
        flex-shrink: 0;
    }
    
    .banner-section {
        margin-top: 65px;
        padding: 0 12px;
    }
    
    .carousel-slide .slide-title {
        font-size: 18px;
    }
    
    .carousel-slide .slide-desc {
        font-size: 12px;
    }
    
    .quick-entry {
        padding: 0 12px;
    }
    
    .entry-grid {
        gap: 8px;
        padding: 12px;
    }
    
    .entry-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
        border-radius: 12px;
    }
    
    .entry-item span {
        font-size: 11px;
    }
    
    .trust-section {
        padding: 0 12px;
    }
    
    .trust-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 12px;
    }
    
    .trust-item {
        padding: 6px;
    }
    
    .trust-item i {
        font-size: 20px;
    }
    
    .trust-item h4 {
        font-size: 12px;
    }
    
    .trust-item p {
        font-size: 11px;
    }
    
    .section-block {
        padding: 0 12px;
    }
    
    .section-header {
        margin-bottom: 12px;
    }
    
    .section-title h2 {
        font-size: 16px;
    }
    
    .promo-card {
        min-width: 130px;
    }
    
    .promo-card .promo-img {
        height: 90px;
    }
    
    .promo-card .promo-info {
        padding: 10px;
    }
    
    .promo-card .promo-name {
        font-size: 12px;
    }
    
    .promo-card .promo-price {
        font-size: 15px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .product-card .card-info {
        padding: 10px;
    }
    
    .product-card .card-name {
        font-size: 13px;
        min-height: 36px;
        -webkit-line-clamp: 2;
    }
    
    .product-card .card-price {
        font-size: 17px;
    }
    
    .product-card .card-meta {
        font-size: 11px;
    }
    
    .bottom-nav {
        display: flex;
    }
    
    body {
        padding-bottom: 65px;
    }
    
    .footer {
        margin-bottom: 65px;
        padding: 20px 12px;
    }
    
    .footer-trust {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        padding-bottom: 15px;
        margin-bottom: 15px;
    }
    
    .footer-trust .trust-item {
        font-size: 13px;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
        margin-bottom: 15px;
    }
    
    .footer-links a {
        font-size: 13px;
    }
    
    .footer-copyright {
        font-size: 12px;
    }
    
    /* 模态框移动端适配 */
    .modal-back {
        display: flex;
    }
    
    .modal-close {
        display: none;
    }
    
    .modal-content {
        max-width: 100%;
        border-radius: 16px 16px 0 0;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-info h2 {
        font-size: 17px;
    }
    
    .product-desc {
        font-size: 13px;
    }
    
    .price-box {
        padding: 12px;
        margin-bottom: 18px;
    }
    
    .price-box .price {
        font-size: 22px;
    }
    
    .specs-section, .quantity-section {
        margin-bottom: 18px;
    }
    
    .spec-btn {
        padding: 8px 14px;
        min-width: 70px;
        font-size: 13px;
    }
    
    .modal-footer {
        padding: 15px;
    }
    
    .modal-total .total-price {
        font-size: 22px;
    }
    
    .btn-cart, .btn-buy {
        height: 44px;
        font-size: 15px;
    }
    
    /* 分类页移动端适配 */
    .category-banners {
        gap: 10px;
        padding: 12px;
    }
    .cat-banner img {
        height: 120px;
    }
    .cat-banner .cat-banner-info h3 {
        font-size: 17px;
    }
    .category-products {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 12px;
    }
}

/* 小屏手机 */
@media (max-width: 375px) {
    .entry-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 5px;
        padding: 12px 8px;
    }
    
    .entry-icon {
        width: 38px;
        height: 38px;
        font-size: 18px;
        border-radius: 10px;
    }
    
    .entry-item span {
        font-size: 10px;
    }
    
    .products-grid {
        gap: 8px;
    }
    
    .product-card .card-info {
        padding: 10px;
    }
    
    .product-card .card-name {
        font-size: 12px;
        min-height: 36px;
    }
    
    .product-card .card-price {
        font-size: 16px;
    }
    
    .product-card .card-meta {
        font-size: 11px;
    }
}

/* 平板 */
@media (min-width: 769px) and (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .promo-card {
        min-width: 160px;
    }
}

/* 桌面 */
@media (min-width: 1025px) {
    .products-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .carousel-slide img {
        max-height: 380px;
        object-fit: cover;
    }
    
    .carousel-slide .slide-title {
        font-size: 30px;
    }
    
    .carousel-slide .slide-desc {
        font-size: 18px;
    }
    
    .section-title h2 {
        font-size: 22px;
    }
    
    /* PC端模态框居中 */
    .modal-overlay {
        align-items: center;
    }
    
    .modal-content {
        border-radius: 16px;
        max-height: 85vh;
    }
    
    .modal-overlay.active .modal-content {
        transform: translateY(0);
    }
}

/* 大屏桌面 */
@media (min-width: 1400px) {
    .container {
        max-width: 1300px;
    }
    
    .products-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}
