/* =========================================================
   home.css — CSS specific paginii de home (încărcat doar pe /)
   ========================================================= */

/* ---------- Promo scroller (carousel orizontal produse) ---------- */
.promo-scroller { position: relative; margin: 0 -4px; }
.promo-track {
  display: flex; gap: 14px;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 4px;
  scrollbar-width: none;
  align-items: stretch;
}
.promo-track::-webkit-scrollbar { display: none; }
.promo-slide {
  flex: 0 0 260px;
  scroll-snap-align: start;
  display: flex;
}
.promo-slide > .p-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.promo-slide .p-bottom {
  margin-top: auto;
}
.promo-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: #fff; border: 1px solid var(--border);
  color: var(--ink);
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  z-index: 2;
  transition: background .15s, color .15s, transform .1s;
}
.promo-nav:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.promo-nav:active { transform: translateY(-50%) scale(0.95); }
.promo-nav.prev { left: -8px; }
.promo-nav.prev .icon svg { transform: rotate(180deg); transform-origin: center; }
.promo-nav.next { right: -8px; }
@media (max-width: 640px) {
  .promo-slide { flex-basis: 80vw; max-width: 300px; }
  .promo-nav { display: none; }
  .promo-scroller { margin: 0; overflow: hidden; }
  .promo-track { padding: 4px 0; }
}

/* ---------- Hero ---------- */
.hero { padding: 40px 0 10px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
  min-height: 440px;
}
.hero-main {
  background: var(--ink); color: #F2F2F2;
  border-radius: var(--r-xl);
  padding: 48px;
  position: relative; overflow: hidden;
  display:flex; flex-direction: column; justify-content: space-between;
}
.hero-main .eyebrow {
  font-family: var(--f-mono); font-size: 11px;
  color: var(--accent); letter-spacing: 0.14em; text-transform: uppercase;
}
.hero-main h1 {
  font-family: var(--f-serif); font-weight: 400;
  font-size: clamp(44px, 5vw, 72px); line-height: 1.02; letter-spacing: -0.02em;
  margin: 18px 0 0; max-width: 560px;
}
.hero-main h1 em { font-style: italic; color: var(--accent); font-family: var(--f-serif); }
.hero-main p { max-width: 460px; color: #C7CAD1; margin: 18px 0 0; font-size: 15px; }
.hero-main .cta-row { display:flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero-main .price-tag {
  position: absolute; right: 40px; top: 40px;
  background: var(--accent); color: var(--accent-contrast);
  border-radius: 999px; padding: 8px 16px;
  font-family: var(--f-mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.04em;
}
.hero-main .swoosh {
  position: absolute; right: -120px; bottom: -120px; width: 440px; height: 440px;
  border-radius: 50%; border: 1px solid rgba(255,255,255,0.08);
}
.hero-main .swoosh.sm { width: 300px; height: 300px; right: -60px; bottom: -60px; }
.hero-main .product-placeholder {
  position: absolute; right: 60px; bottom: 40px; width: 320px; height: 240px;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.05) 0 8px, rgba(255,255,255,0.02) 8px 16px);
  border: 1px dashed rgba(255,255,255,0.15);
  border-radius: var(--r-lg);
  display:grid; place-items:center;
  font-family: var(--f-mono); font-size: 11px; color: rgba(255,255,255,0.4);
  letter-spacing: 0.1em; text-transform: uppercase;
}

.hero-side { display:grid; grid-template-rows: 1fr 1fr; gap: 20px; }
.hero-card {
  border-radius: var(--r-xl);
  padding: 28px 240px 28px 28px;
  position: relative; overflow: hidden;
  display:flex; flex-direction: column; justify-content: space-between;
  min-height: 210px;
}
.hero-card.a { background: var(--accent); color: var(--accent-contrast); }
.hero-card.b { background: var(--surface); color: var(--ink); border: 1px solid var(--border); }
.hero-card h3 { font-family: var(--f-serif); font-weight: 400; font-size: 32px; margin: 0; line-height: 1.05; letter-spacing: -0.01em; }
.hero-card .kbd {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  opacity: 0.8;
}
.hero-card .more {
  display:inline-flex; align-items:center; gap:8px;
  font-size: 13px; font-weight: 600;
  border-bottom: 1px solid currentColor; padding-bottom: 2px; width: fit-content;
}
.hero-card .tile-ph {
  position:absolute; right: 18px; bottom: 18px; width: 120px; height: 120px;
  border-radius: var(--r-md);
  background: repeating-linear-gradient(135deg, rgba(0,0,0,0.06) 0 6px, rgba(0,0,0,0.02) 6px 12px);
  border: 1px dashed rgba(0,0,0,0.2);
}
.hero-card.a .tile-ph { background: repeating-linear-gradient(135deg, rgba(0,0,0,0.1) 0 6px, rgba(0,0,0,0.04) 6px 12px); border-color: rgba(0,0,0,0.25); }

/* Hero tile image */
.hero-card .tile-img {
  position: absolute;
  right: 22px; top: 50%;
  transform: translateY(-50%);
  width: 210px; height: 160px;
  object-fit: contain;
  background: #FFFFFF;
  border: 8px solid #FFFFFF;
  border-radius: var(--r-lg);
  box-shadow: 0 18px 36px rgba(0,0,0,0.28), 0 0 0 1px rgba(255,255,255,0.5);
  pointer-events: none;
}
@media (max-width: 900px) {
  .hero-card { padding-right: 180px !important; }
  .hero-card .tile-img { width: 160px; height: 125px; right: 14px; border-width: 6px; }
}
@media (max-width: 640px) {
  .hero-card { padding-right: 140px !important; }
  .hero-card .tile-img { width: 125px; height: 100px; right: 10px; border-width: 5px; }
}

/* Hero main cu background image */
.hero-main.has-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--brand-blue-dark);
  min-height: 440px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
