/* ==========================================================================
   Phones and tablets: corrections for the whole site (public pages, login,
   dashboard). Loaded last in include/__head.blade.php; goes with js/mobile.js.
   Desktop is not changed by this file, except the touch rule in section 1.
   ========================================================================== */

/* ---------------------------------------------------------------------------
   1. Touch screens: no "lift on hover" (it sticks after a tap)
   --------------------------------------------------------------------------- */
@media (hover: none) {
    .single-product-item:hover,
    .single-product-item:hover .product-thumb img,
    .buy-now-cta:hover {
        transform: none !important;
    }
}

/* ---------------------------------------------------------------------------
   2. Item cards: two per row on phones (col-6 in listings/include/item-block),
      so the card is made compact: smaller paddings, price above a full-width
      Buy Now button.
   --------------------------------------------------------------------------- */
@media (max-width: 575.98px) {
    .row:has(> [class*="col-"] > .a2z-product-card) {
        --bs-gutter-x: 12px;
        --bs-gutter-y: 12px;
    }

    .a2z-product-card {
        padding: 6px 6px 10px !important;
        border-radius: 14px !important;
    }

    .a2z-product-card .product-thumb,
    .a2z-product-card .product-thumb img {
        border-radius: 10px !important;
    }

    .a2z-product-card .thumb-floating-top {
        top: 6px !important;
        left: 6px !important;
        right: 6px !important;
    }

    .a2z-product-card .modern-badge.trending-badge {
        gap: 3px !important;
        padding: 3px 7px !important;
        font-size: 10.5px !important;
        letter-spacing: 0.2px !important;
    }

    .a2z-product-card .modern-badge.trending-badge svg {
        width: 10px;
        height: 10px;
    }

    .a2z-product-card .thumb-floating-top .wishlist-btn {
        width: 32px !important;
        height: 32px !important;
    }

    .a2z-product-card .thumb-floating-bottom {
        bottom: 6px !important;
        left: 6px !important;
    }

    .a2z-product-card .stock-pill {
        gap: 4px !important;
        padding: 3px 7px !important;
    }

    .a2z-product-card .stock-pill,
    .a2z-product-card .stock-pill .stock-text {
        font-size: 11px !important;
    }

    .a2z-product-card .content-wrap {
        padding: 9px 2px 0 !important;
    }

    .a2z-product-card .card-meta-row {
        gap: 4px !important;
        margin-bottom: 6px !important;
    }

    .a2z-product-card .card-category-link {
        padding: 2px 6px !important;
        font-size: 11px !important;
        letter-spacing: 0.2px !important;
    }

    .a2z-product-card .card-rating {
        padding: 2px 5px !important;
        font-size: 11.5px !important;
    }

    .a2z-product-card .card-rating .rating-count {
        display: none !important;
    }

    .a2z-product-card .product-title {
        min-height: 38px !important;
        margin-bottom: 8px !important;
        font-size: 13.5px !important;
        line-height: 1.4 !important;
    }

    .a2z-product-card .card-footer-cta {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        padding-top: 8px !important;
    }

    .a2z-product-card .price-label {
        display: none !important;
    }

    .a2z-product-card .price-values {
        gap: 2px 6px !important;
    }

    .a2z-product-card .price-values .main-price {
        font-size: 17px !important;
    }

    .a2z-product-card .price-values .strike-price {
        font-size: 12px !important;
    }

    .a2z-product-card .buy-now-cta {
        width: 100% !important;
        min-height: 38px !important;
        padding: 0 10px !important;
        border-radius: 10px !important;
        font-size: 13px !important;
    }
}

/* Very narrow phones (320–359px) */
@media (max-width: 359.98px) {
    .a2z-product-card .product-title {
        font-size: 13px !important;
    }

    .a2z-product-card .price-values .main-price {
        font-size: 15.5px !important;
    }
}

/* ---------------------------------------------------------------------------
   3. Home: stock labels on the coloured category cards. Their colours are set
      inline, so they need !important; on phones they get solid colours that
      read well on the blue / purple / green cards.
   --------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    .trending-product-card .qty-badge.in-stock-badge {
        background: #0f9f6e !important;
        border-color: rgba(255, 255, 255, 0.45) !important;
        color: #fff !important;
    }

    .trending-product-card .qty-badge.text-danger {
        background: #e5484d !important;
        border-color: rgba(255, 255, 255, 0.45) !important;
        color: #fff !important;
    }
}

/* ---------------------------------------------------------------------------
   4. Item details page
   --------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    /* Wishlist and Share share the row equally */
    .item-details-side-actions,
    .item-details-side-actions .product-actions {
        width: 100%;
    }

    .item-details-side-actions .p-action-btn {
        flex: 1 1 0;
        justify-content: center;
    }
}

/* Tablets and phones held sideways: the picture filled the whole width (690px square, larger than on a
   desktop), so the price and the description were far down. 440px wide, centred with its buttons and
   thumbnails; smaller still on short landscape screens. */
@media (min-width: 576px) and (max-width: 991.98px) {
    .item-details-image-header,
    .item-details-small-image-wrapper {
        max-width: 440px;
        margin-inline: auto;
    }
}

@media (min-width: 576px) and (max-width: 991.98px) and (orientation: landscape) and (max-height: 540px) {
    .item-details-image-header,
    .item-details-small-image-wrapper {
        max-width: 400px;
    }
}

/* Buy Now bar (listings/details.blade.php + mobile.js) */
.m-buybar {
    display: none;
}

