/* ========================================
   海量官网 - 移动端适配
   断点: 1024px (平板) / 768px (手机) / 480px (小屏)
   ======================================== */

/* ========== 平板 (1024px) ========== */
@media (max-width: 1024px) {
    .container {
        width: 100%;
        padding: 0 16px;
    }

    /* 顶部栏 */
    .top-bar {
        font-size: 11px;
    }
    .top-left span:nth-child(3) {
        display: none;
    }
    .top-right a:nth-child(n+5) {
        display: none;
    }

    /* 头部 */
    .header-inner {
        gap: 16px;
        flex-wrap: wrap;
    }
    .search-box {
        order: 3;
        max-width: 100%;
        width: 100%;
        flex: 1 1 100%;
    }
    .logo-icon {
        width: 48px;
        height: 48px;
    }
    .logo-top {
        font-size: 14px;
    }
    .logo-text {
        font-size: 18px;
    }

    /* 主导航 */
    .all-categories {
        width: 180px;
        margin-left: -180px;
        padding-left: 180px;
        font-size: 13px;
    }
    .nav-menu li a {
        padding: 0 14px;
        font-size: 14px;
    }

    /* Hero 区 */
    .hero-inner {
        height: auto;
        flex-wrap: wrap;
    }
    .side-categories {
        display: none;
    }
    .banner {
        flex: 1 1 100%;
        min-height: 280px;
    }
    .banner-slide {
        padding: 30px;
    }
    .banner-content h1 {
        font-size: 32px;
    }
    .banner-visual {
        width: 200px;
        height: 200px;
    }
    .user-panel {
        flex: 1 1 100%;
        flex-direction: row;
        width: 100%;
        flex-wrap: wrap;
    }
    .user-card {
        flex: 1 1 200px;
    }
    .news-card {
        flex: 1 1 300px;
    }
    .quick-entries {
        flex: 1 1 100%;
    }

    /* 服务保障 */
    .service-inner {
        grid-template-columns: repeat(3, 1fr);
        row-gap: 16px;
    }
    .service-item:nth-child(4),
    .service-item:nth-child(5) {
        border-right: none;
    }

    /* 限时秒杀 */
    .flash-list {
        grid-template-columns: repeat(3, 1fr);
    }

    /* 分类入口 */
    .category-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    /* 商品网格 */
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* 品牌专区 */
    .brand-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* 特色服务 */
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 底部 */
    .footer-top {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .footer-qr {
        grid-column: 1 / -1;
    }

    /* 商品详情页 */
    .detail-main {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    .gallery-main {
        height: 360px;
    }
    .detail-bottom {
        grid-template-columns: 1fr;
    }
    .detail-side {
        display: none;
    }

    /* 购物车 */
    .cart-header,
    .cart-item {
        grid-template-columns: 50px 1fr 100px 80px;
    }
    .cart-item .col-total,
    .cart-header .col-total,
    .cart-item .col-op,
    .cart-header .col-op {
        display: none;
    }
    .rec-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* 个人中心 */
    .user-layout {
        grid-template-columns: 200px 1fr;
    }
    .order-types {
        grid-template-columns: repeat(3, 1fr);
    }

    /* 悬浮工具栏 */
    .float-toolbar {
        right: 12px;
        bottom: 60px;
    }
}

/* ========== 手机 (768px) ========== */
@media (max-width: 768px) {
    body {
        font-size: 13px;
    }

    .container {
        padding: 0 12px;
    }

    /* 顶部栏 */
    .top-bar {
        height: auto;
        line-height: 1.6;
        padding: 6px 0;
    }
    .top-bar-inner {
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }
    .top-left, .top-right {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
    }
    .top-left span:nth-child(3),
    .top-left .divider:nth-child(2) {
        display: none;
    }
    .top-right {
        font-size: 11px;
    }
    .top-right a:nth-child(n+5),
    .top-right .divider:nth-child(n+5) {
        display: none;
    }

    /* 头部 */
    .header {
        padding: 12px 0 0;
    }
    .header-inner {
        gap: 10px;
        padding-bottom: 12px;
        flex-wrap: nowrap;
        align-items: center;
    }
    .logo {
        gap: 8px;
    }
    .logo-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }
    .logo-top {
        font-size: 12px;
        margin-top: 2px;
    }
    .logo-bottom {
        font-size: 8px;
        padding: 1px 0;
    }
    .logo-text {
        font-size: 16px;
    }
    .search-box {
        order: 0;
        flex: 1;
        max-width: 100%;
    }
    .search-tabs {
        display: none;
    }
    .search-input-wrap {
        border-width: 1.5px;
    }
    .search-input-wrap input {
        padding: 8px 12px;
        font-size: 13px;
    }
    .search-btn {
        padding: 0 14px;
        font-size: 12px;
    }
    .search-hot {
        display: none;
    }
    .header-cart {
        flex-shrink: 0;
    }
    .cart-link {
        padding: 8px 12px;
        gap: 4px;
    }
    .cart-link span {
        display: none;
    }
    .cart-link i {
        font-size: 20px;
    }

    /* 主导航 */
    .main-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .main-nav::-webkit-scrollbar {
        display: none;
    }
    .nav-inner {
        height: 40px;
    }
    .all-categories {
        display: none;
    }
    .nav-menu {
        white-space: nowrap;
    }
    .nav-menu li a {
        padding: 0 12px;
        font-size: 13px;
        height: 40px;
        line-height: 40px;
    }
    .nav-menu li.active a::after {
        left: 12px;
        right: 12px;
    }

    /* Hero 区 */
    .hero {
        padding: 12px 0;
    }
    .hero-inner {
        flex-direction: column;
        gap: 12px;
        height: auto;
    }
    .side-categories {
        display: none;
    }
    .banner {
        min-height: 200px;
        border-radius: 12px;
    }
    .banner-slide {
        padding: 20px;
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
    .banner-content h1 {
        font-size: 24px;
        line-height: 1.3;
    }
    .banner-content p {
        font-size: 13px;
        margin-bottom: 16px;
    }
    .banner-btn {
        padding: 8px 20px;
        font-size: 13px;
    }
    .banner-visual {
        width: 120px;
        height: 120px;
        margin-top: 12px;
    }
    .visual-main {
        width: 80px;
        height: 80px;
        border-radius: 18px;
    }
    .vm-top {
        font-size: 18px;
        letter-spacing: 3px;
    }
    .vm-bottom {
        font-size: 9px;
        padding: 3px 0;
        margin-top: 4px;
        border-radius: 0 0 18px 18px;
        margin-bottom: -18px;
    }
    .visual-card {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }
    .visual-card i {
        font-size: 16px;
    }
    .circle-1 {
        width: 100px;
        height: 100px;
    }
    .circle-2 {
        width: 70px;
        height: 70px;
    }
    .user-panel {
        flex-direction: row;
        width: 100%;
        gap: 8px;
    }
    .user-card {
        flex: 1 1 140px;
        padding: 12px;
    }
    .user-avatar {
        width: 40px;
        height: 40px;
        font-size: 20px;
        margin-bottom: 6px;
    }
    .user-greet {
        font-size: 12px;
        margin-bottom: 8px;
    }
    .btn-primary, .btn-outline {
        padding: 6px 0;
        font-size: 12px;
    }
    .news-card {
        display: none;
    }
    .quick-entries {
        flex: 1 1 100%;
    }
    .qe-item {
        font-size: 11px;
    }
    .qe-item i {
        font-size: 18px;
    }

    /* 服务保障 */
    .service-bar {
        margin: 12px auto;
    }
    .service-inner {
        grid-template-columns: repeat(2, 1fr);
        padding: 12px 0;
        row-gap: 12px;
    }
    .service-item {
        border-right: none;
        gap: 8px;
    }
    .service-item:nth-child(odd) {
        border-right: 1px solid var(--line);
    }
    .service-item i {
        font-size: 24px;
    }
    .service-item strong {
        font-size: 13px;
    }
    .service-item span {
        font-size: 11px;
    }

    /* section 通用 */
    .section {
        margin: 16px auto;
    }
    .section-head {
        margin-bottom: 14px;
    }
    .section-head h2 {
        font-size: 20px;
    }
    .section-head h2::before,
    .section-head h2::after {
        width: 20px;
    }
    .section-head p {
        font-size: 11px;
    }

    /* 限时秒杀 */
    .flash-sale {
        padding: 14px;
    }
    .flash-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 14px;
    }
    .flash-title h2 {
        font-size: 18px;
    }
    .flash-title i {
        font-size: 22px;
    }
    .flash-time {
        width: 100%;
        justify-content: space-between;
    }
    .time-blocks {
        font-size: 16px;
    }
    .time-blocks em {
        padding: 3px 6px;
        min-width: 28px;
        font-size: 16px;
    }
    .flash-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .flash-img {
        height: 100px;
    }
    .flash-img i {
        font-size: 40px;
    }
    .flash-info h3 {
        font-size: 12px;
        height: 32px;
    }
    .flash-price .now {
        font-size: 17px;
    }

    /* 分类入口 */
    .category-section {
        padding: 16px 0;
    }
    .category-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }
    .cat-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 20px;
    }
    .cat-item span {
        font-size: 11px;
    }
    .cat-item {
        padding: 8px 2px;
        gap: 4px;
    }

    /* 商品网格 */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .product-img {
        height: 160px;
    }
    .product-img i.big {
        font-size: 64px;
    }
    .product-info {
        padding: 10px 12px 12px;
    }
    .product-info h3 {
        font-size: 13px;
        height: 38px;
        -webkit-line-clamp: 2;
    }
    .product-price .now {
        font-size: 17px;
    }
    .product-price .old {
        font-size: 11px;
    }
    .product-meta {
        font-size: 11px;
    }

    /* 品牌专区 */
    .brand-section {
        padding: 16px 0;
    }
    .brand-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    .brand-card {
        padding: 12px 6px;
    }
    .brand-logo {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin-bottom: 6px;
    }
    .brand-name {
        font-size: 12px;
    }
    .brand-tag {
        font-size: 10px;
    }

    /* 特色服务 */
    .feature-section {
        padding: 20px 0;
    }
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .feature-card {
        padding: 18px 12px;
    }
    .feature-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
        margin-bottom: 10px;
    }
    .feature-card h3 {
        font-size: 15px;
    }
    .feature-card p {
        font-size: 12px;
    }

    /* 底部 */
    .footer {
        padding: 24px 0 0;
        margin-top: 20px;
    }
    .footer-top {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        padding-bottom: 20px;
    }
    .footer-col h4 {
        font-size: 13px;
        margin-bottom: 10px;
    }
    .footer-col a {
        font-size: 12px;
        margin-bottom: 6px;
    }
    .footer-qr {
        grid-column: 1 / -1;
        text-align: center;
    }
    .qr-row {
        justify-content: center;
    }
    .qr-box {
        width: 70px;
        height: 70px;
    }
    .footer-bottom {
        padding: 14px 0;
        font-size: 11px;
        line-height: 1.7;
    }
    .footer-bottom p {
        word-break: break-all;
    }

    /* 悬浮工具栏 */
    .float-toolbar {
        right: 8px;
        bottom: 50px;
        padding: 4px 2px;
        gap: 2px;
    }
    .ft-item {
        min-width: 42px;
        padding: 6px 2px;
        font-size: 10px;
    }
    .ft-item i {
        font-size: 18px;
    }

    /* ===== 商品列表页 ===== */
    .breadcrumb {
        font-size: 12px;
        margin-bottom: 10px;
    }
    .filter-bar {
        border-radius: 10px;
    }
    .filter-row {
        padding: 6px 10px;
    }
    .filter-label {
        width: 50px;
        font-size: 12px;
    }
    .filter-options .opt {
        padding: 3px 8px;
        font-size: 12px;
    }
    .sort-bar {
        padding: 8px 10px;
        flex-wrap: wrap;
        gap: 6px;
    }
    .sort-left {
        flex-wrap: wrap;
        gap: 2px;
    }
    .sort-item {
        padding: 4px 10px;
        font-size: 12px;
    }
    .sort-right {
        width: 100%;
        justify-content: flex-end;
    }
    .page-jump {
        display: none;
    }
    .pagination {
        gap: 4px;
        margin-top: 20px;
    }
    .page-num {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
    }

    /* ===== 商品详情页 ===== */
    .detail-page {
        padding: 12px 0 24px;
    }
    .detail-main {
        padding: 14px;
        gap: 16px;
    }
    .gallery-main {
        height: 260px;
        border-radius: 10px;
    }
    .gallery-thumbs {
        gap: 6px;
    }
    .thumb {
        width: 48px;
        height: 48px;
    }
    .detail-title {
        font-size: 16px;
        line-height: 1.4;
    }
    .detail-sub {
        font-size: 12px;
    }
    .price-block {
        padding: 14px;
    }
    .price-now {
        font-size: 16px;
    }
    .price-now em {
        font-size: 24px;
    }
    .attr-row {
        padding: 10px 14px;
    }
    .attr-label {
        width: 64px;
        font-size: 12px;
    }
    .attr-options .opt {
        padding: 5px 10px;
        font-size: 12px;
    }
    .action-buttons {
        gap: 8px;
    }
    .btn-cart, .btn-buy {
        height: 42px;
        font-size: 14px;
    }
    .service-promise {
        flex-wrap: wrap;
        gap: 8px;
        font-size: 12px;
    }
    .detail-bottom {
        grid-template-columns: 1fr;
    }
    .detail-side {
        display: none;
    }
    .content-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .content-tabs::-webkit-scrollbar {
        display: none;
    }
    .content-tabs .tab {
        padding: 12px 16px;
        font-size: 13px;
        white-space: nowrap;
    }
    .content-body {
        padding: 16px;
    }
    .spec-table {
        margin-bottom: 20px;
    }
    .spec-table h3 {
        font-size: 14px;
    }
    .spec-table table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .spec-table table td {
        padding: 8px 12px;
        font-size: 12px;
    }
    .img-block {
        height: 200px;
    }
    .img-block p {
        font-size: 14px;
    }

    /* ===== 购物车页 ===== */
    .cart-page {
        padding: 12px 0 100px;
    }
    .cart-title {
        font-size: 18px;
        margin-bottom: 10px;
    }
    .cart-step {
        display: none;
    }
    .cart-header {
        display: none;
    }
    .cart-item {
        grid-template-columns: 1fr !important;
        gap: 10px;
        padding: 14px 12px;
    }
    .cart-item > * {
        text-align: left !important;
        justify-content: flex-start !important;
    }
    .cart-item .col-check {
        order: -1;
    }
    .item-img {
        width: 64px;
        height: 64px;
        margin-right: 10px;
    }
    .item-img i {
        font-size: 32px;
    }
    .item-info h3 {
        font-size: 13px;
    }
    .item-attrs {
        font-size: 11px;
    }
    .item-price {
        font-size: 13px;
        text-align: left;
    }
    .item-qty {
        justify-content: flex-start;
    }
    .item-total {
        font-size: 15px;
        text-align: left;
    }
    .item-op {
        flex-direction: row;
        justify-content: flex-end;
        font-size: 12px;
    }
    .cart-recommend {
        padding: 16px 12px;
        margin-top: 14px;
    }
    .cart-recommend h3 {
        font-size: 15px;
        margin-bottom: 12px;
    }
    .rec-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .rec-img {
        height: 100px;
    }
    .rec-img i {
        font-size: 40px;
    }
    .rec-card h4 {
        font-size: 12px;
    }
    .rec-price {
        font-size: 14px;
    }
    .cart-checkout-bar {
        height: 56px;
        line-height: 56px;
    }
    .checkout-inner {
        padding: 0 12px;
    }
    .checkout-left {
        gap: 8px;
    }
    .batch-op {
        font-size: 12px;
    }
    .checkout-stat {
        font-size: 12px;
        gap: 8px;
    }
    .stat-total {
        font-size: 18px;
    }
    .stat-save {
        display: none;
    }
    .btn-checkout {
        height: 40px;
        line-height: 40px;
        padding: 0 20px;
        font-size: 14px;
    }

    /* ===== 个人中心页 ===== */
    .user-page {
        padding: 12px 0 24px;
    }
    .user-layout {
        grid-template-columns: 1fr;
    }
    .user-side {
        order: 2;
    }
    .user-main {
        order: 1;
    }
    .user-info {
        padding: 20px 16px;
    }
    .user-avatar {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
    .user-name {
        font-size: 15px;
    }
    .side-menu {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        padding: 4px;
    }
    .menu-group {
        border-bottom: none;
        padding: 4px 0;
    }
    .menu-group h4 {
        font-size: 11px;
        padding: 2px 10px;
    }
    .menu-item {
        padding: 8px 10px;
        font-size: 12px;
    }
    .welcome-card {
        padding: 20px 16px;
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    .welcome-info h2 {
        font-size: 18px;
    }
    .welcome-info > p {
        font-size: 12px;
    }
    .level-bar {
        max-width: 100%;
    }
    .welcome-actions {
        justify-content: center;
    }
    .welcome-actions .btn-primary,
    .welcome-actions .btn-outline {
        padding: 6px 18px;
        font-size: 13px;
    }
    .welcome-visual {
        width: 100px;
        height: 80px;
    }
    .visual-icon {
        font-size: 48px;
    }
    .card {
        padding: 16px;
    }
    .card-head h3 {
        font-size: 15px;
    }
    .order-types {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin-bottom: 16px;
        padding-bottom: 14px;
    }
    .order-type {
        padding: 10px 0;
    }
    .ot-icon {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }
    .order-type span {
        font-size: 12px;
    }
    .ot-badge {
        right: 20%;
    }
    .order-head {
        flex-wrap: wrap;
        gap: 6px;
        padding: 8px 12px;
    }
    .order-status {
        margin-left: 0;
        width: 100%;
        text-align: right;
    }
    .order-body {
        padding: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .order-img {
        width: 64px;
        height: 64px;
    }
    .order-img i {
        font-size: 32px;
    }
    .order-info h4 {
        font-size: 13px;
    }
    .order-price {
        text-align: left;
        margin-right: 0;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .order-foot {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
        padding: 10px 12px;
    }
    .order-actions {
        justify-content: flex-end;
    }
    .assets-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .asset-card {
        padding: 14px;
        gap: 10px;
    }
    .asset-icon {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }
    .asset-info strong {
        font-size: 17px;
    }
    .asset-info span {
        font-size: 11px;
    }
}

/* ========== 小屏手机 (480px) ========== */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    /* 顶部栏 */
    .top-bar {
        font-size: 10px;
    }
    .top-right a:nth-child(n+3),
    .top-right .divider {
        display: none;
    }
    .top-right a {
        font-size: 11px;
    }

    /* 头部 */
    .logo-text {
        display: none;
    }
    .search-input-wrap input {
        padding: 7px 10px;
        font-size: 12px;
    }
    .search-btn {
        padding: 0 10px;
        font-size: 11px;
    }
    .search-btn i {
        font-size: 14px;
    }

    /* Banner */
    .banner-slide {
        padding: 16px;
    }
    .banner-content h1 {
        font-size: 20px;
    }
    .banner-content p {
        font-size: 12px;
    }
    .banner-btn {
        padding: 7px 16px;
        font-size: 12px;
    }
    .banner-visual {
        width: 90px;
        height: 90px;
    }
    .visual-main {
        width: 60px;
        height: 60px;
        border-radius: 14px;
    }
    .vm-top {
        font-size: 14px;
        letter-spacing: 2px;
    }
    .vm-bottom {
        font-size: 7px;
        padding: 2px 0;
        border-radius: 0 0 14px 14px;
        margin-bottom: -14px;
    }
    .visual-card {
        width: 28px;
        height: 28px;
        border-radius: 8px;
    }
    .visual-card i {
        font-size: 12px;
    }

    /* 服务保障 */
    .service-inner {
        grid-template-columns: 1fr;
    }
    .service-item {
        border-right: none !important;
        border-bottom: 1px solid var(--line);
        padding-bottom: 12px;
    }
    .service-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    /* 限时秒杀 */
    .flash-list {
        grid-template-columns: 1fr;
    }

    /* 分类入口 */
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* 商品网格 */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .product-img {
        height: 130px;
    }
    .product-img i.big {
        font-size: 52px;
    }
    .product-info h3 {
        font-size: 12px;
        height: 34px;
    }
    .product-price .now {
        font-size: 15px;
    }

    /* 品牌专区 */
    .brand-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* 特色服务 */
    .feature-grid {
        grid-template-columns: 1fr;
    }

    /* 底部 */
    .footer-top {
        grid-template-columns: 1fr;
    }
    .footer-qr {
        text-align: center;
    }

    /* 悬浮工具栏 */
    .float-toolbar {
        right: 4px;
        bottom: 40px;
    }
    .ft-item span {
        display: none;
    }
    .ft-item {
        min-width: 36px;
        padding: 8px 4px;
    }
    .ft-item i {
        font-size: 20px;
    }

    /* 商品详情 */
    .gallery-main {
        height: 220px;
    }
    .detail-title {
        font-size: 15px;
    }

    /* 购物车 */
    .rec-grid {
        grid-template-columns: 1fr;
    }

    /* 个人中心 */
    .order-types {
        grid-template-columns: repeat(3, 1fr);
    }
    .assets-grid {
        grid-template-columns: 1fr;
    }
}
