/* ==========================================================================
   COSPTY mobile app skin  ·  v1.0.0
   --------------------------------------------------------------------------
   Selector names below were read off the LIVE shop (Hummingbird + Bootstrap 5),
   not guessed. Every rule sits inside @media (max-width: 991.98px) unless it is
   marked "desktop opt-in", so the desktop layout is untouched by default.

   Provenance of the selector names, since it matters when a rule silently does
   nothing:
     · product cards, listing toolbar, product page, pagination, search
         -> read off the rendered HTML of the live category / product / search
            pages
     · cart rows and the account menu (.product-line, .cart__item,
       .account-menu__link)
         -> read off the theme's own stylesheet, because a logged-out visitor
            cannot render a filled cart or the "my account" page. These match
            the theme's component classes, so they apply the moment a shopper
            is in a state that renders them.

   Scoping model
     html.cp-app           master switch — added only when the module is enabled
     html.cp-<feature>     one class per back-office switch, so any single
                           feature can be turned off without editing this file
     body#category #product #cart #authentication #search
                           PrestaShop already sets a stable id on <body>

   Colour and the bottom-nav height arrive as CSS variables written by the
   module from the back office, so the config fields actually do something.
   ========================================================================== */

:root {
  --cp-radius: 14px;
  --cp-radius-sm: 10px;
  --cp-surface: #fff;
  --cp-bg: #f4f4f6;
  --cp-line: rgba(16, 16, 22, .08);
  --cp-line-strong: rgba(16, 16, 22, .14);
  --cp-txt: #16161a;
  --cp-mut: #6b6b76;
  --cp-cta-h: 50px;
  --cp-nav-h: 58px;
  --cp-header-h: 56px;
  --cp-pad: 14px;
}

