/* Catalog cu filtre — exclusivsrl.ro. Totul e sub #exf ca să nu se amestece cu stilurile temei / Elementor. */
#exf {
  --red: #B60017; --red-dark: #8e0012;
  /* Portocaliu cald, soft: --acc pentru elemente (≥3:1 pe alb), --acc-ink pentru text (≥4,5:1) */
  --acc: #EA580C; --acc-ink: #C2410C; --acc-soft: #fff3ea; --acc-line: #fbd5bb;
  --acc-btn: #EA580C; --acc-btn-h: #C2410C; /* portocaliu intens, cerut de client; text alb bold */
  --acc-on: #fff; --acc-light: #f7b07a;
  --ink: #141414; --text: #2b2b2b; --muted: #6b6b6b; --faint: #8c8c8c;
  --line: #ececec; --line-soft: #f3f3f3; --card: #fff; --soft: #fafafa;
  --radius: 18px; --radius-s: 10px; --pill: 99px; --side: 280px; /* site: carduri cu colțuri de 22px */
  color: var(--text); font-size: 15px; line-height: 1.45; text-align: left;
}
#exf, #exf * { box-sizing: border-box; }
/* Reset: tema și Elementor stilizează global butoanele și câmpurile */
#exf button, #exf input, #exf select { font: inherit; color: inherit; margin: 0; text-transform: none; letter-spacing: normal; box-shadow: none; min-height: 0; line-height: inherit; text-align: inherit; white-space: normal; font-weight: inherit; }
#exf button { background: none; border: 0; padding: 0; border-radius: 0; cursor: pointer; transition: none; }
#exf button:hover, #exf button:focus { background-color: transparent; color: inherit; }
#exf a { color: inherit; text-decoration: none; }
#exf h2, #exf h3, #exf p, #exf ul { margin: 0; padding: 0; }
#exf img { max-width: 100%; height: auto; }

/* Lista randată pe server (înainte de JavaScript) */
#exf .exf-ssr { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
#exf .exf-ssr a { display: block; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; text-align: center; font-size: 14px; }

#exf .layout { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); gap: 24px; align-items: start; }
#exf .scrim { display: none; }

/* Coloana de filtre */
#exf .side { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); } /* întreagă, fără scroll propriu */
#exf .layout > .side { position: sticky; top: var(--exf-stick, 16px); } /* rămâne pe ecran la scroll (exf.js calculează top, sub antetul fix) */
#exf .side-head, #exf .side-foot { display: none; }
#exf .block { border-bottom: 1px solid var(--line); }
#exf .block:last-child { border-bottom: 0; }
#exf .block-h { display: flex; align-items: center; gap: 6px; padding: 14px 16px; }
#exf .block-h .tg { flex: 1; display: flex; align-items: center; justify-content: space-between; text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink); }
#exf .sel-n { background: var(--acc-ink); color: #fff; font-size: 11px; border-radius: 999px; padding: 1px 7px; margin-left: 8px; font-weight: 600; }
#exf .chev { width: 14px; height: 14px; stroke: var(--faint); transition: transform .15s; flex: none; }
#exf .block.closed .chev { transform: rotate(-90deg); }
#exf .block.closed .block-b { display: none; }
#exf .info { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 12px; font-weight: 700; display: grid; place-items: center; font-family: Georgia, serif; font-style: italic; text-align: center; }
#exf .info[aria-expanded="true"] { background: var(--acc); color: #fff; border-color: var(--acc); }
#exf .help { margin: -4px 16px 10px; padding: 10px 12px; background: var(--acc-soft); border-left: 2px solid var(--acc); border-radius: var(--radius-s); font-size: 13px; color: var(--muted); }
#exf .block-b { padding: 0 8px 12px; }

#exf .opt { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: var(--pill); cursor: pointer; font-size: 14px; margin: 0; font-weight: 400; }
#exf .opt:hover { background: var(--acc-soft); }
#exf .opt input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; border: 1.5px solid #c9c3b8; border-radius: 4px; flex: none; display: grid; place-items: center; background: #fff; cursor: pointer; padding: 0; }
#exf .opt input[type=radio] { border-radius: 50%; }
#exf .opt input:checked { background: var(--acc); border-color: var(--acc); }
#exf .opt input:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
#exf .opt input[type=radio]:checked::after { width: 6px; height: 6px; border: 0; border-radius: 50%; background: #fff; transform: none; }
#exf .opt input:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
#exf .opt .l { flex: 1; min-width: 0; line-height: 1.3; }
#exf .opt .c, #exf .sw .c, #exf .cat .c { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; font-weight: 400; }
#exf .opt.zero, #exf .sw.zero { opacity: .42; cursor: default; }
#exf .fit { display: flex; align-items: center; gap: 8px; padding: 0 8px; }
#exf .fit input { width: 110px; height: 40px; border: 1px solid var(--line); border-radius: var(--pill); padding: 0 12px; font-size: 16px; background: #fff; }
#exf .fit input:focus { outline: none; border-color: var(--acc); }
#exf .fit span { color: var(--muted); }
#exf .fit-h { margin: 8px 8px 0; font-size: 13px; color: var(--muted); }
#exf .fit-h b { color: var(--ink); }
#exf .more { color: var(--acc-ink); font-weight: 600; font-size: 13px; padding: 6px 10px; }
#exf .more:hover { color: var(--ink); }

