/* Tema · partea „baza” */

/* Culori, litere, butoane și elementele folosite în mai multe părți ale site-ului.
   Paletă: hârtie rece, cerneală bleumarin, galben de etichetă, roșu de preț. */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("fonturi/archivo-latin.woff2") format("woff2-variations"), url("fonturi/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("fonturi/archivo-latin-ext.woff2") format("woff2-variations"), url("fonturi/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --paper: #F3F4F6;
  --white: #FFFFFF;
  --ink: #18202B;
  --ink-2: #3A4452;
  --muted: #5D6876;
  --line: #DDE1E6;
  --line-strong: #C3CAD2;
  --tag: #FFD43B;
  --tag-deep: #E9B800;
  --red: #D7262E;
  --focus: #1F5FE0;
  --accent: #1D4ED8;      /* singura culoare de accent: butonul „Merg la magazin” */
  --accent-hover: #1E40AF;
  --on-accent: #FFFFFF;
  --green: #16A34A;
  --ok-bg: #EAF7EF;
  --ok-line: #A9DDBC;
  --ok-text: #17673A;
  --err-bg: #FDECEC;
  --err-line: #F2B1B4;
  --hole: #FFFFFF;     /* „gaura” din eticheta galbenă: culoarea suprafeței de sub ea */
  --img-bg: #FFFFFF;   /* fundalul de sub pozele de produs și logouri (rămâne alb și pe aspectul întunecat) */
  --shadow: rgba(24, 32, 43, .18);

  --font: "Archivo", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --narrow: 72%;
  --semi: 86%;

  --wrap: 1240px;
  --gutter: clamp(16px, 3vw, 28px);
  --radius: 6px;
}

/* Aspectul întunecat: aceleași nume de culori, alte valori. „--white” e culoarea suprafețelor (carduri, antet),
   „--ink” e culoarea textului, așa că tot site-ul se schimbă de aici, fără reguli separate în fiecare parte. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #12171E;
  --white: #1B222C;
  --ink: #EEF1F5;
  --ink-2: #C9D0D9;
  --muted: #98A3B1;
  --line: #2C3642;
  --line-strong: #46525F;
  --red: #FF6B6B;
  --focus: #8AB4FF;
  --accent: #7AA7FF;
  --accent-hover: #A3C2FF;
  --on-accent: #0B1220;
  --green: #34D399;
  --ok-bg: #14301F;
  --ok-line: #2B6A45;
  --ok-text: #6FD39A;
  --err-bg: #3A1A1C;
  --err-line: #7A3438;
  --hole: #1B222C;
  --shadow: rgba(0, 0, 0, .5);
}

/* Elementele galbene (eticheta de reducere, eticheta de raft, logoul scris) rămân la fel pe ambele aspecte. */
.logo-tag, .tag, .shelf-label, .offer-best, .preview-strip, .maint-tag {
  --ink: #18202B; --ink-2: #3A4452; --muted: #5D6876; --red: #D7262E;
  color: var(--ink);
}
/* Etichetele așezate peste poze: „gaura” lor arată albul pozei. */
.card-tag, .tag-lg { --hole: var(--img-bg); }

*, *::before, *::after { box-sizing: border-box; }

