/* Orchard Valley — wholesale catalogue. Loads after the deck's stylesheet and reuses
   its tokens, top bar, buttons, kicker and pop-up window styles. */

body { font-size: 17px; }
.cat-page main { padding-top: var(--bar-h); }

/* ── Hero ─────────────────────────────────────────────────────────── */
.c-hero { padding-block: clamp(34px, 6vw, 84px) clamp(26px, 4vw, 52px); }
.c-hero-grid { display: grid; gap: clamp(28px, 4vw, 64px); }
.c-hero h1 { font-size: clamp(44px, 7.4vw, 104px); font-weight: 800; text-transform: uppercase; letter-spacing: -.02em; line-height: .9; color: var(--ink); margin: 16px 0 0; }
.c-hero h1 span { display: block; }
.c-hero .lede { margin-top: 22px; color: var(--text); }
.c-hero .lede b { color: var(--ink); }
.c-hero .pricing { margin-top: 14px; font-size: 15px; color: var(--mute); display: flex; gap: 10px; align-items: baseline; }
.c-hero .pricing::before { content: ""; flex: 0 0 auto; width: 8px; height: 8px; background: var(--gold); transform: translateY(-1px); }
.c-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.c-ctas .btn { padding: 14px 18px; font-size: 13.5px; gap: 12px; }
.c-ctas .btn span { font-size: 15px; }

