:root {
  --bg: #f5f3ef;
  --card: #ffffff;
  --ink: #17181a;
  --muted: #6b6d72;
  --line: #e2dfd8;
  --dark: #17181a;
  --buy: #1f9d55;
  --buy-hover: #178046;
  --sale: #c8372d;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 Manrope, system-ui, -apple-system, Segoe UI, sans-serif;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }

/* Antet */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 16px;
  background: var(--dark); color: #fff;
}
.logo { font-weight: 800; letter-spacing: .12em; text-decoration: none; font-size: 18px; }
.logo span { font-weight: 400; opacity: .7; margin-left: 4px; }
.call {
  margin-left: auto; padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.12); text-decoration: none;
  font-size: 14px; font-weight: 700; white-space: nowrap;
}
@media (max-width: 560px) {
  .top { flex-wrap: wrap; }
  .cats { order: 3; width: 100%; }
}
.cart-btn {
  position: relative; padding: 6px 10px; border-radius: 999px;
  background: rgba(255,255,255,.12); text-decoration: none; font-size: 16px;
}
.cart-btn b {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--buy); color: #fff;
  font-size: 11px; line-height: 18px; text-align: center;
}
.cats { display: flex; gap: 4px; overflow-x: auto; }
.cats a {
  padding: 6px 12px; border-radius: 999px; text-decoration: none;
  font-size: 14px; font-weight: 600; white-space: nowrap; opacity: .75;
}
.cats a.on { background: #fff; color: var(--dark); opacity: 1; }

main { max-width: 1180px; margin: 0 auto; padding: 20px 16px 48px; }

/* Catalog */
.hero { margin: 4px 0 20px; }
.hero h1 { margin: 0; font-size: clamp(24px, 5vw, 36px); line-height: 1.15; letter-spacing: -.01em; }
.hero p { margin: 6px 0 0; color: var(--muted); }

.subs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; }
.subs button {
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
}
.subs button.on { background: var(--dark); color: #fff; border-color: var(--dark); }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
@media (min-width: 1020px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.card {
  display: flex; flex-direction: column;
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.card .pic { position: relative; aspect-ratio: 3 / 4; background: #e9e6e0; }
.card .pic img { width: 100%; height: 100%; object-fit: cover; }
.badge {
  position: absolute; left: 8px; top: 8px;
  background: rgba(23,24,26,.82); color: #fff;
  font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
}
.card .info { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.card .sub { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.card .name { font-weight: 600; font-size: 15px; line-height: 1.3; }
.card .sizes { font-size: 13px; color: var(--muted); }

.price { font-weight: 800; font-size: 17px; margin-top: 4px; }
.price s { color: var(--muted); font-weight: 500; font-size: .85em; margin-left: 6px; }
.price.sale { color: var(--sale); }
.deal {
  display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 6px;
  background: #fff1d6; color: #7a4b00; font-size: 13px; font-weight: 700;
}

/* Pagina produsului */
.back { display: inline-block; margin-bottom: 14px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; }
.product { display: grid; gap: 24px; }
@media (min-width: 900px) { .product { grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; } }

.gallery { min-width: 0; }
.slides {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  border-radius: var(--radius); background: #e9e6e0; scrollbar-width: none;
}
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 3 / 4; }
.slide img, .slide video { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 2px; }
.thumbs button {
  position: relative; flex: 0 0 64px; height: 80px; padding: 0;
  border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: #e9e6e0;
}
.thumbs button.on { border-color: var(--dark); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.thumbs .play {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; font-size: 20px; background: rgba(0,0,0,.25);
}

@media (min-width: 900px) { .details { position: sticky; top: 84px; } }
.details h1 { margin: 2px 0 6px; font-size: clamp(22px, 4vw, 30px); line-height: 1.2; }
.details .price { font-size: 26px; }
.code { color: var(--muted); font-size: 14px; }

.opt { margin-top: 18px; }
.opt h3 { margin: 0 0 8px; font-size: 14px; font-weight: 700; }
.opt h3 span { color: var(--muted); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button {
  min-width: 52px; padding: 9px 14px;
  border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--ink); font-weight: 600;
}
.chips button.on { border-color: var(--dark); background: var(--dark); color: #fff; }
.opt.err h3 { color: var(--sale); }

.buy {
  width: 100%; margin-top: 22px; padding: 16px;
  border: 0; border-radius: 12px;
  background: var(--buy); color: #fff; font-size: 17px; font-weight: 800;
}
.buy:hover { background: var(--buy-hover); }
.buy:disabled { opacity: .6; cursor: wait; }
.add {
  width: 100%; margin-top: 10px; padding: 14px;
  border: 1.5px solid var(--dark); border-radius: 12px;
  background: transparent; color: var(--ink); font-size: 16px; font-weight: 700;
}

/* Oferta 1 / 2 bucăți */
.offer { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.offer button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 12px 14px; text-align: left;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink);
}
.offer button.on { border-color: var(--dark); box-shadow: inset 0 0 0 1px var(--dark); }
.offer b { font-size: 15px; }
.offer span { font-weight: 800; font-size: 17px; }
.offer em { font-style: normal; font-size: 12px; font-weight: 700; color: #7a4b00; background: #fff1d6; padding: 1px 6px; border-radius: 6px; }
.piece.multi { margin-top: 14px; padding: 2px 14px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }

/* Coș */
.cart-wrap { display: grid; gap: 20px; }
@media (min-width: 900px) { .cart-wrap { grid-template-columns: 1.3fr 1fr; align-items: start; } }
.cart { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cart li {
  display: grid; grid-template-columns: 80px 1fr auto; gap: 12px; align-items: start;
  padding: 10px; background: var(--card); border-radius: var(--radius);
}
.cart img { width: 80px; height: 100px; object-fit: cover; border-radius: 10px; }
.ci { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.ci b { font-size: 15px; }
.ci span { color: var(--muted); }
.ci .qty { margin-top: 6px; align-self: flex-start; }
.rm { border: 0; background: none; color: var(--muted); font-size: 16px; padding: 4px 8px; }
.more { display: inline-block; margin-top: 12px; font-weight: 700; text-decoration: none; }
.saved { margin: 0 0 4px; color: #7a4b00; font-weight: 700; font-size: 14px; }
.order .price { margin-bottom: 14px; font-size: 22px; }

.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 20;
  padding: 12px 18px; border-radius: 12px; background: var(--dark); color: #fff;
  font-weight: 600; font-size: 15px; box-shadow: 0 8px 24px rgba(0,0,0,.2); white-space: nowrap;
}
.toast a { color: #8ee3b0; margin-left: 8px; }

.order {
  margin-top: 18px; padding: 18px;
  background: var(--card); border-radius: var(--radius); border: 1px solid var(--line);
}
.order h2 { margin: 0 0 4px; font-size: 18px; }
.order .sum { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.field input, .field textarea {
  width: 100%; padding: 12px; font: inherit;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--dark); }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 10px; }
.qty button { width: 40px; height: 40px; border: 0; background: none; font-size: 18px; }
.qty b { min-width: 28px; text-align: center; }
.msg { margin: 10px 0 0; font-size: 14px; color: var(--sale); }
.done {
  margin-top: 18px; padding: 20px; border-radius: var(--radius);
  background: #e7f6ee; border: 1px solid #b9e3cb;
}
.done h2 { margin: 0 0 4px; font-size: 18px; }
.done p { margin: 0; }

.desc { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.desc h3 { margin: 0 0 8px; font-size: 15px; }
.desc p { margin: 0; white-space: pre-line; color: #33353a; }

.empty { padding: 40px 0; color: var(--muted); text-align: center; }

.foot { padding: 28px 16px 32px; text-align: center; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }
.foot h2 { margin: 0 0 6px; color: var(--ink); font-size: 16px; }
.foot-phone { display: inline-block; color: var(--ink); font-size: 22px; font-weight: 800; text-decoration: none; }
.foot-note { margin: 2px 0 14px; font-size: 14px; }
.socials { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.socials a {
  padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--ink); font-weight: 700; font-size: 14px; text-decoration: none;
}
.socials a:hover { border-color: var(--dark); }
