/* ==========================================================================
   Templates Studio — UI Core
   Componente reutilizabile, fara framework. Depinde de tokens.css.
   ========================================================================== */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

/* Atributul hidden trebuie sa bata orice display din clase (grid, flex...). */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: var(--r-sm); }
::selection { background: var(--brand); color: var(--brand-ink); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: -100px; left: var(--s-4); z-index: var(--z-toast);
  background: var(--brand); color: var(--brand-ink);
  padding: var(--s-3) var(--s-4); border-radius: var(--r-md); font-weight: 600;
}
.skip-link:focus { top: var(--s-4); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow { max-width: var(--container-narrow); }
.container-wide { max-width: 1440px; }

.section { padding-block: var(--section-y); }
.section-sm { padding-block: calc(var(--section-y) * .6); }
.section-subtle { background: var(--bg-subtle); }
.section-muted { background: var(--bg-muted); }
.section-dark { background: var(--n-900); color: var(--n-50); }
.section-dark .lead, .section-dark .text-muted { color: var(--n-300); }

.stack > * + * { margin-top: var(--s-4); }
.stack-sm > * + * { margin-top: var(--s-2); }
.stack-lg > * + * { margin-top: var(--s-6); }

.grid { display: grid; gap: var(--s-5); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

.split { display: grid; gap: var(--s-8); align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split-wide-left { grid-template-columns: 1.15fr .85fr; }
}

.cluster { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.between { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; justify-content: space-between; }
.center-x { margin-inline: auto; }

/* ---------- Tipografie ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}
h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
.display {
  font-size: var(--fs-5xl); font-family: var(--font-display); font-weight: 600;
  line-height: 1.04; letter-spacing: var(--tracking-tight);
}

p { text-wrap: pretty; }
.lead { font-size: var(--fs-lg); line-height: 1.6; color: var(--text-muted); max-width: 62ch; }
.text-muted { color: var(--text-muted); }
.text-subtle { color: var(--text-subtle); font-size: var(--fs-sm); }
.text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }
.text-center { text-align: center; }
.text-center .lead { margin-inline: auto; }
.text-brand { color: var(--brand); }
.italic-serif { font-family: var(--font-display); font-style: italic; font-weight: 400; }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: var(--tracking-wide); text-transform: uppercase;
  color: var(--brand);
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; }
.eyebrow-plain::before { display: none; }

.section-head { max-width: 60ch; margin-bottom: var(--s-8); }
.section-head > * + * { margin-top: var(--s-3); }
.section-head.text-center { margin-inline: auto; }

.prose { max-width: 68ch; }
.prose > * + * { margin-top: var(--s-4); }
.prose h2 { font-size: var(--fs-2xl); margin-top: var(--s-8); }
.prose h3 { margin-top: var(--s-6); }
.prose ul, .prose ol { padding-left: var(--s-5); }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: var(--s-2); }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote {
  border-left: 3px solid var(--brand); padding: var(--s-2) 0 var(--s-2) var(--s-5);
  font-family: var(--font-display); font-size: var(--fs-lg); font-style: italic; color: var(--text-muted);
}
.prose img { border-radius: var(--r-lg); }
.prose code {
  font-family: var(--font-mono); font-size: .9em;
  background: var(--bg-muted); padding: .15em .4em; border-radius: var(--r-sm);
}

/* ---------- Butoane ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  padding: .8rem 1.4rem;
  font-size: var(--fs-sm); font-weight: 600; line-height: 1;
  border-radius: var(--r-md); border: 1px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast),
              transform var(--t-fast), box-shadow var(--t-fast);
}
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn svg { width: 18px; height: 18px; }

.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-hover); box-shadow: var(--shadow-md); }

.btn-outline { border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover { border-color: var(--text); background: var(--bg-subtle); }

.btn-ghost { color: var(--text); }
.btn-ghost:hover { background: var(--bg-muted); }

.btn-dark { background: var(--n-900); color: var(--n-0); }
.btn-dark:hover { background: var(--n-800); }

.btn-light { background: var(--n-0); color: var(--n-900); }
.btn-light:hover { background: var(--n-100); }

.btn-lg { padding: 1.05rem 1.9rem; font-size: var(--fs-base); }
.btn-sm { padding: .55rem 1rem; font-size: var(--fs-xs); }
.btn-block { width: 100%; }
.btn-icon { padding: .65rem; }

.link-arrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-weight: 600; font-size: var(--fs-sm); color: var(--brand);
}
.link-arrow svg { width: 16px; height: 16px; transition: transform var(--t-fast); }
.link-arrow:hover svg { transform: translateX(4px); }

.link-underline { position: relative; }
.link-underline::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-base);
}
.link-underline:hover::after { transform: scaleX(1); }

/* ---------- Badge / Pill ---------- */
.badge {
  display: inline-flex; align-items: center; gap: var(--s-1);
  padding: .3rem .6rem; font-size: var(--fs-xs); font-weight: 600; line-height: 1.2;
  border-radius: var(--r-sm); background: var(--bg-muted); color: var(--text-muted);
}
.badge-brand   { background: var(--brand-soft);   color: var(--brand); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger  { background: var(--danger-soft);  color: var(--danger); }
.badge-info    { background: var(--info-soft);    color: var(--info); }
.badge-dark    { background: var(--n-900); color: var(--n-0); }

.pill {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: .45rem .9rem; border-radius: var(--r-full);
  border: 1px solid var(--border); background: var(--surface);
  font-size: var(--fs-sm); font-weight: 500; cursor: pointer;
  transition: all var(--t-fast);
}
.pill:hover { border-color: var(--text); }
.pill[aria-pressed="true"], .pill.is-active {
  background: var(--solid); border-color: var(--solid); color: var(--solid-ink);
}

/* ---------- Card ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--s-5);
  transition: border-color var(--t-base), box-shadow var(--t-base), transform var(--t-base);
}
.card-hover:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card-flat { border: 0; background: var(--bg-subtle); }
.card-pad-lg { padding: var(--s-7); }
.card > * + * { margin-top: var(--s-3); }

.icon-box {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: var(--r-md);
  background: var(--brand-soft); color: var(--brand);
}
.icon-box svg { width: 22px; height: 22px; }
.icon-box-lg { width: 58px; height: 58px; border-radius: var(--r-lg); }
.icon-box-lg svg { width: 26px; height: 26px; }

/* ---------- Media ---------- */
.media { overflow: hidden; border-radius: var(--r-lg); background: var(--bg-muted); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.ratio-1   { aspect-ratio: 1; }
.ratio-43  { aspect-ratio: 4/3; }
.ratio-32  { aspect-ratio: 3/2; }
.ratio-169 { aspect-ratio: 16/9; }
.ratio-34  { aspect-ratio: 3/4; }
.ratio-45  { aspect-ratio: 4/5; }
.media-zoom img { transition: transform var(--t-slow); }
.media-zoom:hover img { transform: scale(1.05); }

/* ---------- Formulare ---------- */
.field { display: flex; flex-direction: column; gap: var(--s-2); }
.field-row { display: grid; gap: var(--s-4); }
@media (min-width: 640px) { .field-row-2 { grid-template-columns: 1fr 1fr; } }

.label { font-size: var(--fs-sm); font-weight: 600; }
.label .req { color: var(--danger); }
.hint { font-size: var(--fs-xs); color: var(--text-subtle); }

.input, .textarea, .select {
  width: 100%; padding: .8rem 1rem;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--r-md);
  font-size: var(--fs-sm);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.input::placeholder, .textarea::placeholder { color: var(--text-subtle); }
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.textarea { min-height: 130px; resize: vertical; }
.select {
  appearance: none; padding-right: 2.5rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23787066' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .85rem center; background-size: 16px;
}
.input[aria-invalid="true"], .textarea[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--danger); }
.error-msg { font-size: var(--fs-xs); color: var(--danger); font-weight: 500; }
.field:not(.has-error) .error-msg { display: none; }

.check { display: flex; gap: var(--s-3); align-items: flex-start; cursor: pointer; font-size: var(--fs-sm); }
.check input { width: 18px; height: 18px; margin-top: .15rem; accent-color: var(--brand); flex: none; cursor: pointer; }

.input-group { display: flex; gap: var(--s-2); }
.input-group .input { flex: 1; }

.form-note { font-size: var(--fs-xs); color: var(--text-subtle); }
.form-success {
  display: none; gap: var(--s-3); align-items: center;
  padding: var(--s-4); border-radius: var(--r-md);
  background: var(--success-soft); color: var(--success);
  font-size: var(--fs-sm); font-weight: 500;
}
.form-success.is-visible { display: flex; }
.form-success svg { width: 20px; height: 20px; flex: none; }

/* ---------- Header / Navigatie ---------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-base), box-shadow var(--t-base);
}
@supports (backdrop-filter: blur(1px)) {
  .site-header { background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); }
}
.site-header.is-stuck { border-bottom-color: var(--border); }
.header-inner { display: flex; align-items: center; gap: var(--s-5); min-height: 74px; }

.brand {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; letter-spacing: -.02em;
}
.brand-mark { width: 30px; height: 30px; flex: none; }

.nav { display: none; margin-left: auto; }
.nav ul { display: flex; align-items: center; gap: var(--s-5); }
.nav a {
  position: relative; font-size: var(--fs-sm); font-weight: 500;
  color: var(--text-muted); transition: color var(--t-fast);
}
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); font-weight: 600; }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; background: var(--brand); border-radius: 2px;
}
.header-actions { display: flex; align-items: center; gap: var(--s-1); margin-left: auto; }
.nav + .header-actions { margin-left: 0; }
.nav-toggle { display: inline-flex; padding: .55rem; border-radius: var(--r-md); }
.nav-toggle:hover { background: var(--bg-muted); }
.nav-toggle svg { width: 22px; height: 22px; }

/* Aceste reguli vin dupa definitiile de mai sus ca sa le poata suprascrie. */
@media (min-width: 1000px) {
  .nav { display: block; }
  .nav-toggle { display: none; }
}

/* Telefoane inguste (375 px): logo + 4 butoane nu incap cu spatierea de desktop.
   Strangem spatiile si lasam logo-ul sa cedeze, ca pagina sa nu se miste lateral. */
.brand { min-width: 0; white-space: nowrap; overflow: hidden; }  /* un nume lung se taie, nu calca peste butoane */
.header-actions { flex: none; }
@media (max-width: 479px) {
  .header-inner { gap: var(--s-2); }
  .header-actions { gap: 0; }
  .brand { font-size: 1.15rem; }
  .lang-switch > summary .chev { display: none; }
}
/* 320-374 px (inclusiv 360 px, foarte des pe Android): inca putin loc pentru logo. */
@media (max-width: 374px) {
  .header-inner { gap: var(--s-1); }
  .brand { font-size: 1.05rem; gap: var(--s-1); }
  .brand-mark, .brand-mark svg { width: 26px; height: 26px; }
  .header-actions .icon-btn, .header-actions .nav-toggle { width: 36px; height: 36px; padding: 0; justify-content: center; }
  .header-actions .lang-switch > summary { padding-inline: .35rem; gap: var(--s-1); }
}

.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--r-md); color: var(--text);
  transition: background var(--t-fast);
}
.icon-btn:hover { background: var(--bg-muted); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn .count {
  position: absolute; top: 1px; right: 1px;
  min-width: 17px; height: 17px; padding: 0 4px;
  display: grid; place-items: center;
  background: var(--brand); color: var(--brand-ink);
  font-size: 10px; font-weight: 700; line-height: 1; border-radius: var(--r-full);
}

/* ---------- Drawer (meniu mobil / cos) ---------- */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: var(--z-drawer);
  background: hsl(30 10% 8% / .45);
  opacity: 0; visibility: hidden;
  transition: opacity var(--t-base), visibility var(--t-base);
}
.drawer-backdrop.is-open { opacity: 1; visibility: visible; }

.drawer {
  position: fixed; top: 0; bottom: 0; right: 0; z-index: calc(var(--z-drawer) + 1);
  width: min(400px, 88vw);
  display: flex; flex-direction: column;
  background: var(--bg); border-left: 1px solid var(--border);
  transform: translateX(101%);
  /* Inchis = ascuns si pentru tastatura / cititoare de ecran (dupa animatie). */
  visibility: hidden;
  transition: transform var(--t-slow), visibility 0s linear var(--d-slow);
  overscroll-behavior: contain;
}
.drawer.is-open { transform: none; visibility: visible; transition: transform var(--t-slow), visibility 0s; }
.drawer-left {
  right: auto; left: 0;
  border-left: 0; border-right: 1px solid var(--border);
  transform: translateX(-101%);
}
.drawer-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--border); flex: none;
}
.drawer-head h2, .drawer-head h3 { font-size: var(--fs-lg); }
.drawer-body { flex: 1; overflow-y: auto; padding: var(--s-5); }
.drawer-foot { flex: none; padding: var(--s-5); border-top: 1px solid var(--border); background: var(--surface); }
.drawer-nav { display: flex; flex-direction: column; }
.drawer-nav a {
  padding: var(--s-4) 0; border-bottom: 1px solid var(--border);
  font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 500;
}
.drawer-nav a[aria-current="page"] { color: var(--brand); }
body.no-scroll { overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer { background: var(--n-900); color: var(--n-300); padding-block: var(--s-9) var(--s-5); }
.site-footer h3, .site-footer h4, .site-footer .brand { color: var(--n-0); }
.footer-grid { display: grid; gap: var(--s-7); }
@media (min-width: 760px)  { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.8fr 1fr 1fr 1fr; } }
.footer-col h4 {
  font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: var(--tracking-wide); text-transform: uppercase;
  color: var(--n-400); margin-bottom: var(--s-4);
}
.footer-col li + li { margin-top: var(--s-3); }
.footer-col a { font-size: var(--fs-sm); transition: color var(--t-fast); }
.footer-col a:hover { color: var(--n-0); }
.footer-bottom {
  margin-top: var(--s-8); padding-top: var(--s-5); border-top: 1px solid var(--n-800);
  display: flex; flex-wrap: wrap; gap: var(--s-4); justify-content: space-between; align-items: center;
  font-size: var(--fs-xs); color: var(--n-400);
}
.social { display: flex; gap: var(--s-2); }
.social a {
  display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: var(--r-md); border: 1px solid var(--n-800); transition: all var(--t-fast);
}
.social a:hover { background: var(--n-0); color: var(--n-900); border-color: var(--n-0); }
.social svg { width: 17px; height: 17px; }

