/* Home page only. The link's media query keeps the desktop layout unchanged. */
@media (max-width: 767px) {
    .top-header { padding: 4px 0; }
    .top-header > .container {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto 44px;
        align-items: center !important;
        gap: 12px 10px;
        padding-inline: 16px;
    }
    .top-header > .container > .d-flex { display: contents !important; }
    .top-header .logo { grid-column: 1; grid-row: 1; justify-self: start; }
    .top-header .logo img { max-width: 96px; max-height: 44px; }
    .top-header .login-btn,
    .top-header .cart-btn { min-height: 44px; margin: 0 !important; }
    .top-header .login-btn { font-size: .78rem; padding-inline: 12px; }
    .top-header .login-btn,
    .top-header .dropdown { grid-column: 2; grid-row: 1; min-width: 0; max-width: 42vw; }
    .top-header .dropdown .login-btn { max-width: 100%; overflow-wrap: anywhere; height: auto; }
    .top-header .cart-btn { grid-column: 3; grid-row: 1; }
    .top-header .search-box {
        grid-column: 1 / -1;
        grid-row: 2;
        display: block;
        width: 100%;
        min-width: 0;
        margin: 0 !important;
    }
    .top-header .search-box input { min-height: 46px; font-size: 16px; padding-inline: 16px 48px; border-radius: 12px; }
    .top-header .search-box button { left: 2px; width: 44px; height: 44px; }
    .bottom-header { padding: 7px 0; }
    .bottom-header .site-menu-toggle { width: 100%; min-height: 44px; padding-block: 8px; box-shadow: none; }
    .bottom-header #mainNavbar { max-height: 55vh; overflow-y: auto; overscroll-behavior: contain; }
    .bottom-header #mainNavbar .nav-link { min-height: 44px; display: flex; align-items: center; }

    .home-hero .carousel-item { height: auto; min-height: 0; background: #f6f8f8; }
    .home-hero-image {
        position: absolute;
        inset: 0;
        height: 100%;
        object-fit: cover;
        object-position: 80% center;
    }
    .home-hero-image.has-mobile-image { object-position: center; }
    .home-hero-shade {
        display: block;
        background: linear-gradient(0deg, #f6f8f8f5 0%, #f6f8f8b3 26%, transparent 52%);
    }
    .home-hero-content {
        position: relative;
        inset: auto;
        min-height: 460px;
        padding: 220px 18px 54px;
        justify-content: flex-end;
        align-items: flex-start;
    }
    .home-eyebrow { font-size: .78rem; }
    .home-hero-content .home-eyebrow { font-size: .68rem; }
    .home-hero-content h1 { font-size: clamp(1.2rem, 4.8vw, 1.6rem); line-height: 1.55; margin: 5px 0; overflow-wrap: anywhere; }
    .home-hero-content p { max-width: 34ch; font-size: .75rem; line-height: 1.8; margin-bottom: 10px; }
    .home-primary-button { min-height: 46px; padding: 11px 18px; font-size: .84rem; gap: 14px; }
    .home-hero-content .home-primary-button { min-height: 44px; padding: 8px 14px; font-size: .73rem; gap: 10px; border-radius: 10px; }
    .home-hero-controls { display: none; }
    .home-hero-dots { bottom: 8px; left: 20px; right: 20px; justify-content: center; gap: 4px; }
    .home-hero-dots button { position: relative; width: 36px !important; height: 44px !important; margin: 0 !important; background: transparent !important; }
    .home-hero-dots button.active { width: 36px !important; background: transparent !important; }
    .home-hero-dots button::after { content: ''; position: absolute; inset: 20px 6px; background: #9eb0b4; border-radius: 4px; }
    .home-hero-dots button.active::after { inset-inline: 0; background: var(--home-navy); }

    .home-section { margin-top: 36px; padding-inline: 16px; }
    .home-section-heading { align-items: flex-start; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 16px; }
    .home-section-heading h2, .home-guide h2 { font-size: clamp(1.05rem, 4.5vw, 1.35rem); line-height: 1.8; }
    .home-section-heading h2 { flex: 1 1 auto; }
    .home-section-heading a { min-height: 36px; font-size: .73rem; gap: 6px; }
    .home-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .home-category-card, .home-category-card-large { grid-column: auto; aspect-ratio: auto; min-height: 190px; }
    .home-category-card:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 180px; }
    .home-category-card img { object-fit: cover; }
    .home-category-card::after { background: linear-gradient(180deg, #ffffffed 0%, #ffffffb3 27%, transparent 65%); }
    .home-category-content { top: 12px; right: 12px; left: 10px; gap: 4px; }
    .home-category-content strong { font-size: .95rem; line-height: 1.8; }
    .home-category-content small { font-size: .7rem; line-height: 1.8; }
    .home-category-arrow { width: 32px; height: 32px; bottom: 10px; left: 10px; font-size: .8rem; }

    .home-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .home-product-card { padding: 6px; border-radius: 12px; }
    .home-product-image { aspect-ratio: 1; border-radius: 8px; }
    .home-product-name { font-size: .8rem; line-height: 1.9; padding: 10px 4px 8px; min-height: 66px; overflow-wrap: anywhere; }
    .home-product-bottom { flex-wrap: wrap; gap: 8px 4px; padding: 0 4px 6px; font-size: .82rem; }
    .home-product-bottom > span:first-child { min-width: 0; overflow-wrap: anywhere; }
    .home-product-bottom small { display: inline-block; font-size: .68rem; }
    .home-cart-small { width: 32px; height: 32px; flex-shrink: 0; border-radius: 9px; margin-inline-start: auto; }

    .home-banner-grid { gap: 14px; }
    .home-banner { aspect-ratio: auto; min-height: 210px; }
    .home-banner img { object-fit: cover; }
    .home-banner-content { position: relative; inset: auto; padding: 22px 18px; gap: 6px; max-width: 80%; }
    .home-banner-content strong { font-size: 1.25rem; line-height: 1.7; }
    .home-banner-content small { font-size: .78rem; line-height: 1.9; }
    .home-banner-content > span { min-height: 44px; display: inline-flex; align-items: center; gap: 10px; margin-top: 8px; }
    .home-benefits { width: calc(100% - 32px); padding: 22px 10px; gap: 24px 8px; }
    .home-benefits > div { min-width: 0; padding-inline: 5px; }
    .home-benefits strong { font-size: .85rem; }
    .home-benefits span { font-size: .72rem; line-height: 1.9; }
    .home-guide { width: calc(100% - 32px); padding: 24px 20px; gap: 24px; margin-bottom: 40px; }
    .home-guide h2 { margin-top: 8px; }
    .home-guide p { font-size: .86rem; line-height: 2; margin: 12px 0 18px; }
    .home-guide img { width: 100%; max-height: 190px; }

    .home-popup-card { max-height: calc(100dvh - 36px); overflow-y: auto; padding: 60px 22px 26px; }
    .home-popup-close { top: 10px; left: 10px; width: 44px; height: 44px; background: #f5f7f8; border-radius: 50%; }
    .home-popup-card h2 { font-size: 1.2rem; line-height: 1.8; }
    .home-popup-card p { font-size: .85rem; }
    .site-footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 16px; padding-bottom: 28px; }
    .site-footer-brand, .site-footer-trust { grid-column: 1 / -1; }
    .site-footer .footer-links { overflow-wrap: anywhere; }
    .site-footer .footer-links a { display: inline-flex; align-items: center; min-height: 36px; font-size: .78rem; }
    .site-footer-bottom { flex-direction: column; gap: 8px; line-height: 1.9; }
    a:focus-visible, button:focus-visible { outline: 2px solid var(--home-teal); outline-offset: 3px; }
}

@media (max-width: 359px) {
    .home-product-grid, .home-category-grid { gap: 8px; }
    .home-product-bottom { font-size: .76rem; }
    .home-cart-small { width: 28px; height: 28px; }
    .home-category-content strong { font-size: .85rem; }
    .home-category-content small { font-size: .65rem; }
    .site-footer-main > div { grid-column: 1 / -1; }
}