@media (max-width: 991.98px) {
    .m-buybar:not([hidden]) {
        position: fixed;
        inset-inline: 0;
        bottom: 0;
        z-index: 999;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.97);
        border-top: 1px solid rgba(15, 23, 42, 0.08);
        box-shadow: 0 -10px 28px -12px rgba(15, 23, 42, 0.25);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .m-buybar.is-away {
        transform: translateY(110%);
        opacity: 0;
        pointer-events: none;
    }

    .m-buybar-price {
        display: flex;
        flex-direction: column;
        min-width: 0;
        line-height: 1.15;
    }

    .m-buybar-label {
        font-size: 12px;
        font-weight: 600;
        color: #64748b;
    }

    .m-buybar-price strong {
        font-size: 20px;
        font-weight: 800;
        color: #ff5463;
        white-space: nowrap;
    }

    .m-buybar-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        flex: 0 1 220px;
        min-height: 46px;
        padding: 0 22px;
        border-radius: 999px;
        background: linear-gradient(135deg, #ff5463 0%, #ee384a 100%);
        color: #fff !important;
        font-size: 15px;
        font-weight: 700;
        text-decoration: none !important;
        box-shadow: 0 8px 18px -6px rgba(255, 84, 99, 0.6);
    }

    .m-buybar-btn:active {
        transform: scale(0.98);
    }

    /* room for the bar at the end of the page; the "back to top" button sits above it */
    body.has-m-buybar {
        padding-bottom: 72px;
    }

    body.has-m-buybar .progress-wrap {
        bottom: 84px !important;
    }

    /* the cookie notice (first visit) goes over the bar, so Accept / Reject can be tapped;
       still under the promo popup (1000, later in the page), dialogs and the menu */
    .cookie.gdpr {
        z-index: 1000 !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .m-buybar {
        transition: none !important;
    }
}

/* Category / sub-category: the price filter fits narrow phones (it was 11px too wide at 320px) */
@media (max-width: 575.98px) {
    .price-filter-box .price-inputs-wrap {
        display: flex;
        width: 100%;
        min-width: 0;
    }

    .price-filter-box .price-field {
        flex: 1 1 0;
        min-width: 0;
    }

    .price-filter-box .price-field input {
        width: 100% !important;
    }

    .price-filter-box .price-field input::placeholder {
        color: rgba(255, 255, 255, 0.45);
    }

    .price-filter-box .price-apply-btn {
        flex: 0 0 auto;
        padding: 0 14px !important;
    }
}

/* ---------------------------------------------------------------------------
   5. "Back to top" button: smaller and closer to the corner on phones, so it
      does not cover buttons near the edge
   --------------------------------------------------------------------------- */
@media (max-width: 575.98px) {
    .progress-wrap {
        width: 40px !important;
        height: 40px !important;
        inset-inline-end: 12px !important;
        right: 12px !important;
        bottom: 14px !important;
    }

    .progress-wrap .progress-icon svg {
        width: 20px;
        height: 20px;
    }
}

/* ---------------------------------------------------------------------------
   6. Tables (dashboard): one card per row on phones. mobile.js adds .m-table
      and copies each column heading into data-label.
   --------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    .m-table {
        min-width: 0 !important;
        width: 100% !important;
        border-collapse: separate !important;
        border-spacing: 0 !important;
        background: transparent !important;
    }

    .m-table thead {
        display: none !important;
    }

    .m-table tbody,
    .m-table tfoot {
        display: block !important;
        width: 100% !important;
    }

    .m-table tr {
        display: block !important;
        width: 100% !important;
        margin: 0 0 12px !important;
        padding: 4px 14px !important;
        background: #fff !important;
        border: 1px solid #e8ebf1 !important;
        border-radius: 14px !important;
        box-shadow: 0 4px 14px -8px rgba(15, 23, 42, 0.14) !important;
    }

    .m-table tr:last-child {
        margin-bottom: 0 !important;
    }

    .m-table tr > td,
    .m-table tr > th {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 14px !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        padding: 10px 0 !important;
        border: 0 !important;
        border-bottom: 1px dashed #e8ebf1 !important;
        background: transparent !important;
        box-shadow: none !important;
        text-align: end !important;
        white-space: normal !important;
        overflow-wrap: anywhere;
        font-size: 14px;
    }

    .m-table tr > :last-child {
        border-bottom: 0 !important;
    }

    .m-table [data-label]::before {
        content: attr(data-label);
        flex: 0 0 auto;
        max-width: 48%;
        font-size: 13px;
        font-weight: 600;
        color: #64748b;
        text-align: start;
        overflow-wrap: normal;
    }

    /* long content (credentials, pictures) goes under its label */
    .m-table tr > .m-block {
        display: block !important;
        text-align: start !important;
    }

    .m-table tr > .m-block::before {
        display: block;
        max-width: none;
        margin-bottom: 8px;
    }

    .m-table tr > .m-full {
        justify-content: center !important;
        text-align: center !important;
    }

    .m-table tr > .m-empty {
        display: none !important;
    }

    .m-table .tooltip-action-btns {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 8px;
    }

    .m-table .common-action-button,
    .m-table .tooltip-btn {
        min-width: 36px;
        min-height: 36px;
    }

    .m-table img {
        max-width: 100%;
        height: auto;
    }

    /* the scroll boxes around the tables are no longer needed (only once mobile.js has made the cards;
       .common-table-full is 1000px wide for the desktop table) */
    .common-table:has(.m-table),
    .common-table-full:has(.m-table),
    .common-full-table:has(.m-table),
    .table-responsive:has(.m-table),
    .table-responsive-lg:has(.m-table) {
        width: 100% !important;
        min-width: 0 !important;
        overflow: visible !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }
}

/* ---------------------------------------------------------------------------
   7. Login / Create account
   --------------------------------------------------------------------------- */
@media (max-width: 575.98px) {
    /* required "*" stays next to its label */
    label.input-label > span {
        display: inline !important;
    }

    .auth-nav-switcher .auth-nav-btn {
        gap: 6px !important;
        padding-inline: 8px !important;
        font-size: 14px !important;
        white-space: nowrap !important;
    }
}

/* ---------------------------------------------------------------------------
   8. Dashboard: bigger tap areas, notifications list
   --------------------------------------------------------------------------- */
@media (max-width: 1199.98px) {
    /* dashboard header only (header.header-2): its menu button was 22 x 18 px; same look, 40 x 40 px to tap */
    header.header-2 button.td-offcanvas-toggle {
        box-sizing: content-box !important;
        padding: 11px 9px !important;
        margin: -11px -9px !important;
    }
}

@media (max-width: 767.98px) {
    #button-container {
        flex-wrap: wrap;
        gap: 6px 10px !important;
    }

    #button-container .chart-btn {
        min-height: 36px;
        padding: 6px 10px !important;
        border-radius: 999px;
    }

    .notifications-item {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 12px !important;
        margin-bottom: 10px !important;
        padding: 14px !important;
        background: #fff !important;
        border: 1px solid #e8ebf1 !important;
        border-radius: 14px !important;
        box-shadow: 0 4px 14px -8px rgba(15, 23, 42, 0.14) !important;
    }

    .notifications-item .notification-list {
        display: flex;
        align-items: center;
        gap: 12px;
        min-width: 0;
    }

    .notifications-item .notification-list .icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 38px;
        width: 38px;
        height: 38px;
        border-radius: 50%;
        background: rgba(255, 84, 99, 0.1);
        color: #ff5463;
    }

    /* the icon library is not loaded here: draw a small check mark instead of the empty <i> */
    .notifications-item .notification-list .icon > i:empty::before {
        content: "";
        display: block;
        width: 18px;
        height: 18px;
        background: currentColor;
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
    }

    .notifications-item .content {
        min-width: 0;
    }

    .notifications-item .title {
        margin: 0 0 3px !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        line-height: 1.35 !important;
    }

    .notifications-item .meta {
        font-size: 13px;
        color: #94a3b8;
    }

    .notifications-item .notifications-link a {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        min-height: 36px;
        padding: 0 14px !important;
        border-radius: 999px;
        background: rgba(255, 84, 99, 0.1);
        color: #ff5463 !important;
        font-size: 13px !important;
        font-weight: 600;
        white-space: nowrap;
        text-decoration: none !important;
    }
}