/* Ce e marcat „hidden” rămâne ascuns, orice alt stil ar avea. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  font-variant-numeric: tabular-nums;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 { margin: 0; font-stretch: var(--semi); letter-spacing: -0.01em; line-height: 1.12; }

p { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

button, input, select { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

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

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--ink); color: var(--white); padding: 10px 14px; border-radius: var(--radius);
}
.skip:focus { top: 12px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.muted { color: var(--muted); }
.small { font-size: 14px; }
.count { color: var(--muted); font-weight: 400; font-size: .86em; }

/* ---------- Butoane ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  background: var(--ink); color: var(--white);
  border: 1.5px solid var(--ink); border-radius: var(--radius);
  font-weight: 650; font-size: 15px; line-height: 1.2; text-decoration: none; text-align: center;
  cursor: pointer;
}
.btn:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); }
.btn-lg { min-height: 54px; padding: 14px 26px; font-size: 17px; }
/* „Merg la magazin”: cel mai vizibil element din pagină, în culoarea de accent (contrast ≥ 4,5:1 pe ambele teme). */
.btn-buy { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-buy:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn-sm { min-height: 38px; padding: 7px 14px; font-size: 14px; }
.link-btn { padding: 0; border: 0; background: none; font-size: 14px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: var(--ink); text-decoration-thickness: 2px; }
.btn-block { width: 100%; }

/* ---------- Logo ---------- */

.logo { display: inline-flex; align-items: center; gap: 2px; text-decoration: none; flex-shrink: 0; }
.logo-tag {
  position: relative;
  display: inline-grid; place-items: center;
  height: 34px; padding: 0 9px 0 16px;
  background: var(--tag); color: var(--ink);
  font-weight: 900; font-stretch: var(--narrow); font-size: 26px; line-height: 1;
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);
}
.logo-tag::before {
  content: ""; position: absolute; left: 7px; top: 50%;
  width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--hole);
}
.logo-rest { font-weight: 800; font-stretch: var(--semi); font-size: 25px; letter-spacing: -0.02em; line-height: 1; padding-left: 3px; }
.logo-small .logo-tag { height: 28px; font-size: 21px; }
.logo-small .logo-rest { font-size: 21px; }

/* Logoul încărcat din Setări magazin. Cu două imagini se arată cea potrivită aspectului;
   cu una singură, pe aspectul celălalt primește o plăcuță deschisă sau închisă, ca să rămână vizibilă. */
