/* ═════════════════════════════════════════════════════════════
   GUMIROM — Magazin anvelope (doar magazin.html)
   Folosește tokenii din style.css
   ═════════════════════════════════════════════════════════════ */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Header: buton coș ---------- */
.cart-btn {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--hairline-strong);
  font-weight: 700; font-size: .9rem; transition: border-color .3s, background-color .3s;
}
.cart-btn:hover { border-color: var(--ink); background: rgba(255,206,163,.06); }
.cart-btn__count {
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; font-size: .78rem; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.page-shop .burger { margin-left: 8px; }
.header__nav a[aria-current="page"] { color: var(--ink); }
.header__nav a[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- Hero magazin ---------- */
.page-hero {
  position: relative;
  padding: calc(var(--header-h) + 48px) var(--gutter) 56px;
  border-bottom: 1px solid var(--hairline);
  background: radial-gradient(60% 90% at 85% 0%, rgba(237,62,53,.14), transparent 60%), var(--bg);
}
.page-hero .hero__kicker { margin-bottom: 26px; }
.page-hero__title {
  font-weight: 900; font-stretch: 125%; text-transform: uppercase;
  font-size: clamp(2rem, 5.6vw, 5rem); line-height: 1; letter-spacing: -.015em;
  margin-bottom: 22px; max-width: 18ch;
}
.page-hero__title span { color: var(--accent); }
.page-hero__sub { color: var(--ink-dim); max-width: 60ch; font-size: clamp(1rem, 1.5vw, 1.12rem); margin-bottom: 22px; }
.page-hero .page-hero__bullets { margin: 0 0 28px; }
.page-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.demo-banner {
  margin-top: 26px; max-width: 70ch;
  padding: 12px 16px; border-radius: 12px;
  border: 1px dashed rgba(255,196,107,.6); background: rgba(255,196,107,.07);
  color: #ffd9a0; font-size: .88rem;
}
.demo-banner b { color: #ffc46b; }

/* ---------- Catalog ---------- */
.shop { padding: 40px var(--gutter) 90px; border-bottom: 1px solid var(--hairline); }
.filters {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px;
  padding: 18px; border: 1px solid var(--hairline); border-radius: var(--radius);
  background: var(--bg-2); margin-bottom: 16px;
}
.filters__field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.filters__field label {
  font-size: .7rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
}
.filters__field select, .filters__field input {
  width: 100%; background: var(--bg); color: var(--ink); color-scheme: dark;
  border: 1px solid var(--hairline-strong); border-radius: 10px; padding: 0 12px;
  height: 44px; font: inherit; font-size: .95rem;
}
.filters__field select:focus, .filters__field input:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(237,62,53,.18);
}
/* telefon: stare+sezon pe un rând, cele 3 dimensiuni pe un rând */
.filters__field { grid-column: span 3; }
.filters__field--size { grid-column: span 2; }
.filters__field--q { grid-column: 1 / -1; }
.filters__field:has(#fSort) { grid-column: span 4; }
.filters__reset {
  grid-column: span 2; align-self: end; height: 44px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--hairline-strong); color: var(--ink-dim); font-weight: 700; font-size: .88rem;
  transition: border-color .3s, color .3s;
}
.filters__reset:hover { border-color: var(--ink); color: var(--ink); }

.size-help { margin-bottom: 22px; color: var(--ink-dim); font-size: .92rem; }
.size-help summary { cursor: pointer; color: var(--accent-hi); font-weight: 700; width: max-content; max-width: 100%; }
.size-help p { margin-top: 10px; max-width: 70ch; }
.size-help b { color: var(--ink); }

.shop__count { color: var(--muted); font-size: .9rem; margin-bottom: 16px; }
.shop__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }

/* ---------- Card produs ---------- */
.product {
  display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px;
  padding: 18px; border: 1px solid var(--hairline); border-radius: var(--radius);
  background: var(--bg-2); transition: border-color .3s;
}
.product:hover { border-color: var(--hairline-strong); }
.product__visual { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.product__svg { width: 96px; height: 96px; }
.tyre__outer { fill: #0d0705; stroke: rgba(255,206,163,.35); stroke-width: 2; }
.tyre__tread { fill: none; stroke: rgba(255,206,163,.22); stroke-width: 6; stroke-dasharray: 4 3; }
.tyre__rim { fill: var(--bg-3); stroke: rgba(255,206,163,.4); stroke-width: 1.5; }
.tyre__hub { fill: var(--accent); }
.tyre__spoke { stroke: rgba(255,206,163,.35); stroke-width: 3; stroke-linecap: round; }
.product__visual--sh .tyre__tread { stroke: rgba(255,196,107,.3); }
.product__visual-size {
  font-size: .72rem; font-weight: 800; letter-spacing: .04em; color: var(--ink-dim);
  text-align: center; font-variant-numeric: tabular-nums;
}
.product__body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.product__badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  padding: 3px 10px; border-radius: 999px; font-size: .7rem; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--hairline-strong); color: var(--ink-dim);
}
.badge--nou { border-color: rgba(126,224,138,.5); color: #7ee08a; }
.badge--sh { border-color: rgba(255,196,107,.55); color: #ffc46b; }
.badge--iarna { color: #9fd3ff; border-color: rgba(159,211,255,.45); }
.badge--vara { color: #ffb38a; border-color: rgba(255,179,138,.45); }
.product__title { font-weight: 800; font-stretch: 108%; font-size: 1.08rem; line-height: 1.2; overflow-wrap: anywhere; }
.product__size { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.product__sh { color: var(--ink-dim); font-size: .88rem; }
.product__note { color: var(--muted); font-size: .86rem; }
.product__scarcity { color: var(--accent-hi); font-size: .82rem; font-weight: 800; letter-spacing: .04em; }
.product__scarcity--set { color: #7ee08a; }
.product__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-top: 4px; }
.product__price b { font-weight: 900; font-stretch: 118%; font-size: 1.5rem; color: var(--accent); }
.product__price span { color: var(--muted); font-size: .85rem; }
.product__price small { flex-basis: 100%; color: var(--muted); font-size: .8rem; }
.product__buy { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.product__qty {
  background: var(--bg); color: var(--ink); color-scheme: dark;
  border: 1px solid var(--hairline-strong); border-radius: 999px; padding: 9px 12px;
  font: inherit; font-size: .9rem;
}
.product__add { flex: 1 1 auto; }

.shop__empty {
  padding: 34px 24px; border: 1px dashed var(--hairline-strong); border-radius: var(--radius);
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.shop__empty h2 { font-weight: 900; font-stretch: 115%; text-transform: uppercase; font-size: clamp(1.2rem, 2.6vw, 1.7rem); }
.shop__empty p { color: var(--ink-dim); max-width: 50ch; }
.shop__empty a:not(.btn) { color: var(--accent-hi); font-weight: 700; }

/* ---------- Cum comanzi ---------- */
.shop-how__steps { margin-bottom: 30px; max-width: 60ch; }

/* ---------- Coș (sertar) ---------- */
.cart { position: fixed; inset: 0; z-index: 150; }
.cart[hidden] { display: none; }
.cart__overlay { position: absolute; inset: 0; background: rgba(8, 4, 2, .6); opacity: 0; transition: opacity .35s; }
.cart__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100%);
  background: var(--bg-2); border-left: 1px solid var(--hairline-strong);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .4s var(--ease-out);
}
.cart.is-open .cart__overlay { opacity: 1; }
.cart.is-open .cart__panel { transform: none; }
.cart__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 20px; border-bottom: 1px solid var(--hairline);
}
.cart__head h2 { font-weight: 900; font-stretch: 118%; text-transform: uppercase; font-size: 1.2rem; }
.cart__close { width: 44px; height: 44px; border-radius: 50%; font-size: 1.6rem; line-height: 1; border: 1px solid var(--hairline-strong); }
.cart__close:hover { border-color: var(--ink); }
.cart__body { flex: 1 1 auto; overflow-y: auto; padding: 18px 20px 28px; display: flex; flex-direction: column; gap: 18px; }
.cart__empty { color: var(--muted); }
.cart__lines { display: flex; flex-direction: column; }
.cart-line { padding: 14px 0; border-bottom: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 10px; }
.cart-line__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cart-line__main b { font-weight: 800; overflow-wrap: anywhere; }
.cart-line__main span { color: var(--muted); font-size: .85rem; }
.cart-line__ctrl { display: flex; align-items: center; gap: 10px; }
.cart-line__sum { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; }
.cart-line__remove {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--hairline-strong);
  font-size: 1.2rem; line-height: 1; color: var(--ink-dim);
}
.cart-line__remove:hover { border-color: var(--accent); color: var(--accent); }
#cartExtras { display: flex; flex-direction: column; gap: 14px; }
#cartExtras[hidden] { display: none; }
.cart__mount {
  display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
  padding: 14px; border-radius: 12px; border: 1px solid rgba(237,62,53,.45); background: rgba(237,62,53,.07);
}
.cart__mount input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.cart__mount span { display: flex; flex-direction: column; gap: 2px; }
.cart__mount small { color: var(--muted); font-size: .82rem; }
.cart__bonus li { position: relative; padding-left: 22px; color: var(--ink-dim); font-size: .88rem; margin-bottom: 6px; }
.cart__bonus li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 900; }
.cart__bonus b { color: #7ee08a; }
.cart__totals { border-top: 1px solid var(--hairline); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.cart__totals div { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-dim); }
.cart__totals dd { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); }
.cart__totals .cart__grand { padding-top: 8px; border-top: 1px solid var(--hairline); font-size: 1.1rem; }
.cart__grand dt { color: var(--ink); font-weight: 800; }
.cart__grand dd { color: var(--accent); font-weight: 900; font-stretch: 118%; font-size: 1.35rem; }
.checkout { padding: 18px; gap: 14px; }
.checkout[hidden] { display: none; }
.checkout .form__field input, .checkout .form__field textarea { padding: 12px 14px; }
.checkout .form__actions .btn { width: 100%; }

/* ---------- Buton coș plutitor + toast ---------- */
.cart-fab {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 90;
  padding: 14px 20px; border-radius: 999px; background: var(--accent); color: #fff;
  font-weight: 800; font-size: .92rem; box-shadow: 0 10px 30px rgba(0,0,0,.45);
  transition: transform .3s var(--ease-out), background-color .3s;
}
.cart-fab:hover { background: var(--accent-hi); transform: translateY(-2px); }
.cart-fab[hidden] { display: none; }
.toast {
  position: fixed; left: 50%; bottom: 84px; z-index: 160; max-width: calc(100% - 32px);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 12px 18px; border-radius: 12px; background: var(--ink); color: var(--bg);
  font-weight: 700; font-size: .9rem; transition: opacity .3s, transform .3s var(--ease-out);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 767px) {
  .page-hero { padding-top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; align-items: flex-start; }
  .page-hero .hero__kicker { margin-bottom: 18px; font-size: .68rem; letter-spacing: .14em; }
  .page-hero__title { margin-bottom: 14px; }
  .page-hero__sub { font-size: .95rem; margin-bottom: 18px; }
  .page-hero__actions { order: 4; }
  .page-hero .page-hero__bullets { order: 5; margin: 20px 0 0; flex-direction: column; gap: 6px; font-size: .9rem; }
  .demo-banner { order: 6; }
}
@media (max-width: 379px) {
  .filters { gap: 10px 8px; padding: 14px; }
  .filters__field--size select { padding: 0 6px; font-size: .9rem; }
  .filters__field:has(#fSort), .filters__reset { grid-column: 1 / -1; }
}
@media (max-width: 479px) {
  .cart-btn__label { display: none; }
  .product { grid-template-columns: 72px minmax(0, 1fr); padding: 14px; gap: 12px; }
  .product__svg { width: 72px; height: 72px; }
  .page-hero__actions .btn { width: 100%; }
}

@media (min-width: 768px) {
  .shop__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .filters { grid-template-columns: repeat(5, minmax(0, 1fr)) 1.5fr 1.2fr auto; align-items: end; }
  .filters__field, .filters__field--size, .filters__field--q, .filters__field:has(#fSort), .filters__reset { grid-column: auto; }
  .shop__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product { grid-template-columns: minmax(0, 1fr); }
  .product__visual { flex-direction: row; justify-content: flex-start; gap: 14px; }
  .product__svg { width: 64px; height: 64px; }
  .product__visual-size { font-size: .95rem; color: var(--ink); }
}
@media (min-width: 768px) {
  .page-shop .cart-btn { margin-left: 18px; }
}