/* ---------- Breadcrumb / Pagination ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); font-size: var(--fs-xs); color: var(--text-subtle); }
.breadcrumb li { display: flex; align-items: center; gap: var(--s-2); }
.breadcrumb li:not(:last-child)::after { content: "/"; color: var(--border-strong); }
.breadcrumb a:hover { color: var(--text); text-decoration: underline; }

.pagination { display: flex; flex-wrap: wrap; gap: var(--s-2); justify-content: center; align-items: center; }
.pagination a, .pagination span {
  display: grid; place-items: center; min-width: 40px; height: 40px; padding-inline: var(--s-2);
  border: 1px solid var(--border); border-radius: var(--r-md);
  font-size: var(--fs-sm); font-weight: 500; transition: all var(--t-fast);
}
.pagination a:hover { border-color: var(--text); }
.pagination [aria-current="page"] { background: var(--solid); border-color: var(--solid); color: var(--solid-ink); }
.pagination .is-disabled { opacity: .4; pointer-events: none; }

/* ---------- Accordion ---------- */
.accordion { border-top: 1px solid var(--border); }
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  width: 100%; padding: var(--s-5) 0; text-align: left;
  font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 500;
}
.accordion-trigger .chev { flex: none; width: 20px; height: 20px; color: var(--text-subtle); transition: transform var(--t-base); }
.accordion-trigger[aria-expanded="true"] .chev { transform: rotate(180deg); color: var(--brand); }
.accordion-panel { overflow: hidden; height: 0; transition: height var(--t-base); }
.accordion-panel > div { padding-bottom: var(--s-5); color: var(--text-muted); max-width: 70ch; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: var(--s-1); border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: var(--s-3) var(--s-4); white-space: nowrap;
  font-size: var(--fs-sm); font-weight: 600; color: var(--text-subtle);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--brand); }