#exf .sw { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--pill); cursor: pointer; font-size: 14px; margin: 0; font-weight: 400; }
#exf .sw:hover { background: var(--acc-soft); }
#exf .sw input { appearance: none; -webkit-appearance: none; width: 34px; height: 20px; border-radius: 999px; background: #ddd8cf; position: relative; flex: none; cursor: pointer; transition: background .15s; border: 0; padding: 0; }
#exf .sw input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
#exf .sw input:checked { background: var(--acc); }
#exf .sw input:checked::after { transform: translateX(14px); }
#exf .sw input:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
#exf .sw .l { flex: 1; }
#exf .sw-help { display: block; font-size: 12px; color: var(--faint); line-height: 1.35; }

#exf .cat { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 7px 10px; border-radius: var(--pill); font-size: 14px; }
#exf .cat:hover { background: var(--acc-soft); }
#exf .cat.on { background: var(--acc-soft); color: var(--acc-ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--acc-line); }

/* Căutarea stă în capul coloanei de filtre; pe mobil, deasupra produselor rămâne doar butonul „Filtre” */
#exf .q { position: relative; display: block; margin: 12px 12px 4px; }
#exf .q svg { position: absolute; left: 14px; top: 11px; width: 18px; height: 18px; stroke: var(--faint); pointer-events: none; }
#exf .q input { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: var(--pill); padding: 0 14px 0 40px; background: var(--soft); font-size: 15px; }
#exf .q input:focus { outline: none; border-color: var(--acc); background: #fff; }
#exf .bar { display: none; }
#exf .fbtn { display: flex; width: 100%; height: 48px; align-items: center; gap: 10px; padding: 0 20px; background: var(--ink); color: #fff; border: 0; border-radius: var(--pill); font-weight: 600; font-size: 15px; }
#exf .fbtn:hover, #exf .fbtn:focus { background: #000; color: #fff; }
#exf .fbtn svg { width: 18px; height: 18px; stroke: #fff; flex: none; }
#exf .fbtn .n { background: var(--acc-btn); color: var(--acc-on); border-radius: 999px; font-size: 12px; font-weight: 700; padding: 0 8px; line-height: 20px; }
#exf .fbtn .count { margin-left: auto; font-weight: 400; font-size: 14px; color: rgba(255,255,255,.7); }
#exf .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
#exf .chips:empty { display: none; }
#exf .chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px 0 12px; border-radius: 999px; background: var(--acc-soft); border: 1px solid var(--acc-line); font-size: 13px; }
#exf .chip:hover, #exf .chip:focus { border-color: var(--acc); background: var(--acc-soft); }
#exf .chip small { color: var(--faint); font-size: 12px; }
#exf .chip svg { width: 14px; height: 14px; stroke: var(--acc-ink); }
#exf .chip.clear { border: 0; background: none; color: var(--acc-ink); font-weight: 600; padding: 0 6px; }