.c-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: clamp(30px, 4vw, 48px) 0 0; border-top: 1px solid var(--ink); }
.c-stats div { padding: 14px 12px 4px 0; border-right: 1px solid var(--rule); }
.c-stats div:nth-child(3n) { border-right: 0; }
.c-stats div:nth-child(n+4) { border-top: 1px solid var(--rule); }
.c-stats dt { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.c-stats dd { margin: 4px 0 10px; font-size: clamp(26px, 3vw, 38px); font-weight: 800; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
@media (min-width: 700px) {
  .c-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .c-stats div { border-right: 1px solid var(--rule); padding-left: 14px; }
  .c-stats div:first-child { padding-left: 0; }
  .c-stats div:nth-child(3n) { border-right: 1px solid var(--rule); }
  .c-stats div:last-child { border-right: 0; }
  .c-stats div:nth-child(n+4) { border-top: 0; }
}

/* Category tiles: a swipeable strip on phones, a 3x3 grid beside the copy on desktop */
.c-tiles { list-style: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 6px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(132px, 38%);
  gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.c-tiles::-webkit-scrollbar { display: none; }
.c-tiles li { scroll-snap-align: start; }
.c-tile { all: unset; box-sizing: border-box; display: block; width: 100%; cursor: pointer; }
.c-tile .img { display: block; aspect-ratio: 1; overflow: hidden; background: #d9b27c; position: relative; }
.c-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.c-tile:hover img { transform: scale(1.05); }
.c-tile .img::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--gold); transform: scaleX(0); transform-origin: 0 50%; transition: transform .45s var(--ease); }
.c-tile[aria-pressed="true"] .img::after { transform: none; }
.c-tile .n { display: block; margin-top: 9px; font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.c-tile .c { display: block; font-size: 13px; color: var(--mute); font-variant-numeric: tabular-nums; }
.c-tile:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (min-width: 1000px) {
  .c-hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; }
  .c-tiles { margin: 6px 0 0; padding: 0; grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; gap: 18px 14px; }
  .c-tile .n { font-size: 14.5px; }
}

/* ── Toolbar ──────────────────────────────────────────────────────── */
.c-tools { position: sticky; top: var(--bar-off); z-index: 20; background: rgba(255,255,255,.96); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); transition: top .5s var(--ease); }
.c-tools .wrap { display: grid; gap: 10px; padding-block: 12px 10px; }
.c-row { display: flex; gap: 10px; align-items: center; min-width: 0; }
.c-search { position: relative; flex: 1; min-width: 0; }
.c-search svg { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; pointer-events: none; }
.c-search input { width: 100%; height: 46px; padding: 0 40px 0 42px; font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1.5px solid var(--rule); border-radius: 0; outline: none; -webkit-appearance: none; appearance: none; }
.c-search input:focus { border-color: var(--ink); }
.c-search input::placeholder { color: #8a8a8a; }
.c-search input::-webkit-search-cancel-button { display: none; }
.c-clear { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.c-clear[hidden] { display: none; }
.c-clear svg { position: static; transform: none; width: 14px; height: 14px; stroke-width: 2.6; }
.c-fmt { flex: 0 0 auto; position: relative; }
.c-fmt select { height: 46px; padding: 0 34px 0 14px; font: inherit; font-size: 15px; font-weight: 700; color: var(--ink); background: #fff; border: 1.5px solid var(--rule); border-radius: 0; -webkit-appearance: none; appearance: none; cursor: pointer; }
.c-fmt select:focus { border-color: var(--ink); outline: none; }
.c-fmt::after { content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.c-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 2px; scroll-padding-inline: var(--gutter); }
.c-chips::-webkit-scrollbar { display: none; }
.c-chip { flex: 0 0 auto; height: 34px; padding: 0 13px; font: inherit; font-size: 14px; font-weight: 700; color: var(--text); background: var(--surface); border: 0; border-radius: 0; cursor: pointer; white-space: nowrap; transition: background .2s, color .2s; }
.c-chip:hover { background: #e7e7e7; }
.c-chip[aria-pressed="true"] { background: var(--ink); color: #fff; }
.c-chip b { font-weight: 600; color: var(--mute); margin-left: 6px; font-variant-numeric: tabular-nums; }
.c-chip[aria-pressed="true"] b { color: var(--gold); }
.c-count { font-size: 13px; color: var(--mute); white-space: nowrap; font-variant-numeric: tabular-nums; }
.c-count b { color: var(--ink); }
@media (max-width: 699px) { .c-row .c-count { display: none; } }
@media (min-width: 700px) { .c-mcount { display: none; } }
.c-mcount { font-size: 13px; color: var(--mute); }

/* ── Results ──────────────────────────────────────────────────────── */
.c-results { padding-block: 8px clamp(56px, 8vw, 110px); min-height: 60vh; }
.c-sec { padding-top: clamp(30px, 4vw, 54px); scroll-margin-top: calc(var(--bar-off) + 120px); }
.c-sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--ink); }
.c-sec-head h2 { font-size: clamp(26px, 3vw, 40px); font-weight: 800; text-transform: uppercase; letter-spacing: -.01em; line-height: 1; }
.c-sec-head p { font-size: 15px; color: var(--mute); }
.c-sec-head p b { color: var(--ink); font-variant-numeric: tabular-nums; }
.c-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; }
@media (min-width: 700px) { .c-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 20px; } }
@media (min-width: 1100px) { .c-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card { position: relative; cursor: pointer; outline: none; min-width: 0; }
.card .ph { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #dcc29a; }
.card .ph.w { background: #fff; box-shadow: inset 0 0 0 1px var(--rule); }
.card .ph.none { background: var(--surface); display: grid; place-items: center; }
.card .ph.none img { width: 34%; height: auto; opacity: .38; filter: grayscale(1); object-fit: contain; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), opacity .5s var(--ease); }
.card .ph img.ld { opacity: 0; }
.card:hover .ph img, .card:focus-visible .ph img { transform: scale(1.045); }
.card:focus-visible .ph { outline: 2px solid var(--ink); outline-offset: 3px; }
.card .pop { position: absolute; top: 0; left: 0; z-index: 1; background: var(--gold); color: var(--ink); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 6px 9px 5px; }
.card h3 { margin: 12px 0 7px; font-size: 16.5px; font-weight: 700; line-height: 1.22; color: var(--ink); text-wrap: pretty; }
.card .fm { margin: 0; display: grid; gap: 3px; }
.card .fm div { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.card .fm dt { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.card .fm dd { margin: 0; font-size: 14px; color: var(--text); line-height: 1.35; font-variant-numeric: tabular-nums; }
@media (max-width: 420px) {
  .card h3 { font-size: 15px; }
  .card .fm div { grid-template-columns: 1fr; gap: 0; }
  .card .fm dd { font-size: 13.5px; margin-bottom: 3px; }
}

.c-empty { padding: 70px 0; text-align: center; }
.c-empty h2 { font-size: 26px; font-weight: 800; }
.c-empty p { margin-top: 8px; color: var(--mute); }
.c-empty button { margin-top: 18px; font: inherit; font-weight: 700; font-size: 15px; background: var(--gold); border: 0; padding: 12px 18px; cursor: pointer; }

/* Loading skeleton */
.sk .ph { background: linear-gradient(100deg, #f1f1f1 30%, #f8f8f8 50%, #f1f1f1 70%); background-size: 300% 100%; animation: sk 1.4s linear infinite; }
.sk i { display: block; height: 14px; margin-top: 12px; width: 78%; background: #f1f1f1; }
.sk i + i { width: 52%; margin-top: 8px; }
@keyframes sk { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ── Pop-up ───────────────────────────────────────────────────────── */
.c-win .w-card > .w-pic { aspect-ratio: 3 / 2; max-height: 46vh; }
.c-win .w-card > .w-pic.w { background: #fff; }
.c-win .w-card > .w-pic.w img { object-fit: contain; }
.c-win .w-card > .w-pic.none { display: grid; place-items: center; background: var(--surface); }
.c-win .w-card > .w-pic.none img { position: static; width: 26%; height: auto; opacity: .35; filter: grayscale(1); }
@media (min-width: 900px) {
  .c-win .w-card:has(> .w-pic) { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
  .c-win .w-card > .w-pic { aspect-ratio: 1; max-height: none; }
}
.w-sum { margin-top: 2px; font-size: 16px; color: var(--text); }
.w-sum b { color: var(--ink); }
.lines { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 15px; border-top: 1px solid var(--ink); }
.lines th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); padding: 10px 10px 8px 0; border-bottom: 1px solid var(--rule); }
.lines td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--rule); color: var(--ink); vertical-align: top; font-variant-numeric: tabular-nums; }
.lines td.code, .lines td.ean { color: var(--text); font-size: 14px; white-space: nowrap; }
.lines .oos { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #a33a2a; }
@media (max-width: 520px) {
  .lines thead { display: none; }
  .lines tr { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
  .lines td { padding: 0; border: 0; }
  .lines td.fmt { font-weight: 700; }
  .lines td.code, .lines td.ean { font-size: 13.5px; color: var(--mute); }
  .lines td.ean { text-align: right; }
}
.w-price { margin-top: 18px; display: flex; gap: 10px; align-items: baseline; font-size: 15px; color: var(--mute); }
.w-price::before { content: ""; flex: 0 0 auto; width: 8px; height: 8px; background: var(--gold); transform: translateY(-1px); }
.w-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.w-ctas .btn { padding: 13px 16px; font-size: 13px; gap: 12px; }
.w-ctas .btn span { font-size: 15px; }
.c-win .win-nav { display: grid; }

/* ── Close band + top button ──────────────────────────────────────── */
.c-close { background: var(--gold); padding-block: clamp(60px, 9vw, 120px); }
.c-close .h2 { max-width: 12em; }
.c-close .lede { margin-top: 18px; color: var(--ink); }
.c-close .ctas { margin-top: 30px; }
#ctop { position: fixed; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 30; width: 46px; height: 46px; border: 0; background: var(--ink); cursor: pointer;
  display: grid; place-items: center; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .3s var(--ease), transform .3s var(--ease); }
#ctop svg { width: 18px; height: 18px; fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
#ctop.on { opacity: 1; transform: none; pointer-events: auto; }
html.win-open #ctop { opacity: 0; pointer-events: none; }
.c-win .win-nav[hidden] { display: none; }
.c-win .win { opacity: 0; transform: translateY(18px) scale(.985); transform-origin: 50% 60%; }
.c-win.on .win { opacity: 1; transform: none; }
@media (max-width: 520px) {
  .lines td.code { text-align: right; }
  .lines td.ean { grid-column: 1 / -1; text-align: left; }
}
@media (max-width: 760px) { .c-win .win-nav { display: none !important; } }
@media (max-width: 599px) { .c-ctas { display: grid; } }
@media (min-width: 1000px) { .c-hero h1 { font-size: clamp(56px, 4.9vw, 80px); } }
