/* ============================================================
   Customer QC Gallery — everythingreps design
   Self-contained: all tokens are declared on .qcx so the plugin
   renders identically regardless of the active theme. Mono
   ink-on-paper vocabulary (Oswald display + Roboto text), matched
   to the everythingreps prototype QC gallery.
   ============================================================ */

.qcx {
  /* palette (HSL components, composed at use sites) */
  --ink: 222 39% 13%;
  --muted: 217 18% 37%;
  --paper: 220 7% 96.5%;
  --surface: 220 30% 99%;
  --surface-muted: 220 22% 96%;
  --line: 219 18% 83%;
  --ok: 160 84% 30%;
  --cta-dark: 222 47% 11%;

  --r-sm: 0.75rem;
  --r-md: 0.875rem;
  --r-lg: 1rem;
  --r-full: 9999px;

  --sh-sm: 0 8px 20px -18px hsl(222 39% 13% / 0.15);
  --sh-md: 0 18px 40px -30px hsl(222 39% 13% / 0.22);
  --sh-lg: 0 32px 80px hsl(222 44% 8% / 0.4);

  --f-display: "Roboto", system-ui, -apple-system, sans-serif;
  --f-text: "Roboto", system-ui, -apple-system, sans-serif;

  --wrap: 1200px;

  color: hsl(var(--ink));
  font-family: var(--f-text);
  box-sizing: border-box;
}
.qcx *, .qcx *::before, .qcx *::after { box-sizing: border-box; }

.qcx-wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(16px, 4vw, 28px); }

/* ---- page band (breadcrumb + title + subtitle) ---- */
.qcx-band { border-bottom: 1px solid hsl(var(--line) / 0.7); background: hsl(var(--surface)); }
.qcx-band__inner { padding: clamp(38px, 5.5vw, 66px) 0 clamp(32px, 4.5vw, 48px); }
.qcx-crumb { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; color: hsl(var(--muted)); margin: 0 0 14px; flex-wrap: wrap; }
.qcx-crumb a { color: hsl(var(--muted)); text-decoration: none; transition: color 0.15s; }
.qcx-crumb a:hover { color: hsl(var(--ink)); }
.qcx-crumb svg { width: 13px; height: 13px; opacity: 0.5; flex: none; }
.qcx-crumb b { color: hsl(var(--ink)); font-weight: 600; }
.qcx-band__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.qcx-band h1 { font-family: var(--f-display); font-weight: 700; font-size: clamp(2rem, 4vw, 3rem); line-height: 0.98; letter-spacing: -0.045em; margin: 0; text-transform: none; }
.qcx-band__sub { color: hsl(var(--muted)); font-size: clamp(1rem, 1.4vw, 1.1rem); line-height: 1.65; margin: 16px 0 0; max-width: 58ch; }
.qcx-band__meta { display: flex; align-items: center; gap: 8px; flex: none; }