.tab-panel { padding-top: var(--s-5); }
.tab-panel[hidden] { display: none; }

/* ---------- Carousel ---------- */
.carousel { position: relative; }
.carousel-track {
  display: flex; gap: var(--s-5);
  overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -ms-overflow-style: none;
  padding-bottom: var(--s-2);
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > * { scroll-snap-align: start; flex: 0 0 auto; width: min(330px, 78vw); }
.carousel-nav { display: flex; gap: var(--s-2); }
.carousel-btn {
  display: grid; place-items: center; width: 42px; height: 42px;
  border: 1px solid var(--border); border-radius: var(--r-full);
  background: var(--surface); transition: all var(--t-fast);
}
.carousel-btn:hover { border-color: var(--text); }
.carousel-btn[disabled] { opacity: .35; pointer-events: none; }
.carousel-btn svg { width: 18px; height: 18px; }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: var(--z-modal);
  display: grid; place-items: center; padding: var(--gutter);
  background: hsl(30 10% 8% / .5);
  opacity: 0; visibility: hidden;
  transition: opacity var(--t-base), visibility var(--t-base);
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal-box {
  position: relative;
  width: min(520px, 100%); max-height: 88vh; overflow-y: auto;
  background: var(--bg); border-radius: var(--r-xl); box-shadow: var(--shadow-xl);
  padding: var(--s-7);
  transform: translateY(14px) scale(.98); transition: transform var(--t-slow);
}
.modal.is-open .modal-box { transform: none; }
.modal-close { position: absolute; top: var(--s-3); right: var(--s-3); }

/* ---------- Toast ---------- */
.toast-region {
  position: fixed; bottom: var(--s-5); right: var(--s-5); z-index: var(--z-toast);
  display: flex; flex-direction: column; gap: var(--s-2); pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-4) var(--s-5); max-width: 340px;
  background: var(--n-900); color: var(--n-0);
  border-radius: var(--r-md); box-shadow: var(--shadow-lg);
  font-size: var(--fs-sm); font-weight: 500;
  transform: translateY(12px); opacity: 0;
  transition: transform var(--t-slow), opacity var(--t-base);
}
.toast.is-visible { transform: none; opacity: 1; }
.toast svg { width: 18px; height: 18px; flex: none; color: hsl(140 50% 65%); }

