/* ==========================================================================
   Shop + Quote drawer
   ========================================================================== */
.shop-hero { padding: clamp(48px, 7vw, 84px) 0 clamp(28px, 4vw, 44px); background: radial-gradient(120% 100% at 50% -20%, var(--paper), var(--cream)); }
.shop-hero .eyebrow { margin-bottom: 16px; }
.shop-hero h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
.shop-hero p { max-width: 560px; margin-top: 16px; color: var(--text-soft); font-size: 1.08rem; }

/* Filter panel — labeled, premium controls */
.shop-controls {
  margin-top: clamp(26px, 4vw, 36px);
  display: flex; flex-direction: column; gap: 18px;
  padding: clamp(16px, 2.4vw, 22px);
  background: var(--paper);
  background: linear-gradient(180deg, var(--paper), color-mix(in srgb, var(--paper) 86%, var(--cream)));
  border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow-sm);
}
.control-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px 22px; flex-wrap: wrap; }
.control-group { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.control-row .control-group { flex: 1 1 auto; }
.control-label {
  font-family: var(--font-display); font-weight: 700; font-size: .66rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--text-soft);
}

.shop-filters { display: flex; gap: 9px; flex-wrap: wrap; }
.filter-chip {
  font-family: var(--font-display); font-weight: 600; font-size: .86rem;
  padding: 9px 17px; border-radius: 999px; border: 1.5px solid var(--line);
  color: var(--text-soft); background: var(--paper); cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s, transform .12s;
}
.filter-chip:hover { border-color: var(--ink); color: var(--ink); }
.filter-chip:active { transform: translateY(1px); }
.filter-chip.active { background: var(--ink); color: var(--paper); border-color: var(--ink); box-shadow: 0 8px 20px -12px rgba(23,19,16,.6); }

.shop-search { position: relative; flex: 0 0 auto; }
.shop-search input {
  font-family: var(--font-body); font-size: .92rem; padding: 12px 16px 12px 44px;
  border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--text);
  width: 280px; max-width: 100%; transition: border-color .2s, box-shadow .2s;
}
.shop-search input::placeholder { color: var(--text-soft); }
.shop-search input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(23,19,16,.06); }
.shop-search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--text-soft); pointer-events: none; }
.shop-count { font-family: var(--font-display); font-size: .9rem; color: var(--text-soft); margin-top: 18px; }
.shop-count b { color: var(--ink); }

/* Value props under hero */
.shop-valueprops { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 24px; }
.shop-valueprops li { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: .9rem; color: var(--text); }
.shop-valueprops .vp-k {
  font-weight: 800; font-size: .72rem; letter-spacing: .04em; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); padding: 4px 9px; border-radius: 8px;
}

/* Brand strip — only the real catalogue brands (Brother · HP · Lexmark) */
.shop-brandstrip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px clamp(22px, 5vw, 46px);
  margin-top: clamp(26px, 4vw, 40px); padding-top: 26px; border-top: 1px solid var(--line);
}
.shop-brandstrip .bs-label {
  font-family: var(--font-display); font-weight: 700; font-size: .68rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--text-soft);
  margin-right: 4px;
}
.shop-brandstrip .bs-brand {
  font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; letter-spacing: -.02em;
  color: var(--text); opacity: .9; transition: color .25s, opacity .25s;
}
.shop-brandstrip .bs-brand:hover { color: var(--ink); opacity: 1; }

/* Dark trust band (shop punctuation before footer) */
/* Premium charcoal/near-black treatment — same as the Monthly Special card and
   final CTA (replaces the muddy brown from the shared .dark surface). */
.trust-band { padding: clamp(48px, 6vw, 76px) 0; background: linear-gradient(125deg, #181512 0%, #121010 55%, #0e0c0a 100%); }
.trust-band-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 48px); }
.tb-item { display: flex; gap: 18px; align-items: flex-start; }
.tb-num { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; letter-spacing: .04em; color: var(--yellow); flex: none; padding-top: 2px; }
.tb-item:nth-child(2) .tb-num { color: var(--cyan); }
.tb-item:nth-child(3) .tb-num { color: var(--magenta); }
.tb-item h3 { font-size: 1.18rem; margin-bottom: 8px; }
.tb-item p { color: var(--text-onbrown-soft); font-size: .95rem; line-height: 1.55; }

/* Product grid */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 26px; }
.product-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
  padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 15px;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s;
  position: relative;
}
/* CMYK key line that reveals on hover — functional accent, not a heavy shadow */
.product-card::before {
  content: ""; position: absolute; left: 22px; right: 22px; top: 0; height: 2px; border-radius: 2px;
  background: currentColor; opacity: 0; transition: opacity .28s var(--ease);
}
.product-card[data-stock="in"]::before      { color: var(--cyan); }
.product-card[data-stock="low"]::before     { color: var(--yellow); }
.product-card[data-stock="special"]::before { color: var(--magenta); }
.product-card:hover { transform: translateY(-4px); border-color: var(--ink); box-shadow: 0 16px 40px -28px rgba(28,20,11,.5); }
.product-card:hover::before { opacity: 1; }

