/* =====================================================================
   electro_storefront — responsive layer (6 of 6)

   Electro breakpoints: 576 / 768 / 992 / 1200 / 1480 (Bootstrap 5 grid).
   ===================================================================== */

/* ------------------------------------------------------ ≤1200: tighten */
@media (max-width: 1199.98px) {
    .sf-pdp__layout {
        grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
        gap: 24px;
    }
}

/* -------------------------------------------------- ≤992: tablet layout */
@media (max-width: 991.98px) {
    /* topbar + yellow navbar make way for the drawer */
    .sf-topbar,
    .sf-navbar {
        display: none;
    }

    .sf-burger {
        display: inline-flex;
    }

    .sf-header__inner {
        gap: 14px;
    }

    .sf-search {
        max-width: none;
    }

    /* single column: PDP above sidebar */
    .sf-shop-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .sf-sidebar {
        position: static;
    }
    .sf-pdp-page > .sf-sidebar { order: 2; }

    .sf-pdp {
        padding: 20px;
    }

    .sf-pdp__layout {
        grid-template-columns: minmax(0, 1fr);
    }

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

    .sf-footer-bottom__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 2.5em;
    }
}

/* -------------------------------------------------- ≤768: large phones */
@media (max-width: 767.98px) {
    .sf-main {
        padding-block: 1em 4.5em; /* room for the handheld bar */
    }

    .sf-header-actions .sf-action--cart .sf-action__label {
        display: none;
    }

    .sf-search {
        order: 3;
        flex-basis: 100%;
    }

    .sf-header__inner {
        flex-wrap: wrap;
        row-gap: 12px;
        padding-block: 10px;
        min-height: 0;
    }

    /* gallery: thumbs become a horizontal strip */
    .sf-gallery__thumbs {
        flex-direction: row;
        flex: 0 0 auto;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .sf-gallery__thumbs::-webkit-scrollbar {
        display: none;
    }

    .sf-tabs__nav {
        gap: 1.4em;
        padding-bottom: 6px;
        position: relative;
    }

    .sf-tabs__nav::after {
        content: "";
        border-bottom: 1px solid var(--sf-border);
        display: block;
        position: absolute;
        bottom: 5px;
        width: 100%;
    }

    .sf-tabs__nav li.is-active a::before {
        bottom: 0;
    }

    .sf-tabs__nav a {
        font-size: 1em;
        padding-bottom: 0.5em;
    }

    .sf-handheld-bar {
        display: flex;
    }

    .sf-toast-stack {
        inset-block-end: 76px; /* above the handheld bar */
        inset-inline: 16px;
    }
}

/* ------------------------------------------------------ ≤576: phones */
@media (max-width: 575.98px) {
    .sf-topbar__welcome {
        display: none;
    }

    .sf-breadcrumbs {
        padding: 8px 0;
        margin-inline: 0;
    }

    .sf-pdp {
        padding: 14px;
    }

    .sf-summary__actions .sf-btn--cart {
        flex-basis: 100%;
    }

    .sf-footer-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.8em;
    }

    .sf-copyright__inner {
        justify-content: center;
        text-align: center;
    }
}