.logo-img { display: block; width: auto; max-width: min(260px, 52vw); object-fit: contain; }
.logo-on-dark { display: none; }
[data-theme="dark"] .logo-on-light { display: none; }
[data-theme="dark"] .logo-on-dark { display: block; }
[data-theme="dark"] .logo-solo-light { background: #FFFFFF; padding: 5px 10px; border-radius: var(--radius); box-sizing: content-box; }
[data-theme="light"] .logo-solo-dark { background: #18202B; padding: 5px 10px; border-radius: var(--radius); box-sizing: content-box; }

/* Logoul unui magazin: imaginea încărcată sau numele scris, pe o plăcuță albă. */
.store-logo { display: flex; align-items: center; justify-content: center; background: var(--img-bg); border-radius: 4px; overflow: hidden; }
.store-logo-img { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; }
.store-logo-text { color: #18202B; font-weight: 800; font-stretch: var(--narrow); font-size: 20px; line-height: 1.1; text-align: center; overflow-wrap: anywhere; padding: 0 4px; }

/* ---------- Mesaje ---------- */

.site-msgs:empty { display: none; }
.site-msg { margin-top: 16px; padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--ok-line); background: var(--ok-bg); font-weight: 550; }
.site-msg-error { border-color: var(--err-line); background: var(--err-bg); }

/* Eticheta de raft: elementul central al site-ului */
.shelf-label {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "disc prices";
  align-items: center; gap: 4px 22px;
  margin: 22px 0 22px; padding: 18px 24px 18px 22px; max-width: 540px;
  background: var(--tag); border-radius: var(--radius);
  box-shadow: inset 0 -4px 0 var(--tag-deep);
}
.shelf-discount {
  grid-area: disc; align-self: stretch; display: flex; align-items: center;
  padding-right: 22px; border-right: 2px solid rgba(24, 32, 43, .22);
  font-weight: 900; font-stretch: 62%; font-size: clamp(42px, 5.6vw, 66px); line-height: .9; letter-spacing: -0.02em;
}
/* Coloana cu prețuri: prețul vechi, prețul nou și economia, centrate. Prețul nou își alege mărimea după
   lățimea coloanei și după câte caractere are (--chars, pus de șablon), ca să încapă mereu în etichetă. */
.shelf-prices {
  grid-area: prices; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-width: 0; text-align: center; container-type: inline-size;
}
.shelf-prices s { font-size: 18px; color: var(--ink-2); font-stretch: var(--semi); }
.shelf-prices strong {
  color: var(--red); font-weight: 900; font-stretch: 64%;
  font-size: clamp(34px, 6vw, 76px); line-height: .96; letter-spacing: -0.015em; white-space: nowrap; max-width: 100%;
}
/* Pentru browserele vechi, fără unități de container: mărimi fixe după lungimea prețului. */
.shelf-len-m .shelf-prices strong { font-size: clamp(30px, 5vw, 62px); }
.shelf-len-l .shelf-prices strong { font-size: clamp(26px, 4.2vw, 50px); }
.shelf-len-xl .shelf-prices strong { font-size: clamp(22px, 3.6vw, 42px); }
@supports (font-size: 1cqi) {
  .shelf-label .shelf-prices strong { font-size: clamp(22px, calc(100cqi / (var(--chars, 9) * 0.47)), 88px); }
}
.shelf-save { font-size: 15px; font-weight: 650; }
.shelf-plain { grid-template-columns: 1fr; grid-template-areas: "prices"; }

.block { padding-top: 40px; }
.block-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; margin-bottom: 16px; }
.block-head h2 { font-size: clamp(21px, 2.2vw, 26px); font-weight: 800; }
.block-head a { font-weight: 600; font-size: 15px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 14px;
  background: var(--white); border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: 15px; font-weight: 550; text-decoration: none;
}
.chips a:hover { border-color: var(--ink); }
.chips a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.chips a[aria-current="page"] .count { color: inherit; opacity: .75; }

/* ---------- Preț și eticheta de reducere ---------- */

.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.price-now { color: var(--red); font-weight: 850; font-stretch: var(--narrow); font-size: 24px; line-height: 1.05; white-space: nowrap; }
.price-old { color: var(--muted); font-size: 14px; white-space: nowrap; }

.tag {
  position: relative; display: inline-flex; align-items: center;
  padding: 5px 9px 5px 17px; background: var(--tag); color: var(--ink);
  font-weight: 850; font-stretch: var(--narrow); font-size: 18px; line-height: 1;
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);
}
.tag::before {
  content: ""; position: absolute; left: 7px; top: 50%;
  width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: var(--hole);
}

/* ---------- Firimituri, titluri de pagină, stări goale ---------- */

.crumbs { padding: 16px 0 6px; font-size: 14px; color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; }
.crumbs li + li::before { content: "/"; margin: 0 8px; color: var(--line-strong); }
.crumbs a { color: var(--ink-2); }

.list-head { padding: 8px 0 20px; }
.list-head h1 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; }
.list-head .muted { margin-top: 6px; }
.chips-sub { margin-top: 16px; }

.empty-state { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px 28px; max-width: 720px; }
.empty-state h1, .empty-state h2 { font-size: 24px; font-weight: 800; margin-bottom: 10px; }
.empty-state p + p { margin-top: 14px; }

/* ---------- Pagini de text ---------- */

.page { padding-bottom: 20px; }
.page h1 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; margin: 8px 0 20px; }
.page .prose { font-size: 17px; line-height: 1.6; }
.page h2 { font-size: 21px; font-weight: 800; margin: 26px 0 8px; }
.prose { max-width: 68ch; color: var(--ink-2); }
.prose p + p { margin-top: 12px; }
.list-head-store { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 18px; align-items: center; }
.list-head-store > :not(.list-head-logo) { grid-column: 2; }
.list-head-logo { grid-row: 1 / span 2; }
.list-head-logo .store-mark { --mark: 76px; max-width: 220px; }
@media (max-width: 760px) { .list-head-logo .store-mark { --mark: 56px; max-width: 150px; } }
.notice { margin-top: 20px; padding: 16px 18px; background: var(--white); border: 1px solid var(--line); border-left: 5px solid var(--tag-deep); border-radius: var(--radius); }

