/* ===========================================================================
   Boutique page — Deutschmaak.

   Base = the shared public layer (public-pages.css): body.dm-public background,
   .sp-eyebrow / .sp-lead typography, .sp-btn CTAs, .sp-cta banner, .sp-footer.
   This file only adds the shop layout and the dark overrides for shop pieces,
   following the same token pattern as packs-page.css / about-page.css.
   Light → Dark is instant: html.dark rules below, no reload, no !important.
   =========================================================================== */

/* Hero — single column, same typographic language as packs.php / about.php */
.shop-hero { padding: 0 0 clamp(38px, 5vw, 58px); }
.shop-hero .sp-eyebrow { color: #7e858d; }
.shop-hero h1 {
  /* One line at every viewport, from the very first paint.
     Root cause of the intermittent wrap: BEFORE the webfont loads, the
     fallback (Arial/Helvetica) is wider than Space Grotesk and "Boutique PDF
     & ressources." exceeds the .sp-shell width at the clamp max → two lines;
     after the font swaps in (or on reload, with the font cached) it collapses
     to one line. white-space:nowrap removes that font-metrics dependency
     (body.dm-public has overflow-x:hidden, so nothing ever scrolls, and the
     responsive clamp keeps the line inside the shell at every breakpoint). */
  max-width: 1320px;
  white-space: nowrap;
  margin: 16px 0 18px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(3.2rem, 6.8vw, 6.2rem);
  font-weight: 700;
  line-height: .96;
  letter-spacing: -.07em;
}
.shop-hero h1 em { font-style: normal; color: var(--sp-red); }
.shop-hero .sp-lead { max-width: 680px; }

/* Flash — same visual family as .packs-flash */
.shop-flash {
  max-width: 820px;
  margin: 0 auto 30px;
  padding: 15px 18px;
  border: 1px solid transparent;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
}
.shop-flash.ok { color: #175c31; background: #eaf7ee; border-color: #b9e3c6; }
.shop-flash.err { color: #8f172a; background: #fff1f2; border-color: #f0c4ca; }

/* Product grid — auto-fill keeps 4→2→1 columns without overflow */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

/* Product card — same surface language as .dm-price-card / .sp-stat */
.shop-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(16, 18, 22, .08);
  border-radius: 26px;
  background: var(--sp-surface, rgba(255, 255, 255, .84));
  box-shadow: 0 15px 38px rgba(22, 24, 30, .055);
  transition: transform .35s var(--dm-ease), box-shadow .35s var(--dm-ease), border-color .35s ease;
}
.shop-card:hover,
.shop-card:focus-within {
  z-index: 2;
  transform: translateY(-6px);
  border-color: rgba(16, 18, 22, .17);
  box-shadow: 0 25px 52px rgba(22, 24, 30, .12);
}

/* Cover — fixed 16/9 ratio, contained image, clean placeholder */
.shop-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eceef1;
  color: #9aa4ad;
}
.shop-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.shop-cover i { font-size: 2.6rem; }

.shop-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 22px 24px;
}
.shop-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.02em;
}
.shop-desc {
  margin: 0;
  color: #68717a;
  font-size: 12.5px;
  line-height: 1.65;
  /* consistent card height: clamp long descriptions instead of overflowing */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shop-price {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: auto;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -.03em;
}
.shop-price small {
  color: #8b939c;
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.shop-actions { margin-top: 6px; }
.shop-actions .sp-btn { width: 100%; }
.shop-actions .sp-btn:focus-visible {
  outline: 3px solid rgba(225, 29, 46, .38);
  outline-offset: 3px;
}

/* Empty catalogue — clean state, same family as .packs-empty */
.shop-empty {
  padding: 46px 30px;
  border: 1px dashed var(--sp-line);
  border-radius: 26px;
  background: rgba(255, 255, 255, .45);
  text-align: center;
}
.shop-empty-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  border: 1px solid var(--sp-line);
  border-radius: 16px;
  background: #fff;
  color: var(--sp-red);
  font-size: 20px;
}
.shop-empty strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
  letter-spacing: -.02em;
}
.shop-empty p { margin: 8px 0 0; color: #68717a; font-size: 12.5px; line-height: 1.7; }

/* Footer spacing consistent with sister pages */
.dm-shop-page .sp-footer { margin-top: 56px; }

/* ============================ DARK MODE ================================== */
html.dark .shop-hero .sp-eyebrow { color: #8d95a0; }
html.dark .shop-hero .sp-lead { color: #98a1aa; }
html.dark .shop-flash.ok { border-color: rgba(140, 220, 170, .25); background: #14251c; color: #a9e5c3; }
html.dark .shop-flash.err { border-color: rgba(240, 140, 152, .22); background: #2b181d; color: #ffc5cc; }
html.dark .shop-card {
  background: #181c22;
  border-color: rgba(255, 255, 255, .08);
  color: #f5f7f9;
}
html.dark .shop-card:hover,
html.dark .shop-card:focus-within {
  border-color: rgba(255, 255, 255, .16);
  box-shadow: 0 25px 52px rgba(0, 0, 0, .32);
}
html.dark .shop-cover { background: #161b21; color: #5d6670; }
html.dark .shop-desc { color: #9aa4ae; }
html.dark .shop-price { color: #fff; }
html.dark .shop-price small { color: #98a1aa; }
html.dark .shop-empty { background: rgba(24, 28, 34, .55); border-color: rgba(255, 255, 255, .12); }
html.dark .shop-empty-icon { background: #1d2229; border-color: rgba(255, 255, 255, .08); }
html.dark .shop-empty p { color: #98a1aa; }

/* ============================ RESPONSIVE ================================= */
@media (max-width: 680px) {
  .shop-hero { padding-bottom: 34px; }
  .shop-hero h1 { max-width: 100%; font-size: clamp(1.45rem, 6.9vw, 1.9rem); white-space: nowrap; }
  .shop-hero .sp-lead { font-size: 14px; }
  .shop-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .shop-content { padding: 20px; }
  .shop-empty { padding: 38px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .shop-card { transition: none; }
  .shop-card:hover,
  .shop-card:focus-within { transform: none; }
}