/* ---------------------------------------------------------------------------
   9. Purchased items (purchase/delivery-item): the credentials box and the
      file cards fit a phone; their buttons no longer break inside a word.
      (Most of their look is inline, hence the !important.)
   --------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    .delivery-credentials-box {
        padding: 12px 14px !important;
        font-size: 15px !important;
    }

    .delivery-credentials-box > .d-flex {
        align-items: flex-start !important;
        gap: 10px;
    }

    .delivery-credentials-box .delivery-text-content {
        font-size: 15px !important;
        line-height: 1.6 !important;
    }

    .copy-delivery-text-btn {
        flex: 0 0 auto;
        min-height: 34px;
        white-space: nowrap;
    }

    /* file name + size on top, then the hint, then the buttons side by side */
    .delivery-image-card > .d-flex:first-child,
    .delivery-video-card > .d-flex:first-child {
        gap: 10px;
    }

    .delivery-image-card > .d-flex:first-child > .badge,
    .delivery-video-card > .d-flex:first-child > .badge {
        flex: 0 0 auto;
    }

    .delivery-image-card > .d-flex:first-child > span:first-child,
    .delivery-video-card > .d-flex:first-child > span:first-child {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .delivery-image-card > .d-flex:last-child,
    .delivery-video-card > .d-flex:last-child {
        flex-wrap: wrap;
        gap: 10px;
    }

    .delivery-image-card > .d-flex:last-child > small,
    .delivery-video-card > .d-flex:last-child > small {
        flex: 1 1 100%;
        font-size: 12px !important;
        text-align: start;
    }

    .delivery-image-card > .d-flex:last-child > .d-flex {
        flex: 1 1 100%;
    }

    .delivery-image-card > .d-flex:last-child .btn,
    .delivery-video-card > .d-flex:last-child > .btn {
        flex: 1 1 0;
        justify-content: center;
        min-height: 40px;
        font-size: 13px !important;
        white-space: nowrap;
    }

    .delivery-file-card {
        flex-wrap: wrap;
        padding: 12px 14px !important;
    }

    .delivery-file-card > .btn {
        flex-basis: 100% !important;
        justify-content: center;
        min-height: 42px;
    }
}

/* ---------------------------------------------------------------------------
   10. Mobile menu (public and dashboard): full-width rows that are easy to tap
       (the links were 18px tall). The border colour suits the white and the
       dark menu.
   --------------------------------------------------------------------------- */
@media (max-width: 1199.98px) {
    .td-offcanvas .offcanvas-nav ul li {
        margin: 0 !important;
        border-bottom: 1px solid rgba(127, 127, 127, 0.16);
    }

    .td-offcanvas .offcanvas-nav ul li:last-child {
        border-bottom: 0;
    }

    .td-offcanvas .offcanvas-nav ul li a {
        display: block;
        padding: 13px 2px;
        font-size: 16px;
        font-weight: 600;
        line-height: 1.3;
    }

    .td-offcanvas .offcanvas-nav ul li a.active {
        color: #ff5463 !important;
    }
}

/* "View All" text link next to a section title (item page, related items): was 58 x 19 px to tap;
   same look, about 74 x 39 px */
@media (max-width: 767.98px) {
    .section-header-3 .view-all-button .view-all-btn {
        display: inline-block;
        padding: 10px 8px;
        margin: -10px -8px;
    }
}

/* ---------------------------------------------------------------------------
   10b. Messages (success / error box at the top). include/__notify makes the
        box 100vw - 24px wide but its holder only 100vw - 32px, so on phones
        the box stuck out 8px on the right. Its <style> comes after this file,
        hence "html body" to win.
   --------------------------------------------------------------------------- */
@media (max-width: 575.98px) {
    html body .alert-show-status {
        max-width: calc(100vw - 24px) !important;
    }
}

/* ---------------------------------------------------------------------------
   11. Touch screens: text fields at 16px. An iPhone zooms the whole page in
       when a field under 16px is tapped (it happened with the search box, the
       price filter and the ticket form).
   --------------------------------------------------------------------------- */
@media (max-width: 991.98px) and (pointer: coarse) {
    input:not([type]),
    input[type="text"],
    input[type="search"],
    input[type="email"],
    input[type="tel"],
    input[type="url"],
    input[type="number"],
    input[type="password"],
    input[type="date"],
    input[type="datetime-local"],
    select,
    textarea,
    .search:not(.search-modal) input[type="text"],
    .search:not(.search-modal) input[type="search"],
    header.header .header-full .search:not(.search-modal) input[type="text"] {
        font-size: 16px !important;
    }
}

/* ===========================================================================
   12. Compact phone layout (all pages). Phones only (up to 767px; most of it
       up to 575px): less empty space, smaller headings, "View All" next to its
       title, two cards per row, shorter lists. Desktop and tablets unchanged.
   =========================================================================== */

