/* ==========================================================================
   3dform.ro — strat de ajustari peste build-ul compilat
   --------------------------------------------------------------------------
   Sursa React nu exista pe server, doar bundle-ul Vite. Fisierul asta se
   incarca DUPA `assets/index-*.css` si corecteaza trei lucruri fara sa atinga
   build-ul. La urmatorul build de frontend, mutati aceste reguli in sursa.
   ========================================================================== */

/* --- 1. Logo in navbar, in locul textului "3D Form" ---------------------- */
/* Structura din bundle: header > .container-custom > div > a.focus-ring > div > span */

header a.focus-ring > div > span.font-display {
  display: block;
  width: 127px;
  height: 44px;
  font-size: 0 !important;      /* ascunde textul, pastreaza elementul */
  line-height: 0;
  background-image: url("/images/v2/logo-navbar.webp");
  background-repeat: no-repeat;
  background-position: left center;
  background-size: contain;
}

/* Modul intunecat comuta clasa .dark pe <html>; acolo cuvantul FORM e deschis */
.dark header a.focus-ring > div > span.font-display {
  background-image: url("/images/v2/logo-navbar-dark.webp");
}

/* --- 2. Titluri pe ecrane mici ------------------------------------------- */
/* Minimele din clamp() (2.7-2.8rem) erau peste ce dadea partea in vw, deci pe
   telefon titlurile ramaneau fixe la ~45px indiferent cat de ingust e ecranul. */

@media (max-width: 767px) {   /* acelasi breakpoint ca designul */
  .atelier-hero h1          { font-size: clamp(2rem, 9vw, 2.8rem) !important; }
  .atelier h1,
  .atelier-catalog-intro h1 { font-size: clamp(1.9rem, 8.5vw, 2.7rem) !important; }
  .marketplace-intro h1     { font-size: clamp(1.9rem, 8.5vw, 2.8rem) !important; }
  .atelier h2               { font-size: clamp(1.45rem, 6.5vw, 2rem) !important; }
  .atelier-footer-brand     { font-size: 26px !important; }
}

@media (max-width: 380px) {
  .atelier-hero h1          { font-size: clamp(1.8rem, 8.5vw, 2.4rem) !important; }
  .atelier h1,
  .atelier-catalog-intro h1,
  .marketplace-intro h1     { font-size: clamp(1.7rem, 8vw, 2.3rem) !important; }
}

/* --- 3. Aparitie la derulare --------------------------------------------- */
/* Clasa .reveal-on-scroll e pusa DOAR de custom.js. Daca JS-ul nu ruleaza,
   nimic nu e ascuns -- de aia opacity:0 sta pe clasa, nu pe element. */

@media (prefers-reduced-motion: no-preference) {
  .reveal-on-scroll {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .65s cubic-bezier(.22,.68,.32,1),
                transform .65s cubic-bezier(.22,.68,.32,1);
    will-change: opacity, transform;
  }
  .reveal-on-scroll.is-revealed {
    opacity: 1;
    transform: none;
  }
  /* decalaj intre cardurile din acelasi rand */
  .reveal-on-scroll[data-reveal-delay="1"] { transition-delay: .08s; }
  .reveal-on-scroll[data-reveal-delay="2"] { transition-delay: .16s; }
  .reveal-on-scroll[data-reveal-delay="3"] { transition-delay: .24s; }
}

/* --- 4. Tranzitii la interactiune ---------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .marketplace-card,
  .atelier-button,
  .atelier-text-link {
    transition: transform .35s cubic-bezier(.22,.68,.32,1),
                box-shadow .35s ease,
                background-color .25s ease,
                color .25s ease;
  }
  .marketplace-card:hover { transform: translateY(-4px); }
  .atelier-button:hover   { transform: translateY(-2px); }

  /* imaginile din carduri respira la hover, fara sa iasa din cadru */
  .marketplace-card-image img {
    transition: transform .6s cubic-bezier(.22,.68,.32,1);
  }
  .marketplace-card:hover .marketplace-card-image img { transform: scale(1.04); }
  .marketplace-card-image { overflow: hidden; }
}