.hero-main.has-bg::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to right,
    rgba(255,255,255,0.95) 0%,
    rgba(255,255,255,0.85) 40%,
    rgba(255,255,255,0.55) 60%,
    rgba(255,255,255,0.20) 80%,
    rgba(255,255,255,0) 100%);
  pointer-events: none; z-index: 0;
}
.hero-main.has-bg > div { position: relative; z-index: 2; }
.hero-main.has-bg .price-tag { z-index: 3; }
.hero-main.has-bg .eyebrow   { color: var(--brand-orange-dark); }
.hero-main.has-bg h1         { color: var(--brand-blue-dark); font-size: clamp(32px, 3.6vw, 52px); max-width: 480px; line-height: 1.08; }
.hero-main.has-bg h1 em      { color: var(--brand-orange); }
.hero-main.has-bg p          { color: var(--ink); opacity: 0.85; max-width: 440px; font-size: 14px; }
.hero-main.has-bg .btn.ghost.light { color: var(--brand-blue-dark); border-color: var(--brand-blue-dark); background: transparent; }
.hero-main.has-bg .btn.ghost.light:hover { background: var(--brand-blue-dark); color: #fff; }
@media (max-width: 900px) {
  .hero-main.has-bg::before {
    background: linear-gradient(to bottom,
      rgba(255,255,255,0.95) 0%,
      rgba(255,255,255,0.92) 35%,
      rgba(255,255,255,0.55) 55%,
      rgba(255,255,255,0) 75%);
  }
  .hero-main.has-bg { background-position: center center; min-height: 520px; padding: 32px 28px; justify-content: center; }
  .hero-main.has-bg h1 { font-size: clamp(32px, 6vw, 44px); max-width: 100%; }
  .hero-main.has-bg p { font-size: 15px; max-width: 520px; }
  .hero-main.has-bg .cta-row { margin-top: 22px; }
}

/* ---------- Marquee / ticker ---------- */
.ticker {
  background: var(--ink); color: #E5E5E5;
  padding: 14px 0; overflow: hidden;
  border-radius: var(--r-xl);
  margin: 28px 0;
  position: relative;
}
.ticker .track {
  display: flex; gap: 48px; animation: ticker 40s linear infinite;
  width: max-content;
}
.ticker .item {
  display:flex; align-items:center; gap: 10px;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.06em;
  text-transform: uppercase; white-space: nowrap;
}
.ticker .item .d { color: var(--accent); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Section ---------- */
.section { padding: 40px 0; }
.section-head {
  display:flex; align-items:flex-end; justify-content:space-between; gap: 24px;
  margin-bottom: 24px; flex-wrap: wrap;
}
.section-head .t-eyebrow {
  font-family: var(--f-mono); font-size: 11px; color: var(--muted);
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 8px;
}
.section-head h2 {
  font-family: var(--f-serif); font-weight: 400; font-size: 44px;
  line-height: 1; letter-spacing: -0.02em; margin: 0;
}
.section-head h2 em { font-style: italic; color: var(--accent-ink); }
.section-head .side-link {
  display:inline-flex; align-items:center; gap: 8px;
  font-size: 13px; font-weight: 600;
  border: 1px solid var(--border-strong); padding: 10px 16px; border-radius: 999px;
  background: var(--bg-elev);
}
.section-head .side-link:hover { border-color: var(--ink); }

/* ─── Hero carousel (multi-slide + animations) ──────────────────────────── */
/* Slide-urile moștenesc layout-ul EXACT al .hero-main / .hero-card (zero design drift).
   .hero-carousel = pure wrapper de poziționare; slide.is-active = vizibil deasupra. */
.hero-carousel { position: relative; overflow: hidden; }
.hero-carousel > .hero-slides { position: relative; width: 100%; height: 100%; }

/* Slide-ul moștenește totul de la cardul părinte */
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s ease, visibility 0.6s; visibility: hidden; pointer-events: none; }
.hero-slide.is-active { opacity: 1; visibility: visible; pointer-events: auto; z-index: 1; }

/* Primary: parent transparent + fără clipping; slide-ul are propriul rotunjire + overflow */
.hero-main.hero-carousel {
  padding: 0 !important; background: transparent !important;
  border-radius: 0 !important; overflow: visible !important;
  min-height: 420px;
}
.hero-main.hero-carousel > .hero-slides { min-height: 420px; }
.hero-main .hero-slide {
  background: var(--ink); color: #F2F2F2;
  border-radius: var(--r-xl);
  padding: 48px;
  display: flex; flex-direction: column; justify-content: space-between;
  background-size: cover; background-position: center;
  overflow: hidden;
}
/* Doar .hero-body e limitat la 560px (text content). Bar-ul rămâne full-width. */
.hero-main .hero-slide > .hero-body { max-width: 560px; position: relative; z-index: 2; }
.hero-main .eyebrow-2 { color: var(--accent); margin-top: 6px; }

/* Secondary: replicăm layout .hero-card cu padding-right pentru .tile-img absolut */
.hero-card.hero-carousel { background: transparent !important; border: 0 !important; padding: 0 !important; min-height: 210px; }
.hero-card.hero-carousel > .hero-slides { min-height: 210px; }
.hero-card .hero-slide {
  border-radius: var(--r-xl);
  padding: 28px 240px 28px 28px;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 210px;
  text-decoration: none; color: inherit;
}
.hero-card.a .hero-slide { background: var(--accent); color: var(--accent-contrast); }
.hero-card.b .hero-slide { background: var(--surface); color: var(--ink); border: 1px solid var(--border); }
.hero-card .hero-slide p { font-size: 13px; margin: 4px 0 0; line-height: 1.4; opacity: 0.92; }

/* ─── Primary layout: bottom-bar ─────────────────────────────────────── */
/* Slide-ul are top rounded, bottom flat → bar lipit edge-to-edge */
.hero-main.hero-carousel { container-type: inline-size; }
.hero-main .hero-layout-bottom-bar {
  padding: 56px 56px 0;
  justify-content: flex-start;
  /* full radius — slide's overflow:hidden tunde bar-ul la colțurile de jos */
}
.hero-main .hero-layout-bottom-bar .hero-body { flex: 1; }
.hero-main .hero-bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 24px;
  padding: 18px 48px;
  background: rgba(0, 0, 0, 0.72); color: #fff;
  border-radius: 0;
  backdrop-filter: blur(6px);
  z-index: 3;
}
.hero-main .hero-bar-desc { flex: 1; margin: 0; max-width: none; color: inherit; font-size: 15px; line-height: 1.45; opacity: 0.95; }
.hero-main .hero-bar-cta { flex: 0 0 auto; }

