/* Responsive Breakpoints & Mobile First Adaptations */

.mobile-nav {
    display: none;
}

.show-mobile-only {
    display: none !important;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }

    .show-mobile-only {
        display: block !important;
    }
}

@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;
    }

    .section-head {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        margin-bottom: 12px !important;
    }

    .section-head>div {
        min-width: 0 !important;
        flex: 1 1 auto !important;
    }

    .section-kicker {
        font-size: 10.5px !important;
        letter-spacing: 0.8px !important;
        margin-bottom: 2px !important;
        line-height: 1.2 !important;
    }

    .section-title {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
        font-size: 18px !important;
        line-height: 1.25 !important;
        font-weight: 700 !important;
        margin: 2px 0 0 !important;
        letter-spacing: -0.2px !important;
    }

    .section-head a {
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        font-size: 12px !important;
    }

    .fk-view-all-pill {
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        font-size: 11.5px !important;
        padding: 4px 11px !important;
    }

    .section {
        padding: 28px 0 !important;
    }

    .section-sm {
        padding: 18px 0 !important;
    }

    .breadcrumb {
        font-size: 11.5px !important;
        gap: 5px !important;
        margin-bottom: 12px !important;
        line-height: 1.3 !important;
    }

    h1,
    .page-title {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
        font-size: 22px !important;
        line-height: 1.25 !important;
        font-weight: 800 !important;
        letter-spacing: -0.3px !important;
    }

    h2 {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
        font-size: 18px !important;
        line-height: 1.25 !important;
        font-weight: 700 !important;
        letter-spacing: -0.2px !important;
    }

    h3 {
        font-size: 15px !important;
        line-height: 1.3 !important;
        font-weight: 600 !important;
    }

    h4 {
        font-size: 13.5px !important;
        line-height: 1.3 !important;
        font-weight: 600 !important;
    }
}

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

    .topbar {
        padding: 2px 0 !important;
    }

    .topbar-container {
        padding: 3px 0 !important;
        justify-content: flex-start !important;
        gap: 0 !important;
    }

    .topbar-left {
        width: 100% !important;
        justify-content: flex-start !important;
    }

    .topbar-shipping-msg,
    .topbar-trust-msg {
        display: none !important;
    }

    .delivery-location-widget {
        width: 100% !important;
    }

    .loc-trigger-btn {
        width: 100% !important;
        max-width: 100% !important;
        padding: 5px 10px !important;
        justify-content: flex-start !important;
        background: rgba(255, 255, 255, 0.05) !important;
    }

    .loc-trigger-btn .loc-value {
        max-width: calc(100vw - 80px) !important;
        font-size: 11.5px !important;
    }

    .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)) !important;
        gap: 8px !important;
    }

    .product-card {
        border-radius: 12px !important;
        border: 1px solid #ebd9c8 !important;
        background: #ffffff !important;
        box-shadow: 0 1px 4px rgba(40, 25, 15, 0.04) !important;
    }

    .product-media {
        aspect-ratio: 1 / 1 !important;
        background: #ffffff !important;
        padding: 6px !important;
    }

    .product-media img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }

    .product-body {
        padding: 6px 8px 8px !important;
    }

    .product-brand {
        font-size: 9.5px !important;
        color: #8c7b70 !important;
        margin-bottom: 2px !important;
    }

    .product-name {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
        font-size: 11.5px !important;
        font-weight: 500 !important;
        color: #1e293b !important;
        line-height: 1.25 !important;
        margin: 2px 0 3px !important;
        min-height: 29px !important;
    }

    .price {
        font-size: 13.5px !important;
        font-weight: 700 !important;
    }

    .mrp-price {
        font-size: 10.5px !important;
    }

    .savings-pct {
        font-size: 10.5px !important;
    }

    .product-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 4px !important;
        margin-top: 6px !important;
    }

    .product-actions .btn {
        padding: 5px 2px !important;
        font-size: 10.5px !important;
        font-weight: 600 !important;
        border-radius: 6px !important;
        min-height: 26px !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
        letter-spacing: 0 !important;
    }

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

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

    .section {
        padding: 20px 0 !important;
    }

    .section-sm {
        padding: 14px 0 !important;
    }

    .breadcrumb {
        font-size: 11px !important;
        margin-bottom: 10px !important;
        gap: 4px !important;
    }

    h1,
    .page-title {
        font-size: 20px !important;
    }

    h2 {
        font-size: 17px !important;
    }

    h3 {
        font-size: 14px !important;
    }

    h4 {
        font-size: 13px !important;
    }

    .section-head {
        margin-bottom: 10px !important;
        gap: 8px !important;
    }

    .section-title {
        font-size: 16.5px !important;
        line-height: 1.25 !important;
    }

    .section-kicker {
        font-size: 10px !important;
    }

    .fk-view-all-pill {
        font-size: 11px !important;
        padding: 4px 9px !important;
    }

    /* Newsletter compact mobile styling */
    .newsletter-strip {
        padding: 18px 0 !important;
    }

    .newsletter-title {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
        font-size: 16px !important;
        line-height: 1.25 !important;
        margin: 2px 0 0 !important;
    }

    .newsletter-copy .section-kicker {
        font-size: 10px !important;
    }

    .newsletter-form {
        gap: 8px !important;
        margin-top: 8px !important;
    }

    .newsletter-input {
        padding: 9px 12px !important;
        font-size: 12.5px !important;
        border-radius: 8px !important;
    }

    .newsletter-btn {
        padding: 9px 16px !important;
        font-size: 12.5px !important;
        border-radius: 8px !important;
    }

    /* Footer compact mobile styling */
    .site-footer {
        padding: 22px 0 16px !important;
    }

    .footer-grid {
        gap: 16px !important;
        padding: 14px 0 8px !important;
    }

    .site-footer h4 {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
        font-size: 13.5px !important;
        font-weight: 700 !important;
        margin: 0 0 8px !important;
    }

    .site-footer a {
        font-size: 12px !important;
        margin-bottom: 6px !important;
    }

    .site-footer p {
        font-size: 11.5px !important;
        line-height: 1.4 !important;
    }

    .footer-bottom {
        margin-top: 16px !important;
        padding-top: 12px !important;
        font-size: 10.5px !important;
        flex-direction: column !important;
        gap: 4px !important;
    }

    .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;
    }
}