/* ATENTIE: aici a fost `html { scroll-behavior: smooth }`, si a stricat
   navigarea. Aplicatia sare sus la schimbarea rutei cu
   `scrollTo({top:0, behavior:"auto"})`, iar „auto" inseamna „ce zice CSS-ul".
   Cu `smooth` global, saltul devenea o derulare lunga si animata, intrerupta
   cand React inlocuia continutul — pagina noua parea ca ramane la mijloc.
   Derularea lina se cere explicit, punctual, acolo unde chiar o vrem. */

/* ==========================================================================
   5. Benzi autoscrolabile (dreapta -> stanga)
   --------------------------------------------------------------------------
   custom.js ADAUGA un singur nod propriu si nu muta niciodata copiii pusi de
   React -- originalele raman in DOM, doar ascunse din CSS. Banda porneste
   numai daca textul chiar nu incape.
   ========================================================================== */

.marquee {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.marquee-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  will-change: transform;
}

@media (prefers-reduced-motion: no-preference) {
  .marquee-track { animation: marquee-scroll var(--marquee-durata, 26s) linear infinite; }
  .marquee:hover .marquee-track { animation-play-state: paused; }
}

@keyframes marquee-scroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

/* --- banda de sus: "Ceară de soia ✳ Printare 3D la comandă ✳ ..." --------- */
@media (max-width: 767px) {
  .atelier-ticker.marquee-activ { display: block; padding: 17px 0; }
  .atelier-ticker.marquee-activ > span,
  .atelier-ticker.marquee-activ > i { display: none; }
  .atelier-ticker .marquee-track > span {
    font-size: 9px; text-transform: uppercase; letter-spacing: .15em;
    white-space: nowrap; padding: 0 9px;
  }
  .atelier-ticker .marquee-track > i {
    font-size: 17px; color: #a68b60; font-style: normal; padding: 0 3px;
  }
}

/* --- eticheta din hero: "LUMÂNĂRI · PRINTURI 3D · ..." -------------------- */
@media (max-width: 767px) {
  .atelier-hero-copy > .atelier-eyebrow.marquee-activ { max-width: 100%; font-size: 0; }
  .atelier-hero-copy > .atelier-eyebrow.marquee-activ .marquee-track {
    font-size: 10px; letter-spacing: .19em; font-weight: 600; text-transform: uppercase;
  }
  .atelier-hero-copy > .atelier-eyebrow.marquee-activ .marquee-track > span { padding-right: 26px; }
}

/* ==========================================================================
   6. Sus: doar logoul (ca la Facebook). Jos: meniul.
   --------------------------------------------------------------------------
   Sub 1024px headerul ramane o bara subtire cu logoul, iar toate actiunile
   trec in bara de jos. Butoanele din header nu se sterg, doar se ascund:
   bara de jos apasa butonul real de meniu, ca sa se deschida acelasi panou.
   ========================================================================== */

@media (max-width: 1023px) {

  /* bara de sus se subtiaza: 52px in loc de 64 */
  header .container-custom > div:first-child {
    height: 52px !important;
    min-height: 52px;
    justify-content: flex-start !important;
  }

  header .container-custom { padding-left: 18px; padding-right: 18px; }

  /* logoul, in stanga, ca la Facebook */
  header a.focus-ring > div > span.font-display,
  .dark header a.focus-ring > div > span.font-display {
    width: 104px;
    height: 34px;
    background-position: left center;
  }
  header a.focus-ring > div > p { display: none !important; }

  /* Sus raman doar logoul (stanga) si lupa de cautare (dreapta). Restul
     actiunilor pleaca in bara de jos, dar nodurile raman in DOM.
     `display:contents` scoate wrapper-ul din calcul, ca butonul de cautare sa
     devina element flex al randului si sa poata fi impins la dreapta. */
  header .header-actions { display: contents; }
  header .header-actions > * { display: none !important; }

  header .header-actions > div.static {
    display: block !important;
    margin-left: auto;
    margin-right: -6px;
  }
  header .header-actions > div.static > button { padding: 10px !important; }
}