/* small passed / eyebrow chips */
.qcx-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px 7px 9px; border-radius: var(--r-full); background: hsl(var(--surface-muted)); border: 1px solid hsl(var(--line) / 0.7); font-size: 0.8rem; font-weight: 600; color: hsl(var(--ink)); white-space: nowrap; }
.qcx-chip--ok { color: hsl(var(--ok)); }
.qcx-check { width: 18px; height: 18px; border-radius: 50%; background: hsl(var(--ink)); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.qcx-check svg { width: 10px; height: 10px; stroke: #fff; stroke-width: 3.4; fill: none; }
.qcx-chip--ok .qcx-check { background: hsl(var(--ok)); }

/* ---- buttons ---- */
.qcx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 48px; padding: 0 22px; border-radius: var(--r-md); font-family: var(--f-display); font-weight: 600; font-size: 0.98rem; letter-spacing: 0.01em; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform 0.12s, box-shadow 0.16s, background 0.16s; white-space: nowrap; }
.qcx-btn svg { width: 17px; height: 17px; flex: none; }
.qcx-btn:active { transform: scale(0.985); }
.qcx-btn--solid { background: hsl(var(--ink)); color: #fff; box-shadow: var(--sh-sm); }
.qcx-btn--solid:hover { background: hsl(var(--ink) / 0.9); box-shadow: var(--sh-md); color: #fff; }
.qcx-btn--outline { background: transparent; color: hsl(var(--ink)); border-color: hsl(var(--ink) / 0.22); }
.qcx-btn--outline:hover { border-color: hsl(var(--ink) / 0.45); background: hsl(var(--ink) / 0.03); }

/* =====================================================
   ARCHIVE + HOMEPAGE GRID (qc cards)
   ===================================================== */
.qcx-main { padding: clamp(44px, 6vw, 80px) 0 clamp(60px, 9vw, 104px); }
.qcx-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 2.6vw, 32px); list-style: none; margin: 0; padding: 0; }

.qcx-card { position: relative; background: hsl(var(--surface)); border: 1px solid hsl(var(--line) / 0.7); border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; gap: 15px; transition: box-shadow 0.16s ease, transform 0.16s ease, border-color 0.16s ease; text-align: left; }
.qcx-card__link { display: flex; flex-direction: column; gap: 15px; text-decoration: none; color: inherit; }
.qcx-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -20px hsl(220 20% 40% / 0.28); border-color: hsl(var(--ink) / 0.2); }
.qcx-card__shot { position: relative; display: block; width: 100%; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: hsl(var(--surface-muted)); }
.qcx-card__shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s ease; }
.qcx-card:hover .qcx-card__shot img { transform: scale(1.05); }
.qcx-card__count { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: var(--r-full); background: hsl(var(--ink) / 0.82); color: #fff; font-size: 0.72rem; font-weight: 600; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.qcx-card__count svg { width: 12px; height: 12px; stroke: #fff; stroke-width: 2; fill: none; }
.qcx-card__pass { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px 4px 6px; border-radius: var(--r-full); background: hsl(0 0% 100% / 0.92); color: hsl(var(--ink)); font-size: 0.72rem; font-weight: 600; box-shadow: var(--sh-sm); }
.qcx-card__pass .qcx-check { width: 14px; height: 14px; background: hsl(var(--ok)); }
.qcx-card__view { position: absolute; left: 0; right: 0; bottom: 0; padding: 24px 12px 11px; text-align: center; font-size: 0.78rem; font-weight: 600; color: #fff; background: linear-gradient(to top, hsl(222 40% 12% / 0.78), transparent); opacity: 0; transform: translateY(6px); transition: opacity 0.16s ease, transform 0.16s ease; }
.qcx-card:hover .qcx-card__view { opacity: 1; transform: none; }
.qcx-card__meta { display: flex; flex-direction: column; gap: 8px; padding: 2px 4px 6px; }
.qcx-card__title { font-weight: 700; font-size: 0.95rem; letter-spacing: -0.01em; color: hsl(var(--ink)); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qcx-card__sub { font-size: 0.8rem; color: hsl(var(--muted)); display: inline-flex; align-items: center; gap: 6px; }

.qcx-empty { grid-column: 1 / -1; text-align: center; padding: 48px 20px; background: hsl(var(--surface-muted)); border-radius: var(--r-lg); color: hsl(var(--muted)); }

/* pagination */
.qcx-pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: clamp(34px, 5vw, 52px); }
.qcx-pager .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 14px; border: 1px solid hsl(var(--line) / 0.8); border-radius: var(--r-md); text-decoration: none; color: hsl(var(--ink)); font-weight: 600; font-size: 0.9rem; background: hsl(var(--surface)); transition: border-color 0.15s, background 0.15s; }
.qcx-pager .page-numbers:hover { border-color: hsl(var(--ink) / 0.4); }
.qcx-pager .page-numbers.current { background: hsl(var(--ink)); color: #fff; border-color: hsl(var(--ink)); }
.qcx-pager .page-numbers.dots { border: none; background: none; }

/* homepage shortcode section */
.qcx-section { padding: clamp(44px, 6vw, 76px) 0; }
.qcx-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: clamp(26px, 3.5vw, 40px); flex-wrap: wrap; }
.qcx-eyebrow { font-family: var(--f-display); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: hsl(var(--muted)); margin: 0 0 8px; }
.qcx-section h2 { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -0.04em; line-height: 1; margin: 0; }
.qcx-link { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: 0.9rem; color: hsl(var(--ink)); text-decoration: none; white-space: nowrap; }
.qcx-link svg { width: 15px; height: 15px; transition: transform 0.15s; }
.qcx-link:hover svg { transform: translateX(3px); }

/* =====================================================
   SINGLE — gallery viewer
   ===================================================== */
.qcx-layout { display: block; }

/* gallery mirrors the site product gallery: big square main image on top,
   a horizontal thumbnail GRID below (not a tall side rail). Centered in a
   product-width column so it never sprawls. */
.qcx-gal { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.qcx-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 12px; }
.qcx-thumb { position: relative; aspect-ratio: 1; border-radius: var(--r-md); overflow: hidden; border: 2px solid transparent; background: hsl(var(--surface-muted)); cursor: pointer; padding: 0; transition: border-color 0.15s, transform 0.15s; }
.qcx-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qcx-thumb:hover { transform: translateY(-2px); }
.qcx-thumb.is-active { border-color: hsl(var(--ink)); }
.qcx-thumb:focus-visible { outline: 2px solid hsl(var(--ink)); outline-offset: 2px; }

/* main stage — square, rounded like the product image */
.qcx-stage { position: relative; border-radius: var(--radius-3xl, 1.5rem); overflow: hidden; background: hsl(var(--surface-muted)); border: 1px solid hsl(var(--line) / 0.6); }
.qcx-stage__img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; cursor: zoom-in; }
.qcx-stage__counter { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); padding: 5px 13px; border-radius: var(--r-full); background: hsl(var(--ink) / 0.8); color: #fff; font-size: 0.76rem; font-weight: 600; font-variant-numeric: tabular-nums; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.qcx-stage__zoom { position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-full); background: hsl(0 0% 100% / 0.92); color: hsl(var(--ink)); font-size: 0.74rem; font-weight: 600; box-shadow: var(--sh-sm); pointer-events: none; }
.qcx-stage__zoom svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; }
.qcx-arw { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #fff !important; color: hsl(var(--ink)) !important; border: 1px solid hsl(var(--line) / 0.6) !important; cursor: pointer; box-shadow: var(--sh-sm); -webkit-appearance: none; appearance: none; transition: none; z-index: 2; }
.qcx-arw:hover { background: #fff !important; }
.qcx-arw svg { display: none; }
.qcx-arw::before { font-family: Arial, sans-serif; font-size: 22px; line-height: 1; color: hsl(var(--ink)) !important; }
.qcx-arw--prev { left: 14px; }
.qcx-arw--prev::before { content: "\276E"; }
.qcx-arw--next { right: 14px; }
.qcx-arw--next::before { content: "\276F"; }

/* content below gallery */
.qcx-content { margin: clamp(30px, 4vw, 48px) auto 0; line-height: 1.75; font-size: 1.02rem; color: hsl(var(--ink) / 0.9); max-width: 640px; }
.qcx-content p { margin: 0 0 1em; }
.qcx-content img { max-width: 100%; height: auto; border-radius: var(--r-md); }

/* =====================================================
   LIGHTBOX (fullscreen)
   ===================================================== */
.qcx-lb { position: fixed; inset: 0; z-index: 99999; display: none; align-items: center; justify-content: center; background: hsl(222 44% 6% / 0.94); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.qcx-lb.is-open { display: flex; animation: qcx-fade 0.18s ease; }
@keyframes qcx-fade { from { opacity: 0; } to { opacity: 1; } }
.qcx-lb__img { max-width: 90vw; max-height: 84vh; object-fit: contain; border-radius: 6px; box-shadow: 0 30px 90px rgba(0,0,0,0.5); }
.qcx-lb__close { position: absolute; top: 20px; right: 20px; width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: hsl(222 44% 8% / 0.62) !important; color: #fff !important; border: none !important; cursor: pointer; -webkit-appearance: none; appearance: none; transition: none; z-index: 3; }
.qcx-lb__close:hover { background: hsl(222 44% 8% / 0.85) !important; }
.qcx-lb__close svg { width: 26px; height: 26px; max-width: none; stroke: #fff; stroke-width: 2.2; fill: none; }
.qcx-lb__arw { position: absolute; top: 50%; transform: translateY(-50%); width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: hsl(222 44% 8% / 0.62) !important; color: #fff !important; border: none !important; cursor: pointer; -webkit-appearance: none; appearance: none; transition: none; box-shadow: none !important; }
.qcx-lb__arw:hover { background: hsl(222 44% 8% / 0.85) !important; }
.qcx-lb__arw svg { display: none; }
.qcx-lb__arw::before { font-family: Arial, sans-serif; font-size: 30px; line-height: 1; color: #fff !important; }
.qcx-lb__arw--prev { left: 24px; }
.qcx-lb__arw--prev::before { content: "\276E"; }
.qcx-lb__arw--next { right: 24px; }
.qcx-lb__arw--next::before { content: "\276F"; }
.qcx-lb__cap { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); color: hsl(0 0% 100% / 0.85); font-size: 0.85rem; font-weight: 500; font-variant-numeric: tabular-nums; }

/* icons must not be shrunk by the theme's global img,svg rule, and must draw
   as strokes (these controls carry inline stroke too, for belt-and-braces). */
.qcx svg { max-width: none; }
.qcx-arw svg, .qcx-stage__zoom svg, .qcx-lb__arw svg, .qcx-lb__close svg { fill: none; }
@media (max-width: 1100px) {
  .qcx-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .qcx-grid { grid-template-columns: repeat(2, 1fr); gap: clamp(14px, 3vw, 18px); }
  .qcx-band__row { align-items: flex-start; }
  .qcx-thumbs { grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 10px; }
  .qcx-arw { width: 38px; height: 38px; }
  .qcx-arw svg { width: 18px; height: 18px; }
  .qcx-lb__arw { width: 44px; height: 44px; }
  .qcx-lb__arw--prev { left: 10px; }
  .qcx-lb__arw--next { right: 10px; }
}
@media (max-width: 420px) {
  .qcx-card { padding: 10px; gap: 9px; }
  .qcx-card__title { font-size: 0.84rem; }
}
