/* WATZADU catalogue — focused mobile commerce layer.
   Loaded after the shared theme styles only on shop/category archives. */

.wzd-shop-catalog {
  padding-top: 36px;
}

@media (max-width: 768px) {
  body.wzd-archive-product,
  body.tax-product_cat {
    --wzd-shop-pad: 16px;
    --wzd-shop-nav-h: 64px;
    background: #fff;
    overflow-x: clip !important;
    overflow-y: visible !important;
  }

  /* Category pages should lead with the catalogue on phones. The top hero is
     retained for desktop and the general shop page, but takes too much of the
     initial viewport before visitors can reach the products. */
  body.tax-product_cat .wzd-hero {
    display: none !important;
  }

  body.wzd-archive-product .wzd-brand,
  body.tax-product_cat .wzd-brand {
    gap: 8px !important;
  }

  body.wzd-archive-product .wzd-brand .wzd-wmark,
  body.tax-product_cat .wzd-brand .wzd-wmark {
    width: 46px !important;
    height: 46px !important;
  }

  body.wzd-archive-product .wzd-brand-text,
  body.tax-product_cat .wzd-brand-text {
    display: flex !important;
    width: auto !important;
    color: #1d1d1f !important;
    font-size: 16px !important;
    font-weight: 750 !important;
    letter-spacing: -.025em;
  }

  body.wzd-archive-product .wzd-brand-text small,
  body.tax-product_cat .wzd-brand-text small {
    display: block !important;
  }
  body.wzd-archive-product .wzd-brand-company-legal,
  body.tax-product_cat .wzd-brand-company-legal { display: none !important; }
  body.wzd-archive-product .wzd-brand-company-short,
  body.tax-product_cat .wzd-brand-company-short {
    display: block !important;
    font-size: 10.5px !important;
    font-weight: 600 !important;
    color: #595959 !important;
    line-height: 1.15 !important;
  }

  body.wzd-archive-product .wzd-container,
  body.tax-product_cat .wzd-container {
    --pad-x: var(--wzd-shop-pad);
    padding-left: var(--wzd-shop-pad);
    padding-right: var(--wzd-shop-pad);
  }

  /* Compact editorial hero: one clear action and no clipped copy. */
  body.wzd-archive-product .wzd-hero--md,
  body.tax-product_cat .wzd-hero--md {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    background: #f7f4ef;
  }

  body.wzd-archive-product .wzd-hero-inner,
  body.tax-product_cat .wzd-hero-inner {
    max-width: none;
    padding-top: 18px !important;
    padding-bottom: 24px !important;
  }

  body.wzd-archive-product .wzd-bread,
  body.tax-product_cat .wzd-bread {
    gap: 6px;
    margin-bottom: 14px;
    color: #6e6e73;
    font-size: 12px;
    line-height: 1.45;
  }

  body.wzd-archive-product .wzd-hero-eyebrow,
  body.tax-product_cat .wzd-hero-eyebrow {
    margin-bottom: 12px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(142, 37, 33, .07);
    letter-spacing: .08em;
    font-size: 11px;
  }

  body.wzd-archive-product .wzd-hero-title,
  body.tax-product_cat .wzd-hero-title {
    max-width: 11em;
    margin-bottom: 12px;
    color: #1d1d1f;
    font-size: clamp(31px, 9vw, 38px) !important;
    font-weight: 750;
    letter-spacing: -.035em;
    line-height: 1.12;
  }

  body.wzd-archive-product .wzd-hero-sub,
  body.tax-product_cat .wzd-hero-sub {
    margin-bottom: 20px;
    color: #5f5f63;
    font-size: 15px !important;
    line-height: 1.62;
  }

  body.wzd-archive-product .wzd-hero-ctas,
  body.tax-product_cat .wzd-hero-ctas {
    display: block !important;
  }

  body.wzd-archive-product .wzd-hero-ctas .wzd-btn,
  body.tax-product_cat .wzd-hero-ctas .wzd-btn {
    width: 100%;
    min-height: 52px;
    border-radius: 14px;
    box-shadow: none;
    font-size: 15px;
  }

  body.wzd-archive-product .wzd-hero-ctas .wzd-btn--outline,
  body.tax-product_cat .wzd-hero-ctas .wzd-btn--outline {
    display: none !important;
  }

  /* Intro is supporting copy, not a second hero. */
  .wzd-shop-catalog {
    padding-top: 18px !important;
    padding-bottom: 48px !important;
  }

  .wzd-shop-catalog .wzd-cat-intro {
    margin: 0 0 16px;
    padding: 14px 15px 10px;
    border: 1px solid #e8e8ed;
    border-radius: 16px;
    background: #fff;
    color: #6e6e73;
    font-size: 13px;
    line-height: 1.65;
    cursor: default;
  }

  .wzd-shop-catalog .wzd-cat-intro strong {
    color: #3a3a3c;
  }

  .wzd-shop-catalog .wzd-cat-intro-toggle {
    min-height: 40px !important;
    margin: 2px 0 0 !important;
    padding: 7px 0 !important;
    color: #8e2521;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 13px;
  }

  .wzd-shop-catalog .wzd-cat-layout {
    gap: 0;
  }

  /* Two-row sticky shopping controls. */
  .wzd-shop-catalog .wzd-cat-toolbar {
    position: sticky !important;
    top: 69px !important;
    z-index: 80 !important;
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    grid-template-rows: 40px 44px !important;
    column-gap: 8px !important;
    row-gap: 8px !important;
    margin: 0 calc(-1 * var(--wzd-shop-pad)) 14px !important;
    padding: 10px var(--wzd-shop-pad) 12px !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(0, 0, 0, .08) !important;
    border-radius: 0 !important;
    background: rgba(255, 255, 255, .94) !important;
    box-shadow: none !important;
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
  }

  .wzd-shop-catalog .wzd-cat-count {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    min-width: 0;
    color: #6e6e73;
    font-size: 12.5px;
    white-space: nowrap;
  }

  .wzd-shop-catalog .wzd-cat-count strong {
    color: #1d1d1f;
    font-size: 15px;
  }

  .wzd-shop-catalog .wzd-cat-toolbar-filter,
  .wzd-shop-catalog .wzd-cat-toolbar-sort {
    min-height: 40px !important;
    border: 1px solid #d2d2d7 !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: none !important;
    color: #1d1d1f !important;
    font-size: 13px !important;
  }

  .wzd-shop-catalog .wzd-cat-toolbar-filter {
    grid-column: 2;
    grid-row: 1;
    gap: 5px;
    padding: 8px 11px !important;
    color: #8e2521 !important;
  }

  .wzd-shop-catalog .wzd-cat-toolbar-sort {
    grid-column: 3;
    grid-row: 1;
    max-width: 92px;
    padding: 6px 27px 6px 10px !important;
  }

  .wzd-shop-catalog .wzd-cat-toolbar-search {
    grid-column: 1 / -1;
    grid-row: 2;
    order: initial;
  }

  .wzd-shop-catalog .wzd-cat-toolbar-search i {
    left: 14px;
    color: #86868b;
    font-size: 18px;
  }

  .wzd-shop-catalog .wzd-cat-toolbar-search input {
    height: 44px !important;
    padding: 9px 14px 9px 42px !important;
    border: 1px solid #d2d2d7 !important;
    border-radius: 13px !important;
    background: #f5f5f7 !important;
    color: #1d1d1f;
    font-size: 16px !important;
  }

  .wzd-shop-catalog .wzd-cat-toolbar-search input:focus {
    border-color: #8e2521 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(142, 37, 33, .1);
    outline: 0;
  }

  /* Product cards: quiet surfaces, strong image hierarchy, large controls. */
  .wzd-shop-catalog .wzd-cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  .wzd-shop-catalog .wzd-cat-grid .wzd-prod {
    min-width: 0;
    border: 1px solid #e5e5ea !important;
    border-radius: 17px !important;
    background: #fff;
    box-shadow: none !important;
    transform: none !important;
  }

  .wzd-shop-catalog .wzd-cat-grid .wzd-prod-img {
    aspect-ratio: 1.08 / 1 !important;
    padding: 15px 12px 9px !important;
    background: #fafafa !important;
  }

  .wzd-shop-catalog .wzd-cat-grid .wzd-prod-img img {
    object-fit: contain;
  }

  .wzd-shop-catalog .wzd-prod-select {
    top: 4px;
    left: 4px;
    z-index: 6;
    width: 44px;
    height: 44px;
    padding: 11px;
  }

  .wzd-shop-catalog .wzd-prod-select span {
    width: 22px !important;
    height: 22px !important;
    border: 1.5px solid #d2d2d7 !important;
    border-radius: 7px !important;
    background: rgba(255, 255, 255, .92) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06) !important;
  }

  .wzd-shop-catalog .wzd-prod-select input:checked + span {
    border-color: #982722 !important;
    background: #982722 !important;
    color: #fff !important;
  }

  .wzd-shop-catalog .wzd-prod-usage {
    top: 10px;
    right: 10px;
    max-width: calc(100% - 62px);
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(55, 55, 57, .88);
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
  }

  .wzd-shop-catalog .wzd-cat-grid .wzd-prod-body {
    padding: 10px 11px 11px !important;
  }

  .wzd-shop-catalog .wzd-cat-grid .wzd-prod-name {
    min-height: 40px;
    margin: 0 0 7px;
    color: #1d1d1f;
    font-size: 14px !important;
    font-weight: 650;
    line-height: 1.4;
  }

  .wzd-shop-catalog .wzd-prod-specs {
    margin-bottom: 10px;
  }

  .wzd-shop-catalog .wzd-prod-spec {
    color: #6e6e73;
    font-size: 11.5px;
    line-height: 1.35;
  }

  .wzd-shop-catalog .wzd-cat-grid .wzd-prod-link {
    min-height: 40px !important;
    padding: 7px 6px !important;
    border: 1.5px solid #8e2521 !important;
    border-radius: 12px !important;
    color: #8e2521 !important;
    font-size: 12.5px !important;
    font-weight: 600;
  }

  /* Filter behaves as a true modal bottom sheet. */
  .wzd-shop-catalog .wzd-filter-overlay {
    z-index: 1080 !important;
    background: rgba(0, 0, 0, .38) !important;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }

  .wzd-shop-catalog .wzd-cat-filter {
    z-index: 1090 !important;
    max-height: min(78dvh, 720px) !important;
    padding: 6px 16px calc(14px + env(safe-area-inset-bottom, 0px)) !important;
    border: 0 !important;
    border-radius: 24px 24px 0 0 !important;
    background: #fff !important;
    box-shadow: 0 -16px 48px rgba(0, 0, 0, .2) !important;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }

  .wzd-shop-catalog .wzd-cat-filter-head {
    position: sticky;
    top: -6px;
    z-index: 4;
    min-height: 70px;
    margin: 0 -16px 6px;
    padding: 24px 16px 8px;
    border-bottom: 1px solid #ececef;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .wzd-shop-catalog .wzd-cat-filter-head::before {
    top: 8px;
    width: 38px;
    height: 4px;
    background: #d2d2d7;
  }

  .wzd-shop-catalog .wzd-cat-filter .wzd-filter-h {
    gap: 8px;
    color: #1d1d1f;
    font-size: 17px;
    font-weight: 700;
  }

  .wzd-shop-catalog .wzd-cat-filter-close {
    display: inline-flex !important;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: #f2f2f4 !important;
    color: #3a3a3c !important;
    align-items: center;
    justify-content: center;
    font-size: 19px;
  }

  .wzd-shop-catalog .wzd-filter-tree-all {
    min-height: 48px;
    margin: 4px 0 6px;
    padding: 10px 12px !important;
    border: 0;
    border-left: 3px solid transparent;
    border-radius: 12px;
  }

  .wzd-shop-catalog .wzd-filter-link.on {
    border-left-color: #8e2521 !important;
    background: #f8eeee !important;
    color: #8e2521 !important;
  }

  .wzd-shop-catalog .wzd-filter-link.on .count {
    background: #8e2521 !important;
    color: #fff !important;
  }

  .wzd-shop-catalog .wzd-cat-filter .wzd-filter-acc {
    padding: 3px 0;
    border-bottom: 1px solid #ececef;
  }

  .wzd-shop-catalog .wzd-cat-filter .wzd-filter-acc > summary {
    min-height: 48px;
    padding: 10px 36px 10px 4px;
    color: #1d1d1f;
    font-size: 14px;
    font-weight: 650;
  }

  .wzd-shop-catalog .wzd-filter-actions {
    position: sticky;
    bottom: calc(-14px - env(safe-area-inset-bottom, 0px));
    z-index: 5;
    gap: 10px !important;
    margin: 12px -16px 0 !important;
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px)) !important;
    border-top: 1px solid #e5e5ea !important;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .wzd-shop-catalog .wzd-filter-actions .wzd-btn {
    min-height: 48px;
    border-radius: 13px;
    box-shadow: none;
  }

  body:has(#wzd-filter-toggle:checked) .wzd-bottomnav,
  body:has(#wzd-filter-toggle:checked) .wzd-fab,
  body:has(#wzd-filter-toggle:checked) .wdc-ck-fab,
  body:has(#wzd-filter-toggle:checked) .wzd-compare-bar {
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* Bottom navigation is the only persistent mobile navigation layer. */
  body.wzd-archive-product .wzd-fab,
  body.tax-product_cat .wzd-fab,
  body.wzd-archive-product .wdc-ck-fab,
  body.tax-product_cat .wdc-ck-fab,
  body.wzd-archive-product .wzd-cat-sticky,
  body.tax-product_cat .wzd-cat-sticky {
    display: none !important;
  }

  body.wzd-archive-product .wzd-bottomnav,
  body.tax-product_cat .wzd-bottomnav {
    height: calc(var(--wzd-shop-nav-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    border-top: .5px solid rgba(0, 0, 0, .16);
    background: rgba(255, 255, 255, .96);
    box-shadow: none;
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
  }

  body.wzd-archive-product .wzd-bottomnav-item,
  body.tax-product_cat .wzd-bottomnav-item {
    gap: 2px;
    min-width: 0;
    padding: 7px 2px 5px;
    color: #6e6e73;
  }

  body.wzd-archive-product .wzd-bottomnav-item i,
  body.tax-product_cat .wzd-bottomnav-item i {
    font-size: 21px;
  }

  body.wzd-archive-product .wzd-bottomnav-item span,
  body.tax-product_cat .wzd-bottomnav-item span {
    font-size: 11px;
    line-height: 1.15;
  }

  body.wzd-archive-product .wzd-compare-bar,
  body.tax-product_cat .wzd-compare-bar {
    bottom: calc(var(--wzd-shop-nav-h) + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 890 !important;
    padding: 9px 0 !important;
    border-top: .5px solid rgba(0, 0, 0, .1);
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, .08);
  }

  body.wzd-archive-product .wzd-compare-bar .wzd-btn,
  body.tax-product_cat .wzd-compare-bar .wzd-btn {
    min-height: 44px;
    border-radius: 12px;
    box-shadow: none;
  }

  body.wzd-archive-product:has(.wzd-compare-bar:not([hidden])),
  body.tax-product_cat:has(.wzd-compare-bar:not([hidden])) {
    padding-bottom: calc(138px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (max-width: 370px) {
  body.wzd-archive-product .wzd-brand-text,
  body.tax-product_cat .wzd-brand-text {
    display: flex !important;
  }
  body.wzd-archive-product .wzd-brand .wzd-wmark,
  body.tax-product_cat .wzd-brand .wzd-wmark { width: 40px !important; height: 40px !important; }
  body.wzd-archive-product .wzd-brand-primary,
  body.tax-product_cat .wzd-brand-primary { font-size: 15px !important; }
  body.wzd-archive-product .wzd-brand-company-short,
  body.tax-product_cat .wzd-brand-company-short { font-size: 9.5px !important; }

  .wzd-shop-catalog .wzd-cat-toolbar {
    grid-template-columns: minmax(0, 1fr) auto 86px !important;
  }

  .wzd-shop-catalog .wzd-cat-count {
    font-size: 11.5px;
  }

  .wzd-shop-catalog .wzd-cat-toolbar-filter {
    padding-inline: 9px !important;
  }

  .wzd-shop-catalog .wzd-cat-grid {
    gap: 9px !important;
  }

  .wzd-shop-catalog .wzd-cat-grid .wzd-prod-body {
    padding-inline: 10px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wzd-shop-catalog .wzd-cat-filter,
  .wzd-shop-catalog .wzd-filter-overlay {
    transition: none !important;
  }
}

/* On narrow screens the photographic banner is purely decorative and delays
 * the largest paint. A layered brand-colour backdrop keeps the hierarchy and
 * contrast while allowing the real heading to paint with the first frame. */
@media (max-width: 600px) {
  body.tax-product_cat .wzd-hero {
    background:
      radial-gradient(circle at 88% 16%, rgba(230, 81, 0, .16), transparent 34%),
      radial-gradient(circle at 8% 90%, rgba(142, 37, 33, .12), transparent 38%),
      linear-gradient(135deg, #fff9f3 0%, #f6e7d9 100%) !important;
  }

  body.tax-product_cat .wzd-hero-bg-wrap {
    display: none !important;
  }
}


/* Desktop catalogue: the sidebar stays genuinely interactive, while a
 * restrained internal scroll keeps long category trees usable beside products. */
@media (min-width: 881px) {
  .wzd-shop-catalog .wzd-cat-filter {
    z-index: 2;
    isolation: isolate;
    max-height: calc(100vh - 112px);
    overflow: auto;
    overscroll-behavior: contain;
    background: linear-gradient(180deg, #ffffff 0%, #fdfbf9 100%);
    box-shadow: 0 12px 30px rgba(46, 17, 15, .07);
    scrollbar-color: rgba(142, 37, 33, .34) transparent;
    scrollbar-width: thin;
  }

  .wzd-shop-catalog .wzd-cat-filter::-webkit-scrollbar { width: 7px; }
  .wzd-shop-catalog .wzd-cat-filter::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: rgba(142, 37, 33, .34);
    background-clip: padding-box;
  }

  .wzd-shop-catalog .wzd-filter-acc--tree > summary {
    min-height: 44px;
    padding: 10px 8px;
    border-radius: 10px;
    transition: background .16s ease, color .16s ease;
  }

  .wzd-shop-catalog .wzd-filter-acc--tree > summary:hover,
  .wzd-shop-catalog .wzd-filter-acc--tree[open] > summary {
    color: var(--c-brick);
    background: rgba(142, 37, 33, .06);
  }

  .wzd-shop-catalog .wzd-filter-acc--tree[open] > summary::after {
    box-shadow: 0 2px 6px rgba(142, 37, 33, .18);
  }

  .wzd-shop-catalog .wzd-filter-tree-subs {
    margin: 2px 4px 8px;
    padding: 5px 0 7px 5px;
    border-left: 1px solid rgba(142, 37, 33, .15);
  }

  .wzd-shop-catalog .wzd-filter-link:focus-visible,
  .wzd-shop-catalog .wzd-filter-acc--tree > summary:focus-visible {
    outline: 2px solid var(--c-brick);
    outline-offset: 2px;
  }
}
