/* ==========================================================================
   CHRISBEK'S — Phone and tablet refinements for the theme's sections.
   Loaded after the theme styles and chrisbek-header.css.
   ========================================================================== */

/* Search panel: let the theme's search box shrink so the close button stays on screen */
.cbk-search > .cbk-container > .search-box-wrap {
    min-width: 0;
}

.cbk-header .cbk-search__close {
    flex-shrink: 0;
}

/* TikTok glyph in the footer social row (drawn inline; see master/front.blade.php) */
.footer-social-links .cbk-tiktok {
    display: inline-block;
    vertical-align: -2px;
}

@media (max-width: 767.98px) {

    /* --- Search panel ---------------------------------------------------- */

    .cbk-search > .cbk-container {
        gap: 4px;
    }

    .site-header.cbk-header .search-box-wrap .search-box select {
        width: 72px;
        min-width: 0;
        padding-right: 18px;
        font-size: 13px;
    }

    .site-header.cbk-header .search-box-wrap .form-control {
        font-size: 16px; /* 16px stops iOS zooming into the field */
    }

    /* --- Section headings with tab links ----------------------------------
       The theme wraps long tab rows onto several lines and splits names
       ("New / Product"). Keep them on one line and let the row scroll. */

    .section-title .links {
        display: flex !important;
        flex-wrap: nowrap;
        gap: 22px;
        max-width: 100%;
        overflow-x: auto;
        padding-bottom: 12px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .section-title .links::-webkit-scrollbar {
        display: none;
    }

    .section-title .links a {
        flex: 0 0 auto;
        margin: 0 !important;
        white-space: nowrap;
        font-size: 14px;
    }

    /* Centred while the row fits; scrolls from the first tab when it doesn't */
    .newproduct-section .section-title .links a:first-child,
    .sps-two .section-title .links a:first-child {
        margin-left: auto !important;
    }

    .newproduct-section .section-title .links a:last-child,
    .sps-two .section-title .links a:last-child {
        margin-right: auto !important;
    }

    .section-title {
        margin-bottom: 18px;
    }

    /* --- Service highlights: compact rows instead of three tall cards ---- */

    .service-section .row > [class*="col-"] {
        margin-bottom: 10px !important;
    }

    .service-section .single-service.single-service2 {
        gap: 14px;
        padding: 14px 16px;
        border-radius: 8px;
    }

    .service-section .single-service img {
        flex-shrink: 0;
        width: 34px;
        height: 34px;
        margin: 0;
        object-fit: contain;
    }

    .service-section .single-service2 .content h6 {
        margin-bottom: 2px !important;
        font-size: 14.5px;
    }

    .service-section .single-service2 .content p {
        font-size: 12.5px;
        line-height: 1.4;
    }

    /* --- Deal of the week heading ---------------------------------------- */

    .deal-of-day-section .section-title .right-area {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 14px;
    }
}

/* --- Mobile drawer (opened from the header's menu button, below 1280px) --------- */

/* The theme only shows the drawer on narrow screens; the header menu button appears below 1280px */
@media (max-width: 1279.98px) {
    .mobile-menu.open {
        display: block;
    }
}

.mobile-menu {
    width: min(86vw, 340px);
    font-family: "Manrope", "Helvetica Neue", Arial, sans-serif;
    box-shadow: 0 0 60px rgba(23, 23, 23, 0.25);
}

.mobile-menu .mm-heading-area {
    align-items: center;
    padding: 18px 20px;
    background: #171717 !important;
}

.mobile-menu .mm-heading-area h4 {
    font-family: "Cormorant Garamond", "Times New Roman", serif;
    font-size: 21px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.mobile-menu .mm-heading-area .mm-t-two a {
    display: flex;
    font-size: 20px;
}

.mobile-menu .nav-tabs {
    border-bottom: 1px solid #E6E1D8;
}

.mobile-menu .nav-tabs li {
    flex: 1;
}

.mobile-menu .nav-tabs li span {
    position: relative;
    padding: 13px 0;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-align: center;
    text-transform: uppercase;
    color: #66615B;
}

.mobile-menu .nav-tabs li span.active {
    color: #171717;
}

.mobile-menu .nav-tabs li span.active::after {
    content: "";
    position: absolute;
    right: 20%;
    bottom: -1px;
    left: 20%;
    height: 2px;
    background: #171717;
}

.cbk-mnav {
    margin: 0;
    padding: 6px 0 24px;
    list-style: none;
}

.cbk-mnav__item {
    border-bottom: 1px solid #EFEBE4;
}

.mobile-menu .cbk-mnav__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 52px;
    padding: 0 20px;
    border: 0;
    background: transparent;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    text-align: left;
    color: #171717;
}

.cbk-mnav__item.is-active > .cbk-mnav__link {
    font-weight: 600;
}

.cbk-mnav__toggle i {
    font-size: 15px;
    color: #66615B;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.cbk-mnav__toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.cbk-mnav__sub {
    margin: 0;
    padding: 4px 0 12px;
    list-style: none;
    background: #F7F4EE;
}

.mobile-menu .cbk-mnav__sublink {
    display: block;
    padding: 11px 20px 11px 32px;
    font-size: 14px;
    line-height: 1.35;
    color: #66615B;
}

.mobile-menu .cbk-mnav__sublink.is-active,
.mobile-menu .cbk-mnav__sublink:hover {
    color: #171717;
}

.mobile-menu .cbk-mnav__link:focus-visible,
.mobile-menu .cbk-mnav__sublink:focus-visible {
    outline: 1px solid #171717;
    outline-offset: -3px;
}

#mmenu > .slideable-menu {
    padding: 0;
    border-top: 0;
}

/* Dimmed page behind the open drawer (element added by chrisbek-header.js) */
.cbk-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999998; /* just under the theme's drawer */
    background: rgba(23, 23, 23, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.35s;
}

.cbk-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
}

html.cbk-drawer-open,
html.cbk-drawer-open body {
    overflow: hidden;
}
