/* ═══════════════════════════════════════════════════════════════
   PRODUCTS PAGE — CATEGORY SHOWCASE SECTIONS
   Doors · Tables · Sofa · Beds & Accessories · Wardrobes & Cupboards

   Additive only — consumes existing design tokens (--bg, --bg-2, --tx,
   --tx-3, --pr, --pr-2, --bd, --bd-2, --r-lg, --r-md, --shadow-*, --ease,
   --t2) from design-system.css/main.css/themes.css. Reuses .prod-card
   markup rendered by products.js's buildCard() — no parallel card CSS.
   ═══════════════════════════════════════════════════════════════ */

.cat-showcase-section { position: relative; z-index: 1; padding: 40px 0; }

.cat-showcase {
  padding: 64px 0;
  border-top: 1px solid var(--bd);
}
.cat-showcase:first-child { border-top: none; padding-top: 24px; }

/* ── Header row: media column + copy column ── */
.cat-showcase-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
/* Alternate left/right rhythm per section */
.cat-showcase[data-align="right"] .cat-showcase-media { order: 2; }
.cat-showcase[data-align="right"] .cat-showcase-copy   { order: 1; }
.cat-showcase[data-align="left"]  .cat-showcase-media  { order: 1; }
.cat-showcase[data-align="left"]  .cat-showcase-copy   { order: 2; }

/* ── Media column: cross-fade Ken-Burns slider ── */
.cat-showcase-media {
  position: relative;
  aspect-ratio: 4 / 3.1;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}
.cat-showcase-glow {
  position: absolute;
  inset: -30%;
  z-index: -1;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  background: radial-gradient(circle, rgba(140,160,91,0.30) 0%, transparent 70%);
  pointer-events: none;
}

.cat-slider { position: absolute; inset: 0; background: var(--bg-2); }
.cat-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1);
  transition: opacity 1.1s var(--ease, ease);
  will-change: opacity, transform;
}
.cat-slide.is-active {
  opacity: 1;
  z-index: 1;
  animation: catKenBurns 5.6s ease-in-out forwards;
}
@keyframes catKenBurns {
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}
.cat-showcase-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.28) 100%);
  pointer-events: none;
  z-index: 2;
}
.cat-showcase-media-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--tx-4, var(--tx-3));
  font-size: 13px;
}

/* ── Copy column ── */
.cat-showcase-copy { max-width: 560px; }
.cat-showcase-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 10px 0 16px;
}
.cat-showcase-sub {
  font-size: 15px;
  line-height: 1.85;
  color: var(--tx-3);
  margin-bottom: 28px;
}
.cat-showcase-cta { margin-top: 8px; }

/* ── Product mini-grid: full width beneath the header row ── */
.cat-showcase-products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 44px;
}
/* Fewer than 3 products in a category still lay out cleanly */
.cat-showcase-products:empty { display: none; }

/* ── Responsive ── */
@media (max-width: 1023px) {
  .cat-showcase-header { grid-template-columns: 1fr; gap: 32px; }
  .cat-showcase[data-align="right"] .cat-showcase-media,
  .cat-showcase[data-align="left"]  .cat-showcase-media { order: 1; }
  .cat-showcase[data-align="right"] .cat-showcase-copy,
  .cat-showcase[data-align="left"]  .cat-showcase-copy { order: 2; }
  .cat-showcase-copy { max-width: none; }
  .cat-showcase-media { aspect-ratio: 16 / 10; }
}

@media (max-width: 767px) {
  .cat-showcase { padding: 44px 0; }
  .cat-showcase-header { gap: 24px; }
  .cat-showcase-title { font-size: clamp(24px, 7vw, 32px); }
  .cat-showcase-sub { font-size: 14px; margin-bottom: 22px; }
  .cat-showcase-products { grid-template-columns: 1fr; gap: 18px; margin-top: 32px; }
  .cat-showcase-media { aspect-ratio: 4 / 3; border-radius: var(--r-md); }
  .cat-showcase-cta .btn { width: 100%; justify-content: center; }
}

@media (max-width: 420px) {
  .cat-showcase-title { font-size: 22px; }
}

/* ── Reduced motion: freeze on first image, no Ken-Burns/parallax ── */
@media (prefers-reduced-motion: reduce) {
  .cat-slide { transition: none; }
  .cat-slide.is-active { animation: none; transform: none; }
}

