/*reset*/

/* 主容器 - 移动端优先，模拟流畅滚动 */
        .app-container {
            max-width: 480px;
            margin: 0 auto;
            background: #f8fafc;
            min-height: 100vh;
            position: relative;
            box-shadow: 0 0 20px rgba(0,0,0,0.02);
        }

        /* 顶部导航区 (现代毛玻璃风格) */
        .header {
            position: sticky;
            top: 0;
            z-index: 20;
            background: rgba(255,255,255,0.92);
            backdrop-filter: blur(12px);
            border-bottom: 1px solid rgba(226,232,240,0.6);
            padding: 12px 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .logo-area h1 {
            font-size: 22px;
            font-weight: 700;
            background: linear-gradient(135deg, #1e293b, #3b82f6);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            letter-spacing: -0.5px;
        }
        .logo-area span {
            font-size: 10px;
            font-weight: 500;
            color: #5b6e8c;
            letter-spacing: 0;
        }

        .header-actions {
            display: flex;
            gap: 18px;
        }

        .header-actions h1 {
            font-size: 22px;
            font-weight: 700;
            background: linear-gradient(135deg, #1e293b, #3b82f6);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            letter-spacing: -0.5px;
        }

        /* 搜索条 (现代圆润玻璃质感) */
        .search-section {
            padding: 12px 16px;
            background: #ffffff;
            border-bottom: 1px solid #edf2f7;
        }
        .search-box {
            background: #f1f5f9;
            border-radius: 32px;
            padding: 10px 16px;
            display: flex;
            align-items: center;
            gap: 10px;
            transition: all 0.2s;
        }
        .search-box i {
            color: #94a3b8;
            font-size: 16px;
        }
        .search-box input {
            background: transparent;
            border: none;
            flex: 1;
            font-size: 15px;
            font-weight: 400;
            outline: none;
            font-family: 'Inter', sans-serif;
        }
        .search-box input::placeholder {
            color: #94a3b8;
            font-weight: 400;
        }

 /* 分类标签 (横向滚动，现代胶囊) */
        .categories-tabs {
            background: #ffffff;
            padding: 12px 16px 8px 16px;
            overflow-x: auto;
            white-space: nowrap;
            scrollbar-width: thin;
            display: flex;
            gap: 8px;
            border-bottom: 1px solid #eef3fc;
        }
        .categories-tabs::-webkit-scrollbar {
            height: 2px;
        }
        .category-chip {
            display: inline-flex;
            padding: 8px 20px;
            background: #f1f5f9;
            border-radius: 40px;
            font-size: 14px;
            font-weight: 500;
            color: #334155;
            transition: all 0.2s;
            cursor: pointer;
        }
        .category-chip.active {
            background: #0f172a;
            color: white;
            box-shadow: 0 5px 10px rgba(0,0,0,0.05);
        }
        .category-chip:active {
            transform: scale(0.96);
        }

        /* 商品网格布局 (两列，呼吸感强) */
        .products-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
            padding: 16px;
        }

        /* 商品卡片 (现代简约，柔和阴影) */
        .product-card {
            background: #ffffff;
            border-radius: 24px;
            overflow: hidden;
            transition: all 0.25s ease;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0,0,0,0.03);
            cursor: pointer;
        }
        .product-card:active {
            transform: scale(0.98);
        }
        .product-img {
            position: relative;
            width: 100%;
            aspect-ratio: 1 / 1;
            background: #f8fafc;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }
        .product-img img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s;
        }

/* 模拟商品图片占位(现代简约纯色+图标) 实际可替换真实图片 */
        .placeholder-img {
            background: linear-gradient(145deg, #eef2ff, #e0e7ff);
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 42px;
            color: #3b82f6;
        }
        .badge {
            position: absolute;
            top: 12px;
            left: 12px;
            background: rgba(0,0,0,0.6);
            backdrop-filter: blur(4px);
            color: white;
            font-size: 10px;
            font-weight: 600;
            padding: 4px 8px;
            border-radius: 20px;
            letter-spacing: 0.3px;
        }

        .favorite-icon {
            position: absolute;
            bottom: 12px;
            right: 12px;
            background: rgba(255,255,255,0.85);
            backdrop-filter: blur(4px);
            width: 32px;
            height: 32px;
            border-radius: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #ef4444;
            font-size: 16px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .favorite-icon:hover, .favorite-icon:active {
            transform: scale(1.08);
            background: white;
        }
        .product-info {
            padding: 12px 12px 14px;
        }
        .product-title {
            font-size: 14px;
            font-weight: 600;
            color: #0f172a;
            line-height: 1.3;
            margin-bottom: 6px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .price-row {
            display: flex;
            align-items: baseline;
            gap: 6px;
            margin: 8px 0 4px;
        }
        .current-price {
            font-size: 18px;
            font-weight: 800;
            color: #0f172a;
        }
        .old-price {
            font-size: 12px;
            color: #94a3b8;
            text-decoration: line-through;
        }
        .sales {
            font-size: 11px;
            color: #6c7a91;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        /* 底部加载占位 & 安全区 */
        .bottom-safe {
            height: 30px;
        }

        /* 空状态/加载动画简单优雅 */
        .loading-skeleton {
            display: flex;
            justify-content: center;
            padding: 40px;
            color: #94a3b8;
        }


/*   详情 */

/* 主容器，移动端宽度 */
        .detail-container {
            max-width: 480px;
            margin: 0 auto;
            background: #fff;
            position: relative;
            box-shadow: 0 0 20px rgba(0,0,0,0.02);
            padding-bottom: 80px; /* 给底部操作栏留空间 */
        }

/* 顶部导航 (毛玻璃) */
        .nav-bar {
            position: sticky;
            top: 0;
            z-index: 30;
            background: rgba(255,255,255,0.94);
            backdrop-filter: blur(16px);
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 20px;
            border-bottom: 1px solid #f0f2f5;
        }
        .nav-btn {
            width: 40px;
            height: 40px;
            background: #f8fafc;
            border-radius: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
            color: #1e293b;
            font-size: 18px;
        }
        .nav-btn:active {
            background: #eef2ff;
            transform: scale(0.94);
        }
        .nav-actions {
            display: flex;
            gap: 12px;
        }

        /* 商品轮播图 (现代简约) */
        .gallery {
            width: 100%;
            overflow-x: auto;
            scroll-snap-type: x mandatory;
            display: flex;
            background: #f9fafc;
            scrollbar-width: thin;
        }
        .gallery::-webkit-scrollbar {
            height: 3px;
        }
        .gallery-item {
            flex: 0 0 100%;
            scroll-snap-align: start;
            aspect-ratio: 1 / 1;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(145deg, #f1f5f9, #ffffff);
        }
        .gallery-item img {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

     /* 商品基本信息区块 */
        .product-info-section {
            padding: 20px 20px 16px;
            border-bottom: 8px solid #f8fafc;
        }
        .brand-tag {
            display: inline-block;
            background: #eef2ff;
            color: #3b82f6;
            font-size: 12px;
            font-weight: 600;
            padding: 4px 12px;
            border-radius: 40px;
            margin-bottom: 12px;
        }
        .product-title {
            font-size: 24px;
            font-weight: 700;
            line-height: 1.3;
            letter-spacing: -0.3px;
            margin-bottom: 8px;
        }
        .sub-title {
            font-size: 13px;
            color: #5b6e8c;
            margin-bottom: 14px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .price-row {
            display: flex;
            align-items: baseline;
            gap: 12px;
            margin: 12px 0 8px;
        }
        .current-price {
            font-size: 32px;
            font-weight: 800;
            color: #0f172a;
        }
        .old-price {
            font-size: 16px;
            color: #94a3b8;
            text-decoration: line-through;
        }
        .discount {
            background: #fef3c7;
            border-radius: 20px;
            padding: 4px 8px;
            font-size: 12px;
            font-weight: 600;
            color: #b45309;
        }
        .sales-rank {
            font-size: 13px;
            color: #5f6c84;
            display: flex;
            gap: 16px;
            margin-top: 10px;
        }

        /* 配送/服务 (现代卡片条) */
        .service-row {
            background: #fafcff;
            border-radius: 20px;
            padding: 12px 16px;
            margin: 16px 0 8px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border: 1px solid #edf2f7;
        }
        .service-left {
            display: flex;
            gap: 14px;
            font-size: 13px;
            font-weight: 500;
            color: #2d3a5e;
        }
        .service-left i {
            color: #3b82f6;
        }
        .arrow-icon {
            color: #b9c2d4;
            font-size: 12px;
        }

        /* 规格选择卡片(现代简洁) */
        .spec-card {
            background: #ffffff;
            padding: 16px 20px;
            border-bottom: 8px solid #f8fafc;
            cursor: pointer;
        }
        .spec-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
        }
        .spec-header span:first-child {
            font-weight: 600;
            font-size: 16px;
        }
        .spec-value {
            font-size: 14px;
            color: #5b6e8c;
        }

        /* 商品详情描述区 */
        .description-section {
            padding: 20px;
            border-bottom: 8px solid #f8fafc;
        }
        .section-title {
            font-weight: 700;
            font-size: 18px;
            margin-bottom: 14px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .desc-text {
            color: #2d3a5e;
            line-height: 1.5;
            font-size: 14px;
            margin-bottom: 20px;
        }

        /* 底部操作栏 (悬浮现代风格) */
        .bottom-action {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            max-width: 400px;
            margin: 0 auto;
            background: rgba(255,255,255,0.96);            
            border-top: 1px solid #eff3f8;
            padding: 12px 20px 20px;
            display: flex;
            gap: 16px;
            align-items: center;
            z-index: 20;
            box-shadow: 0 -4px 12px rgba(0,0,0,0.02);
        }
        .action-icons {
            display: flex;
            gap: 18px;
        }
        .icon-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            font-size: 12px;
            color: #475569;
            cursor: pointer;
        }
        .icon-btn i {
            font-size: 22px;
        }
        .buy-buttons {
            flex: 1;
            display: flex;
            gap: 12px;
        }
        .btn-cart {
            flex: 1;
            background: #d7dde2;
            border-radius: 60px;
            padding: 14px 0;
            text-align: center;
            font-weight: 600;
            font-size: 15px;
            color: #1e293b;
            cursor: pointer;
            transition: 0.2s;
        }
        .btn-buy {
            flex: 1;
            background: #0f172a;
            border-radius: 60px;
            padding: 14px 0;
            text-align: center;
            font-weight: 600;
            font-size: 15px;
            color: white;
            cursor: pointer;
            transition: 0.2s;
            box-shadow: 0 4px 10px rgba(0,0,0,0.05);
        }
        .btn-cart:active, .btn-buy:active {
            transform: scale(0.97);
        }


        /* 添加到购物车轻提示 */
        .toast-msg {
            position: fixed;
            bottom: 100px;
            left: 50%;
            transform: translateX(-50%);
            background: #1e293be6;
            backdrop-filter: blur(12px);
            color: white;
            padding: 10px 22px;
            border-radius: 40px;
            font-size: 13px;
            font-weight: 500;
            z-index: 999;
            opacity: 0;
            transition: opacity 0.2s;
            pointer-events: none;
            white-space: nowrap;
        }
        
        /* 规格选择弹窗 (现代底部抽屉模拟) */
        .spec-drawer {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            max-width: 480px;
            margin: 0 auto;
            background: white;
            border-radius: 32px 32px 0 0;
            z-index: 1000;
            transform: translateY(100%);
            transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
            box-shadow: 0 -8px 30px rgba(0,0,0,0.1);
            padding: 24px 20px 30px;
        }
        .drawer-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.3);
            backdrop-filter: blur(3px);
            z-index: 999;
            opacity: 0;
            visibility: hidden;
            transition: all 0.2s;
        }
        .drawer-open {
            transform: translateY(0);
        }
        .drawer-header {
            display: flex;
            justify-content: space-between;
            font-weight: 700;
            font-size: 18px;
            margin-bottom: 20px;
        }
        .spec-option {
            margin-bottom: 20px;
        }
        .spec-label {
            font-weight: 600;
            margin-bottom: 12px;
            font-size: 14px;
        }
        .spec-buttons {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
        }
        .spec-btn {
            background: #f1f5f9;
            padding: 8px 20px;
            border-radius: 40px;
            font-size: 14px;
            cursor: pointer;
            transition: 0.1s;
        }
        .spec-btn.active {
            background: #0f172a;
            color: white;
        }
        .drawer-footer {
            margin-top: 28px;
            display: flex;
            gap: 12px;
        }
        .drawer-confirm {
            flex:1;
            background: #0f172a;
            color: white;
            text-align: center;
            padding: 14px;
            border-radius: 60px;
            font-weight: 600;
            cursor: pointer;
        }
        .close-drawer {
            background: #eef2ff;
        }
        
        @media (max-width: 450px) {
            .product-title { font-size: 22px; }
            .current-price { font-size: 28px; }
        }