/* ---- 12a. Sections and section titles ------------------------------------ */
@media (max-width: 767.98px) {
    .section_space-py {
        padding-top: 32px !important;
        padding-bottom: 32px !important;
    }

    .section_space-pT {
        padding-top: 32px !important;
    }

    .title_mb {
        margin-bottom: 16px !important;
    }

    .title-accent {
        gap: 10px !important;
    }

    .title-accent-badge,
    .title-accent-halo {
        width: 36px !important;
        height: 36px !important;
        border-radius: 11px !important;
    }

    .title-accent-badge svg {
        width: 18px !important;
        height: 18px !important;
    }

    .title-accent-body {
        gap: 5px !important;
    }

    .title-accent-bar {
        width: 32px !important;
    }

    .title-accent .section-title,
    .trending-product .section-header .title-accent .section-title {
        font-size: 20px !important;
    }

    /* the same size for the older "Trending Products" title (an h2 with a flame icon, no accent mark) */
    .trending-product .section-header > .section-title {
        font-size: 20px !important;
    }

    /* the title on the left and its "View All" button on the right, in one line
       (the button used to sit under the title, on the left) */
    .row.title_mb:has(.view-all-category-btn) {
        --bs-gutter-x: 12px;
        --bs-gutter-y: 0;
        flex-wrap: nowrap;
        align-items: center;
    }

    .row.title_mb:has(.view-all-category-btn) > * {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    .row.title_mb:has(.view-all-category-btn) > :first-child {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
    }

    .row.title_mb:has(.view-all-category-btn) > :last-child {
        flex: 0 0 auto;
        width: auto;
        text-align: end !important;
    }

    /* product-card.css sets these with a.view-all-category-btn + !important */
    a.view-all-category-btn.view-all-category-btn {
        height: 34px !important;
        padding: 0 14px !important;
        gap: 6px !important;
        font-size: 12.5px !important;
        white-space: nowrap;
    }

    a.view-all-category-btn.view-all-category-btn i {
        font-size: 11px !important;
    }

    .trending-product .section-header.title_mb {
        flex-wrap: nowrap !important;
        gap: 10px !important;
    }

    .trending-product .view-all-header-link {
        flex: 0 0 auto;
        min-height: 34px;
        padding: 0 14px !important;
        font-size: 12.5px !important;
        white-space: nowrap;
    }
}

/* ---- 12b. Home: hero (the wall of brand logos is left out on phones) ------- */
@media (max-width: 767.98px) {
    .ip-home-hero {
        padding: 22px 0 26px !important;
    }

    .ip-home-hero .col-lg-5 {
        display: none !important;
    }

    .ip-home-hero .ip-eyebrow {
        margin-bottom: 12px !important;
        padding: 5px 11px !important;
        font-size: 10.5px !important;
    }

    .ip-home-hero .ip-hero-title {
        margin-bottom: 10px !important;
    }

    .ip-home-hero .ip-hero-lead {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
        font-size: 14px !important;
        line-height: 1.6 !important;
    }

    .ip-home-hero .ip-hero-actions {
        margin-top: 16px !important;
        gap: 10px !important;
    }

    .ip-home-hero .ip-btn {
        height: 44px;
        min-height: 44px !important;
        padding: 0 14px !important;
        font-size: 14.5px !important;
    }

    .ip-home-hero .hero-stats {
        margin-top: 16px !important;
        gap: 16px !important;
    }

    .ip-home-hero .hero-stats .left-content img {
        width: auto !important;
        height: 30px !important;
    }

    .ip-home-hero .hero-stats .right-content strong {
        font-size: 17px !important;
    }

    .ip-home-hero .hero-stat-label {
        font-size: 12px !important;
    }

    .ip-home-hero .hero-features-wrap {
        margin-top: 14px !important;
        gap: 8px !important;
    }

    .ip-home-hero .hero-feature-card {
        gap: 6px !important;
        padding: 9px 6px !important;
        border-radius: 13px !important;
    }

    .ip-home-hero .hero-feature-card .feature-icon-box {
        width: 30px !important;
        height: 30px !important;
        border-radius: 9px !important;
    }

    .ip-home-hero .hero-feature-card .feature-icon-box svg {
        width: 15px !important;
        height: 15px !important;
    }
}

/* ---- 12c. Category grids (home "Best Selling", All Categories, a category's
            sub-categories): three per row; the home shows three rows ---------- */
@media (max-width: 575.98px) {
    .best-selling-product-wrapper {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .best-selling-product:has(.view-all-category-btn) .best-selling-product-wrapper > :nth-child(n+10) {
        display: none !important;
    }
}

/* ---- 12d. Home: Trending Products, two per row ---------------------------- */
@media (max-width: 575.98px) {
    .trending-product-cards-row {
        --bs-gutter-x: 10px;
        --bs-gutter-y: 10px;
    }

    .trending-product-cards-row > .trending-product-cards-col {
        flex: 0 0 50%;
        width: 50%;
        max-width: 50%;
    }

    .trending-product-card {
        height: 100%;
        gap: 10px !important;
        padding: 12px 10px !important;
        border-radius: 16px !important;
    }

    .trending-product-card .card-meta-bar,
    .trending-product-card .title-icon .category-meta-info .sub-label,
    .trending-product-card .item-bullet-icon,
    .trending-product-card .item-arrow-icon,
    .trending-product-card .product-list:nth-child(n+4) {
        display: none !important;
    }

    .trending-product-card .title-icon {
        gap: 8px !important;
        margin: 0 !important;
        padding: 0 0 10px !important;
    }

    /* product-card.css sizes the icon box with a six-class selector */
    .trending-product-cards .trending-product-cards-row .trending-product-cards-col .trending-product-card .title-icon .icon {
        flex: 0 0 34px;
        width: 34px !important;
        height: 34px !important;
        border-radius: 10px !important;
    }

    .trending-product-card .title-icon .icon i {
        font-size: 16px !important;
    }

    .trending-product-card .title-icon .icon img {
        width: 19px !important;
        height: 19px !important;
    }

    .trending-product-card .category-meta-info {
        min-width: 0;
    }

    .trending-product-card .category-meta-info h6 {
        overflow: hidden;
        margin: 0 !important;
        font-size: 14.5px !important;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .trending-product-card .products-lists {
        gap: 6px !important;
        margin: 0 !important;
    }

    .trending-product-card .product-list-card {
        gap: 6px !important;
        min-height: 0 !important;
        padding: 7px 8px !important;
        border-radius: 9px !important;
    }

    .trending-product-card .item-name-group {
        flex: 1 1 auto;
        min-width: 0;
    }

    .trending-product-card .product-list-card h5 {
        overflow: hidden;
        margin: 0 !important;
        font-size: 12px !important;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    /* stock: a tick or a cross in a solid circle instead of the "Stock" / "No Stock" pill. The pill's
       colours are set inline with !important, so the pill is kept for screen readers only and the
       circle is drawn by its group */
    .trending-product-card .item-badge-group {
        position: relative;
        flex: 0 0 auto;
        gap: 0 !important;
    }

    .trending-product-card .item-badge-group > .qty-badge {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        overflow: hidden !important;
        clip: rect(0 0 0 0) !important;
        padding: 0 !important;
        white-space: nowrap !important;
    }

    .trending-product-card .item-badge-group:has(> .qty-badge)::before {
        content: "\f00c";
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background: #0f9f6e;
        box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.6);
        color: #fff;
        font: 900 9px/1 "Font Awesome 6 Free";
    }

    .trending-product-card .item-badge-group:has(> .qty-badge.text-danger)::before {
        content: "\f00d";
        background: #e5484d;
    }

    .trending-product-card .view-all-btn {
        margin-top: auto !important;
        padding: 0 !important;
    }

    /* product-card.css: .trending-product-card .view-all-btn a { ... !important } */
    .trending-product-card .view-all-btn a.trending-card-btn {
        height: 34px !important;
        padding: 0 8px !important;
        gap: 5px !important;
        font-size: 12px !important;
        white-space: nowrap;
    }

    .trending-product-card .view-all-btn a.trending-card-btn span {
        white-space: nowrap;
    }

    .trending-product-card .view-all-btn a.trending-card-btn i {
        margin: 0 !important;
        font-size: 11px !important;
    }
}

/* ---- 12e. Home: "Trending <category>" rows show one row (two items) each;
            "View All" opens the rest -------------------------------------- */
@media (max-width: 575.98px) {
    .trending-games .row.gy-30 > [class*="col-"]:nth-child(n+3) {
        display: none !important;
    }
}

/* ---- 12f. Home: New Listing, two per row ---------------------------------- */
@media (max-width: 575.98px) {
    .new-listing-section .row.gy-30 {
        --bs-gutter-x: 10px;
        --bs-gutter-y: 10px;
    }

    .new-listing-section .row.gy-30 > [class*="col-"] {
        flex: 0 0 50%;
        width: 50%;
        max-width: 50%;
    }

    .new-listing-item {
        height: 100%;
        border-radius: 14px !important;
    }

    .new-listing-item .card-head {
        gap: 6px !important;
        padding: 12px 8px !important;
    }

    .new-listing-item .card-head .icon {
        font-size: 13px !important;
    }

    .new-listing-item .card-head .title {
        min-width: 0;
    }

    .new-listing-item .card-head h3 {
        overflow: hidden;
        margin: 0 !important;
        font-size: 14.5px !important;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .new-listing-item .list-inner {
        padding: 6px 8px 8px !important;
    }

    .new-listing-item .list {
        padding: 6px 8px !important;
    }

    .new-listing-item .list li {
        padding: 5px 0 !important;
    }

    .new-listing-item .list li:nth-child(n+4) {
        display: none !important;
    }

    .new-listing-item .list li a {
        display: block;
        min-width: 0;
        overflow: hidden;
        padding: 2px 0 !important;
        font-size: 12.5px !important;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    /* the arrow's icon is display:flex (it took a line of its own) */
    .new-listing-item .list li a .chev,
    .new-listing-item .list li a .chev i {
        display: inline-flex !important;
        vertical-align: middle;
    }

    .new-listing-item .list li a .chev {
        margin-right: 2px;
    }
}

/* ---- 12g. Home: Customer Reviews ------------------------------------------ */
@media (max-width: 575.98px) {
    .td-testimonial-section .testimonial-slider {
        padding-bottom: 14px !important;
    }

    .testimonial-item {
        padding: 16px !important;
        border-radius: 14px !important;
    }

    .testimonial-item .testimonial-top {
        margin-bottom: 8px !important;
    }

    .testimonial-item .testimonial-quote,
    .testimonial-item .testimonial-quote svg {
        width: 22px !important;
        height: 22px !important;
        font-size: 20px !important;
    }

    .testimonial-item .rating-icons i {
        font-size: 13px !important;
    }

    .testimonial-item .description {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 4;
        overflow: hidden;
        margin-bottom: 12px !important;
        font-size: 14px !important;
        line-height: 1.6 !important;
    }

    .testimonial-item .user-thumb {
        flex: 0 0 40px;
        width: 40px !important;
        height: 40px !important;
        font-size: 14px !important;
    }

    .testimonial-item .user-contents .title {
        margin: 0 !important;
        font-size: 15px !important;
    }

    .testimonial-item .designation {
        font-size: 12.5px !important;
    }

    .td-testimonial-section .slider-pagination {
        margin-top: 12px !important;
    }

    .testimonial-nav-btn {
        width: 34px !important;
        height: 34px !important;
    }
}

/* ---- 12h. Articles (home "Recent Articles" and the blog list): small picture on
            the left, title on the right ------------------------------------ */
@media (max-width: 575.98px) {
    .td-blog-section .row.gy-30,
    .row.gy-30:has(> [class*="col-"] > .single-blog-item) {
        --bs-gutter-y: 10px;
    }

    .single-blog-item {
        display: grid !important;
        grid-template-columns: 112px minmax(0, 1fr);
        align-items: center;
        gap: 12px;
        padding: 8px !important;
        border-radius: 14px !important;
    }

    .single-blog-item .blog-thumb {
        margin: 0 !important;
        overflow: hidden;
        border-radius: 10px !important;
    }

    .single-blog-item .blog-thumb img {
        width: 100% !important;
        height: 84px !important;
        object-fit: cover;
        border-radius: 10px !important;
    }

    .single-blog-item .blog-contents {
        padding: 0 !important;
    }

    .single-blog-item .blog-date {
        gap: 5px !important;
        margin-bottom: 6px !important;
        padding: 3px 8px !important;
        font-size: 11.5px !important;
    }

    .single-blog-item .title {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
        margin: 0 !important;
        font-size: 14px !important;
        line-height: 1.35 !important;
    }

    .single-blog-item .description {
        display: none !important;
    }
}

/* ---- 12i. Call to action above the footer --------------------------------- */
@media (max-width: 575.98px) {
    .td-cta-section {
        padding-top: 28px !important;
        padding-bottom: 28px !important;
    }

    .td-cta-section .section-title {
        font-size: 22px !important;
        line-height: 1.25 !important;
    }

    .td-cta-section .title_mb {
        margin-bottom: 0 !important;
    }

    .td-cta-section .btn-inner {
        margin-top: 16px !important;
    }

    .td-cta-section .primary-button {
        min-height: 40px;
        padding: 0 18px !important;
        font-size: 14px !important;
    }
}

/* ---- 12j. Footer (footer.css loads after this file: stronger selectors) ----- */
@media (max-width: 575.98px) {
    .a2z-footer.a2z-footer .footer-primary .footer-main {
        padding: 28px 0 10px;
    }

    .a2z-footer.a2z-footer .footer-main > .row {
        --bs-gutter-x: 12px;
        --bs-gutter-y: 20px;
    }

    .a2z-footer.a2z-footer .footer-logo {
        margin-bottom: 10px;
    }

    .a2z-footer.a2z-footer .footer-primary .footer-logo img {
        height: 34px !important;
        max-height: 34px !important;
    }

    .a2z-footer.a2z-footer .footer-contents .description {
        font-size: 13px;
        line-height: 1.6;
    }

    .a2z-footer.a2z-footer .footer-social {
        margin-top: 12px;
    }

    /* the three lists of links side by side */
    .a2z-footer.a2z-footer .footer-main > .row > .col-6 {
        flex: 0 0 33.3333%;
        width: 33.3333%;
        max-width: 33.3333%;
    }

    .a2z-footer.a2z-footer .footer-wg-head .title {
        margin-bottom: 10px;
        padding-bottom: 8px;
        font-size: 14px;
    }

    .a2z-footer.a2z-footer .footer-links ul li:not(:last-child) {
        margin-bottom: 6px;
    }

    .a2z-footer.a2z-footer .footer-links ul li a {
        font-size: 12.5px;
        line-height: 1.4;
    }

    .a2z-footer.a2z-footer .a2z-footer__bar {
        gap: 12px;
        padding: 14px 0 16px;
    }

    .a2z-footer.a2z-footer .copyright-payment {
        flex-direction: row;
        justify-content: center;
        gap: 10px;
        padding: 8px 10px;
    }

    .a2z-footer.a2z-footer .payment-label {
        font-size: 13px;
    }

    .a2z-footer.a2z-footer .payment-methods-wrap {
        gap: 8px;
    }

    .a2z-footer.a2z-footer .payment-badge {
        height: 32px;
        min-width: 78px;
        padding: 0 10px;
        border-radius: 8px;
    }

    .a2z-footer.a2z-footer .payment-badge img {
        height: 22px;
    }

    .a2z-footer.a2z-footer .payment-badge--nagad img {
        height: 18px;
    }

    .a2z-footer.a2z-footer .copyright-link ul {
        gap: 6px 16px;
    }

    .a2z-footer.a2z-footer .copyright-link ul li a {
        font-size: 12.5px;
    }

    .a2z-footer.a2z-footer .footer-copyright {
        padding: 12px 0;
    }

    .a2z-footer.a2z-footer .copyright-text p.description {
        font-size: 12.5px;
    }
}

/* ---- 12k. Item page on phones and tablets: the buy box comes up under the price --
   mobile.js moves the box (stock, quantity, total, Buy Now) out of the right-hand
   column, which used to drop below the description and the reviews, and puts it
   back on wider screens. The description is cut short with a "See more" button. */
@media (max-width: 991.98px) {
    .item-details-info {
        display: flex;
        flex-direction: column;
    }

    .item-details-info > .price-section {
        order: 1;
    }

    .item-details-info > .delivery-info {
        order: 2;
    }

    .item-details-info > .seller-info-card {
        order: 3;
    }

    .item-details-info > .details-section {
        order: 4;
    }

    /* once the box has moved, the right-hand column only holds a "Suggested Items" list that the
       grid at the end of the page repeats */
    .items-details-section:has(~ .best-selling-product) .row > [class*="col-"]:has(> .items-sidebar):not(:has(.seller-info-card)) {
        display: none;
    }

    /* "See more": the description shows its first part, faded at the bottom */
    .details-section.m-clamp:not(.is-open) .product-description-container {
        max-height: 340px;
        overflow: hidden;
        -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent);
        mask-image: linear-gradient(to bottom, #000 62%, transparent);
    }

    .details-section.m-clamp .m-more-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        height: 42px;
        margin-top: 6px;
        border: 1px solid rgba(255, 84, 99, 0.35);
        border-radius: 999px;
        background: rgba(255, 84, 99, 0.06);
        color: #ff5463;
        font-size: 14px;
        font-weight: 700;
    }

    .details-section .m-more-btn i {
        font-size: 12px;
        transition: transform 0.25s ease;
    }

    .details-section.is-open .m-more-btn i {
        transform: rotate(180deg);
    }
}

.m-more-btn {
    display: none;
}

@media (max-width: 767.98px) {
    .items-details-section.section_space-py {
        padding-top: 16px !important;
    }

    .items-details-section .row.gy-50 {
        --bs-gutter-y: 28px;
    }

    /* picture: 250px tall instead of a 360px square; Wishlist and Share as round buttons on it */
    .item-details-image-header {
        position: relative;
        gap: 0 !important;
    }

    .item-details-image-box {
        width: 100% !important;
        height: 250px !important;
        aspect-ratio: auto !important;
        padding: 8px !important;
        border-radius: 16px !important;
    }

    .item-details-image-box img,
    .item-details-image-box .item-details-image img {
        width: auto !important;
        max-width: 100%;
        height: 100% !important;
        border-radius: 10px !important;
    }

    .item-details-side-actions {
        position: absolute;
        top: 10px;
        inset-inline-end: 10px;
        z-index: 3;
        width: auto !important;
        padding: 0 !important;
    }

    .item-details-side-actions .product-actions {
        flex-direction: column !important;
        gap: 8px !important;
        width: auto !important;
    }

    .item-details-side-actions .p-action-btn {
        flex: 0 0 auto !important;
        width: 40px;
        min-width: 0 !important;
        height: 40px;
        padding: 0 !important;
        border-radius: 50% !important;
        font-size: 15px;
        box-shadow: 0 4px 14px -4px rgba(15, 23, 42, 0.18);
    }

    .item-details-side-actions .p-action-btn .text {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        overflow: hidden !important;
        clip: rect(0 0 0 0) !important;
        white-space: nowrap !important;
    }

    .item-details-side-actions .p-action-btn:hover {
        transform: none;
    }

    /* thumbnails only when there is more than one picture */
    .item-details-small-image-wrapper {
        margin: 10px 0 0 !important;
    }

    .item-details-small-image-wrapper:not(:has(.swiper-slide:nth-child(2))) {
        display: none;
    }

    .item-small-nav .swiper-slide {
        width: 56px !important;
        height: 56px !important;
    }

    .item-details-small-image {
        width: 56px;
        height: 56px;
    }

    .item-details-info {
        margin-top: 16px;
    }

    /* name and price */
    .item-details-info > .price-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        margin-bottom: 12px;
    }

    .item-details-info .price-section .product-title {
        margin: 0;
        font-size: 21px !important;
        line-height: 1.3;
    }

    .item-details-info .price-section .current-price {
        font-size: 24px !important;
        font-weight: 700;
        color: #ff5463;
    }

    .item-details-info .price-section .old-price {
        margin-inline-start: 6px;
        font-size: 14px;
    }

    /* delivery method and speed: two small tiles side by side */
    .item-details-info > .delivery-info {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-bottom: 14px;
        padding: 0;
        border: 0;
    }

    .item-details-info .delivery-info .delivery-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        min-width: 0;
        padding: 8px 10px;
        border: 1px solid rgba(30, 29, 37, 0.08);
        border-radius: 12px;
        background: #f8fafc;
    }

    .item-details-info .delivery-info .delivery-item .label strong {
        font-size: 11.5px;
        font-weight: 600;
        color: #64748b;
    }

    .item-details-info .delivery-info .delivery-item .status {
        max-width: 100%;
        font-size: 13px;
    }

    /* the buy box: stock and quantity on one line, then the total, then Buy Now */
    .item-details-info > .seller-info-card {
        margin-bottom: 20px;
        padding: 14px !important;
        border-radius: 16px !important;
        box-shadow: 0 10px 26px -18px rgba(15, 23, 42, 0.35);
    }

    .item-details-info > .seller-info-card .inner-contents {
        padding: 0 !important;
    }

    .item-details-info > .seller-info-card .flash-sale-countdown {
        margin-bottom: 12px !important;
    }

    .item-details-info #buyNowForm {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 12px 10px;
    }

    .item-details-info #buyNowForm > * {
        grid-column: 1 / -1;
    }

    .item-details-info #buyNowForm > .availability {
        grid-column: 1;
        margin: 0 !important;
        text-align: start !important;
    }

    .item-details-info #buyNowForm .stock-badge-in,
    .item-details-info #buyNowForm .stock-badge-out {
        padding: 6px 12px !important;
        font-size: 13px !important;
    }

    .item-details-info #buyNowForm > .quantity-control {
        grid-column: 2;
        justify-self: end;
        width: 150px;
        margin: 0 !important;
    }

    .item-details-info #buyNowForm .quantity-control .qty-btn {
        width: 42px;
        height: 42px;
    }

    .item-details-info #buyNowForm .quantity-control .quantity {
        flex: 1 1 auto;
        width: 0;
        min-width: 0;
        height: 42px;
    }

    .item-details-info #buyNowForm > div:has(> .error-msg.d-none) {
        display: none;
    }

    .item-details-info #buyNowForm > div:has(> .error-msg) {
        margin: 0 !important;
    }

    .item-details-info #buyNowForm > .total-info {
        margin: 0 !important;
        padding-top: 12px;
        border-top: 1px dashed rgba(30, 29, 37, 0.15);
    }

    .item-details-info #buyNowForm .total-label {
        margin: 0;
        font-size: 15px !important;
    }

    .item-details-info #buyNowForm .total-price {
        font-size: 21px !important;
        font-weight: 700;
    }

    .item-details-info #buyNowForm > button[type="submit"] {
        height: 46px !important;
        font-size: 15px !important;
    }

    .item-details-info > .seller-info-card .coupon-info {
        margin-bottom: 10px;
        font-size: 13.5px;
    }

    /* description: tighter boxes (their sizes are set inline) */
    .item-details-info .details-section .line-title,
    .items-details-main > .line-title {
        margin-bottom: 12px;
        font-size: 17px !important;
    }

    .product-description-container {
        font-size: 14px !important;
    }

    .product-description-container > div {
        margin-bottom: 12px !important;
        padding: 14px !important;
        border-radius: 12px !important;
    }

    .product-description-container > div h4 {
        font-size: 15px !important;
        line-height: 1.4 !important;
    }

    .product-description-container > div h5 {
        font-size: 14px !important;
        line-height: 1.45 !important;
    }

    .product-description-container > div > div,
    .product-description-container > div p,
    .product-description-container > div ol {
        font-size: 13.5px !important;
        line-height: 1.65 !important;
    }

    .product-description-container > div > div > div:first-child[style*="width: 38px"] {
        width: 32px !important;
        height: 32px !important;
        font-size: 15px !important;
    }

    /* reviews */
    .items-details-main > .line-title {
        margin-top: 26px;
    }

    .reviews-section {
        padding: 14px !important;
        border-radius: 14px !important;
    }

    .reviews-section .reviews-summary {
        gap: 14px;
        margin-bottom: 16px;
    }

    .reviews-section .review-card {
        padding: 12px !important;
    }

    .reviews-section .review-card .user-info img {
        width: 36px;
        height: 36px;
    }

    .reviews-section .review-card .review-text {
        margin-top: 8px;
        font-size: 14px;
        line-height: 1.6;
    }

    .reviews-section .text-center > .fa-star.fa-3x {
        margin-bottom: 8px !important;
        font-size: 30px;
    }

    .reviews-section .text-center > h5 {
        margin-bottom: 2px;
        font-size: 15.5px;
    }

    .reviews-section .text-center > p {
        margin: 0;
        font-size: 13px;
    }

    /* "Suggested Items" at the end of the page (and other titles of this kind) */
    .section-header-3 .section-title {
        font-size: 20px !important;
    }
}

