/* ============================================================
   DENT MASTER GLOBAL - shop.css (v2, light theme)
   Shop grid, filters, product detail, cart, checkout
   ============================================================ */

/* ---------- Toolbar / filters ---------- */
.shop-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-bottom: 2.4rem;
}
.filter-pills { display: flex; gap: 0.55rem; flex-wrap: wrap; }
.filter-pill {
  padding: 0.5rem 1.25rem;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transform: skewX(var(--skew));
  transition: all var(--dur-fast);
}
.filter-pill span { display: inline-block; transform: skewX(calc(var(--skew) * -1)); }
.filter-pill:hover { border-color: var(--red); color: var(--red); }
.filter-pill.is-active { background: var(--red-fill, var(--red)); border-color: var(--red); color: #fff; }
.shop-sort { display: flex; align-items: center; gap: 0.6rem; font-size: var(--text-sm); color: var(--text-dim); }
.shop-sort select {
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 8px;
  padding: 0.5rem 2.1rem 0.5rem 0.9rem; color: var(--text-strong); cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23616161' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.7rem center; background-size: 13px;
}

/* ---------- Account promo strip ---------- */
.account-promo { background: var(--red-fill, var(--red)); position: relative; overflow: hidden; }
.account-promo::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 60%, rgba(255,255,255,0.08) 60.5%, rgba(255,255,255,0.08) 74%, transparent 74.5%);
}
.account-promo__inner {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 1.4rem; flex-wrap: wrap;
  padding-block: 0.9rem; text-align: center;
}
.account-promo__inner > span { color: #fff; font-size: var(--text-sm); }
.account-promo strong { font-family: var(--font-display); letter-spacing: 0.03em; font-size: 1.05rem; text-transform: uppercase; }

/* ---------- Account page ---------- */
.account-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2.4rem; align-items: stretch; }
@media (max-width: 820px) { .account-layout { grid-template-columns: 1fr; } }

.account-offer {
  position: relative; overflow: hidden;
  background: var(--ink); color: #c9c9c9;
  border-radius: var(--radius);
  padding: clamp(1.8rem, 1.4rem + 2vw, 3rem);
  display: flex; flex-direction: column; justify-content: center;
}
.account-offer::before {
  content: ""; position: absolute; top: -30%; right: -10%; width: 60%; height: 160%;
  background: linear-gradient(115deg, transparent 42%, rgba(191,10,26,0.4) 42.5%, rgba(191,10,26,0.4) 56%, transparent 56.5%);
  transform: skewX(var(--skew));
}
.account-offer__badge {
  position: relative;
  align-self: flex-start;
  font-family: var(--font-display); font-weight: 700; font-style: italic;
  font-size: clamp(3rem, 2rem + 4vw, 5rem); line-height: 1; color: #fff;
}
.account-offer__badge em { color: var(--red); font-style: italic; }
.account-offer h2 { position: relative; color: #fff; margin-top: 0.8rem; }
.account-offer p { position: relative; color: #b9b9b9; margin-top: 0.9rem; font-size: var(--text-sm); }
.account-offer .checklist { position: relative; }
.account-offer .checklist li { color: #c9c9c9; }
.account-offer .checklist li strong { color: #fff; }

.account-consent { display: flex; gap: 0.55rem; align-items: flex-start; font-size: var(--text-xs); color: var(--text-dim); line-height: 1.4; }
.account-consent input { accent-color: var(--red); margin-top: 2px; }
.account-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.6rem; }
.account-tab {
  flex: 1; padding: 0.7rem 1rem; cursor: pointer;
  background: var(--bg-soft); border: 1.5px solid var(--line);
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-dim); transition: all var(--dur-fast);
}
.account-tab.is-active { background: var(--red-fill, var(--red)); border-color: var(--red); color: #fff; }
.account-panel { display: none; }
.account-panel.is-active { display: block; }
.account-dash { display: grid; gap: 1rem; }
.account-dash__welcome {
  background: var(--red-soft); border: 1px solid rgba(191,10,26,0.25); border-radius: var(--radius-sm);
  padding: 1.1rem 1.3rem;
}
.account-dash__welcome strong { color: var(--red); font-family: var(--font-display); font-size: 1.1rem; }
.account-dash__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (max-width: 480px) { .account-dash__grid { grid-template-columns: 1fr; } }
.account-stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.1rem 1.2rem; }
.account-stat strong { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--text-strong); line-height: 1; }
.account-stat span { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); }

/* ---------- Comenzile clientului ----------
   Starea vine de la panou, in timp real: aceeasi stare pe care o vede echipa
   in „Comenzi", nu un contor tinut in browser. */
