/* Responsive Breakpoints & Mobile First Adaptations */

.mobile-nav {
    display: none;
}

@media (max-width: 980px) {
    .head-main {
        grid-template-columns: 1fr auto;
    }

    .searchbox {
        grid-column: 1 / -1;
        grid-row: 2;
        margin-top: 4px;
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

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

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .category-grid {
        display: flex !important;
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        gap: 12px !important;
        padding: 4px 4px 14px 4px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        margin: 0 -12px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .category-grid::-webkit-scrollbar {
        display: none;
    }

    .collection-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    .journal {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    body {
        padding-bottom: 72px;
        /* Space for bottom mobile nav */
    }

    .topbar .container span:last-child {
        display: none;
    }

    .head-main {
        padding: 12px 0;
        gap: 14px;
    }

    .logo {
        font-size: 22px;
    }

    .head-actions .hide-mobile {
        display: none;
    }

    .nav {
        display: block !important;
        border-top: 1px solid var(--line);
        background: transparent;
        padding: 6px 0;
        margin-top: 2px;
    }

    .nav-scroll-container,
    .category-pills-row {
        display: flex !important;
        align-items: center;
        gap: 8px !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        scrollbar-width: none !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 4px 12px 10px !important;
    }

    .nav-scroll-container::-webkit-scrollbar,
    .category-pills-row::-webkit-scrollbar {
        display: none !important;
    }

    .nav-pill,
    .home-cat-pill {
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        padding: 8px 16px !important;
        border-radius: 999px !important;
        background: #ffffff !important;
        border: 1px solid var(--line, #ebd9c8) !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        color: #2d201a !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        text-decoration: none !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
        transition: all 0.15s ease;
    }

    .nav-pill.active,
    .home-cat-pill.active {
        background: #2d201a !important;
        color: #ffffff !important;
        border-color: #2d201a !important;
        box-shadow: 0 2px 6px rgba(45, 32, 26, 0.25) !important;
    }

    .container {
        width: min(100% - 24px, var(--max));
    }

    .hero-box {
        min-height: 180px;
        border-radius: 18px;
    }

    .hero-copy {
        padding: 18px 16px;
    }

    .hero-jewel {
        right: -5%;
        top: 10%;
        width: 45%;
        opacity: 0.15;
    }

    .category-grid {
        display: flex !important;
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        gap: 10px !important;
        padding: 4px 4px 14px 4px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        margin: 0 -12px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .category-grid::-webkit-scrollbar {
        display: none;
    }

    .cat {
        flex: 0 0 92px;
        min-width: 92px;
        padding: 12px 6px;
        border-radius: 14px;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }

    .cat-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
        margin: 0 auto 6px;
        border-radius: 50%;
    }

    .cat b {
        font-size: 12px;
        line-height: 1.25;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .product-body {
        padding: 12px;
    }

    .product-name {
        font-size: 14px;
        margin: 4px 0 6px;
    }

    .price {
        font-size: 16px;
    }

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

    .collection-grid,
    .trust,
    .journal {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        padding: 24px 0;
    }

    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(251, 248, 244, 0.98);
        backdrop-filter: blur(12px);
        border-top: 1px solid var(--line);
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
        z-index: 999;
        justify-content: space-around;
        align-items: center;
        padding: 8px 0;
    }

    .mobile-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        font-size: 11px;
        color: var(--muted);
    }

    .mobile-nav a strong {
        font-size: 17px;
        line-height: 1;
    }

    .col-6,
    .col-4,
    .col-3 {
        grid-column: span 12;
    }
}