/* ---- 12l. Listing pages (All Items, search, a category): a smaller header ------
   the title and the filters take about half the height; the filters sit side by
   side. The page styles come earlier (@stack('style')), so equal selectors win here. */
@media (max-width: 767.98px) {
    .breadcrumb-area {
        padding: 7px 0 !important;
    }

    .breadcrumb-menu ul li span,
    .breadcrumb-menu ul li a {
        font-size: 13.5px !important;
    }

    .all-items-section {
        padding: 16px 0 18px !important;
    }

    .all-items-section .row.gy-3 {
        --bs-gutter-y: 10px;
    }

    .hero-items-title {
        margin: 0 !important;
        font-size: 20px !important;
    }

    .hero-dropdowns-wrap {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px !important;
        margin-top: 0 !important;
    }

    /* search: category, sort and "per page" in one row */
    .hero-dropdowns-wrap:has(> .hero-select-box:nth-child(3)) {
        grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 0.85fr);
    }

    .hero-dropdowns-wrap .hero-select-box.hero-select-box {
        flex: none !important;
        min-width: 0 !important;
    }

    .hero-select-box select.defaultselect2 {
        height: 40px !important;
        padding: 0 12px !important;
        border-radius: 10px !important;
    }

    .hero-select-box .select2-container--default .select2-selection--single {
        height: 40px !important;
        border-radius: 10px !important;
    }

    .hero-select-box .select2-container--default .select2-selection--single .select2-selection__rendered {
        padding-left: 12px !important;
        padding-right: 26px !important;
        font-size: 13px !important;
    }

    .hero-select-box .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 38px !important;
        right: 8px !important;
    }

    /* the right-hand list opens no wider than its box (it went past the edge of the screen) */
    .hero-select-box.sort-select-box .select2-dropdown {
        min-width: 100% !important;
    }

    /* a category: its filter card */
    .items-filter-card {
        margin-bottom: 0 !important;
        padding: 14px !important;
        border-radius: 16px !important;
    }

    .filter-card-header {
        flex-wrap: nowrap;
        gap: 8px;
        margin-bottom: 12px;
        padding-bottom: 12px;
    }

    .filter-header-left {
        gap: 8px;
        min-width: 0;
    }

    .filter-title {
        gap: 7px !important;
        min-width: 0;
        font-size: 17px !important;
    }

    .filter-title span {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .filter-title i {
        font-size: 16px;
    }

    .filter-count-badge {
        flex: 0 0 auto;
        padding: 2px 9px;
        font-size: 11.5px;
        white-space: nowrap;
    }

    .filter-reset-link {
        flex: 0 0 auto;
        padding: 5px 11px;
        font-size: 12px;
        white-space: nowrap;
    }

    .filter-toolbar-row {
        gap: 10px;
    }

    /* price: the sliders icon stands for the "Price:" label, all on one line */
    .price-filter-box {
        flex-wrap: nowrap;
        gap: 8px;
        padding: 6px 6px 6px 12px;
        border-radius: 12px;
    }

    .price-filter-box .price-box-label {
        flex: 0 0 auto;
        gap: 0;
        font-size: 0;
    }

    .price-filter-box .price-box-label i {
        font-size: 16px;
    }

    .price-filter-box .price-inputs-wrap {
        flex: 1 1 auto;
        gap: 6px;
        min-width: 0;
    }

    .price-filter-box .price-field input,
    .price-filter-box .price-apply-btn {
        height: 38px !important;
    }

    .filter-dropdowns-group {
        gap: 8px;
    }

    .filter-dropdowns-group .filter-select-item {
        flex: 1 1 0;
        min-width: 0;
    }

    .filter-select-item .select2-container--default .select2-selection--single {
        height: 40px !important;
    }

    .filter-select-item .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 38px !important;
    }
}