/* --- bara de jos ---------------------------------------------------------- */

.tabbar {
  --tb-paper: #f8f5ef;
  --tb-muted: #777064;
  --tb-line:  #ddd6ca;
  --tb-accent:#805237;
  display: none;
}

.dark .tabbar {
  --tb-paper: #20221e;
  --tb-muted: #bbb5a9;
  --tb-line:  #48483f;
  --tb-accent:#d6ad87;
}

@media (max-width: 1023px) {
  .tabbar {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;                       /* peste pagina, sub modale (z-100) */
    align-items: stretch;
    background: color-mix(in srgb, var(--tb-paper) 93%, transparent);
    -webkit-backdrop-filter: blur(14px);
            backdrop-filter: blur(14px);
    border-top: 1px solid var(--tb-line);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .tabbar button,
  .tabbar a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 2px 7px;
    background: none;
    border: 0;
    color: var(--tb-muted);
    text-decoration: none;
    font: 600 9px/1 Manrope, system-ui, sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    position: relative;
  }

  .tabbar svg { width: 21px; height: 21px; display: block; }

  /* fila din mijloc: logoul, ceva mai mare, fara eticheta */
  .tabbar .tabbar-acasa img { width: 27px; height: 27px; display: block; }
  .tabbar .tabbar-acasa { gap: 0; }

  .tabbar [aria-current="page"] { color: var(--tb-accent); }
  .tabbar [aria-current="page"]::before {
    content: "";
    position: absolute;
    top: 2px;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--tb-accent);
  }

  body.has-tabbar { padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 1023px) and (prefers-reduced-motion: no-preference) {
  .tabbar a, .tabbar button { transition: color .2s ease, transform .12s ease; }
  .tabbar a:active, .tabbar button:active { transform: scale(.93); }
}

/* ==========================================================================
   7. Spatiul de sus al paginii
   --------------------------------------------------------------------------
   Headerul fix are acum 52px, dar hero-ul isi pastra `padding-top:64px` plus
   inca 50px pe copy -- peste 110px de gol inainte de primul text.
   ========================================================================== */

@media (max-width: 1023px) {
  .atelier-hero { padding-top: 52px !important; }
  .atelier-hero-copy { padding-top: 24px !important; padding-bottom: 28px !important; }
  .marketplace-page { padding-top: 52px !important; }
}

/* ==========================================================================
   8. Hero pe mobil: butoanele pe un rand, eticheta devine banda de stiri jos
   --------------------------------------------------------------------------
   `.atelier-hero-copy` e o coloana flex cu ordinea din DOM:
       eticheta → h1 → paragraf → „Vezi colecția" → „Sau spune-ne ideea ta"

   Trecem containerul pe grid cu doua coloane: titlul si paragraful ocupa toata
   latimea, cele doua butoane stau unul langa altul, iar eticheta e impinsa
   ultima cu `order`. Nu se muta niciun nod din DOM -- doar se aseaza altfel.
   ========================================================================== */