/* ---------- Banner acord statistici ---------- */

.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40; max-width: 560px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  padding: 16px 18px; background: var(--white); border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: 0 8px 28px var(--shadow); font-size: 14px;
}
.consent p { flex: 1 1 260px; }
.consent-actions { display: flex; gap: 8px; }
.consent .btn { min-height: 38px; padding: 6px 14px; font-size: 14px; }

.preview-strip { background: var(--tag); color: var(--ink); text-align: center; font-weight: 600; font-size: 14px; padding: 8px var(--gutter); }

/* ---------- Iconițe ---------- */

.ico { display: block; flex-shrink: 0; }

/* ---------- Rânduri care se derulează stânga–dreapta ---------- */

.carousel { position: relative; }
.car-track {
  display: flex; gap: var(--car-gap, 14px); overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  padding: 3px; margin: -3px; /* loc pentru conturul de focus */
}
.car-track::-webkit-scrollbar { display: none; }
.car-track > * { flex: 0 0 auto; scroll-snap-align: start; }
.car-btn {
  position: absolute; top: 50%; z-index: 3; display: grid; place-items: center;
  width: 44px; height: 44px; margin-top: -22px; padding: 0;
  background: var(--white); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 50%;
  box-shadow: 0 4px 14px var(--shadow); cursor: pointer;
}
.car-btn:hover { border-color: var(--ink); }
.car-prev { left: -16px; }
.car-next { right: -16px; }
@media (max-width: 1300px) { .car-prev { left: -8px; } .car-next { right: -8px; } }
@media (max-width: 760px) { .car-btn { width: 38px; height: 38px; margin-top: -19px; } .car-prev { left: -6px; } .car-next { right: -6px; } }

/* ---------- Semnul pătrat al unui magazin ---------- */

/* Logoul încărcat își păstrează proporția: o iconiță pătrată rămâne pătrată, un logo lat se întinde cât îl lasă plăcuța.
   Fără logo, apar inițialele magazinului pe un pătrat colorat. */
.store-mark { --mark: 56px; display: flex; align-items: center; justify-content: center; height: var(--mark); max-width: 100%; flex-shrink: 0; }
.store-mark img {
  height: 100%; width: auto; max-width: 100%; padding: 5px; object-fit: contain;
  background: var(--img-bg); border: 1px solid var(--line); border-radius: 12px;
}
.store-mark-text { width: var(--mark); border-radius: 12px; color: #18202B; font-weight: 850; font-stretch: var(--narrow); font-size: calc(var(--mark) * .43); line-height: 1; letter-spacing: 0; }
.store-tone-1 { background: #FFD43B; }
.store-tone-2 { background: #BFE3FF; }
.store-tone-3 { background: #C9F0D2; }
.store-tone-4 { background: #FFD0C7; }
.store-tone-5 { background: #E2D6FF; }
.store-tone-6 { background: #DDE1E6; }

/* ---------- Săgeata „înapoi sus” ---------- */

.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 30; display: grid; place-items: center;
  width: 48px; height: 48px; padding: 0; background: var(--ink); color: var(--white);
  border: 2px solid var(--white); border-radius: 50%; box-shadow: 0 6px 20px var(--shadow); cursor: pointer;
}
.to-top:hover { background: var(--tag); color: #18202B; }
@media (max-width: 760px) { .to-top { right: 12px; bottom: 12px; width: 44px; height: 44px; } }

/* ---------- Ecrane mici ---------- */

@media (max-width: 760px) {
  .price-now { font-size: 21px; }
  .shelf-label { padding: 14px 16px; gap: 4px 16px; }
  .shelf-discount { padding-right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