@media (max-width: 359.98px) {
    .hero-dropdowns-wrap:has(> .hero-select-box:nth-child(3)) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-dropdowns-wrap > .hero-select-box:nth-child(3) {
        grid-column: 1 / -1;
    }
}

/* ---- 12m. Contact page --------------------------------------------------- */
@media (max-width: 767.98px) {
    .contact-section.section_space-py {
        padding-top: 20px !important;
        padding-bottom: 28px !important;
    }

    .contact-row.gy-50 {
        --bs-gutter-y: 14px;
    }

    .contact-left-contents,
    .contact-form-contents {
        padding: 18px 16px !important;
        border-radius: 16px !important;
    }

    .contact-left-contents .title_mb {
        margin-bottom: 14px !important;
    }

    .contact-left-contents .section-title {
        margin-bottom: 6px !important;
        font-size: 22px !important;
    }

    .contact-intro {
        font-size: 13.5px !important;
        line-height: 1.6 !important;
    }

    .contact-info {
        display: grid;
        gap: 8px;
        margin-top: 0 !important;
    }

    .contact-info .item {
        align-items: center !important;
        gap: 12px !important;
        margin: 0 !important;
        padding: 10px 12px;
        border: 1px solid rgba(30, 29, 37, 0.08);
        border-radius: 12px;
        background: #f8fafc;
    }

    .contact-info .item .icon {
        flex: 0 0 38px;
        width: 38px !important;
        height: 38px !important;
        font-size: 15px !important;
    }

    .contact-info .item .content {
        min-width: 0;
    }

    .contact-info .item .title {
        margin-bottom: 1px !important;
        font-size: 14.5px !important;
    }

    .contact-info .item .info {
        font-size: 13.5px !important;
        line-height: 1.45 !important;
        overflow-wrap: anywhere;
    }

    .contact-form-contents .row.gy-3 {
        --bs-gutter-y: 12px;
    }

    .contact-form-contents .input-label {
        margin-bottom: 6px !important;
        font-size: 13.5px !important;
    }

    .contact-form-contents .form-control {
        height: 46px !important;
    }

    .contact-form-contents textarea.form-control,
    .contact-form-contents textarea {
        height: 110px !important;
        min-height: 110px !important;
    }

    .contact-form-contents .btn-inner {
        margin-top: 16px !important;
    }

    .contact-form-contents .btn-inner .primary-button {
        width: 100%;
        height: 46px !important;
        font-size: 15px !important;
    }
}