/* ── Skeleton shimmer while the first slide image decodes ── */
.cat-slider--loading::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(100deg,
    var(--bg-2, #F7F5F1) 35%,
    var(--bg-card, rgba(255,255,255,0.65)) 50%,
    var(--bg-2, #F7F5F1) 65%);
  background-size: 240% 100%;
  animation: catSkeleton 1.3s ease-in-out infinite;
}
@keyframes catSkeleton {
  0%   { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cat-slider--loading::before { animation: none; }
}

/* ═══════════════════════════════════════════════════════════════
   FLOATING GLASS STAT CARDS — 2 per showcase, overlaying the media
   column. Glassmorphism from the same theme tokens used by
   themes.css (--bg-card / --bd / --tx / --tx-3), so they adapt to
   both dark and light themes automatically.
   ═══════════════════════════════════════════════════════════════ */
.cat-stat {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 18px;
  border-radius: var(--r-md, 14px);
  background: var(--bg-card-2, rgba(255,255,255,0.10));
  border: 1px solid var(--bd-2, rgba(255,255,255,0.14));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--sh-md, 0 8px 32px rgba(0,0,0,0.30));
  pointer-events: none;
  animation: chip-float ease-in-out infinite;
}
.cat-stat-a { top: 18px; inset-inline-end: 18px; animation-duration: 10s; }
.cat-stat-b { bottom: 18px; inset-inline-start: 18px; animation-duration: 12s; animation-delay: -6s; }
.cat-stat-val {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,0.45);
}
.cat-stat-lbl {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.82);
  text-shadow: 0 1px 4px rgba(0,0,0,0.45);
}
@media (max-width: 767px) {
  .cat-stat { padding: 9px 13px; }
  .cat-stat-val { font-size: 14px; }
  .cat-stat-lbl { font-size: 8.5px; }
  .cat-stat-a { top: 12px; inset-inline-end: 12px; }
  .cat-stat-b { bottom: 12px; inset-inline-start: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .cat-stat { animation: none; }
}

/* ── Soft blurred gradient orb behind the text column ── */
.cat-showcase-copy { position: relative; }
.cat-copy-orb {
  position: absolute;
  width: 380px;
  height: 380px;
  top: 50%;
  inset-inline-start: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  background: radial-gradient(circle, rgba(140,160,91,0.35) 0%, rgba(140,160,91,0.10) 45%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}
html[dir="rtl"] .cat-copy-orb { transform: translate(50%, -50%); }

/* ═══════════════════════════════════════════════════════════════
   ALL PRODUCTS PAGE — compact hero with CSS-only cross-fade
   background slider (3 layers, no JS). Kept short (~44vh) since
   the page's purpose is the full catalog grid beneath it.
   ═══════════════════════════════════════════════════════════════ */
.ap-hero {
  position: relative;
  z-index: 1;
  min-height: 44vh;
  max-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid var(--bd);
}
.ap-hero-slides { position: absolute; inset: 0; z-index: 0; background: var(--bg-2); }
.ap-hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: apHeroFade 18s ease-in-out infinite;
}
.ap-hero-slide:nth-child(1) { animation-delay: 0s; }
.ap-hero-slide:nth-child(2) { animation-delay: 6s; }
.ap-hero-slide:nth-child(3) { animation-delay: 12s; }
@keyframes apHeroFade {
  0%      { opacity: 0; transform: scale(1); }
  5.5%    { opacity: 1; }
  33.3%   { opacity: 1; }
  40%     { opacity: 0; transform: scale(1.07); }
  100%    { opacity: 0; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .ap-hero-slide { animation: none; }
  .ap-hero-slide:nth-child(1) { opacity: 1; }
}
.ap-hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(10,10,7,0.62) 0%, rgba(10,10,7,0.48) 55%, rgba(10,10,7,0.72) 100%);
}
.ap-hero-inner { position: relative; z-index: 2; padding: 72px 24px; max-width: 720px; }
.ap-hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 12px 0 14px;
  text-shadow: 0 2px 18px rgba(0,0,0,0.45);
}
.ap-hero-title .accent { color: var(--ac, #B9CC8B); }
.ap-hero-sub {
  font-size: 15.5px;
  line-height: 1.8;
  color: rgba(255,255,255,0.85);
  margin: 0 auto;
  max-width: 560px;
  text-shadow: 0 1px 10px rgba(0,0,0,0.40);
}
.ap-hero .eyebrow { color: var(--ac, #B9CC8B); justify-content: center; }
@media (max-width: 767px) {
  .ap-hero { min-height: 40vh; }
  .ap-hero-inner { padding: 56px 20px; }
  .ap-hero-sub { font-size: 14px; }
}