.account-orders { margin-top: 2.2rem; }
.account-orders__title { font-family: var(--font-display); font-size: 1.15rem; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 1rem; }
.account-orders__empty { font-size: var(--text-sm); color: var(--text-dim); margin: 0; }
.account-orders__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.9rem; }
.order-row { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1.2rem; }
.order-row__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.order-row__head strong { font-family: var(--font-mono, monospace); font-size: 0.95rem; color: var(--text-strong); }
.order-row__status { font-family: var(--font-display); font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; padding: 0.25rem 0.6rem; border-radius: 999px; background: var(--surface-2, rgba(127,127,127,0.12)); color: var(--text-dim); white-space: nowrap; }
.order-row__status.is-new { background: rgba(59,130,246,0.14); color: #1d4ed8; }
.order-row__status.is-paid { background: rgba(168,85,247,0.14); color: #7e22ce; }
.order-row__status.is-shipped { background: rgba(245,158,11,0.16); color: #b45309; }
.order-row__status.is-done { background: rgba(34,197,94,0.16); color: #15803d; }
.order-row__status.is-cancelled { background: rgba(239,68,68,0.14); color: #b91c1c; }
.order-row__status.is-loading { opacity: 0.6; }
.order-row__body { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1.2rem; margin-top: 0.6rem; font-size: var(--text-sm); color: var(--text-dim); }
.order-row__total { font-weight: 600; color: var(--text-strong); }
.order-row__lines { list-style: none; padding: 0; margin: 0; flex: 1 1 100%; font-size: var(--text-xs); color: var(--text-faint); }
.order-row__wait { font-style: normal; color: #b45309; }
p.order-row__wait { flex: 1 1 100%; margin: 0; font-size: var(--text-xs); font-weight: 600; }
.order-row__track { flex: 1 1 100%; font-size: var(--text-xs); color: var(--text-strong); }

/* Comanda spre care trimite linkul din confirmare. Fara ea, omul ajungea pe o
   lista in care trebuia sa-si caute singur comanda tocmai plasata. */
.order-row.is-highlighted { border-color: var(--red); box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12); }

/* ---------- Classic shop layout (sidebar + main) ---------- */
.shop-layout { display: grid; grid-template-columns: 250px 1fr; gap: 2.4rem; align-items: start; }
@media (max-width: 900px) { .shop-layout { grid-template-columns: 1fr; } }

/* Sticky sidebar that never hides its own content: scrolls internally if taller than the viewport */
.shop-sidebar { position: sticky; top: 100px; align-self: start; max-height: calc(100dvh - 120px); overflow-y: auto; display: grid; gap: 1.6rem; padding-right: 2px; }
.shop-sidebar::-webkit-scrollbar { width: 6px; }
.shop-sidebar::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.shop-sidebar__head { display: none; }

/* Mobile: filters open in an off-canvas popup */
.filters-toggle { display: none; }
.filters-backdrop { display: none; }
@media (max-width: 900px) {
  .filters-toggle {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.55rem 1.1rem; border: 1.5px solid var(--line); background: var(--surface);
    font-family: var(--font-display); font-weight: 600; font-size: 0.92rem; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--text-strong); cursor: pointer; transform: skewX(var(--skew));
  }
  .filters-toggle > span { display: inline-flex; align-items: center; gap: 0.45rem; transform: skewX(calc(var(--skew) * -1)); }
  .filters-toggle svg { width: 16px; height: 16px; }

  /* Compact, always-visible filter (left) + sort (right) bar */
  .shop-toolbar {
    position: sticky; top: 64px; z-index: 40;
    margin: 0 0 1.1rem; padding: 0.5rem 0; background: var(--bg);
    display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
    box-shadow: 0 6px 12px -10px rgba(17,17,17,0.4);
  }
  .shop-toolbar [data-shop-count] { display: none; }
  .filters-toggle { padding: 0.42rem 0.85rem; font-size: 0.82rem; }
  .filters-toggle svg { width: 14px; height: 14px; }
  .shop-sort { gap: 0.4rem; font-size: 0.8rem; }
  .shop-sort label { display: none; }
  .shop-sort select { padding: 0.42rem 1.8rem 0.42rem 0.7rem; font-size: 0.82rem; }

  .shop-sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 95;
    width: min(340px, 88vw); max-height: 100dvh; overflow-y: auto;
    background: var(--bg-soft); padding: 1.1rem;
    grid-auto-rows: min-content; gap: 1.1rem;
    transform: translateX(-102%);
    transition: transform var(--dur) var(--ease-out);
    box-shadow: 0 0 60px -10px rgba(17,17,17,0.5);
  }
  .shop-sidebar.is-open { transform: none; }
  .shop-sidebar__head {
    display: flex; align-items: center; justify-content: space-between;
    font-family: var(--font-display); font-size: 1.2rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-strong);
    padding-bottom: 0.4rem; border-bottom: 2px solid var(--red);
  }
  .shop-sidebar__close {
    background: none; border: none; cursor: pointer; color: var(--text-dim);
    font-size: 1.8rem; line-height: 1; padding: 0 0.2rem;
  }
  .shop-sidebar__close:hover { color: var(--red); }
  .filters-backdrop {
    display: block; position: fixed; inset: 0; z-index: 94;
    background: rgba(17,17,17,0.5); opacity: 0; visibility: hidden;
    transition: opacity var(--dur), visibility var(--dur);
  }
  .filters-backdrop.is-open { opacity: 1; visibility: visible; }
  body.filters-lock { overflow: hidden; }
  .filter-group { padding: 1rem 1.1rem; }
}
.filter-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.3rem 1.4rem; }
.filter-group h4 {
  font-family: var(--font-display); font-size: 1.05rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-strong); margin-bottom: 1rem; padding-bottom: 0.7rem; border-bottom: 1px solid var(--line);
}
.filter-group h4::after { content: ""; display: block; width: 26px; height: 3px; background: var(--red-fill, var(--red)); transform: skewX(var(--skew)); margin-top: 0.55rem; }

.shop-search { position: relative; }
.shop-search input {
  width: 100%; background: var(--bg-soft); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem 0.7rem 2.3rem; color: var(--text-strong); transition: border-color var(--dur-fast);
}
.shop-search input:focus { outline: none; border-color: var(--red); }
.shop-search svg { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-faint); }

.filter-list { display: grid; gap: 0.15rem; }
/* Lista din interiorul unei categorii n-are randuri despartite prin linii:
   e o cale de intoarcere plus subcategoriile, nu un meniu de acelasi rang. */
.filter-list--incat { gap: 0.35rem; }