/* ---- 12n. About, FAQ, Privacy, Terms, Refund: smaller headers and sections ---
   (the home hero has its own rules in 12b) */
@media (max-width: 767.98px) {
    .ip-hero:not(.ip-home-hero) {
        padding: 26px 0 30px;
    }

    .ip-hero:not(.ip-home-hero) .ip-eyebrow {
        margin-bottom: 12px;
        padding: 5px 11px 5px 9px;
        font-size: 11px;
    }

    .ip-hero:not(.ip-home-hero) .ip-hero-title {
        margin-bottom: 10px;
        font-size: 26px;
        line-height: 1.16;
    }

    .ip-hero:not(.ip-home-hero) .ip-hero-lead {
        font-size: 14px;
        line-height: 1.65;
    }

    .ip-hero:not(.ip-home-hero) .ip-hero-actions {
        margin-top: 18px;
        gap: 10px;
    }

    .ip-hero:not(.ip-home-hero) .ip-btn {
        height: 46px;
        min-height: 46px;
        padding: 0 16px;
        font-size: 15px;
    }

    /* About: the wall of brand logos is left out on phones, as on the home page */
    .ip-about-hero:not(.ip-home-hero) .row > .col-xl-5 {
        display: none;
    }

    .ip-hero:not(.ip-home-hero) .ip-hero-meta {
        margin-top: 16px;
        gap: 8px;
    }

    .ip-hero:not(.ip-home-hero) .ip-hero-meta li {
        padding: 5px 10px;
        font-size: 12px;
    }

    .ip-section {
        padding: 36px 0;
    }

    .ip-section-head {
        margin-bottom: 20px;
    }

    .ip-section-title {
        margin-bottom: 10px;
        font-size: 23px;
    }

    .ip-section-lead {
        font-size: 14.5px;
    }

    /* FAQ */
    .ip-faq {
        padding: 22px 0 40px;
    }

    .ip-faq-list {
        gap: 10px;
    }
}