@media (max-width: 991.98px) {

  /* ================================================================ global */

  html.cp-app body {
    background: var(--cp-bg);
    color: var(--cp-txt);
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    overscroll-behavior-y: none;
  }

  /* The theme reserves a tall min-height here; on a phone it becomes dead
     space between the content and the footer. */
  html.cp-app #wrapper {
    min-height: 0;
  }

  html.cp-app .container,
  html.cp-app .container--limited-sm {
    padding-left: var(--cp-pad);
    padding-right: var(--cp-pad);
  }

  /* Content sits on white cards over a tinted canvas instead of everything
     sharing one white sheet — the core "native app" cue. */
  html.cp-app #main,
  html.cp-app .page,
  html.cp-app .page-content,
  html.cp-app .center-column {
    background: transparent;
  }

  /* 44px is the floor for a reliable thumb hit; the theme mixes 32 and 40. */
  html.cp-app .btn,
  html.cp-app .btn-square-icon,
  html.cp-app .form-control,
  html.cp-app .form-select {
    min-height: 44px;
  }

  html.cp-app .btn-square-icon {
    min-width: 44px;
  }

  html.cp-app h1,
  html.cp-app .page-title-section,
  html.cp-app .h1 {
    font-size: 21px;
    line-height: 1.25;
    margin-bottom: 10px;
  }

  html.cp-app .page-header {
    padding: 10px 0 4px;
  }

  /* ================================================================ header */

  html.cp-app #header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--cp-surface);
    border-bottom: 1px solid var(--cp-line);
  }

  html.cp-app #header .header__top,
  html.cp-app #header .header-top {
    padding-top: 6px;
    padding-bottom: 6px;
  }

  html.cp-app #header .logo img,
  html.cp-app #header .logo,
  html.cp-app #_desktop_logo img {
    max-height: 30px;
    width: auto;
  }

  html.cp-app .ps-searchbar {
    margin-top: 4px;
    margin-bottom: 4px;
  }

  html.cp-app .ps-searchbar__input {
    height: 42px;
    border-radius: var(--cp-radius-sm);
    background: var(--cp-bg);
    border-color: transparent;
  }

  /* ================================================ product cards (shared) */

  html.cp-app .product-miniature__inner {
    background: var(--cp-surface);
    border: 1px solid var(--cp-line);
    border-radius: var(--cp-radius);
    overflow: hidden;
    height: 100%;
  }

  /* Square media is the biggest single "app" cue on a listing page. */
  html.cp-app .product-miniature__image-container {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 0;
    overflow: hidden;
    background: var(--cp-bg);
  }

  html.cp-app .product-miniature__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  html.cp-app .product-miniature__bottom {
    padding: 9px 10px 11px;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  html.cp-app .product-miniature__title {
    font-size: 13px;
    line-height: 1.35;
    font-weight: 500;
    color: var(--cp-txt);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 35px;
  }

  html.cp-app .product-miniature__prices {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
  }

  /* Verified price markup on the live listing:
       .product-miniature__prices
         └ .product-miniature__price              <- the price you pay
         └ .product-miniature__discount-price
              └ .product-miniature__regular-price <- the old price, struck */
  html.cp-app .product-miniature__price {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -.01em;
  }

  html.cp-app .product-miniature__discount-price,
  html.cp-app .product-miniature__regular-price {
    font-size: 12px;
    color: var(--cp-mut);
    text-decoration: line-through;
  }

  html.cp-app .product-miniature__regular-price {
    color: var(--cp-mut);
  }

  html.cp-app .product-miniature__top .product-flags,
  html.cp-app .product-miniature .product-flags {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  html.cp-app .product-miniature .product-flags .badge {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: 999px;
    line-height: 1.4;
  }

  html.cp-app .product-miniature .product-flags .badge.discount {
    background: #e5484d;
    color: #fff;
  }

  html.cp-app .product-miniature .product-flags .badge.new {
    background: var(--cp-brand, #7c3aed);
    color: #fff;
  }

  /* Colour dots on a 165px card are too small to tap accurately; choosing a
     variant belongs on the product page. */
  html.cp-app .product-miniature__variants {
    display: none;
  }

  html.cp-app .product-miniature__add {
    width: 100%;
    height: 36px;
    min-height: 36px;
    border-radius: var(--cp-radius-sm);
    font-size: 12.5px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 8px;
  }

  html.cp-app .product-miniature__add .material-icons {
    font-size: 17px;
  }

  /* Quick-view is a desktop affordance: two buttons cover the entire photo
     of a 165px card. */
  html.cp-app.cp-hide-qv .product-miniature__quickview-button,
  html.cp-app.cp-hide-qv .product-miniature__quickview-touch {
    display: none;
  }

  /* ====================================================== category listing */

  /* Two columns is the commerce-app default and roughly doubles how much
     catalogue a shopper sees before scrolling. */
  html.cp-app.cp-2col .products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  /* Sub-categories as a horizontal rail, so a long category list cannot push
     the products below the fold. */
  html.cp-app body#category .subcategory__list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }

  html.cp-app body#category .subcategory__list > * {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  html.cp-app body#category .subcategory__list::-webkit-scrollbar {
    display: none;
  }

  html.cp-app body#category .category__cover {
    border-radius: var(--cp-radius);
    overflow: hidden;
  }

  html.cp-app body#category .category__description {
    font-size: 13px;
    color: var(--cp-mut);
  }

  /* Sticky toolbar: sort + filter stay reachable through a long listing.
     Offset by the sticky header so the two never overlap. */
  html.cp-app body#category .products__selection {
    position: sticky;
    top: var(--cp-header-h);
    z-index: 1020;
    background: var(--cp-bg);
    padding: 8px 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
  }

  html.cp-app body#category .products__count {
    font-size: 12px;
    color: var(--cp-mut);
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  html.cp-app body#category .products__sort-label {
    display: none;
  }

  html.cp-app body#category .products__sort-dropdown-button,
  html.cp-app body#category .products__filter-button {
    height: 38px;
    min-height: 38px;
    border-radius: 999px;
    font-size: 12.5px;
    padding: 0 14px;
    background: var(--cp-surface);
    border: 1px solid var(--cp-line-strong);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
  }

  html.cp-app body#category .products__filter-button .material-icons {
    font-size: 17px;
  }

  /* The filter drawer is an offcanvas anchored to the left edge, which reads
     as a desktop side panel. Bottom-anchored with rounded top corners reads
     as a native sheet. */
  html.cp-app.cp-sheet #offcanvas-faceted.ps-facetedsearch--mobile {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    max-height: 82vh;
    border: 0;
    border-radius: 18px 18px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }

  html.cp-app.cp-sheet #offcanvas-faceted .offcanvas-header {
    position: sticky;
    top: 0;
    background: var(--cp-surface);
    border-radius: 18px 18px 0 0;
    border-bottom: 1px solid var(--cp-line);
    padding: 16px;
  }

  /* Grab handle — decoration, but it is what makes a sheet read as a sheet.
     Drawn with a pseudo-element, no image. */
  html.cp-app.cp-sheet #offcanvas-faceted .offcanvas-header::before {
    content: "";
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    width: 38px;
    height: 4px;
    border-radius: 999px;
    background: var(--cp-line-strong);
  }

  html.cp-app.cp-sheet #offcanvas-faceted .offcanvas-body {
    padding: 6px 16px 22px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  html.cp-app #offcanvas-faceted .accordion-item,
  html.cp-app #offcanvas-faceted .search-filters__item {
    border: 0;
    border-bottom: 1px solid var(--cp-line);
  }

  html.cp-app #offcanvas-faceted .accordion-button {
    font-size: 14px;
    font-weight: 500;
    padding: 14px 0;
    background: transparent;
    box-shadow: none;
  }

  html.cp-app #offcanvas-faceted .form-check-label,
  html.cp-app #offcanvas-faceted .facet-label {
    font-size: 13.5px;
  }

  html.cp-app .active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 0 8px;
  }

  /* Keep the last row of cards clear of the fixed bottom navigation. */
  html.cp-app body#category #js-product-list,
  html.cp-app body#search #js-product-list,
  html.cp-app body#category .products__pagination,
  html.cp-app body#search .products__pagination {
    padding-bottom: calc(var(--cp-nav-h) + 10px);
  }

  html.cp-app .pagination__number {
    font-size: 12px;
    color: var(--cp-mut);
    text-align: center;
    padding: 10px 0;
  }

  html.cp-app .pagination__nav .page-link,
  html.cp-app .pagination__nav .btn {
    min-width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--cp-radius-sm);
  }

  /* ======================================================== product detail */

  /* Full-bleed gallery: the photo should own the width, not sit inside a
     padded container with visible gutters. */
  html.cp-app body#product .product__container {
    padding-left: 0;
    padding-right: 0;
  }

  html.cp-app body#product .product__images {
    border-radius: 0;
    background: var(--cp-surface);
  }

  html.cp-app body#product .product__carousel .carousel-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
  }

  html.cp-app body#product .product__zoom {
    right: 12px;
    bottom: 12px;
    background: rgba(255, 255, 255, .92);
    border-radius: 999px;
  }

  /* The detail block becomes a rounded card that overlaps the gallery — the
     standard native-commerce pattern; separates photo from text without a
     hard rule. */
  html.cp-app body#product .product__right {
    background: var(--cp-surface);
    border-radius: 18px 18px 0 0;
    margin-top: -18px;
    position: relative;
    z-index: 2;
    padding: 16px var(--cp-pad) 0;
  }

  html.cp-app body#product .product__name,
  html.cp-app body#product h1 {
    font-size: 19px;
    line-height: 1.3;
    font-weight: 500;
    margin-bottom: 8px;
  }

  html.cp-app body#product .product__manufacturer {
    font-size: 12.5px;
    color: var(--cp-mut);
    margin-bottom: 6px;
  }

  html.cp-app body#product .product__price {
    font-size: 23px;
    font-weight: 600;
    letter-spacing: -.02em;
  }

  html.cp-app body#product .product__prices-inline del,
  html.cp-app body#product .product__prices-inline .regular-price {
    font-size: 14px;
    font-weight: 400;
    color: var(--cp-mut);
  }

  html.cp-app body#product .product__tax-label {
    font-size: 12px;
    color: var(--cp-mut);
  }

  html.cp-app body#product .product__description-short {
    font-size: 13.5px;
    color: var(--cp-mut);
    margin: 8px 0 12px;
  }

  /* Variant pickers: the theme renders sizes as a <select> and colours as
     radio swatches. Both need a bigger hit area. */
  html.cp-app body#product .product-variant {
    border: 0;
    padding: 0;
    margin-bottom: 12px;
  }

  html.cp-app body#product .product-variant__label {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 6px;
  }

  html.cp-app body#product .product-variant__legend {
    font-size: 13px;
    font-weight: 500;
    color: var(--cp-txt);
    margin: 0;
  }

  html.cp-app body#product .product-variant__selected {
    font-size: 13px;
    color: var(--cp-mut);
  }

  html.cp-app body#product .product-variant select.form-select {
    height: 48px;
    min-height: 48px;
    border-radius: var(--cp-radius-sm);
    background-color: var(--cp-bg);
    border-color: transparent;
    font-size: 15px;
  }

  html.cp-app body#product .product-variant__colors {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  html.cp-app body#product .product-variant__color,
  html.cp-app body#product .input-color {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Product customisation (this shop sells printable items) — give the
     textarea and its label the same treatment as the login form. */
  html.cp-app body#product .product-customization__title {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 8px;
  }

  html.cp-app body#product .product-customization__label {
    font-size: 13px;
    color: var(--cp-mut);
    margin-bottom: 4px;
  }

  html.cp-app body#product textarea.form-control {
    font-size: 16px;
    border-radius: var(--cp-radius-sm);
    background: var(--cp-bg);
    border-color: transparent;
    min-height: 96px;
  }

  html.cp-app body#product .product-customization__action {
    margin-top: 10px;
  }

  html.cp-app body#product .product-customization__action .btn {
    width: 100%;
    height: var(--cp-cta-h);
    min-height: var(--cp-cta-h);
    border-radius: var(--cp-radius);
    font-size: 15px;
    font-weight: 600;
  }

  /* Sticky purchase bar — the one control a shopper must never have to
     scroll back for.

     bottom = height of the fixed bottom navigation (a back-office field; set
     it to 0 when that module is not installed) + the iPhone home indicator. */
  html.cp-app.cp-sticky-cta body#product .product__add-to-cart-container {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--cp-nav-h) + env(safe-area-inset-bottom));
    z-index: 1035;
    background: var(--cp-surface);
    border-top: 1px solid var(--cp-line);
    padding: 9px var(--cp-pad);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  html.cp-app.cp-sticky-cta body#product .product__add-to-cart-container .product__actions-qty-add {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
  }

  html.cp-app.cp-sticky-cta body#product .product__quantity {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
  }

  html.cp-app.cp-sticky-cta body#product .quantity-button__group {
    margin: 0;
  }

  html.cp-app.cp-sticky-cta body#product #quantity_wanted {
    width: 46px;
    min-width: 46px;
    text-align: center;
    height: 44px;
    min-height: 44px;
    font-size: 16px;
  }

  html.cp-app.cp-sticky-cta body#product .product__add-to-cart {
    flex: 1 1 auto;
    margin: 0;
  }

  html.cp-app.cp-sticky-cta body#product .product__add-to-cart-button {
    width: 100%;
    height: var(--cp-cta-h);
    min-height: var(--cp-cta-h);
    border-radius: var(--cp-radius);
    font-size: 15px;
    font-weight: 600;
  }

  /* A disabled add-to-cart (product needs customisation first) must still
     look deliberate rather than broken. */
  html.cp-app.cp-sticky-cta body#product .product__add-to-cart-button[disabled] {
    opacity: .45;
  }

  /* .add is the theme's wrapper for the button itself */
  html.cp-app.cp-sticky-cta body#product .product__add-to-cart-container > .add {
    flex: 1 1 auto;
    margin: 0;
  }

  /* Clear the sticky bar at the end of the page. */
  html.cp-app.cp-sticky-cta body#product .product__container,
  html.cp-app.cp-sticky-cta body#product .product__bottom {
    padding-bottom: calc(var(--cp-cta-h) + var(--cp-nav-h) + 18px);
  }

  /* The theme already ships Description / Details as a Bootstrap accordion —
     it only needs the app-scale treatment. */
  html.cp-app body#product .product__accordion .accordion-item {
    border: 0;
    border-bottom: 1px solid var(--cp-line);
    background: transparent;
  }

  html.cp-app body#product .product__accordion .accordion-button {
    font-size: 15px;
    font-weight: 500;
    padding: 15px 0;
    background: transparent;
    box-shadow: none;
  }

  html.cp-app body#product .product__accordion .accordion-button:not(.collapsed) {
    color: var(--cp-brand, #7c3aed);
  }

  html.cp-app body#product .product__accordion .accordion-body {
    padding: 0 0 16px;
    font-size: 13.5px;
    line-height: 1.6;
    color: #3a3a44;
  }

  html.cp-app body#product .product__bottom-right,
  html.cp-app body#product .product__accessories,
  html.cp-app body#product .product__additional-info {
    background: var(--cp-surface);
    border-radius: var(--cp-radius);
    border: 1px solid var(--cp-line);
    padding: 4px 14px;
    margin-bottom: 12px;
  }

  /* Wishlist heart: keep it next to the CTA, not floating over the photo. */
  html.cp-app body#product .wishlist-button {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* =================================================================== cart */

  html.cp-app body#cart .cart-grid__content,
  html.cp-app body#cart .cart-grid__aside {
    padding-left: 0;
    padding-right: 0;
  }

  html.cp-app body#cart .cart-grid__products-details {
    background: var(--cp-surface);
    border: 1px solid var(--cp-line);
    border-radius: var(--cp-radius);
    padding: 4px 12px;
  }

  /* Cart rows come from the theme's .product-line component. */
  html.cp-app body#cart .product-line,
  html.cp-app body#cart .cart__item {
    padding: 12px 0;
    border-bottom: 1px solid var(--cp-line);
  }

  html.cp-app body#cart .product-line:last-child,
  html.cp-app body#cart .cart__item:last-child {
    border-bottom: 0;
  }

  /* The theme centres the text inside a cart row; left alignment is far
     easier to read in a narrow column. */
  html.cp-app body#cart .product-line__content,
  html.cp-app body#cart .product-line__item--info,
  html.cp-app body#cart .product-line__item--prices,
  html.cp-app body#cart .cart__item {
    text-align: left !important;
  }

  html.cp-app body#cart .product-line__image img,
  html.cp-app body#cart .product-line__img {
    border-radius: var(--cp-radius-sm);
    max-width: 76px;
    height: auto;
  }

  html.cp-app body#cart .cart-grid__aside-wrapper {
    background: var(--cp-surface);
    border: 1px solid var(--cp-line);
    border-radius: var(--cp-radius);
    padding: 14px;
  }

  html.cp-app body#cart .cart-summary__line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-size: 14px;
    padding: 7px 0;
  }

  html.cp-app body#cart .cart-summary__label {
    color: var(--cp-mut);
  }

  html.cp-app body#cart .cart-summary__line--bold,
  html.cp-app body#cart .cart-summary__total {
    font-size: 18px;
    font-weight: 600;
    border-top: 1px solid var(--cp-line);
    margin-top: 6px;
    padding-top: 12px;
  }

  html.cp-app body#cart .cart__continue-shopping {
    width: 100%;
    margin-top: 12px;
    border-radius: var(--cp-radius);
  }

  /* Checkout stays reachable while the shopper scrolls the item list. */
  html.cp-app body#cart .cart-summary__actions {
    position: sticky;
    bottom: calc(var(--cp-nav-h) + env(safe-area-inset-bottom));
    z-index: 1025;
    background: var(--cp-surface);
    padding-top: 10px;
  }

  html.cp-app body#cart .cart-summary__actions .btn,
  html.cp-app body#cart a[href*="controller=order"] {
    width: 100%;
    height: var(--cp-cta-h);
    min-height: var(--cp-cta-h);
    border-radius: var(--cp-radius);
    font-size: 15px;
    font-weight: 600;
  }

  html.cp-app body#cart .cart__empty {
    text-align: center;
    padding: 28px 0;
    color: var(--cp-mut);
  }

  /* ============================================ login / my account / forms */

  html.cp-app body#authentication .login__form-wrapper,
  html.cp-app body#authentication .login__register-wrapper,
  html.cp-app body#authentication .register__form-wrapper {
    background: var(--cp-surface);
    border: 1px solid var(--cp-line);
    border-radius: var(--cp-radius);
    padding: 16px;
  }

  /* 16px on inputs stops iOS Safari from zooming the whole page on focus —
     the classic mobile form bug. */
  html.cp-app body#authentication input.form-control,
  html.cp-app body#authentication select.form-select {
    font-size: 16px;
    height: 48px;
    min-height: 48px;
    border-radius: var(--cp-radius-sm);
    background: var(--cp-bg);
    border-color: transparent;
  }

  html.cp-app body#authentication textarea.form-control {
    font-size: 16px;
    border-radius: var(--cp-radius-sm);
    background: var(--cp-bg);
    border-color: transparent;
  }

  html.cp-app body#authentication .form-control:focus,
  html.cp-app body#authentication .form-select:focus {
    background: var(--cp-surface);
    border-color: var(--cp-brand, #7c3aed);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, .16);
  }

  html.cp-app body#authentication .form-label {
    font-size: 13px;
    color: var(--cp-mut);
    margin-bottom: 4px;
  }

  /* Account menu as a tappable list rather than a wall of small links. */
  html.cp-app .account-menu__link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 12px 14px;
    background: var(--cp-surface);
    border-bottom: 1px solid var(--cp-line);
    font-size: 14.5px;
  }

  html.cp-app .account-menu__link .account-menu__icon {
    font-size: 21px;
    color: var(--cp-mut);
    flex: 0 0 auto;
  }

  html.cp-app .account-menu {
    border-radius: var(--cp-radius);
    overflow: hidden;
    border: 1px solid var(--cp-line);
  }

  /* ================================================================ search */

  html.cp-app body#search .ps-searchbar__input {
    height: 46px;
  }

  /* ================================================================ footer */

  html.cp-app #footer {
    padding-bottom: calc(var(--cp-nav-h) + env(safe-area-inset-bottom) + 16px);
  }

  html.cp-app #footer .footer__before,
  html.cp-app #footer .footer__after {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  /* The theme stacks the whole footer link farm on a phone. Collapse it so
     the app does not end in six screens of links. */
  html.cp-app.cp-tidy-footer #footer .footer__after .h4,
  html.cp-app.cp-tidy-footer #footer .footer__after .h3 {
    font-size: 14px;
  }
}