.shop-cat-row { border-bottom: 1px solid var(--line-soft); }
.shop-cat-row:last-child { border-bottom: none; }
.shop-cat-head { display: flex; align-items: center; }
.shop-cat {
  flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  background: none; border: none; cursor: pointer;
  padding: 0.55rem 0.6rem; border-radius: var(--radius-sm);
  font-size: var(--text-sm); font-weight: 500; color: var(--text-dim); text-align: left;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.shop-cat:hover { background: var(--bg-soft); color: var(--text-strong); }
.shop-cat.is-active { background: var(--red-soft); color: var(--red); font-weight: 600; }
.shop-cat em { font-style: normal; font-size: var(--text-xs); color: var(--text-faint); background: var(--bg-soft); padding: 0.1rem 0.5rem; border-radius: 99px; }
.shop-cat.is-active em { background: var(--red-fill, var(--red)); color: #fff; }
.shop-cat-toggle {
  flex: 0 0 auto; width: 28px; height: 28px; display: grid; place-items: center;
  background: none; border: none; cursor: pointer; color: var(--text-faint); border-radius: 6px;
}
.shop-cat-toggle:hover { color: var(--red); background: var(--bg-soft); }
.shop-cat-toggle svg { width: 15px; height: 15px; transition: transform var(--dur) var(--ease-out); }
.shop-cat-row.is-open .shop-cat-toggle svg { transform: rotate(180deg); }
.shop-subcats { list-style: none; margin: 0; padding: 0; display: none; }
.shop-cat-row.is-open .shop-subcats { display: block; padding: 0 0 0.5rem; }
.shop-subcats li { display: block; }
.shop-subcats a { display: block; padding: 0.38rem 0.6rem 0.38rem 1.5rem; font-size: 0.82rem; color: var(--text-dim); }
.shop-subcats a:hover { color: var(--red); }

/* In-category sidebar: back link + active category + static subcategory list */
.shop-cat-back {
  display: inline-flex; align-items: center; gap: 0.4rem; width: 100%;
  padding: 0.5rem 0.2rem; background: none; border: none; cursor: pointer;
  font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; letter-spacing: 0.03em;
  text-transform: uppercase; color: var(--text-dim); transition: color var(--dur-fast);
}
.shop-cat-back:hover { color: var(--red); }
.shop-cat-back svg { width: 15px; height: 15px; }
.shop-cat-current {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  padding: 0.55rem 0.7rem; margin-top: 0.2rem; border-radius: var(--radius-sm);
  background: var(--red-soft); color: var(--red);
  font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.02em;
}
.shop-cat-current em { font-style: normal; font-size: var(--text-xs); background: var(--red-fill, var(--red)); color: #fff; padding: 0.1rem 0.5rem; border-radius: 99px; }
.shop-subcats--static { display: block !important; padding: 0.6rem 0 0.1rem; }
.shop-subcats--static li { padding: 0.34rem 0.6rem 0.34rem 1.4rem; font-size: 0.82rem; color: var(--text-dim); position: relative; }
.shop-subcats--static li::before { content: ""; position: absolute; left: 0.6rem; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--line); }

/* Attribute facet filters (brand / colour / country) */
.shop-attrs { display: grid; gap: 1.1rem; }
.shop-attrs[hidden] { display: none; }
.attr-filter { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem 1.2rem; }
.attr-filter h4 {
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-strong); margin-bottom: 0.7rem;
}
.attr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; }
.attr-check { display: flex; align-items: center; gap: 0.55rem; padding: 0.34rem 0.2rem; cursor: pointer; font-size: 0.86rem; color: var(--text-dim); }
.attr-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.attr-check__box {
  flex: 0 0 auto; width: 18px; height: 18px; border: 1.5px solid var(--line); border-radius: 4px; background: var(--surface);
  display: grid; place-items: center; transition: border-color var(--dur-fast), background var(--dur-fast);
}
.attr-check__box::after {
  content: ""; width: 10px; height: 10px; transform: scale(0);
  background: #fff; transition: transform var(--dur-fast);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.attr-check input:checked + .attr-check__box { background: var(--red-fill, var(--red)); border-color: var(--red); }
.attr-check input:checked + .attr-check__box::after { transform: scale(1); }
.attr-check input:focus-visible + .attr-check__box { box-shadow: 0 0 0 3px var(--red-soft); }
.attr-check__label { flex: 1; }
.attr-check:hover .attr-check__label { color: var(--text-strong); }
.attr-check em { font-style: normal; font-size: var(--text-xs); color: var(--text-faint); }

/* Manual price entry boxes */
.price-inputs { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.9rem; }
.price-input { display: flex; align-items: center; gap: 0.25rem; flex: 1; min-width: 0; padding: 0.45rem 0.6rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); transition: border-color var(--dur-fast); }
.price-input:focus-within { border-color: var(--red); }
.price-input__cur { color: var(--text-faint); font-weight: 600; font-size: 0.85rem; }
.price-input input { width: 100%; min-width: 0; border: none; outline: none; background: none; font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; color: var(--text-strong); -moz-appearance: textfield; }
.price-input input::-webkit-outer-spin-button, .price-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.price-input__dash { color: var(--text-faint); font-weight: 700; }

/* Dual-thumb price range slider */
.price-slider { position: relative; height: 22px; margin: 0.3rem 0 0; }
.price-slider__rail { position: absolute; top: 9px; left: 0; right: 0; height: 4px; background: var(--line); border-radius: 2px; }
.price-slider__fill { position: absolute; top: 0; height: 100%; background: var(--red-fill, var(--red)); border-radius: 2px; }
.price-slider input[type="range"] {
  position: absolute; top: 0; left: 0; width: 100%; height: 22px; margin: 0;
  -webkit-appearance: none; appearance: none; background: transparent; pointer-events: none;
}
.price-slider input[type="range"]::-webkit-slider-runnable-track { height: 22px; background: none; border: none; }
.price-slider input[type="range"]::-moz-range-track { height: 22px; background: none; border: none; }
.price-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; pointer-events: auto;
  width: 18px; height: 18px; margin-top: 2px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--red); cursor: grab;
  box-shadow: 0 2px 6px rgba(17, 17, 17, 0.25);
}
.price-slider input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--red); cursor: grab;
  box-shadow: 0 2px 6px rgba(17, 17, 17, 0.25);
}
.price-slider input[type="range"]:active::-webkit-slider-thumb { cursor: grabbing; }
.price-slider input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(191, 10, 26, 0.2); }
.price-slider__values { display: flex; justify-content: space-between; margin-top: 0.7rem; font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; color: var(--text-strong); }