/* Container query: când hero-main e îngust (tablet vertical, carduri stivuite, etc.),
   bar-ul devine column cu desc + buton centrate. */
@container (max-width: 720px) {
  .hero-main .hero-bar { flex-direction: column; align-items: center; padding: 14px 18px; gap: 12px; text-align: center; }
  .hero-main .hero-bar-desc { text-align: center; }
  .hero-main .hero-bar-cta { width: auto; min-width: 200px; justify-content: center; }
}
/* Fallback pe mobile pentru browsere fără container queries */
@media (max-width: 599.98px) {
  .hero-main .hero-bar { flex-direction: column; align-items: center; padding: 14px 18px; gap: 12px; text-align: center; }
  .hero-main .hero-bar-desc { text-align: center; }
  .hero-main .hero-bar-cta { width: auto; min-width: 200px; justify-content: center; }
}

/* ─── Secondary: imagine full-background (has-cover-img) ─────────────── */
.hero-card .hero-slide.has-cover-img {
  background-size: cover; background-position: center; padding-right: 28px;
}
.hero-card .hero-slide.has-cover-img::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,0.12) 0%, rgba(0,0,0,0.62) 100%);
}
.hero-card .hero-slide.has-cover-img .hero-body,
.hero-card .hero-slide.has-cover-img .more { position: relative; z-index: 2; color: #fff; }

/* Dots */
.hero-dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 5; }
.hero-dot { width: 8px; height: 8px; border: none; border-radius: 50%; background: rgba(255,255,255,0.4); cursor: pointer; padding: 0; transition: background .2s, transform .2s; }
.hero-dot:hover { background: rgba(255,255,255,0.7); }
.hero-dot.is-active { background: #fff; transform: scale(1.3); }
/* Arrows */
.hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,0.45); color: #fff; border: none; font-size: 22px; line-height: 1; cursor: pointer; z-index: 5; opacity: 0; transition: opacity .2s, background .2s; }
.hero-carousel:hover .hero-arrow { opacity: 1; }
.hero-arrow:hover { background: rgba(0,0,0,0.65); }
.hero-arrow.prev { left: 8px; }
.hero-arrow.next { right: 8px; }
@media (max-width: 899.98px) { .hero-arrow { opacity: 1; width: 30px; height: 30px; font-size: 18px; } }

