/* ==========================================
 * 永信医馆 - 响应式断点系统
 * ========================================== */

/* === 断点变量 === */
:root {
    --breakpoint-desktop: 1200px;
    --breakpoint-tablet: 768px;
    --breakpoint-mobile: 767px;
}

/* === Tablet 适配 (768px - 1199px) === */
@media (max-width: 1199px) and (min-width: 768px) {
    :root {
        --container-width: calc(100% - 40px);
        --font-size-base: 15px;
    }

    .post-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }

    .single-product .product {
        grid-template-columns: 1fr;
    }

    .cart-layout {
        grid-template-columns: 1fr;
    }
}

/* === Mobile 适配 (≤767px) === */
@media (max-width: 767px) {
    :root {
        --container-width: calc(100% - 20px);
        --font-size-base: 14px;
    }

    /* 容器 */
    .jiankangyx-container {
        padding-left: var(--spacing-sm);
        padding-right: var(--spacing-sm);
    }

    /* 导航 */
    .main-navigation {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    /* 文章网格 */
    .post-grid {
        grid-template-columns: 1fr;
    }

    /* 页脚 */
    .footer-widgets {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-sm);
        text-align: center;
    }

    /* 404 */
    .error-code {
        font-size: 4rem;
    }

    /* 标题 */
    h1 {
        font-size: var(--font-size-2xl);
    }

    h2 {
        font-size: var(--font-size-xl);
    }

    /* 触摸友好 - 最小触摸目标 44x44px */
    button,
    .button,
    input[type="submit"],
    .jiankangyx-button {
        min-height: 44px;
        min-width: 44px;
    }

    .menu-toggle,
    .cart-link,
    .search-toggle {
        padding: 12px;
    }

    /* 侧边栏 */
    
    /* 商店页面 - 移动端完整适配 */
    .woocommerce-products-header__title.page-title,
    .page-title {
        display: none !important;
    }

    .products-sidebar,
    .sidebar.widget-area {
        display: none !important;
    }

    .products-main {
        width: 100% !important;
    }

    /* 商品网格 - 移动端两列 */
    ul.products,
    .products.columns-4,
    .products.columns-3 {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    ul.products li.product,
    .products li.product {
        width: 100% !important;
        float: none !important;
        clear: none !important;
        margin: 0 !important;
    }

    ul.products li.product img,
    .products li.product img {
        width: 100% !important;
        height: auto !important;
    }

    .woocommerce-LoopProduct-link {
        display: block !important;
        width: 100% !important;
    }
}