/* Carduri */
#exf .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
#exf .card { container-type: inline-size; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s; }
#exf .card:hover { border-color: var(--acc); }
/* Mișcare discretă: cardul se ridică, poza se mărește (doar cu mouse; fără umbre) */
@media (hover: hover) {
  #exf .card { transition: border-color .2s, transform .25s ease; }
  #exf .card:hover { transform: translateY(-3px); }
  #exf .card .img img { transition: transform .45s ease; }
  #exf .card:hover .img img { transform: scale(1.05); }
}
/* Confirmarea „adăugat”: butonul pulsează scurt */
@keyframes exf-added { 0% { transform: scale(.94); } 55% { transform: scale(1.04); } 100% { transform: scale(1); } }
#exf .btn.pri.just { animation: exf-added .45s ease; }
@media (prefers-reduced-motion: reduce) {
  #exf .card, #exf .card .img img, #exf .btn.pri.just { transition: none !important; animation: none !important; transform: none !important; }
}
#exf .card .img { aspect-ratio: 4/3; background: #fff; display: block; border-bottom: 1px solid var(--line); overflow: hidden; }
/* Același filtru ca grila originală: fundalul gri al fotografiilor devine alb */
#exf .card .img img, #exf .det-top img { filter: brightness(.98) contrast(1.79) saturate(1.17); }
#exf .card .img img { width: 100%; height: 100%; object-fit: cover; }
#exf .card .body { padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
#exf .card .kat { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); font-weight: 600; }
#exf .card h3 { font-size: 16px; color: var(--ink); line-height: 1.25; font-weight: 700; overflow-wrap: anywhere; } /* coduri lungi fără spații (Cu/XLPE/SWA/PVC) */
#exf .card h3 a:hover { color: var(--acc-ink); }
#exf .card .sub { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#exf .card .spec { margin-top: auto; padding-top: 4px; font-size: 12.5px; line-height: 1.45; color: var(--faint); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#exf .card .spec span + span::before { content: " · "; color: #c4c4c4; font-weight: 400; }
#exf .card .spec .hit { color: var(--ink); font-weight: 600; }
#exf .badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
#exf .badge { font-size: 12px; background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: var(--pill); padding: 1px 8px; white-space: nowrap; line-height: 1.4; }
#exf .badge.hit { background: var(--acc-soft); color: var(--acc-ink); border-color: var(--acc-line); }
#exf .card .act { display: flex; gap: 8px; padding: 0 14px 14px; }
#exf .btn { height: 38px; border-radius: var(--pill); border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 0 12px; font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-align: center; white-space: nowrap; }
#exf .btn:hover, #exf .btn:focus { border-color: var(--acc); background: #fff; }
#exf .btn.pri { background: var(--acc-btn); border-color: var(--acc-btn); color: var(--acc-on); font-weight: 700; flex: 1; letter-spacing: .02em; }
#exf .btn.pri:hover, #exf .btn.pri:focus { background: var(--acc-btn-h); border-color: var(--acc-btn-h); color: var(--acc-on); }
#exf .btn.pri.in { background: var(--acc-soft); color: var(--acc-ink); border-color: var(--acc-line); }
#exf .btn[aria-busy="true"] { opacity: .6; cursor: progress; }

#exf .empty { grid-column: 1 / -1; background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); padding: 32px; text-align: center; }
#exf .empty h2 { margin: 0 0 6px; font-size: 18px; color: var(--ink); }
#exf .empty p { margin: 0 0 16px; color: var(--muted); }
#exf .empty .sugg { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
#exf .empty .sugg .btn { white-space: normal; height: auto; min-height: 38px; padding: 8px 16px; line-height: 1.3; text-align: center; } /* sugestiile pot fi lungi */

/* Fișa produsului (panou lateral) și sertarul de filtre pe mobil — <dialog> în top layer */
#exf dialog { border: 0; padding: 0; max-width: none; max-height: none; color: var(--text); }
#exf dialog:not([open]) { display: none; }
#exf dialog::backdrop { background: rgba(20,20,20,.45); }
#exf .sheet { position: fixed; inset: 0 0 0 auto; height: 100%; width: min(620px, 100%); margin: 0; background: #fff; display: flex; flex-direction: column; }
#exf .sheet[open] { animation: exf-slide .2s ease-out; }
@keyframes exf-slide { from { transform: translateX(40px); opacity: 0; } }
#exf .sheet-h { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
#exf .sheet-h h2 { font-size: 20px; color: var(--ink); line-height: 1.25; flex: 1; font-weight: 700; }
#exf .sheet-h .kat { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--acc-ink); margin-bottom: 6px; font-weight: 600; }
#exf .x { width: 38px; height: 38px; border-radius: var(--pill); border: 1px solid var(--line); background: #fff; display: grid; place-items: center; flex: none; }
#exf .x svg { width: 18px; height: 18px; stroke: var(--ink); }
#exf .sheet-b { flex: 1; overflow: auto; padding: 20px; }
#exf .sheet-f { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; }
#exf .sheet-f .btn { height: 44px; }
#exf .det-top { display: grid; grid-template-columns: 180px 1fr; gap: 18px; margin-bottom: 18px; }
#exf .det-top img { width: 100%; aspect-ratio: 1; object-fit: contain; border: 1px solid var(--line-soft); border-radius: 8px; }
#exf .det-apl { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
#exf .specs { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0; border: 0; }
#exf .specs th, #exf .specs td { text-align: left; padding: 9px 10px; border: 0; border-bottom: 1px solid var(--line); vertical-align: top; background: none; }
#exf .specs th { width: 42%; color: var(--muted); font-weight: 500; }
#exf .specs tr:nth-child(odd) td, #exf .specs tr:nth-child(odd) th { background: none; }
#exf .note { font-size: 13px; color: var(--muted); background: var(--acc-soft); border-radius: 8px; padding: 12px; margin-top: 16px; }
#exf .toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: var(--pill); font-size: 14px; z-index: 100000; display: flex; gap: 14px; align-items: center; border: 1px solid var(--acc); max-width: calc(100vw - 32px); }
#exf .toast a { color: var(--acc-light); font-weight: 700; text-decoration: underline; }