@media (max-width: 1023px) {
  .atelier-hero-copy {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    column-gap: 12px;
    row-gap: 0;
  }

  .atelier-hero-copy > h1,
  .atelier-hero-copy > p { grid-column: 1 / -1; }

  /* cele doua butoane, cate unul pe coloana, pe acelasi rand */
  .atelier-hero-copy > .atelier-button {
    grid-column: 1;
    width: 100%;
    justify-content: center;
    gap: 10px;
    margin-top: 26px;
  }

  .atelier-hero-copy > .atelier-explore {
    grid-column: 2;
    margin-top: 26px !important;     /* avea 28-60px si cadea sub buton */
    justify-content: center;
    text-align: center;
    line-height: 1.35;
  }

  /* eticheta pleaca ultima si devine banda pe toata latimea */
  .atelier-hero-copy > .atelier-eyebrow {
    grid-column: 1 / -1;
    order: 9;
    width: calc(100% + 48px);
    margin: 30px -24px 0;            /* iese din marginile coloanei de text */
    padding: 11px 0;
    border-top: 1px solid var(--line, #ddd6ca);
    border-bottom: 1px solid var(--line, #ddd6ca);
    max-width: none;
  }

  /* punctul dinaintea textului nu are ce cauta intr-o banda */
  .atelier-hero-copy > .atelier-eyebrow .atelier-dot { display: none; }
}

/* separatorul dintre repetarile benzii din hero, ca la tickerul de sus */
@media (max-width: 1023px) {
  .atelier-hero-copy > .atelier-eyebrow .marquee-track > i {
    font-size: 15px;
    color: #a68b60;
    font-style: normal;
    padding: 0 4px;
  }
}

/* ==========================================================================
   9. Submeniuri care urca din bara de jos
   --------------------------------------------------------------------------
   Meniul propriu al aplicatiei se deschide in partea de sus; daca il apelam
   dintr-un buton de jos, rezultatul apare la celalalt capat al ecranului.
   De aceea fiecare fila cu optiuni isi deschide propria foaie, tot de jos.
   Foile stau in <body>, in afara lui #root.
   ========================================================================== */

.tabsheet-fundal {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(24, 21, 17, .45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
.tabsheet-fundal.deschis { opacity: 1; pointer-events: auto; }

.tabsheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 71;
  max-height: 76vh;
  overflow-y: auto;
  background: var(--tb-paper, #f8f5ef);
  color: var(--tb-ink, #302d26);
  border-top: 1px solid var(--tb-line, #ddd6ca);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -14px 40px rgba(24, 21, 17, .18);
  transform: translateY(101%);
  transition: transform .28s cubic-bezier(.22, .68, .32, 1);
  padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px));
}
.tabsheet.deschis { transform: none; }

.dark .tabsheet {
  --tb-paper: #20221e;
  --tb-ink:   #f3ede3;
  --tb-line:  #48483f;
  --tb-muted: #bbb5a9;
  --tb-accent:#d6ad87;
}

/* manerul de sus, ca la foile native */
.tabsheet-maner {
  width: 38px; height: 4px;
  margin: 9px auto 2px;
  border-radius: 2px;
  background: var(--tb-line, #ddd6ca);
}

.tabsheet-titlu {
  margin: 0;
  padding: 10px 22px 12px;
  font: 600 9px/1 Manrope, system-ui, sans-serif;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--tb-muted, #777064);
}

.tabsheet-optiune {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 15px 22px;
  background: none;
  border: 0;
  border-top: 1px solid var(--tb-line, #ddd6ca);
  color: inherit;
  font: 500 15px/1.25 Manrope, system-ui, sans-serif;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.tabsheet-optiune[aria-current="page"] { color: var(--tb-accent, #805237); font-weight: 600; }

.tabsheet-optiune svg { width: 15px; height: 15px; flex: none; opacity: .4; }

.tabsheet-optiune.este-iesire { color: #a04c3d; }
.dark .tabsheet-optiune.este-iesire { color: #e08a78; }

@media (prefers-reduced-motion: no-preference) {
  .tabsheet-optiune { transition: background-color .15s ease; }
  .tabsheet-optiune:active { background: rgba(128, 82, 55, .09); }
}

/* campul de cautare din foaia de meniu */
.tabsheet-cautare {
  display: flex;
  gap: 8px;
  padding: 4px 22px 16px;
}
.tabsheet-cautare input {
  flex: 1;
  min-width: 0;
  padding: 11px 13px;
  background: transparent;
  border: 1px solid var(--tb-line, #ddd6ca);
  border-radius: 3px;
  color: inherit;
  font: 400 14px/1.2 Manrope, system-ui, sans-serif;
}
.tabsheet-cautare input:focus { outline: 2px solid var(--tb-accent, #805237); outline-offset: 1px; }
.tabsheet-cautare button {
  padding: 11px 15px;
  background: var(--tb-ink, #302d26);
  color: var(--tb-paper, #f8f5ef);
  border: 0;
  border-radius: 3px;
  font: 600 10px/1 Manrope, system-ui, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}

/* ==========================================================================
   10. Titlul si butoanele din hero, pe mobil
   --------------------------------------------------------------------------
   Titlul e scris `Ideile<br><em>prind formă.</em>` — ruptura e fixa in cod si
   pe telefon lasa un cuvant singur pe primul rand. Pe mobil o anulam si lasam
   textul sa curga; `text-wrap: balance` imparte egal daca tot nu incape.

   Butoanele erau dreptunghiuri de 15-18px padding cu colturi de 2px, cat toata
   latimea. Devin pastile mai mici, una plina si una conturata.
   ========================================================================== */

@media (max-width: 1023px) {
  .atelier-hero h1 br { display: none; }
  .atelier-hero h1 {
    text-wrap: balance;
    font-size: clamp(1.85rem, 8.4vw, 2.6rem) !important;
  }
  .atelier-hero h1 em { font-style: italic; }

  /* --- cele doua butoane, pastile de aceeasi inaltime --- */
  .atelier-hero-copy > .atelier-button,
  .atelier-hero-copy > .atelier-explore {
    min-height: 42px;
    padding: 0 16px !important;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .08em;
    gap: 7px !important;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
  }

  /* plina */
  .atelier-hero-copy > .atelier-button {
    background: var(--ink, #302d26);
    color: var(--paper, #f8f5ef);
    border: 1px solid transparent;
  }

  /* conturata */
  .atelier-hero-copy > .atelier-explore {
    background: transparent;
    color: var(--ink, #302d26);
    border: 1px solid var(--line, #ddd6ca);
    text-transform: none;
  }

  /* sageata din interior nu mai are nevoie de spatiu propriu */
  .atelier-hero-copy > .atelier-explore > span { margin: 0; display: inline-flex; }

  .atelier-hero-copy > .atelier-button svg,
  .atelier-hero-copy > .atelier-explore svg { width: 14px; height: 14px; flex: none; }
}

/* pe ecrane inguste textul butonului al doilea e lung: il lasam sa respire */
@media (max-width: 380px) {
  .atelier-hero-copy > .atelier-button,
  .atelier-hero-copy > .atelier-explore {
    font-size: 9.5px;
    padding: 0 11px !important;
    gap: 5px !important;
  }
}


/* ==========================================================================
   11. Nicio sectiune nu depaseste latimea ecranului
   --------------------------------------------------------------------------
   Plasa de siguranta: daca vreun element lat scapa (banda, o poza, un grid),
   se vede ca bara de derulare orizontala pe tot site-ul. `overflow-x:clip` pe
   sectiuni taie doar in interiorul lor si, spre deosebire de `hidden`, nu
   strica pozitionarea `fixed` a barelor.
   ========================================================================== */

@media (max-width: 1023px) {
  .atelier-story-band,
  .atelier-story-photo,
  .atelier-story-copy,
  .atelier-section,
  .atelier-hero,
  .atelier-hero-copy { overflow-x: clip; max-width: 100%; }

  .atelier-story-photo img { max-width: 100%; }

  /* eticheta din banda de dinaintea footerului: text normal, pe randuri */
  .atelier-story-copy > .atelier-eyebrow {
    max-width: 100%;
    white-space: normal;
    line-height: 1.7;
  }
}

/* ==========================================================================
   12. Pagina de cont, pe mobil: direct continutul
   --------------------------------------------------------------------------
   Pagina e `grid-cols-1 lg:grid-cols-4`: pe telefon lista de sectiuni
   (`.lg:col-span-1`) se aseaza DEASUPRA continutului, asa ca apesi „Comenzile
   mele" si dai tot peste lista, nu peste comenzi. Lista trece in submeniul
   din bara de jos; aici o ascundem — dar ramane in DOM, fiindca submeniul
   apasa chiar butoanele ei (sectiunile sunt stare React, nu rute).

   Clasa `pagina-cont` e pusa pe <body> din custom.js: `lg:col-span-1` e
   folosita si in Cos si in Checkout, iar acolo nu trebuie atinsa.
   ========================================================================== */

@media (max-width: 1023px) {
  body.pagina-cont .lg\:col-span-1 {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  /* continutul ocupa toata latimea ramasa */
  body.pagina-cont .lg\:col-span-3 { grid-column: 1 / -1; }

  /* fara spatiul lasat de coloana disparuta */
  body.pagina-cont .grid.grid-cols-1 { gap: 0 !important; }
}

/* butonul de incarcare poze din formularul de admin */
.incarcare-fisier { display: none; }

.incarcare-buton {
  flex: none;
  padding: 8px 13px;
  margin-left: 6px;
  background: #302d26;
  color: #f8f5ef;
  border: 1px solid transparent;
  border-radius: 6px;
  font: 600 12px/1 Manrope, system-ui, sans-serif;
  cursor: pointer;
  white-space: nowrap;
}
.incarcare-buton:hover:not(:disabled) { background: #493725; }
.incarcare-buton:disabled { opacity: .6; cursor: default; }
.incarcare-buton.are-eroare { background: #a04c3d; }

/* Comutatorul de diagnostic: `?nocustom=1` pune data-nocustom pe <html> si
   anuleaza tot ce adauga fisierul asta, ca sa se vada pagina neatinsa. */
html[data-nocustom] .reveal-on-scroll { opacity: 1 !important; transform: none !important; }
html[data-nocustom] .tabbar,
html[data-nocustom] .tabsheet,
html[data-nocustom] .tabsheet-fundal { display: none !important; }
html[data-nocustom] body.has-tabbar { padding-bottom: 0 !important; }
html[data-nocustom] .marquee { display: none !important; }
html[data-nocustom] header .header-actions { display: flex !important; }
html[data-nocustom] header .header-actions > * { display: revert !important; }
html[data-nocustom] header a.focus-ring > div > span.font-display {
  font-size: revert !important; width: auto !important; height: auto !important;
  background-image: none !important;
}
html[data-nocustom] .atelier-hero-copy { display: flex !important; }
html[data-nocustom] .lg\:col-span-1 { position: static !important; width: auto !important; height: auto !important; clip-path: none !important; }

/* titlu vizibil doar pentru cititoarele de ecran (ordinea h1->h2->h3 pe Contact) */
.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}

/* Tabelele din paginile legale: pe telefon se desfac in carduri, ca sa nu fie taiate.
   Eticheta fiecarei celule vine din atributul data-eticheta pus in chunk. */
@media (max-width: 767px) {
  .tabel-legal > table        { border: 0; width: 100%; }
  .tabel-legal thead          { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .tabel-legal tbody,
  .tabel-legal tr,
  .tabel-legal td             { display: block; width: 100%; }
  .tabel-legal tr             { border: 1px solid #e5e7eb; border-radius: .6rem; margin-bottom: .7rem; padding: .3rem 0; background: #fff; }
  .tabel-legal td             { border: 0 !important; padding: .4rem .9rem !important; display: flex; gap: .7rem; justify-content: space-between; align-items: baseline; }
  .tabel-legal td::before     { content: attr(data-eticheta); flex: 0 0 40%; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #6b7280; }
  .tabel-legal td:last-child  { border-bottom: 0 !important; }
}
.dark .tabel-legal tr         { background: #1f2937; border-color: #374151; }
.dark .tabel-legal td::before { color: #9ca3af; }

/* Firma e neplatitoare de TVA (CUI fara prefix RO), deci mentiunea "cu TVA
   inclus" de sub pretul produsului e gresita. Apare intr-un singur loc in tot
   build-ul: ultimul <span> din blocul de pret al paginii de produs. */
.atelier-detail-price > span { display: none !important; }

/* ==========================================================================
   PANOUL DE ADMIN PE TELEFON  (clasa `e-admin` vine din custom.js)
   ========================================================================== */

/* Bara magazinului statea peste butonul de Salvare al formularelor. */
.e-admin .tabbar { display: none !important; }

@media (max-width: 767px) {

  /* --- modalele ocupa tot ecranul ---------------------------------------- */
  /* Containerul nu mai deruleaza el: panoul tine exact cat ecranul, corpul
     se deruleaza inauntru, iar bara de actiuni ramane mereu vizibila jos.
     (`position:sticky` nu functiona: panoul are `overflow:hidden` din build.) */
  .e-admin .fixed.inset-0.z-50.overflow-y-auto { overflow: hidden; }
  .e-admin .fixed.inset-0.z-50.overflow-y-auto > div {
    padding: 0 !important;
    display: block;
    min-height: 0;
  }
  .e-admin .fixed.inset-0.z-50.overflow-y-auto .rounded-2xl.shadow-xl {
    display: flex;
    flex-direction: column;
    /* fixat direct pe ecran: invelisurile din build il decalau cu ~24px,
       iar coada modalului iesea sub marginea de jos */
    position: fixed;
    inset: 0;
    width: auto;
    height: auto;
    max-width: none;
    margin: 0;
    border-radius: 0;
  }
  /* corpul formularului: singura zona care se deruleaza */
  .e-admin .fixed.inset-0.z-50.overflow-y-auto .rounded-2xl.shadow-xl > :first-child {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* bara de actiuni: lipita jos, butoane egale, una langa alta */
  .e-admin .fixed.inset-0.z-50.overflow-y-auto .rounded-2xl.shadow-xl > .bg-gray-50 {
    position: static;
    flex: 0 0 auto;
    display: flex;
    flex-direction: row-reverse;
    gap: .6rem;
    padding-bottom: calc(.75rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 18px rgba(0, 0, 0, .07);
  }
  .e-admin .fixed.inset-0.z-50.overflow-y-auto .rounded-2xl.shadow-xl > .bg-gray-50 > button {
    flex: 1 1 0;
    width: auto !important;
    margin: 0 !important;
  }

  /* --- tinte de atins ----------------------------------------------------- */
  .e-admin button { min-height: 44px; white-space: nowrap; }
  .e-admin td button { min-height: 0; }
  .e-admin input:not([type="checkbox"]):not([type="radio"]),
  .e-admin select,
  .e-admin textarea {
    min-height: 46px;
    font-size: 16px;   /* sub 16px, iOS mareste pagina la focus */
  }
  .e-admin textarea { min-height: 96px; }

  /* --- spatieri si tipografie --------------------------------------------- */
  .e-admin label {
    display: block;
    margin-bottom: .3rem;
    font-weight: 600;
    letter-spacing: .01em;
  }
  /* perechile de campuri (varianta + stoc) se aseaza pe randuri cand e strans */
  .e-admin .flex.gap-2 { flex-wrap: wrap; }
  .e-admin .flex.gap-2 > input { flex: 1 1 12rem; min-width: 0; }
}

/* --- listele: pe telefon fiecare rand devine un card ---------------------- */
/* `data-eticheta` / `data-actiuni` sunt puse de custom.js, din textul <th>. */
@media (max-width: 767px) {
  .e-admin .tabel-admin { overflow: visible; }
  .e-admin .tabel-admin > table { display: block; width: 100%; min-width: 0; }
  .e-admin .tabel-admin thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0);
  }
  .e-admin .tabel-admin tbody,
  .e-admin .tabel-admin tbody > tr,
  .e-admin .tabel-admin tbody > tr > td { display: block; }

  .e-admin .tabel-admin tbody > tr {
    width: auto;
    margin: 0 .7rem .7rem;
    padding: 0 0 .15rem;
    background: #fff;
    border: 1px solid #e7e2d9;
    border-radius: .75rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
  }
  .e-admin .tabel-admin tbody > tr:first-child { margin-top: .7rem; }

  /* celulele obisnuite: eticheta la stanga, valoarea la dreapta */
  .e-admin .tabel-admin tbody > tr > td[data-eticheta] {
    width: auto;
    display: flex;
    gap: .8rem;
    align-items: baseline;
    justify-content: space-between;
    text-align: right;
    padding: .4rem .85rem !important;
    border: 0 !important;
    white-space: normal !important;
  }
  .e-admin .tabel-admin tbody > tr > td[data-eticheta]::before {
    content: attr(data-eticheta);
    flex: 0 0 7.5rem;
    text-align: left;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6b7280;
  }

  /* prima celula (poza + nume/numar) e capul cardului, fara eticheta */
  .e-admin .tabel-admin tbody > tr > td[data-eticheta]:first-child {
    display: block;
    text-align: left;
    padding: .7rem .85rem .6rem !important;
    border-bottom: 1px solid #f1ede5 !important;
  }
  .e-admin .tabel-admin tbody > tr > td[data-eticheta]:first-child::before { content: none; }
  .e-admin .tabel-admin tbody > tr > td[data-eticheta]:first-child .ml-4 { margin-left: .7rem; }

  /* randul gol („Nu există ...") nu primeste eticheta: ramane cum e */
  .e-admin .tabel-admin tbody > tr > td:not([data-eticheta]) { text-align: center; }

  /* butoanele din celule: tinte de atins, nu iconite de 16px lipite */
  .e-admin .tabel-admin tbody td button {
    min-height: 40px;
    min-width: 40px;
    margin: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fbfaf7;
    border: 1px solid #e7e2d9;
    border-radius: .55rem;
  }
  .e-admin .tabel-admin tbody td button:disabled { opacity: .45; }
  /* `space-x-*` pune margin-left pe copii; trecem pe gap ca sa ramana egal */
  .e-admin .tabel-admin tbody td > div[class*="space-x-"],
  .e-admin .tabel-admin tbody td div[class*="space-x-"] {
    display: flex;
    gap: .45rem;
    align-items: center;
  }
  .e-admin .tabel-admin tbody td div[class*="space-x-"] > * { margin-left: 0 !important; }

  /* actiunile: rand propriu, jos, aliniate la dreapta */
  .e-admin .tabel-admin tbody > tr > td[data-actiuni] {
    align-items: center;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: .15rem;
    padding: .45rem .7rem .55rem !important;
    border-top: 1px solid #f1ede5 !important;
  }
  .e-admin .tabel-admin tbody > tr > td[data-actiuni]::before { flex: 1 1 auto; }
}

html[data-nocustom] .atelier-detail-price > span { display: revert !important; }

/* Card cookie-uri centrat, cu fundal estompat care blocheaza interactiunea pana la alegere */
.pv-cookie-wall {
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  background: rgba(24, 20, 14, .45) !important;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: pv-cookie-in .3s ease both;
}
.pv-cookie-wall > div { max-width: 34rem !important; margin: 0 auto !important; }
html.pv-cookie-lock, html.pv-cookie-lock body { overflow: hidden !important; }
@keyframes pv-cookie-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pv-cookie-wall { animation: none; } }