.pc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pc-grade {
  font-family: var(--font-display); font-weight: 700; font-size: .64rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-soft); border: 1px solid var(--line); padding: 4px 9px; border-radius: 999px; background: var(--cream);
}
.pc-chip {
  width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: .9rem; letter-spacing: -.01em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), var(--shadow-sm);
}
/* product image tile — contained, never stretched */
.pc-media {
  position: relative; height: clamp(168px, 15vw, 184px); border-radius: 14px;
  background: radial-gradient(120% 120% at 50% 18%, #fff, #f6f2ea);
  border: 1px solid var(--line);
  display: grid; place-items: center; overflow: hidden; padding: 18px;
}
.pc-img {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  object-fit: contain; display: block;
  transition: transform .3s var(--ease);
}
.product-card:hover .pc-img { transform: scale(1.04); }
/* simple placeholder, shown only if an image fails to load */
.pc-media.is-empty { background: var(--cream); }
.pc-media.is-empty::after {
  content: "Image coming soon";
  font-family: var(--font-display); font-size: .72rem; font-weight: 600; letter-spacing: .03em; color: var(--text-soft);
}

.pc-anchor { display: flex; flex-direction: column; gap: 4px; }
.pc-part {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.03em; color: var(--ink);
  font-size: 1.6rem; line-height: 1.04; overflow-wrap: anywhere;
}
.pc-sub { font-family: var(--font-display); font-size: .84rem; font-weight: 500; color: var(--text-soft); }

.pc-specs { display: grid; gap: 10px; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 2px 0; }
/* Stack label above value so labels (incl. long ones like "Compatibility")
   never overflow into / overlap the value text. Values wrap naturally. */
.pc-specs li { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pc-specs li span { font-family: var(--font-display); font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-soft); }
.pc-specs li b { font-size: .82rem; font-weight: 600; color: var(--text); line-height: 1.35; overflow-wrap: anywhere; }
.pc-specs--soft li b { font-weight: 500; color: var(--text-soft); font-style: italic; }

.pc-foot { display: flex; align-items: center; justify-content: space-between; }
.pc-stock { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-display); font-weight: 600; font-size: .8rem; color: var(--text); }
.pc-stock i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.pc-stock--in i      { background: #3f8a4e; box-shadow: 0 0 0 3px rgba(63,138,78,.16); }
.pc-stock--low i     { background: #c98a1e; box-shadow: 0 0 0 3px rgba(201,138,30,.16); }
.pc-stock--special i { background: #7c7266; box-shadow: 0 0 0 3px rgba(124,114,102,.16); }
.pc-stock--low     { color: #9a6a12; }
.pc-stock--special { color: var(--text-soft); }
.product-card .add-quote { margin-top: 4px; }
.add-quote {
  width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-display); font-weight: 600; font-size: .92rem;
  padding: 13px 16px; border-radius: 13px; background: var(--ink); color: var(--paper);
  transition: transform .2s var(--ease), background .2s;
}
.add-quote svg { width: 16px; height: 16px; }
.add-quote:hover { transform: translateY(-2px); }
.add-quote.added { background: #2f6b2f; }
.add-quote.added .plus { display: none; }
.add-quote .check { display: none; }
.add-quote.added .check { display: inline-flex; }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 46px; }
.pagination button {
  min-width: 42px; height: 42px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--paper); font-family: var(--font-display); font-weight: 700; color: var(--text); transition: .2s;
}
.pagination button:hover:not(:disabled) { border-color: var(--ink); }
.pagination button.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }
.no-results { text-align: center; padding: 60px 20px; color: var(--text-soft); font-family: var(--font-display); }

/* NOTE: the floating quote button, quote drawer, success state and toast are a
   GLOBAL component (injected on every page by quote.js), so their styles now
   live in styles.css — not here — to guarantee they are always styled. */

@media (max-width: 1000px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .trust-band-grid { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 760px)  {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .pc-part { font-size: 1.5rem; }
  /* search stretches full-width below the type filters so nothing overflows */
  .control-row { flex-direction: column; align-items: stretch; gap: 16px; }
  .shop-search { width: 100%; }
  .shop-search input { width: 100%; }
}
@media (max-width: 560px)  {
  /* polished single-column layout for phones */
  .product-grid { grid-template-columns: 1fr; gap: 16px; }
  .product-card { padding: 18px 18px 18px; gap: 16px; border-radius: 16px; }
  .product-card::before { left: 18px; right: 18px; }
  .pc-media { height: clamp(190px, 56vw, 240px); padding: 22px; }
  .pc-part { font-size: 1.7rem; }
  .pc-sub { font-size: .9rem; }
  .pc-specs li b { font-size: .9rem; }
  .pc-stock { font-size: .86rem; }
  /* larger, easier-to-tap quote button */
  .add-quote { padding: 15px 18px; font-size: 1rem; border-radius: 14px; }

  /* compact, non-overflowing controls */
  .shop-controls { padding: 16px; gap: 16px; }
  .filter-chip { font-size: .88rem; padding: 10px 16px; }
  .shop-valueprops { gap: 8px 18px; }
  .shop-brandstrip { gap: 12px 24px; }
}