/* ==========================================================================
   Desktop opt-in — OFF by default, kept deliberately light. Desktop is
   separate work; this block only exists so the switch is wired to something.
   ========================================================================== */

@media (min-width: 992px) {
  html.cp-app.cp-desktop .product-miniature__inner {
    border: 1px solid var(--cp-line);
    border-radius: var(--cp-radius);
    overflow: hidden;
  }

  html.cp-app.cp-desktop .product-miniature__image-container {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--cp-bg);
  }

  html.cp-app.cp-desktop .product-miniature__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  html.cp-app.cp-desktop .product-miniature__bottom {
    padding: 10px 12px 12px;
  }

  html.cp-app.cp-desktop .product-flags {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  html.cp-app.cp-desktop .product-flags .badge {
    border-radius: 999px;
    font-weight: 600;
  }
}

/* ============================================================
   v1.0.1 — kill horizontal panning on phones
   The theme's search off-canvas drawer and fixed-width hero
   decorations extend past the 390px layout viewport, so the page
   could be dragged sideways (and mobile browsers shrank to fit).
   `clip` (unlike `hidden`) does not create a scroll container, so
   the sticky add-to-cart bar keeps working.
   ============================================================ */
html,
body {
  overflow-x: hidden;
  overflow-x: clip;
}

/* the search drawer itself should never widen the page */
#searchCanvas,
.offcanvas {
  max-width: 100vw;
}

/* ============================================================
   v1.0.2 — stop stacking bottom clearances
   The app bar (cosptyappbar) already clears the fixed tab bar via
   body.ab-has-bar padding. The footer and the product list used to
   add their own nav clearance on top, so phones showed ~136px of
   blank between the page and the bar ("page split from the bar").
   When the app bar is active, those elements rely on the body pad.
   ============================================================ */
body.ab-has-bar #footer {
  padding-bottom: calc(env(safe-area-inset-bottom) + 16px);
}

body.ab-has-bar#category #js-product-list,
body.ab-has-bar#search #js-product-list,
body.ab-has-bar#category .products__pagination,
body.ab-has-bar#search .products__pagination {
  padding-bottom: 10px;
}