.sidebar-help {
  background: var(--ink); color: #c9c9c9; border-radius: var(--radius); padding: 1.3rem;
}
.sidebar-help h4 { color: #fff; font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.08em; font-size: 1rem; margin-bottom: 0.5rem; }
.sidebar-help p { font-size: var(--text-xs); color: #a9a9a9; margin-bottom: 0.9rem; }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; gap: 0.4rem; margin-top: 2.6rem; flex-wrap: wrap; }
.pager-btn {
  min-width: 40px; height: 40px; padding-inline: 0.6rem;
  display: grid; place-items: center;
  background: var(--surface); border: 1.5px solid var(--line); cursor: pointer;
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; color: var(--text-strong);
  transition: all var(--dur-fast);
}
.pager-btn:hover:not(:disabled):not(.is-active) { border-color: var(--red); color: var(--red); }
.pager-btn.is-active { background: var(--red-fill, var(--red)); border-color: var(--red); color: #fff; }
.pager-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- Product grid ---------- */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.product-grid--4 { grid-template-columns: repeat(4, 1fr); }
.shop-main .product-grid { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }
@media (max-width: 1080px) { .product-grid, .product-grid--4 { grid-template-columns: repeat(2, 1fr); } }
/* Mobile: two products per row */
@media (max-width: 620px) {
  .product-grid, .product-grid--4, .shop-main .product-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
  .product-card__body { padding: 0.85rem 0.85rem 1rem; gap: 0.35rem; }
  .product-card__title { font-size: 1rem; }
  .product-card__desc { font-size: 0.8rem; }
  .product-card__cat { font-size: 0.68rem; }
  .price { font-size: 1.2rem; }
  /* Keep price + button on one row; button becomes "Add" + cart icon */
  /* Un rand cand incape; altfel butonul trece sub pret. „Add" are 3 litere,
     dar „Hinzufügen", „Toevoegen" sau „Добавить" nu mai incap langa pret
     intr-un card de 170px si ieseau din card, taiate. */
  .product-card__foot { flex-wrap: wrap; gap: 0.5rem; }
  .product-card__foot .product-card__add { padding-inline: 0.7rem; max-width: 100%; letter-spacing: 0.06em; }
  .product-card__foot .product-card__add .cta-cart { display: inline-block; }
  .product-card__foot .product-card__add .cta-txt__rest { display: none; }
}
@media (max-width: 360px) {
  .product-grid, .product-grid--4, .shop-main .product-grid { grid-template-columns: 1fr; }
}

/* Related-items slider: 4 cards visible on desktop, 2 on mobile */
.product-slider {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: calc((100% - 3 * 1.5rem) / 4);
  gap: 1.5rem; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* dots + arrows replace the scrollbar */
}
.product-slider::-webkit-scrollbar { display: none; }
.product-slider > .product-card { scroll-snap-align: start; }
@media (max-width: 1080px) {
  .product-slider { grid-auto-columns: calc((100% - 1.5rem) / 2); }
}
@media (max-width: 620px) {
  .product-slider { grid-auto-columns: calc((100% - 0.8rem) / 2); gap: 0.8rem; }
}

/* Slider chrome: arrows + dot pagination */
.slider { position: relative; }
.slider__arrow {
  position: absolute; top: calc(50% - 1.2rem); transform: translateY(-50%); z-index: 6;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--text-strong); display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(17,17,17,0.35);
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast), opacity var(--dur-fast);
}
.slider__arrow--prev { left: -14px; }
.slider__arrow--next { right: -14px; }
.slider__arrow:hover { background: var(--red-fill, var(--red)); color: #fff; border-color: var(--red); }
.slider__arrow svg { width: 20px; height: 20px; }
.slider__arrow:disabled { opacity: 0; pointer-events: none; }
.slider__dots { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1.5rem; }
.slider__dot {
  width: 9px; height: 9px; padding: 0; border: none; border-radius: 50%;
  background: var(--line); cursor: pointer; transition: background var(--dur-fast), transform var(--dur-fast), width var(--dur-fast);
}
.slider__dot.is-active { background: var(--red-fill, var(--red)); width: 22px; border-radius: 99px; }
@media (max-width: 700px) {
  /* On touch screens: swipe + dots (arrows would overlap the cards) */
  .slider__arrow { display: none; }
  .slider__dots { margin-top: 1.1rem; }
}

/* ---------- Shop hero (light e-commerce) ---------- */
.shop-hero {
  background:
    radial-gradient(680px 300px at 90% -10%, var(--red-soft), transparent 65%),
    var(--bg-soft);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(1.4rem, 1rem + 1.5vw, 2.4rem) clamp(2rem, 1.6rem + 2vw, 3rem);
}
.shop-hero .breadcrumb--left { margin-bottom: 1.4rem; }
.shop-hero__inner { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(1.5rem, 1rem + 3vw, 4rem); align-items: center; }
/* Coloanele grilei cresc implicit pana la latimea minima a continutului;
   cu un titlu sau un buton lung (fr, pt) coloana trecea de ecran. */
.shop-hero__inner > * { min-width: 0; }
@media (max-width: 860px) { .shop-hero__inner { grid-template-columns: 1fr; gap: 1.6rem; } }
.shop-hero__intro h1 { font-size: clamp(1.9rem, 1.4rem + 2.4vw, 3.2rem); margin-top: 0.2rem; }
.shop-hero__intro p { color: var(--text-dim); margin-top: 0.8rem; max-width: 52ch; }
.shop-hero__search {
  display: flex; align-items: center; gap: 0.5rem; position: relative;
  margin-top: 1.4rem; max-width: 560px;
}
.shop-hero__search > svg { position: absolute; left: 1rem; width: 18px; height: 18px; color: var(--text-faint); pointer-events: none; }
/* `min-width: 0`: un camp flex nu coboara implicit sub latimea lui
   intrinseca (~20 de caractere). Pe 390px, cu „RECHERCHER" pe buton,
   formularul iesea la 415px si dadea scroll orizontal; acum campul cedeaza. */
.shop-hero__search input {
  flex: 1 1 0; min-width: 0; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.85rem 1rem 0.85rem 2.6rem; color: var(--text-strong);
}
.shop-hero__search input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(191,10,26,0.12); }
.shop-hero__search .btn { flex: 0 0 auto; max-width: 55%; }
/* Eticheta lunga (de, ru, pl) trece pe doua randuri in loc sa impinga campul. */
.shop-hero__search .btn span { white-space: normal; }
.shop-hero__usps { display: grid; gap: 0.7rem; }
.shop-hero__usps li { display: flex; align-items: center; gap: 0.7rem; font-size: var(--text-sm); color: var(--text-dim); }
.shop-hero__usps li strong { color: var(--text-strong); font-weight: 600; }
.shop-hero__usps svg { width: 22px; height: 22px; color: var(--red); flex: 0 0 auto; }
@media (max-width: 860px) {
  .shop-hero__usps { grid-template-columns: 1fr 1fr; }
  .shop-hero__search .btn span { display: inline; }
}
@media (max-width: 520px) {
  .shop-hero__usps { grid-template-columns: 1fr 1fr; gap: 0.5rem 1rem; }
  .shop-hero__usps li { font-size: 0.78rem; }
  .shop-hero__search .btn { padding-inline: 1rem; }
}

/* ---------- Category tiles with images (shop landing) ---------- */
.cat-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
@media (max-width: 1100px) { .cat-tiles { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px) { .cat-tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .cat-tiles { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; } }
.cat-tile {
  display: flex; flex-direction: column; gap: 0; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur), border-color var(--dur);
}
.cat-tile:hover { transform: translateY(-4px); box-shadow: 0 26px 46px -26px rgba(17,17,17,0.32); border-color: transparent; }
.cat-tile__media { display: block; aspect-ratio: 4 / 3; background: var(--bg-soft); overflow: hidden; }
.cat-tile__media img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; transition: transform var(--dur-slow) var(--ease-out); }
.cat-tile:hover .cat-tile__media img { transform: scale(1.05); }
.cat-tile__label {
  font-family: var(--font-display); font-weight: 600; font-size: 0.98rem; text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--text-strong); line-height: 1.15; text-align: center; padding: 0.85rem 0.6rem 0.2rem;
}
.cat-tile__count { font-size: var(--text-xs); color: var(--text-faint); text-align: center; padding: 0 0.6rem 0.9rem; }
/* Promo tile */
.cat-tile--promo { position: relative; }
.cat-tile--promo .cat-tile__media { aspect-ratio: auto; height: 100%; }
.cat-tile--promo .cat-tile__media img { mix-blend-mode: normal; }
.cat-tile--promo .cat-tile__label { position: absolute; left: 0; right: 0; bottom: 0; color: #fff; background: linear-gradient(transparent, rgba(17,17,17,0.85)); padding: 1.4rem 0.6rem 0.9rem; }
.cat-tile__promo-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: var(--ink); color: #fff; font-family: var(--font-display); font-weight: 600;
  font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; padding: 0.35rem 0.7rem; border-radius: 6px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur), border-color var(--dur);
}
/* Wishlist / compare buttons on the card */
.product-card__link { position: absolute; inset: 0; display: grid; place-items: center; }
.product-card__actions { position: absolute; top: 12px; right: 12px; z-index: 3; display: grid; gap: 0.4rem; opacity: 0; transform: translateX(6px); transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
.product-card:hover .product-card__actions { opacity: 1; transform: none; }
.pc-action {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; color: var(--text-strong);
  box-shadow: 0 6px 16px -8px rgba(17,17,17,0.35); transition: all var(--dur-fast);
}
.pc-action svg { width: 17px; height: 17px; }
.pc-action:hover { border-color: var(--red); color: var(--red); }
.pc-action.is-active { background: var(--red-fill, var(--red)); border-color: var(--red); color: #fff; }
.pc-action[data-wish].is-active svg { fill: #fff; }
@media (max-width: 900px) { .product-card__actions { opacity: 1; transform: none; } }
.product-card:hover { transform: translateY(-6px); box-shadow: 0 34px 60px -30px rgba(17, 17, 17, 0.3); border-color: transparent; }

.product-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(150deg, #f4f4f4, #e9e9e9);
  display: grid; place-items: center;
  overflow: hidden;
}
/* `contain`, nu `cover`: o vergea PDR lunga si subtire, decupata la 4:3,
   ramanea o pata alba in mijlocul cardului. Poza se vede intreaga, pe fundal
   alb (cel al fotografiilor), iar padding-ul o tine departe de margini. */
.product-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; padding: 0.75rem; background: #fff; transition: transform var(--dur-slow) var(--ease-out); }
.product-card:hover .product-card__media img { transform: scale(1.06); }
.product-card__media svg.picon { position: relative; width: 46%; height: auto; color: var(--text-strong); transition: transform var(--dur) var(--ease-out); }
.product-card:hover .product-card__media svg.picon { transform: scale(1.08) rotate(-2deg); color: var(--red); }

.product-card__badge {
  position: absolute; top: 14px; left: 14px; z-index: 1;
  padding: 0.3rem 0.85rem;
  background: var(--red-fill, var(--red)); color: #fff;
  font-family: var(--font-display);
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  transform: skewX(var(--skew));
}
.product-card__badge span { display: inline-block; transform: skewX(calc(var(--skew) * -1)); }
.product-card__badge--navy { background: var(--navy); }
/* Bleumarinul de noapte (#5b8ae0) e luminat pentru text; sub alb dadea 3,4:1. */
html[data-theme="dark"] .product-card__badge--navy { background: #3b6cc4; }

.product-card__body { padding: 1.35rem 1.35rem 1.45rem; display: flex; flex-direction: column; gap: 0.45rem; flex: 1; }
.product-card__cat { font-size: var(--text-xs); letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-faint); font-weight: 600; }
.product-card__title { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; line-height: 1.12; text-transform: uppercase; color: var(--text-strong); }
/* Cuvinte lungi in cardul de 170px de pe telefon („Профессиональный",
   „Ausbeulwerkzeug"): se despart in silabe dupa `lang`, altfel se rup. */
.product-card__title { overflow-wrap: anywhere; hyphens: auto; }
.product-card__title a:hover { color: var(--red); }
.product-card__desc { font-size: var(--text-sm); color: var(--text-dim); flex: 1; }
.product-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin-top: 0.8rem; }
/* Cart icon only shows on mobile, where the label collapses to "Add" */
.product-card__add .cta-cart { display: none; }
.product-card__add .cta-cart { width: 17px; height: 17px; flex: 0 0 auto; }
.price { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--text-strong); }
.price .from { font-size: 0.62em; color: var(--text-faint); font-weight: 600; margin-right: 3px; text-transform: uppercase; }

/* ---------- Product detail ---------- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 1.6rem + 2.5vw, 4.5rem); align-items: start; }
@media (max-width: 860px) { .product-detail { grid-template-columns: 1fr; } }
.product-detail__media {
  position: relative;
  border-radius: var(--radius);
  background: linear-gradient(150deg, #f4f4f4, #e7e7e7);
  aspect-ratio: 1 / 1;
  display: grid; place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
}
@media (max-width: 860px) { .product-detail__media { aspect-ratio: 1 / 1; } }
.product-detail__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center center; padding: 1.25rem; background: #fff; }
.product-detail__media svg.picon { position: relative; width: 46%; height: auto; color: var(--text-strong); }

.product-detail__info h1 { font-size: clamp(2rem, 1.5rem + 2vw, 3.1rem); }
.product-detail__price { display: flex; align-items: center; gap: 1rem; margin-block: 1.2rem; flex-wrap: wrap; }
.product-detail__price .price { font-size: 2.3rem; }
.product-detail__desc { color: var(--text-dim); }
.product-detail__specs { margin-block: 1.7rem; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.product-detail__specs div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.8rem 1.15rem; font-size: var(--text-sm); }
.product-detail__specs div:nth-child(odd) { background: var(--bg-soft); }
.product-detail__specs dt { color: var(--text-faint); }
.product-detail__specs dd { color: var(--text-strong); font-weight: 600; text-align: right; }

.qty {
  display: inline-flex; align-items: center;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}
.qty button {
  width: 42px; height: 46px;
  background: none; border: none; cursor: pointer;
  color: var(--text-dim); font-size: 1.25rem; font-weight: 700;
  transition: color var(--dur-fast), background var(--dur-fast);
}
.qty button:hover { color: var(--red); background: var(--bg-soft); }
.qty input {
  width: 52px; height: 46px; text-align: center;
  background: none; border: none;
  border-inline: 1.5px solid var(--line);
  color: var(--text-strong); font-weight: 700;
  -moz-appearance: textfield;
}
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; }
.product-detail__buy { display: flex; gap: 1.1rem; flex-wrap: wrap; align-items: center; margin-top: 0.6rem; }
.product-detail__trust { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 1.7rem; font-size: var(--text-xs); color: var(--text-faint); font-weight: 500; }
.product-detail__trust span { display: flex; align-items: center; gap: 0.45rem; }
.product-detail__trust svg { width: 16px; height: 16px; color: var(--red); }

/* ---------- Enriched single product ---------- */
.product-single-section { padding-top: clamp(1.2rem, 0.8rem + 1.5vw, 2.2rem); }
.breadcrumb--left { justify-content: flex-start; text-align: left; color: var(--text-faint); margin-bottom: 1.6rem; }
@media (max-width: 640px) {
  .breadcrumb--trim { flex-wrap: nowrap; overflow: hidden; font-size: 0.72rem; }
  .breadcrumb--trim a, .breadcrumb--trim span { white-space: nowrap; }
  .breadcrumb--trim span:last-child { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
}
.product-detail__gallery { position: sticky; top: 92px; align-self: start; }
@media (max-width: 860px) { .product-detail__gallery { position: static; } }
.product-detail__media { position: relative; }
.product-detail__media .product-card__badge { top: 14px; left: 14px; }
.product-detail__rating { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.3rem; font-size: var(--text-sm); color: var(--text-dim); }
.product-detail__rating .stars { color: var(--red); letter-spacing: 1px; font-size: 1.05rem; }
.stock-badge { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--font-display); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #15803d; }
.stock-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.2); }