/* ─── Animations (re-trigger pe slide change) ──────────────────────────── */
@keyframes ds-fade-up    { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ds-fade-down  { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ds-fade-in    { from { opacity: 0; } to { opacity: 1; } }
@keyframes ds-fade-left  { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes ds-fade-right { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes ds-zoom-in    { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
@keyframes ds-pop        { 0% { opacity: 0; transform: scale(0.85); } 70% { opacity: 1; transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes ds-slide-up   { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ds-blur-in    { from { opacity: 0; filter: blur(8px); } to { opacity: 1; filter: blur(0); } }

.ds-anim-fade-up    { animation: ds-fade-up    .55s ease-out both; }
.ds-anim-fade-down  { animation: ds-fade-down  .55s ease-out both; }
.ds-anim-fade-in    { animation: ds-fade-in    .55s ease-out both; }
.ds-anim-fade-left  { animation: ds-fade-left  .55s ease-out both; }
.ds-anim-fade-right { animation: ds-fade-right .55s ease-out both; }
.ds-anim-zoom-in    { animation: ds-zoom-in    .55s ease-out both; }
.ds-anim-pop        { animation: ds-pop        .55s ease-out both; }
.ds-anim-slide-up   { animation: ds-slide-up   .55s ease-out both; }
.ds-anim-blur-in    { animation: ds-blur-in    .55s ease-out both; }

@media (prefers-reduced-motion: reduce) {
  .ds-anim-fade-up, .ds-anim-fade-down, .ds-anim-fade-in,
  .ds-anim-fade-left, .ds-anim-fade-right, .ds-anim-zoom-in,
  .ds-anim-pop, .ds-anim-slide-up, .ds-anim-blur-in { animation: none; }
}

/* Mobile: secondaries ascunse, doar primary vizibil */
@media (max-width: 599.98px) {
  .hero-grid .hero-side { display: none !important; }
}

/* ---------- Category grid ---------- */
.cat-grid {
  display: grid;
  /* Coloane dinamice via --cat-cols (PHP setează din config); fallback la 6 */
  grid-template-columns: repeat(var(--cat-cols, 6), 1fr);
  grid-auto-flow: dense;
  grid-auto-rows: minmax(150px, auto);
  gap: 12px;
  align-items: stretch;
}
.cat-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 18px;
  display:flex; flex-direction: column; justify-content: space-between;
  min-height: 150px; cursor: pointer;
  transition: border-color .15s, transform .15s;
  position: relative; overflow: hidden;
}
.cat-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.cat-card .ico { width: 32px; height: 32px; background: transparent; color: var(--brand-blue); display:grid; place-items:center; padding: 0; }
.cat-card .ico .icon { width: 28px; height: 28px; }
.cat-card .ico .icon svg { stroke-width: 1.8; }
.cat-card.big .ico { width: 42px; height: 42px; color: #FFFFFF; }
.cat-card.big .ico .icon { width: 36px; height: 36px; }
.cat-card .label { font-weight: 600; font-size: 14px; line-height: 1.2; text-align: center; }
.cat-card .count { font-family: var(--f-mono); font-size: 10px; color: var(--muted); letter-spacing: 0.08em; text-align: center; }
.cat-card { text-align: center; }
.cat-card > div { width: 100%; text-align: center; }
/* Big = 2×1 (2 cols × 1 row) — ~2× lățimea unui small, aceeași înălțime */
.cat-card.big { grid-column: span 2; grid-row: span 1; background: var(--brand-orange); color: #fff; border-color: var(--brand-orange); align-items: center; }
.cat-card.big:hover { border-color: var(--brand-orange-dark); background: var(--brand-orange-dark); }
.cat-card.big .ico { background: rgba(255,255,255,0.08); color: var(--accent); }
.cat-card.big .label { font-family: var(--f-serif); font-size: 22px; font-weight: 400; color: #FFFFFF; text-align: center; }
.cat-card.big .count { color: rgba(255,255,255,0.85); }

/* Cat-card imagine (placeholder când lipsește) — pattern .ph identic cu product card */
.cat-card .cat-img-ph { background: transparent !important; box-shadow: none !important; border: none !important; padding: 6px; display: grid; place-items: center; }
.cat-card .cat-img-ph .ph {
  width: 100%; height: 100%;
  background: repeating-linear-gradient(135deg, rgba(14,17,22,0.06) 0 6px, rgba(14,17,22,0.02) 6px 12px);
  border: 1px dashed var(--border, #d8d8d8);
  border-radius: var(--r-sm, 6px);
  display: grid; place-items: center;
  font-family: var(--f-mono, monospace); font-size: 10px; color: var(--muted-2, #888);
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 8px; text-align: center;
}

/* Cat-card imagine */
.cat-card .cat-img {
  display: block;
  width: calc(100% - 16px);
  max-width: none;
  height: clamp(120px, 18vw, 180px);
  margin: 0 auto 10px;
  object-fit: cover;
  background: #FFFFFF;
  border: 5px solid #FFFFFF;
  border-radius: var(--r-md);
  box-shadow: 0 8px 18px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04);
}
.cat-card.big .cat-img {
  max-width: none;
  width: calc(100% - 24px);
  aspect-ratio: 2 / 1;
  height: auto;
  object-fit: contain;
  background: #fff;
  border-width: 6px;
  margin: 0 auto 10px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.18), 0 0 0 1px rgba(255,255,255,0.4);
}
@media (min-width: 1200px) {
  .cat-card:not(.big) .cat-img { aspect-ratio: 1 / 1; height: auto; }
}
@media (min-width: 600px) and (max-width: 899.98px) {
  .cat-card.big { flex-direction: column !important; align-items: center; gap: 10px; padding: 16px; text-align: center; }
  .cat-card.big .cat-img { width: calc(100% - 24px); flex: 0 0 auto; aspect-ratio: 2 / 1; height: auto; margin: 0 auto; }
  .cat-card.big > div { flex: 0 0 auto; min-width: 0; width: 100%; text-align: center; }
  .cat-card.big .label { font-size: clamp(18px, 3vw, 24px); text-align: center; }
}

/* ---------- Deal of the day ---------- */
.deal {
  background: var(--ink);
  color: #F2F2F2;
  border-radius: var(--r-xl);
  padding: 40px;
  display:grid; grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  position: relative; overflow: hidden;
}
.deal .eyebrow { font-family: var(--f-mono); font-size: 11px; color: var(--accent); letter-spacing: 0.14em; text-transform: uppercase; }
.deal h3 { font-family: var(--f-serif); font-weight: 400; font-size: 48px; line-height: 1.05; margin: 14px 0 8px; letter-spacing: -0.01em; }
.deal p { color: #C7CAD1; max-width: 380px; margin: 0 0 22px; }
.deal .pricing {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas: "was  save" "now  save";
  column-gap: 14px; row-gap: 0;
  align-items: center;
  margin-bottom: 24px;
  justify-content: start;
}
.deal .was  { grid-area: was;  white-space: nowrap; line-height: 1; margin-bottom: -2px; }
.deal .now  { grid-area: now;  white-space: nowrap; line-height: 1; }
.deal .save { grid-area: save; justify-self: start; align-self: center; white-space: nowrap; }
.deal .now  { font-family: var(--f-sans); font-weight: 800; font-size: 40px; letter-spacing: -0.02em; color: var(--accent); }
.deal .was  { font-size: 18px; color: var(--muted-2); text-decoration: line-through; }
.deal .save { font-family: var(--f-mono); font-size: 11px; padding: 4px 10px; background: var(--accent); color: var(--accent-contrast); border-radius: 4px; font-weight: 700; }
.count-row { display:flex; gap: 8px; margin-bottom: 24px; }
.count-cell {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-md);
  padding: 10px 14px; text-align: center;
  min-width: 64px;
}
.count-cell .n { font-family: var(--f-mono); font-size: 22px; font-weight: 600; color: #fff; letter-spacing: -0.02em; }
.count-cell .l { font-size: 10px; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.12em; margin-top: 2px; }
.deal .ph-product {
  width: 100%; aspect-ratio: 4/3;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.05) 0 8px, rgba(255,255,255,0.02) 8px 16px);
  border: 1px dashed rgba(255,255,255,0.15);
  border-radius: var(--r-lg);
  display:grid; place-items:center;
  font-family: var(--f-mono); font-size: 11px; color: rgba(255,255,255,0.4);
  letter-spacing: 0.12em; text-transform: uppercase;
}
.deal .deal-img {
  width: 100%; aspect-ratio: 5/3; max-height: 360px;
  object-fit: contain;
  background: #FFFFFF;
  border: 10px solid rgba(255,255,255,0.08);
  border-radius: var(--r-xl);
  padding: 28px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.04);
}
@media (max-width: 640px) {
  .deal { grid-template-columns: 1fr !important; gap: 24px; }
  .deal .deal-img { max-height: 260px; padding: 18px; border-width: 6px; }
}
@media (max-width: 520px) {
  .deal .save { display: none !important; }
}

/* ---------- Trust row ---------- */
.trust-grid {
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.trust-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 16px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 10px;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.trust-card:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 8px 18px rgba(0,0,0,0.06); }
.trust-card .ico { width: 46px; height: 46px; background: transparent; color: var(--brand-blue); display: grid; place-items: center; margin-bottom: 4px; }
.trust-card .ico .icon { width: 42px; height: 42px; }
.trust-card .ico .icon svg { stroke-width: 1.7; }
.trust-card h4 { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: -0.005em; line-height: 1.25; }
.trust-card p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
@media (max-width: 900px)  { .trust-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .trust-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; } }
@media (max-width: 480px)  { .trust-grid { grid-template-columns: 1fr 1fr; gap: 8px; } .trust-card { padding: 14px 10px; } .trust-card p { font-size: 11px; } }

/* Variable count grid — auto-fit pe orice nr de carduri */
.trust-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* ─── Icon animations (TrustGrid + future) ─────────────────────────────── */
@keyframes ds-pulse  { 0%,100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@keyframes ds-bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes ds-shake  { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
@keyframes ds-spin   { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes ds-wobble { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }

.ds-anim-pulse  { animation: ds-pulse 2.2s ease-in-out infinite; }
.ds-anim-bounce { animation: ds-bounce 1.6s ease-in-out infinite; }
.ds-anim-shake  { animation: ds-shake 2.4s ease-in-out infinite; }
.ds-anim-spin   { animation: ds-spin 4s linear infinite; }
.ds-anim-wobble { animation: ds-wobble 2s ease-in-out infinite; }

/* Hover-triggered: aplicate pe .trust-card:hover .ds-anim-... */
.trust-card .ds-anim-hover-scale { transition: transform .25s ease; }
.trust-card:hover .ds-anim-hover-scale { transform: scale(1.15); }
.trust-card .ds-anim-hover-lift { transition: transform .25s ease; }
.trust-card:hover .ds-anim-hover-lift { transform: translateY(-4px); }
.trust-card .ds-anim-hover-rotate { transition: transform .35s ease; }
.trust-card:hover .ds-anim-hover-rotate { transform: rotate(15deg); }

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .ds-anim-pulse, .ds-anim-bounce, .ds-anim-shake, .ds-anim-spin, .ds-anim-wobble { animation: none; }
}

/* ---------- Brands scroller ---------- */
.brands-scroller {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 20px 12px;
  position: relative; overflow: hidden;
}
.brands-track {
  display: flex; gap: 28px;
  overflow-x: auto; scrollbar-width: none;
  align-items: center;
  padding: 4px 12px;
  scroll-behavior: smooth;
}
.brands-track::-webkit-scrollbar { display: none; }
/* Autoscroll marquee — track-ul are 2× items duplicate, animația translatează -50% */
@keyframes ds-brands-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.brands-scroller { overflow: hidden; }
.brands-track {
  animation: ds-brands-marquee 60s linear infinite;
  width: max-content;
}
.brands-scroller:hover .brands-track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .brands-track { animation: none; } }

/* Brand card: white rounded, logo full color visible, fit cât mai bine */
.brands-scroller .brand {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 160px; height: 80px;
  background: #fff;
  border-radius: var(--r-md);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 0 0 1px rgba(0,0,0,0.04);
  padding: 8px 12px;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
.brands-scroller .brand:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1), 0 0 0 1px rgba(0,0,0,0.06);
}
.brands-scroller .brand img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  /* full color + opacity — logo-ul se vede clar */
}
.brands-scroller .brand-txt {
  font-family: var(--f-serif); font-size: 18px; font-style: italic;
  color: var(--ink); letter-spacing: -0.01em; white-space: nowrap;
  text-align: center; line-height: 1.1;
}
.brands-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  background: #fff; border: 1px solid var(--border);
  color: var(--ink); display: grid; place-items: center;
  cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.1); z-index: 2;
}
.brands-nav:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.brands-nav.prev { left: 4px; }
.brands-nav.prev .icon svg { transform: rotate(180deg); transform-origin: center; }
.brands-nav.next { right: 4px; }
@media (max-width: 640px) { .brands-nav { display: none; } }

/* ---------- Breakpoints home ---------- */

/* Mobile (<= 900px) — hero */
@media (max-width: 900px) {
  .hero { padding: 20px 0 10px; }
  .hero-main { padding: 28px 24px; min-height: 380px; }
  .hero-main h1 { font-size: 36px; }
  .hero-main .price-tag { right: 20px; top: 20px; font-size: 10px; padding: 6px 12px; }
  .hero-main .product-placeholder { display: none; }
  .hero-main p { font-size: 14px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-side { grid-template-columns: 1fr; }
}

/* Tablet (900..1199) */
@media (min-width: 900px) and (max-width: 1199.98px) {
  .hero-grid { grid-template-columns: 1.3fr 1fr !important; }
  .hero-side { grid-template-columns: 1fr !important; grid-template-rows: 1fr 1fr !important; }
  .ticker { margin: 20px 0; padding: 10px 0; border-radius: var(--r-lg); }
  .ticker .item { font-size: 10px; }
  .section { padding: 24px 0; }
  .section-head h2 { font-size: 28px; }
  .section-head .side-link { padding: 8px 14px; font-size: 12px; }
  /* Tablet: forțăm cols=4 (suprascrie --cat-cols); big rămâne 2×1 — same height */
  .cat-grid { grid-template-columns: repeat(4, 1fr) !important; gap: 10px; }
  .cat-card.big { grid-column: span 2 !important; grid-row: span 1 !important; }
  .deal { grid-template-columns: 1fr 1fr !important; padding: 24px; gap: 20px; }
  .deal h3 { font-size: 28px; }
  .deal .now { font-size: 30px; }
  .trust-grid { grid-template-columns: repeat(4, 1fr) !important; }
}

/* Mobile (≤ 899) — hero, cat, deal */
@media (max-width: 899.98px) {
  .hero-grid { grid-template-columns: 1fr !important; }
  .hero-side { grid-template-columns: 1fr 1fr !important; grid-template-rows: auto !important; gap: 14px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  /* Mobile: big = full row (1 card), small = 2 per row */
  .cat-card.big { grid-column: 1 / -1 !important; grid-row: auto !important; min-height: 160px; }
  .cat-card.big .cat-img { width: calc(100% - 24px); aspect-ratio: 2 / 1; height: auto; max-width: none; border-width: 6px; margin: 0 auto 10px; }
  .cat-card .cat-img { height: clamp(130px, 28vw, 200px); }
  .deal { grid-template-columns: 1fr !important; padding: 0 !important; background: transparent !important; gap: 0 !important; position: relative; overflow: visible !important; }
  .deal { --deal-card-h: clamp(320px, 48vw, 460px); }
  .deal .deal-img { order: -1; width: 85%; height: var(--deal-card-h); max-height: none; padding: clamp(16px, 4vw, 28px); border-width: 6px; margin: 0 auto 0 0; object-fit: contain; aspect-ratio: auto; }
  .deal > div:first-of-type { min-height: var(--deal-card-h); background: var(--ink); color: #fff; border: 1px solid rgba(255,255,255,0.14); border-radius: var(--r-xl); padding: clamp(16px, 3vw, 22px) clamp(14px, 3vw, 20px); width: 88%; margin: -40px 0 0 auto; position: relative; z-index: 2; box-shadow: 0 16px 34px rgba(0,0,0,0.28); display: flex; flex-direction: column; justify-content: center; }
  .deal .eyebrow { font-size: clamp(10px, 1.6vw, 12px); }
  .deal h3 { font-size: clamp(18px, 4.2vw, 32px); margin: clamp(6px, 1.5vw, 12px) 0 6px; line-height: 1.1; }
  .deal .now { font-size: clamp(20px, 4.6vw, 32px); white-space: nowrap; }
  .deal .was { font-size: clamp(12px, 2.2vw, 18px); white-space: nowrap; }
  .deal .pricing { flex-wrap: nowrap; gap: 10px; align-items: baseline; margin-bottom: clamp(10px, 2.5vw, 20px); }
  .deal p { font-size: clamp(11px, 2vw, 14px); margin-bottom: clamp(8px, 2vw, 16px); }
  .deal .count-row { gap: 6px; margin-bottom: clamp(10px, 2.5vw, 20px); }
  .deal .count-cell { padding: clamp(6px, 1.4vw, 10px) clamp(8px, 2vw, 14px); min-width: clamp(44px, 10vw, 64px); }
  .deal .count-cell .n { font-size: clamp(14px, 3vw, 22px); }
  .deal .count-cell .l { font-size: clamp(9px, 1.4vw, 10px); }
  .deal .btn.primary.lg { padding: clamp(8px, 2vw, 14px) clamp(14px, 3vw, 22px); font-size: clamp(12px, 2vw, 14px); }
  .section-head { flex-wrap: nowrap !important; gap: 12px; align-items: flex-start; }
  .section-head > div:first-child { min-width: 0; flex: 1 1 auto; }
  .section-head h2 { font-size: 26px; overflow-wrap: anywhere; word-break: break-word; }
  .section-head .side-link { flex-shrink: 0; padding: 8px 12px; font-size: 12px; white-space: nowrap; }
}

/* Tiles 600-899: text wrap */
@media (min-width: 600px) and (max-width: 899.98px) {
  .hero-card h3, .hero-card .kbd, .hero-card .more { white-space: normal; overflow-wrap: anywhere; word-break: break-word; max-width: 100%; }
}

/* Sub 600: tiles stivuite */
@media (max-width: 599.98px) {
  .hero-side { grid-template-columns: 1fr !important; grid-template-rows: auto auto !important; }
}

/* Small phone (≤ 420px) */
@media (max-width: 420px) {
  .hero-main h1 { font-size: 28px; }
  .section-head h2 { font-size: 22px; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .cat-card .label { font-size: 13px; }
}

/* ─── Hero: opțiuni per-slide din editorul de design (2026-07-28) ──────
   Ambele sunt opt-in: fără ele, randarea rămâne cea dinainte. */

/* Overlay-ul întunecat de pe cardurile mici, oprit per slide.
   Util când bannerul e doar imagine, fără text de citit peste el. */
.hero-card .hero-slide.has-cover-img.hero-no-overlay::before { display: none; }

/* Primary randat ca <a> când tot bannerul e link.
   display/flex vin din .hero-main .hero-slide; aici doar neutralizăm
   decorația implicită de link. */
a.hero-slide.hero-slide-linked { text-decoration: none; color: inherit; }
a.hero-slide.hero-slide-linked:hover { text-decoration: none; }

/* ──

/* Ramura porneste DOAR sub 1312px. Pe ecrane mari layoutul ramane cel gandit:
   coloana din dreapta umple exact inaltimea bannerului mare (cele doua carduri
   impart randul 1fr 1fr). Cu proportia imaginii (2,67) ar fi mult mai scunde si
   s-ar rupe echilibrul. Taierea deranja oricum doar pe ecrane inguste. */
@media (max-width: 1311.98px) {
  /* ─── RAMURĂ SEPARATĂ: banner „imagine întreagă" (opt-in per slide, 01.08.2026) ───
     Se activează doar când editorul bifează „Imagine întreagă (fără tăiere)"; template-ul
     pune `.hero-fit` pe container şi `--hero-ar` (proporţia reală a imaginii) pe slide.

     Cum funcţionează: în mod normal TOATE slide-urile sunt `position:absolute; inset:0`,
     deci înălţimea vine din container (fix: 420px / 210px). Aici inversăm relaţia —
     slide-ul ACTIV devine `position:relative` şi primeşte `aspect-ratio`, deci el dictează
     înălţimea, iar containerul o urmează. Celelalte rămân absolute, suprapuse peste el,
     ca tranziţia de fade să meargă mai departe.

     De ce nu pe container: containerul poate avea un singur raport, dar slide-urile din
     aceeaşi zonă pot avea proporţii diferite — aşa fiecare şi-l aduce pe al lui.
     Încercarea anterioară (raport pe container) lăsa cardurile mici mai scunde decât cutia:
     se vedea o bandă portocalie/albastră deasupra şi conţinutul ieşea în jos. */
  .hero-grid:has(.hero-fit) { min-height: 0; align-items: start; }
  .hero-side:has(.hero-fit) { grid-template-rows: auto auto; align-content: start; }

  .hero-carousel.hero-fit,
  .hero-carousel.hero-fit > .hero-slides {
    min-height: 0 !important;
    height: auto;
    aspect-ratio: auto;
  }
  .hero-carousel.hero-fit > .hero-slides { position: relative; }

  /* Slide-ul activ dă înălţimea; raportul coincide cu al imaginii, deci `cover` nu taie. */
  .hero-carousel.hero-fit .hero-slide.is-active {
    position: relative;
    inset: auto;
    aspect-ratio: var(--hero-ar);
    background-size: cover;
    min-height: 90px;   /* plasă: o imagine panoramică pe ecran îngust ar coborî sub 90px */
  }
  /* Slide-urile inactive rămân suprapuse, ca fade-ul să funcţioneze. */
  .hero-carousel.hero-fit .hero-slide:not(.is-active) { position: absolute; inset: 0; }

  /* Padding-ul (48 / 28px) e gândit pentru cutia mare; pe banner scalat ar acoperi imaginea. */
  .hero-main.hero-fit .hero-slide { padding: clamp(10px, 3vw, 48px); }
  .hero-card.hero-fit .hero-slide { padding: clamp(8px, 2.5vw, 28px); }
}

/* ── Bandă promo spre pagina de campanii (19.09.2026) ──────────────────────────────────
   Înlocuieşte blocul de text simplu de sub categorii, deci nu îngroaşă pagina cu o
   secţiune în plus. Fundal întunecat ca `.deal`, dar mai scundă: pe o pagină care are deja
   hero, categorii, oferta zilei şi trei grile de produse, încă o cutie mare ar fi zgomot. */
.promo-strip {
  display: grid;
  /* Trei zone surori, ca ordinea să se poată schimba pe telefon fără alt markup:
     desktop — titlu şi oferta în stânga, imaginea pe toată înălţimea în dreapta. */
  grid-template-columns: 1.1fr 1fr;
  grid-template-areas:
    "head  media"
    "promo media";
  align-items: center;
  column-gap: 32px;
  row-gap: 14px;
  background: var(--ink);
  color: #F2F2F2;
  border-radius: var(--r-xl);
  padding: 36px 40px;
  min-height: 320px;          /* banda arăta turtită pe desktop (Octav, 19.09) */
  overflow: hidden;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.promo-strip__head  { grid-area: head; }
.promo-strip__promo { grid-area: promo; }
.promo-strip__media { grid-area: media; }
.promo-strip__media:hover { opacity: .94; }
.promo-strip .t-eyebrow { color: var(--accent); margin-bottom: 10px; }

.promo-strip__title {
  font-family: var(--f-serif);
  font-weight: 400;
  /* H1-ul magazinului e o frază lungă („ForIT — magazin de IT, electronice şi multe altele"),
     nu două cuvinte ca la campanii: sub 34px încape pe două rânduri lângă imagine. */
  font-size: clamp(24px, 2.8vw, 34px);
  line-height: 1.12;
  text-wrap: balance;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  color: #fff;
}
.promo-strip__title em { color: var(--accent); font-style: italic; }
.promo-strip__sub { color: #C7CAD1; margin: 0 0 14px; max-width: 46ch; }

.promo-strip__facts {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  font-size: 13px; color: var(--muted-2);
  margin-bottom: 18px;
}
.promo-strip__facts strong { color: #fff; font-weight: 700; }
/* Partea de campanii stă sub H1, despărţită de o linie subţire — H1-ul rămâne al magazinului. */
.promo-strip__promo { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); }
.promo-strip__promo-title {
  font-family: var(--f-serif); font-weight: 400; font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.1; margin: 6px 0 10px; color: #fff;
}
.promo-strip__promo-title em { color: var(--accent); font-style: italic; }
.promo-strip__cta { align-self: start; }

/* 🔴 Raport fix pe cutia imaginii. Fără el, o imagine care nu se încarcă (sau una foarte înaltă)
   trage banda în jos — pe dev a ieşit o cutie de ~350px cu pictograma de imagine ruptă. */
.promo-strip__media {
  position: relative; display: block;
  /* 🔴 Fără `width: 100%`, `aspect-ratio` + `height: 100%` calculau LĂŢIMEA din înălţime
     (320px înălţime ⇒ 570px lăţime). Sub ~1050px coloana e mai îngustă de atât, aşa că imaginea
     ieşea din ea şi se lipea de marginea benzii, tăiată de `overflow: hidden`. (Octav, 19.09) */
  width: 100%;
  height: 100%;
  min-height: 220px;
  max-height: 300px;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: rgba(255,255,255,.06);
}
.promo-strip__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
/* Procentul e text, nu parte din imagine: se schimbă odată cu campania, nu cu graficianul. */
.promo-strip__badge {
  position: absolute; top: 12px; right: 12px;
  font-family: var(--f-mono); font-weight: 700; font-size: 18px;
  background: var(--accent); color: var(--accent-contrast);
  padding: 6px 12px; border-radius: 999px;
}

/* Cardurile sunt opţionale (config `cards`): implicit 0, ca să nu mai punem un rând pe pagină. */
.promo-strip__cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 16px; }
.promo-card {
  display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; text-decoration: none; color: var(--ink);
}
.promo-card img { width: 120px; height: 84px; object-fit: cover; display: block; }
.promo-card__body { padding: 10px 14px 10px 0; }
.promo-card__name { font-weight: 700; font-size: 15px; }
.promo-card__meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

@media (max-width: 860px) {
  /* Pe telefon imaginea stă ÎNTRE titlu şi ofertă (cerinţa lui Octav, 19.09.2026) şi se întinde
     până la marginile benzii — de aceea marginile negative cât padding-ul. */
  .promo-strip {
    grid-template-columns: 1fr;
    grid-template-areas: "head" "media" "promo";
    padding: 22px;
    row-gap: 16px;
  }
  /* 🔴 Pe o coloană, `aspect-ratio` + `max-height` deduc LĂŢIMEA din înălţime, iar imaginea
     ieşea o cutie de ~355px lipită în stânga, cu gol în dreapta (captura lui Octav, 19.09).
     Aici lăţimea trebuie să fie a benzii, deci înălţimea o dăm noi şi raportul nu mai decide. */
  .promo-strip__media {
    aspect-ratio: auto;
    width: auto;
    height: clamp(190px, 44vw, 300px);
    max-height: none;
    margin-inline: -22px;
    border-radius: 0;
  }
  .promo-strip__promo { margin-top: 0; padding-top: 0; border-top: 0; }
  /* Distanţa deasupra imaginii ieşea dublă faţă de cea de dedesubt: peste `row-gap` se adăuga
     marginea proprie a subtitlului. Ultimul element din cap nu mai are margine. */
  .promo-strip__head > :last-child { margin-bottom: 0; }
  .promo-strip__sub { margin-bottom: 0; }
  .promo-strip__cta { width: 100%; justify-content: center; }
  .promo-strip__cards { grid-template-columns: 1fr; }
}