/* ---------- Tabel ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); }
.table th, .table td { padding: var(--s-4); text-align: left; font-size: var(--fs-sm); border-bottom: 1px solid var(--border); }
.table th {
  font-weight: 600; background: var(--bg-subtle); white-space: nowrap;
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted);
}
.table tbody tr:last-child td { border-bottom: 0; }
.table-hover tbody tr:hover { background: var(--bg-subtle); }

/* ---------- Rating ---------- */
.stars { display: inline-flex; gap: 2px; color: hsl(38 92% 50%); }
.stars svg { width: 15px; height: 15px; }
.stars .empty { color: var(--border-strong); }

/* ---------- Quantity stepper ---------- */
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.qty button { width: 38px; height: 42px; display: grid; place-items: center; color: var(--text-muted); transition: background var(--t-fast); }
.qty button:hover { background: var(--bg-muted); color: var(--text); }
.qty svg { width: 15px; height: 15px; }
.qty input {
  width: 46px; height: 42px; text-align: center;
  border: 0; border-inline: 1px solid var(--border); background: transparent;
  font-size: var(--fs-sm); font-weight: 600; -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- Price ---------- */
.price { display: inline-flex; align-items: baseline; gap: var(--s-2); }
.price-now { font-weight: 600; }
.price-was { color: var(--text-subtle); text-decoration: line-through; font-size: .9em; font-weight: 400; }

/* ---------- Swatches / marimi ---------- */
.swatches { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.swatch {
  width: 34px; height: 34px; border-radius: var(--r-full);
  border: 1px solid var(--border-strong); cursor: pointer;
  box-shadow: inset 0 0 0 3px var(--bg);
  transition: box-shadow var(--t-fast), border-color var(--t-fast);
}
.swatch[aria-pressed="true"] { border-color: var(--text); box-shadow: inset 0 0 0 3px var(--bg), 0 0 0 1px var(--text); }

.size-opt {
  min-width: 48px; padding: .6rem .7rem; text-align: center;
  border: 1px solid var(--border); border-radius: var(--r-md);
  font-size: var(--fs-sm); font-weight: 500; cursor: pointer; transition: all var(--t-fast);
}
.size-opt:hover { border-color: var(--text); }
.size-opt[aria-pressed="true"] { background: var(--solid); border-color: var(--solid); color: var(--solid-ink); }
.size-opt[disabled] { opacity: .35; pointer-events: none; text-decoration: line-through; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; }
.reveal-d2 { transition-delay: .16s; }
.reveal-d3 { transition-delay: .24s; }
.reveal-d4 { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Comutator de limba ---------- */
.lang-switch { position: relative; }
.lang-switch > summary {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: .5rem .7rem; border-radius: var(--r-md);
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .04em;
  color: var(--text); cursor: pointer; list-style: none;
  transition: background var(--t-fast);
}
.lang-switch > summary::-webkit-details-marker { display: none; }
.lang-switch > summary:hover { background: var(--bg-muted); }
.lang-switch > summary .chev { transition: transform var(--t-fast); }
.lang-switch[open] > summary .chev { transform: rotate(180deg); }

.lang-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: calc(var(--z-sticky) + 1);
  min-width: 170px; padding: var(--s-2);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--shadow-lg);
}
.lang-menu a {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: .55rem .7rem; border-radius: var(--r-sm);
  font-size: var(--fs-sm); color: var(--text-muted);
  transition: background var(--t-fast), color var(--t-fast);
}
.lang-menu a:hover { background: var(--bg-muted); color: var(--text); }
.lang-menu a[aria-current="true"] { color: var(--brand); font-weight: 600; }
.lang-menu .code { font-size: var(--fs-xs); color: var(--text-subtle); letter-spacing: .05em; }

/* ---------- Iconite (sprite din icons.js) ---------- */
.icon { width: 20px; height: 20px; flex: none; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 26px; height: 26px; }

/* ---------- Utilitare ---------- */
.hide { display: none !important; }
@media (max-width: 639px)  { .hide-sm { display: none !important; } }
@media (max-width: 999px)  { .hide-md { display: none !important; } }
@media (min-width: 1000px) { .show-md-only { display: none !important; } }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--s-2); }
.mt-3 { margin-top: var(--s-3); }
.mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); }
.mt-6 { margin-top: var(--s-6); }
.mt-8 { margin-top: var(--s-8); }
.mb-4 { margin-bottom: var(--s-4); }
.mb-6 { margin-bottom: var(--s-6); }
.mb-8 { margin-bottom: var(--s-8); }
.full { width: 100%; }
.divider { height: 1px; background: var(--border); border: 0; }
.rounded { border-radius: var(--r-lg); }
.overflow-hidden { overflow: hidden; }
.relative { position: relative; }