/* Starea stocului, asa cum o calculeaza panoul din cantitatile reale.
   Verdele ramane valoarea implicita; celelalte doua stari se citesc dintr-o
   privire, fara sa fie nevoie de citit textul. */
.stock-badge--low { color: #b45309; }
.stock-badge--low .stock-dot { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,0.2); }
.stock-badge--out { color: #b91c1c; }
.stock-badge--out .stock-dot { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.2); }

/* Acelasi lucru pe cardul din grila, unde nu e loc de o insigna intreaga. */
.product-card__stock { display: inline-block; margin-top: 0.5rem; font-family: var(--font-display); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #b91c1c; }
/* Precomandă / la comandă: se vinde, deci chihlimbar ca „stoc redus", nu roșu ca „epuizat". */
.product-card__stock--wait { color: #b45309; text-transform: none; letter-spacing: 0.02em; }
.stock-badge__lead { font-weight: 500; opacity: 0.85; }
.cart-item__meta--wait { color: #b45309; font-weight: 600; }
.summary__wait { display: block; margin-top: 0.15rem; font-size: 0.75rem; color: #b45309; }
/* Miniaturile galeriei. Apar doar cand produsul are mai mult de o poza –
   pana acum se afisa doar prima, oricate ar fi fost incarcate in panou. */
.product-detail__thumbs { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.9rem; }
.product-detail__thumb {
  width: 64px; height: 64px; padding: 0; overflow: hidden; cursor: pointer;
  border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
  transition: border-color var(--dur-fast);
}
.product-detail__thumb img { width: 100%; height: 100%; object-fit: contain; padding: 3px; background: #fff; display: block; }
.product-detail__thumb:hover { border-color: var(--text-dim); }
.product-detail__thumb.is-active { border-color: var(--red); }

.product-detail__highlights { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: 0.6rem; }
.product-detail__highlights li { position: relative; padding-left: 1.5rem; font-size: var(--text-sm); color: var(--text-dim); }
.product-detail__highlights li strong { color: var(--text-strong); font-weight: 600; }
.product-detail__highlights li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 15px; height: 15px;
  background: var(--red-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23bf0a1a' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 10px no-repeat;
  border-radius: 4px;
}
.product-detail .product-detail__meta { list-style: none; padding: 2.3rem 0 0; margin: 3.2rem 0 0; border-top: 1px solid var(--line); display: grid; gap: 0.7rem; }
.product-detail__meta li { display: flex; gap: 0.8rem; font-size: var(--text-sm); }
.product-detail__meta li span { color: var(--text-faint); min-width: 96px; }
.product-detail__meta li strong { color: var(--text-strong); font-weight: 600; }
.product-detail__meta a:hover { color: var(--red); }

/* Product tabs */
.product-tabs { margin-top: clamp(2.5rem, 2rem + 2vw, 4rem); }
.product-tabs__nav { display: flex; gap: 0.4rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.product-tab {
  background: none; border: none; cursor: pointer; padding: 0.9rem 1.1rem; margin-bottom: -1px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--text-dim); border-bottom: 3px solid transparent; transition: color var(--dur-fast), border-color var(--dur-fast);
}
.product-tab:hover { color: var(--text-strong); }
.product-tab.is-active { color: var(--red); border-bottom-color: var(--red); }
.product-tabs__panel { display: none; padding-top: 1.6rem; max-width: 820px; }
.product-tabs__panel.is-active { display: block; }
.product-tabs__panel p { color: var(--text-dim); margin-bottom: 1rem; }
.product-tabs__panel .product-detail__specs { margin: 0; }

@media (max-width: 860px) {
  .product-detail { gap: 1.4rem; }
  /* Image sits directly under the breadcrumb, in normal flow (never sticky/over the header).
     Keep the media RELATIVE so its absolutely-positioned <img> still fills the 4/3 box. */
  .product-detail__gallery { position: static; top: auto; margin-top: 0; }
  .product-detail__media { position: relative; }
  .product-detail__info h1 { font-size: clamp(1.5rem, 1.2rem + 3vw, 2rem); }
  .product-detail__price .price { font-size: 1.9rem; }
  .product-detail__buy { gap: 0.7rem; }
  .product-detail__buy .btn { flex: 1; min-width: 130px; }
  .product-detail__trust { gap: 1rem 1.2rem; margin-top: 1.3rem; }
  .product-detail .product-detail__meta { margin-top: 2.4rem; padding-top: 1.8rem; }
  /* Keep the three tabs on a single row */
  .product-tabs__nav { flex-wrap: nowrap; gap: 0; }
  .product-tab { flex: 1 1 0; padding: 0.7rem 0.3rem; font-size: 0.78rem; text-align: center; white-space: nowrap; }
  .product-tabs__panel { padding-top: 1.2rem; }
}

/* ---------- Cart ---------- */
.cart-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 2.4rem; align-items: start; }
/* Cosul gol inlocuieste tot continutul paginii, deci grila de doua coloane
   n-are ce imparti: ascunderea sumarului lasa a doua coloana goala, iar
   mesajul se centra IN prima. Vezi si `.checkout-layout.is-done`. */
.cart-layout.is-empty { display: block; }
@media (max-width: 900px) { .cart-layout { grid-template-columns: 1fr; } }

.cart-items { display: grid; gap: 1rem; }
.cart-item {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 1.2rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
}
.cart-item__thumb {
  width: 96px; height: 78px;
  border-radius: var(--radius-sm);
  background: linear-gradient(150deg, #f4f4f4, #e9e9e9);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  overflow: hidden;
  position: relative;
}
.cart-item__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 4px; background: #fff; }
.cart-item__thumb svg.picon { width: 42%; color: var(--text-strong); }
.cart-item__name { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; text-transform: uppercase; color: var(--text-strong); line-height: 1.15; }
.cart-item__name a:hover { color: var(--red); }
.cart-item__meta { font-size: var(--text-xs); color: var(--text-faint); margin-top: 0.25rem; }
.cart-item__controls { display: flex; align-items: center; gap: 1.2rem; }
.cart-item__controls .qty button { height: 38px; width: 34px; }
.cart-item__controls .qty input { height: 38px; width: 44px; }
.cart-item__line-price { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; min-width: 92px; text-align: right; color: var(--text-strong); }
.cart-item__remove {
  background: none; border: none; cursor: pointer;
  color: var(--text-faint); display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 8px;
  transition: color var(--dur-fast), background var(--dur-fast);
}
.cart-item__remove:hover { color: var(--red); background: var(--red-soft); }
.cart-item__remove svg { width: 17px; height: 17px; }
@media (max-width: 620px) {
  .cart-item { grid-template-columns: 72px 1fr; }
  .cart-item__thumb { width: 72px; height: 60px; }
  .cart-item__controls { grid-column: 1 / -1; justify-content: space-between; }
}

/* `max-width` + `margin-inline: auto`: blocul gol apare si in pagini fara
   grila, unde altfel s-ar fi intins pe toata latimea, si in cele cu grila, unde
   trebuie sa fie centrat pe pagina, nu pe coloana. */
.cart-empty { max-width: 640px; margin-inline: auto; text-align: center; padding: 4rem 1.5rem; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--surface); }
.cart-empty svg { width: 60px; height: 60px; color: var(--text-faint); margin: 0 auto 1.2rem; }
.cart-empty h3 { margin-bottom: 0.5rem; }
.cart-empty p { color: var(--text-dim); font-size: var(--text-sm); margin-bottom: 1.8rem; }

/* ---------- Summary ---------- */
.summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  border-radius: var(--radius);
  padding: 1.9rem 1.7rem;
  position: sticky; top: 110px;
  box-shadow: 0 30px 60px -35px rgba(17, 17, 17, 0.2);
}
.summary h3 { font-size: 1.3rem; letter-spacing: 0.08em; margin-bottom: 1.3rem; }
.summary__row { display: flex; justify-content: space-between; padding-block: 0.55rem; font-size: var(--text-sm); color: var(--text-dim); }
.summary__row strong { color: var(--text-strong); }
.summary__row--total { border-top: 1px solid var(--line); margin-top: 0.7rem; padding-top: 1.1rem; font-size: 1rem; }
/* Randul de reducere se adauga din JS si nu avea nicio regula: aparea in
   gri de nota de subsol, la fel ca „Subtotal" si „TVA". Singura linie din
   sumar care scade bani trebuie sa se vada ca atare. */
.summary__row--discount strong { color: #16a34a; font-variant-numeric: tabular-nums; }

.summary__row--total strong { font-family: var(--font-display); font-size: 1.7rem; color: var(--red); }
.summary .btn { margin-top: 1.4rem; }
.summary__note { font-size: var(--text-xs); color: var(--text-faint); margin-top: 1rem; text-align: center; }

/* ---------- Checkout ---------- */
.checkout-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 2.4rem; align-items: start; }
/* Confirmarea inlocuieste tot continutul paginii, deci grila de doua coloane
   n-are ce imparti: blocul ramanea in prima coloana, iar `margin-inline: auto`
   il centra IN coloana – adica vizibil spre stanga paginii. */
.checkout-layout.is-done { display: block; }
@media (max-width: 900px) { .checkout-layout { grid-template-columns: 1fr; } }
.checkout-section { margin-bottom: 2rem; }
.checkout-section h3 {
  font-size: 1.25rem; letter-spacing: 0.08em;
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1.15rem;
}
.checkout-section h3 span {
  width: 30px; height: 30px;
  background: var(--red-fill, var(--red)); color: #fff;
  font-size: 0.95rem;
  display: grid; place-items: center;
  transform: skewX(var(--skew));
}
.checkout-section h3 span i { font-style: normal; display: inline-block; transform: skewX(calc(var(--skew) * -1)); }
.summary__items { display: grid; gap: 0.75rem; margin-bottom: 1rem; }
.summary__item { display: flex; justify-content: space-between; gap: 1rem; font-size: var(--text-sm); }
.summary__item span { color: var(--text-dim); }
.summary__item span em { font-style: normal; color: var(--text-faint); }
.summary__item strong { white-space: nowrap; color: var(--text-strong); }

.pay-options { display: grid; gap: 0.75rem; }
.pay-option {
  display: flex; align-items: center; gap: 0.95rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  cursor: pointer;
  background: var(--surface);
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.pay-option:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.pay-option input { accent-color: var(--red); width: 17px; height: 17px; }
.pay-option strong { font-size: var(--text-sm); display: block; color: var(--text-strong); }
.pay-option small { color: var(--text-faint); font-size: var(--text-xs); }

/* ---------- Order confirmation ---------- */
.order-done { max-width: 640px; margin-inline: auto; text-align: center; padding-block: 2.5rem; }
.order-done__icon {
  width: 88px; height: 88px; margin: 0 auto 1.7rem;
  border-radius: 50%;
  background: #f0fdf4;
  border: 2px solid #16a34a;
  display: grid; place-items: center;
  color: #16a34a;
  animation: pop-in 0.5s var(--ease-out);
}
.order-done__icon svg { width: 40px; height: 40px; }
@keyframes pop-in { from { transform: scale(0.4); opacity: 0; } }
.order-done p { color: var(--text-dim); margin-top: 0.9rem; }
.order-done .order-ref { font-family: var(--font-display); color: var(--red); font-weight: 700; font-size: 1.15em; }

/* ---------- Compare table ---------- */
.compare-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.compare-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.compare-table th, .compare-table td { padding: 0.9rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-soft); font-size: var(--text-sm); }
.compare-table thead th { border-bottom: 2px solid var(--line); background: var(--bg-soft); vertical-align: top; }
.compare-table__rowhead { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint); font-size: 0.8rem; background: var(--bg-soft); position: sticky; left: 0; z-index: 1; white-space: nowrap; }
.compare-table tbody tr:nth-child(odd) td { background: rgba(0,0,0,0.015); }
.compare-table tbody td { color: var(--text-strong); }
.compare-table thead th { width: 220px; }
.compare-table thead th.compare-table__rowhead { width: 130px; }
.compare-col { position: relative; display: grid; gap: 0.6rem; justify-items: center; text-align: center; }
.compare-col__rm { position: absolute; top: -4px; right: -4px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--text-faint); font-size: 1.1rem; line-height: 1; z-index: 2; }
.compare-col__rm:hover { color: var(--red); border-color: var(--red); }
.compare-col__media { width: 100%; height: 210px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; }
.compare-col__media img { width: 100%; height: 100%; object-fit: contain; object-position: center center; padding: 0.6rem; background: #fff; }
.compare-col__media svg.picon { width: 44%; color: var(--text-strong); }
/* Empty compare slots – always keep 4 columns so a lone product can't stretch wide */
.compare-th--empty { vertical-align: top; }
.compare-col--empty { display: grid; gap: 0.6rem; justify-items: center; text-align: center; text-decoration: none; }
.compare-col__media--empty {
  width: 100%; height: 210px; border-radius: var(--radius-sm);
  border: 2px dashed var(--line); background: var(--bg-soft);
  display: grid; place-items: center; color: var(--text-faint);
  transition: border-color var(--dur-fast), color var(--dur-fast);
}
.compare-col--empty:hover .compare-col__media--empty { border-color: var(--red); color: var(--red); }
.compare-col__media--empty svg { width: 30px; height: 30px; }
.compare-col__name--empty { font-family: var(--font-display); font-weight: 600; font-size: 0.98rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint); }
.compare-col__addhint { font-size: var(--text-xs); color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.compare-col--empty:hover .compare-col__addhint { color: var(--red); }
.compare-cell--empty { text-align: center; color: var(--text-faint); }
/* Sticky row-label column must stay fully opaque so product text can't bleed
   through it while the table scrolls horizontally. */
.compare-table thead tr th.compare-table__rowhead,
.compare-table tbody tr td.compare-table__rowhead {
  background: var(--surface); z-index: 3; box-shadow: 2px 0 5px -3px rgba(17,17,17,0.18);
}
@media (max-width: 640px) {
  .compare-table thead th { width: 150px; }
  .compare-table thead th.compare-table__rowhead { width: 76px; }
  .compare-table__rowhead { font-size: 0.7rem; padding: 0.7rem 0.6rem; }
  .compare-table th, .compare-table td { padding: 0.7rem 0.6rem; }
  .compare-col__media, .compare-col__media--empty { height: 96px; }
  .compare-col__name { font-size: 0.86rem; }
}
.compare-col__name { font-family: var(--font-display); font-weight: 600; font-size: 0.98rem; text-transform: uppercase; line-height: 1.15; color: var(--text-strong); min-height: 2.3em; }
.compare-col__name:hover { color: var(--red); }
.compare-col__price .price { font-size: 1.3rem; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 90;
  background: var(--ink);
  color: #fff;
  border-left: 4px solid var(--red);
  border-radius: var(--radius-sm);
  padding: 1rem 1.35rem;
  display: flex; align-items: center; gap: 0.85rem;
  font-size: var(--text-sm); font-weight: 500;
  box-shadow: 0 26px 55px -18px rgba(17, 17, 17, 0.55);
  transform: translateY(20px); opacity: 0; visibility: hidden;
  transition: all var(--dur) var(--ease-out);
  max-width: min(380px, calc(100vw - 48px));
}
.toast.is-visible { transform: none; opacity: 1; visibility: visible; }
.toast svg { width: 18px; height: 18px; color: #4ade80; flex: 0 0 auto; }
.toast a { color: #ff8a95; text-decoration: underline; }

/* ---------------------------------------------------------------
   Finalizarea comenzii – capcana pentru roboți și mesajul de eroare
   --------------------------------------------------------------- */

/* Scos din pagină, nu ascuns cu `display:none` sau `type="hidden"`: un
   robot le sare pe alea două, dar completează un câmp text obișnuit pe
   care browserul îl are în DOM. Un om nu-l vede și nu-l poate tasta. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.checkout-error {
  margin: 1.2rem 0 0;
  padding: .85rem 1.05rem;
  border: 1px solid rgba(180, 35, 40, .35);
  border-left: 3px solid #b42328;
  border-radius: 6px;
  background: rgba(180, 35, 40, .07);
  color: #8d1c20;
  font-size: .92rem;
  line-height: 1.5;
}

.checkout-error[hidden] { display: none; }

/* Cât timp comanda e pe drum, butonul spune ce se întâmplă și nu mai poate
   fi apăsat. Fără asta, un al doilea clic pe o rețea lentă înseamnă două
   comenzi și marfă rezervată de două ori. */
[data-checkout-submit][disabled] {
  opacity: .6;
  cursor: progress;
  pointer-events: none;
}

.order-done__meta {
  margin: 1.4rem auto 0;
  max-width: 26rem;
  border-top: 1px solid rgba(0, 0, 0, .1);
  padding-top: 1.1rem;
  text-align: left;
  font-size: .94rem;
}

.order-done__meta div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .3rem 0;
}

.order-done__meta strong { font-variant-numeric: tabular-nums; }