@media (max-width: 575.98px) {
    .ip-qa {
        gap: 10px;
        padding: 12px;
    }

    .ip-qa-num {
        width: 30px;
        height: 30px;
        border-radius: 9px;
        font-size: 12.5px;
    }

    .ip-qa-btn {
        gap: 10px;
    }

    .ip-qa-q {
        font-size: 15px;
    }
}

/* ---- 12o. About page: the numbers card, the story and the offer cards ------- */
@media (max-width: 767.98px) {
    /* the numbers card overlaps the end of the header: less overlap, so it stays clear of the buttons */
    .ip-about-hero:not(.ip-home-hero) {
        padding-bottom: 52px;
    }

    .ip-about .ip-stats {
        margin-top: -30px;
        border-radius: 18px;
    }

    .ip-about .ip-stats li {
        padding: 16px 10px;
    }

    .ip-about .ip-stats strong {
        margin-bottom: 4px;
        font-size: 26px;
    }

    .ip-about .ip-stats .ip-stat-label {
        font-size: 12.5px;
    }

    .ip-prose {
        font-size: 15px;
        line-height: 1.75;
    }

    .ip-prose p {
        margin-bottom: 12px;
    }

    .ip-story {
        gap: 24px;
    }

    .ip-story-card {
        padding: 20px 18px;
        border-radius: 18px;
    }

    .ip-story-card h3 {
        margin-bottom: 8px;
        font-size: 19px;
    }

    .ip-cards {
        gap: 12px;
    }

    .ip-card {
        gap: 10px;
        padding: 18px;
    }

    .ip-card .ip-badge-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .ip-card h3 {
        font-size: 17px;
    }

    .ip-card p {
        font-size: 14px;
        line-height: 1.6;
    }

    .ip-card-tags li a,
    .ip-card-tags li span {
        padding: 3px 9px;
        font-size: 12px;
    }
}

/* ---- 12p. Home: Browsing History, one short line per item -------------------
   picture, name and stock on the left, the price on the right; swipe or use the
   dots (the arrows covered the card). */
@media (max-width: 575.98px) {
    section.browsing-history {
        padding-bottom: 22px;
    }

    .browsing-history .section-header {
        flex-wrap: nowrap;
        align-items: center;
        gap: 10px;
    }

    .browsing-history .view-all-button {
        flex: 0 0 auto;
    }

    .browsing-history .browsing-history-remove-all {
        display: inline-block;
        margin: -10px -8px;
        padding: 10px 8px;
        font-size: 13.5px;
    }

    .browsing-history-card {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
        margin-top: 10px;
        padding: 6px 14px 6px 6px;
        border-radius: 14px;
    }

    .browsing-history-card .games-details {
        padding: 8px;
        border-radius: 10px;
    }

    .browsing-history-card .games-details .image-title {
        gap: 10px;
    }

    .browsing-history-card .games-details .image-title .image {
        width: 44px;
        height: 44px;
    }

    .browsing-history-card .games-details .image-title .title {
        min-width: 0;
    }

    .browsing-history-card .games-details .image-title .title h6 {
        margin-bottom: 3px;
        font-size: 14px;
    }

    .browsing-history-card .games-details .image-title .title p {
        margin: 0;
        font-size: 12px;
    }

    .browsing-history-card .user-details {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    .browsing-history-card .user-details .left-side {
        display: none;
    }

    .browsing-history-card .user-details .right-side h5 {
        margin: 0;
        font-size: 14px;
        white-space: nowrap;
    }

    .browsing-history-card .user-details .right-side h5 span {
        font-size: 11px;
    }

    .browsing-history-card .remove-item {
        top: -8px;
        inset-inline-end: -6px;
    }

    .browsing-history-card .remove-item .remove-btn {
        width: 26px;
        height: 26px;
    }

    .browsing-history .swiper-arrow-buttons {
        display: none;
    }

    .all-browsing-history .myBrowsingHistorySwiper {
        padding: 0 8px;
    }

    .browsing-history .myBrowsingHistorySwiper .swiper-pagination {
        position: relative;
        bottom: auto;
        margin-top: 12px;
        line-height: 0;
    }
}

/* ---- 12q. Buyer dashboard: the overview numbers two per row; referral totals
            side by side ------------------------------------------------------ */
@media (max-width: 575.98px) {
    .seller-overview .title {
        margin-bottom: 14px !important;
    }

    .seller-overview .title h4 {
        font-size: 22px !important;
    }

    .seller-overview > .row.g-4 {
        --bs-gutter-x: 10px;
        --bs-gutter-y: 10px;
    }

    .seller-overview > .row.g-4 > .col-sm-6 {
        flex: 0 0 50%;
        width: 50%;
        max-width: 50%;
    }

    .seller-overview > .row.g-4 .seller-overview-card {
        height: 100%;
        padding: 14px !important;
        border-radius: 14px !important;
    }

    .seller-overview > .row.g-4 .seller-overview-card .icon {
        width: 34px !important;
        height: 34px !important;
        margin-bottom: 10px !important;
    }

    .seller-overview > .row.g-4 .seller-overview-card .text p {
        margin-bottom: 4px !important;
        font-size: 13px !important;
    }

    .seller-overview > .row.g-4 .seller-overview-card .text h3 {
        font-size: 19px !important;
        line-height: 1.25 !important;
        overflow-wrap: anywhere;
    }

    .seller-overview > .row.g-4 .seller-overview-card .bg-element {
        width: 120px !important;
        opacity: 0.6;
    }

    .total-referrals > .row.g-4 {
        --bs-gutter-x: 10px;
        --bs-gutter-y: 10px;
    }

    .total-referrals > .row.g-4 > .col-md-6 {
        flex: 0 0 50%;
        width: 50%;
        max-width: 50%;
    }

    .total-referrals-card {
        height: 100%;
        padding: 16px 10px !important;
    }

    .total-referrals-card h3,
    .total-referrals-card h4 {
        font-size: 24px !important;
    }

    .total-referrals-card p {
        font-size: 13px !important;
    }
}

/* ---- 12r. A category with sub-categories: its header band holds nothing (an empty
            filter box); on phones it is left out, the breadcrumb is enough ----- */
@media (max-width: 767.98px) {
    .all-items-section:has(.items-filter-wrapper):not(:has(.items-filter-wrapper *)) {
        display: none;
    }
}