#exf .drawer { position: fixed; inset: 0 auto 0 0; height: 100%; width: min(380px, 92vw); margin: 0; background: #fff; display: flex; flex-direction: column; }
#exf .drawer[open] { animation: exf-drawer .2s ease-out; }
@keyframes exf-drawer { from { transform: translateX(-40px); opacity: 0; } }
@keyframes exf-pop { from { opacity: 0; transform: translate(-50%, 8px); } }
#exf .drawer .side { position: static; max-height: none; border: 0; border-radius: 0; flex: 1; display: flex; flex-direction: column; overflow: hidden; }
#exf .drawer .side-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
#exf .drawer .side-head b { font-size: 18px; color: var(--ink); }
#exf .drawer .side-body { flex: 1; overflow: auto; overscroll-behavior: contain; }
#exf .drawer .q { margin: 12px 16px 4px; }
#exf .drawer .q input { font-size: 16px; } /* 16px: iOS nu mai face zoom la focus */
#exf .drawer .side-foot { display: flex; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); background: #fff; }
#exf .drawer .side-foot .btn { height: 46px; }
#exf .drawer .side-foot .btn.pri { flex: 1; }

/* Card îngust (≤ 260 px: tabletă cu coloana de filtre, mobil): butoanele una sub alta, „Fișă tehnică” ca link discret.
   Înălțime fixă pentru zona de butoane, ca „Cere ofertă” să fie la aceeași înălțime și când un card nu are fișă. */
@container (max-width: 260px) {
  #exf .card .act { flex-direction: column; gap: 2px; min-height: 88px; padding: 4px 10px 10px; /* 4 + 40 + 2 + 32 + 10 */ }
  #exf .card .act .btn { width: 100%; flex: none; }
  #exf .card .act .btn.pri { height: 40px; font-size: 13px; }
  #exf .card .act .btn:not(.pri) { height: 32px; border: 0; background: none; font-weight: 500; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
}

@media (max-width: 960px) {
  #exf .layout { grid-template-columns: minmax(0, 1fr); }
  #exf .layout > .side { display: none; }
  #exf .bar { display: block; min-height: 48px; margin-bottom: 14px; }
  /* Pastila plutitoare (vezi exf.js): centrată, deasupra barei fixe de contact a site-ului (49 px) */
  #exf.float-f .fbtn { position: fixed; z-index: 99; left: 50%; bottom: calc(61px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: auto; height: 44px; padding: 0 18px; animation: exf-pop .18s ease-out; }
  #exf.float-f .fbtn .count { display: none; }
}
@media (max-width: 640px) {
  #exf .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #exf .card { border-radius: 14px; }
  #exf .card .img { aspect-ratio: 1; }
  #exf .card .body { padding: 10px 12px 6px; gap: 4px; }
  #exf .card .kat { font-size: 10px; letter-spacing: .1em; }
  #exf .card h3 { font-size: 14px; }
  #exf .card .sub { font-size: 12px; }
  #exf .card .spec { font-size: 11.5px; }
  #exf .badge { font-size: 11px; padding: 1px 7px; white-space: normal; }
  #exf .badge:nth-child(n+3) { display: none; }
  #exf .toast { bottom: 116px; } /* deasupra barei fixe Telefon / WhatsApp / Email și a pastilei „Filtre” */
  #exf .btn { height: 36px; font-size: 12px; padding: 0 8px; }
  #exf .det-top { grid-template-columns: 1fr; }
  #exf .det-top img { max-width: 220px; margin: 0 auto; }
  /* Rânduri de filtre mai înalte: ținte de atingere de ~40 px */
  #exf .drawer .opt, #exf .drawer .sw, #exf .drawer .cat { padding: 9px 12px; font-size: 15px; }
  #exf .drawer .side-foot .btn { font-size: 14px; }
  #exf .empty { padding: 24px 16px; }
}
@media (max-width: 400px) {
  /* Fișa tehnică: „Adaugă la cererea de ofertă” + „Pagina produsului” nu încap alăturate */
  #exf .sheet-f { flex-direction: column; gap: 8px; }
  #exf .sheet-f .btn { width: 100%; }
}
