:root {
  --bg: #120608;
  --bg-2: #1c0a0e;
  --panel: #230d12;
  --panel-2: #2e1117;
  --line: rgba(255, 228, 220, .12);
  --crimson: #b3122e;
  --wine: #6a0b1b;
  --hot: #ff3348;
  --hot-2: #e01f36;
  --cheese: #ffc21f;
  --text: #fff6f0;
  --muted: #d8b9b5;
  --green: #3ccf6b;
  --radius: 18px;
  --display: "Luckiest Guy", "Rubik", system-ui, sans-serif;
  --body: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 130px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--body); color: var(--text); background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 15% -10%, rgba(179, 18, 46, .55), transparent 60%),
    radial-gradient(900px 500px at 100% 10%, rgba(106, 11, 27, .7), transparent 60%);
  background-attachment: fixed; line-height: 1.45; min-height: 100vh;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }
[hidden] { display: none !important; }

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(18, 6, 8, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 6px; text-decoration: none; margin-right: auto; }
.brand-img { height: 40px; width: auto; }
.brand-goat { font-family: var(--display); font-size: 30px; color: transparent; -webkit-text-stroke: 1.6px var(--hot); letter-spacing: 1px; transform: rotate(-4deg); display: inline-block; }
.brand-wraps { font-family: var(--display); font-size: 20px; color: var(--text); letter-spacing: 1px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); }
.status-pill i { width: 8px; height: 8px; border-radius: 50%; background: #777; }
.status-pill.is-open i { background: var(--green); box-shadow: 0 0 0 3px rgba(60, 207, 107, .2); }
.status-pill.is-closed i { background: var(--hot); }
.top-call { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 600; font-size: 14px; padding: 8px 10px; border-radius: 12px; }
.top-call:hover { background: var(--panel); }
.cart-btn { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; border: 0; background: var(--hot); color: #fff; box-shadow: 0 6px 18px rgba(255, 51, 72, .35); }
.cart-count { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--cheese); color: #1b0a0c; font-size: 12px; font-weight: 700; display: grid; place-items: center; }

/* Hero */
.hero { max-width: 1120px; margin: 0 auto; padding: 40px 16px 24px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; align-items: center; }
.hero-kicker { display: inline-block; margin: 0 0 14px; font-size: 13px; font-weight: 600; color: var(--cheese); background: rgba(255, 194, 31, .1); border: 1px solid rgba(255, 194, 31, .25); padding: 5px 12px; border-radius: 99px; }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(40px, 7vw, 76px); line-height: .98; margin: 0 0 14px; letter-spacing: .5px; text-shadow: 0 4px 0 rgba(0, 0, 0, .35); }
.hero h1 span { color: var(--hot); display: block; font-size: .62em; margin-top: 6px; }
.hero-sub { color: var(--muted); font-size: 17px; max-width: 34ch; margin: 0 0 20px; }
.hero-modes { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.mode { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; display: grid; }
.mode b { font-size: 15px; }
.mode span { font-size: 13px; color: var(--muted); }
.hero-art { display: grid; place-items: center; }
.hero-wrap { width: 100%; max-width: 380px; height: auto; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .5)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px) rotate(-2deg); } }
@media (prefers-reduced-motion: reduce) { .hero-wrap { animation: none; } html { scroll-behavior: auto; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; border: 0; border-radius: 14px; padding: 14px 22px; font-weight: 700; font-size: 16px; transition: transform .12s, background .12s, opacity .12s; }
.btn:active { transform: scale(.98); }
.btn-hot { background: var(--hot); color: #fff; box-shadow: 0 8px 22px rgba(255, 51, 72, .3); }
.btn-hot:hover { background: var(--hot-2); }
.btn-ghost { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.demo-banner { max-width: 1120px; margin: 0 auto 12px; padding: 10px 16px; font-size: 14px; color: #1b0a0c; background: var(--cheese); border-radius: 12px; width: calc(100% - 32px); }

/* Category nav */
.cat-nav { position: sticky; top: 64px; z-index: 30; background: rgba(18, 6, 8, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.cat-nav-inner { max-width: 1120px; margin: 0 auto; padding: 10px 16px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.cat-nav-inner::-webkit-scrollbar { display: none; }
.cat-chip { flex: 0 0 auto; text-decoration: none; font-family: var(--display); letter-spacing: .6px; font-size: 16px; padding: 9px 16px 7px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); white-space: nowrap; }
.cat-chip.active { background: var(--hot); border-color: var(--hot); }

/* Menu */
.menu { max-width: 1120px; margin: 0 auto; padding: 8px 16px 40px; }
.cat-section { padding-top: 26px; }
.cat-title { font-family: var(--display); font-weight: 400; font-size: clamp(28px, 4.5vw, 40px); margin: 0 0 14px; letter-spacing: 1px; display: flex; align-items: center; gap: 12px; }
.cat-title::after { content: ""; flex: 1; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--hot), transparent); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.card {
  position: relative; display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: start;
  background: linear-gradient(160deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
  transition: border-color .15s, transform .15s;
}
.card:hover { border-color: rgba(255, 51, 72, .45); }
.card-img { width: 96px; height: 96px; border-radius: 14px; background: radial-gradient(circle at 50% 40%, #8e1226, #3b0912); display: grid; place-items: center; overflow: hidden; }
.card-img svg { width: 88px; height: 70px; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card h3 { font-family: var(--display); font-weight: 400; font-size: 20px; letter-spacing: .5px; margin: 2px 0 4px; line-height: 1.1; }
.card p { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.price { font-family: var(--display); font-size: 22px; letter-spacing: .5px; }
.price small { font-family: var(--body); font-size: 13px; color: var(--muted); font-weight: 500; }
.sizes { display: inline-flex; background: rgba(0, 0, 0, .35); border-radius: 12px; padding: 3px; gap: 2px; }
.sizes button { border: 0; background: transparent; border-radius: 9px; padding: 6px 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.sizes button.on { background: var(--text); color: #1b0a0c; }
.add-btn { width: 44px; height: 44px; border-radius: 14px; border: 0; background: var(--hot); color: #fff; font-size: 26px; line-height: 1; display: grid; place-items: center; flex: 0 0 auto; }
.add-btn:hover { background: var(--hot-2); }
.add-btn[disabled] { background: #5a2a31; cursor: not-allowed; }
.in-cart { position: absolute; top: 10px; right: 10px; background: var(--cheese); color: #1b0a0c; font-size: 12px; font-weight: 700; border-radius: 99px; padding: 2px 8px; }

/* Cart bar (mobile) */
.cart-bar {
  position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 45;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 18px; border: 0; border-radius: 16px; background: var(--hot); color: #fff; font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
}

/* Drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 50; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); z-index: 60; background: var(--bg-2);
  border-left: 1px solid var(--line); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .25s ease;
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px; padding-top: max(16px, env(safe-area-inset-top)); border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-family: var(--display); font-weight: 400; margin: 0; font-size: 26px; letter-spacing: .5px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); font-size: 16px; }
.drawer-body { overflow-y: auto; padding: 16px; padding-bottom: max(24px, env(safe-area-inset-bottom)); flex: 1; }
.empty { text-align: center; color: var(--muted); padding: 24px 0; }
.line { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line-name { font-weight: 600; }
.line-note { grid-column: 1 / -1; }
.line-note input { width: 100%; background: transparent; border: 1px dashed var(--line); border-radius: 10px; padding: 7px 10px; color: var(--text); font-size: 13px; }
.line-price { font-weight: 700; text-align: right; }
.qty { display: inline-flex; align-items: center; gap: 4px; background: var(--panel); border-radius: 12px; padding: 3px; margin-top: 6px; }
.qty button { width: 32px; height: 32px; border: 0; border-radius: 9px; background: var(--panel-2); font-size: 18px; }
.qty span { min-width: 26px; text-align: center; font-weight: 700; }

.checkout { margin-top: 18px; display: grid; gap: 12px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--panel); border-radius: 14px; padding: 4px; gap: 4px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: block; text-align: center; padding: 10px 6px; border-radius: 11px; font-weight: 600; cursor: pointer; }
.seg input:checked + span { background: var(--hot); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--cheese); }
.seg input:disabled + span { opacity: .4; cursor: not-allowed; }
.mode-note { margin: 0; font-size: 13px; color: var(--muted); }
.field { display: grid; gap: 5px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field small { font-weight: 400; }
.field input, .field textarea { width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; color: var(--text); font-size: 16px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--hot); }
.totals { background: var(--panel); border-radius: 14px; padding: 12px 14px; display: grid; gap: 6px; font-size: 15px; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { font-family: var(--display); font-size: 22px; letter-spacing: .5px; padding-top: 6px; border-top: 1px solid var(--line); }
.totals .warn { color: var(--cheese); font-size: 13px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--hot); flex: 0 0 auto; margin-top: 1px; }
.form-error { margin: 0; background: rgba(255, 51, 72, .14); border: 1px solid rgba(255, 51, 72, .5); padding: 10px 12px; border-radius: 12px; font-size: 14px; }
.secure-note { margin: 0; text-align: center; font-size: 12px; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 70; background: var(--text); color: #1b0a0c; font-weight: 600; padding: 10px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); max-width: calc(100% - 32px); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 28px 16px 110px; color: var(--muted); font-size: 14px; }
.footer-grid { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.footer-brand { font-family: var(--display); font-size: 22px; color: var(--text); letter-spacing: .5px; }
.footer p { margin: 6px 0; }

/* Pagina comanda / termeni */
.page { max-width: 640px; margin: 0 auto; padding: 24px 16px 60px; }
.panel { background: linear-gradient(160deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 14px; }
.page h1 { font-family: var(--display); font-weight: 400; font-size: 34px; margin: 0 0 6px; letter-spacing: .5px; }
.steps { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 0; }
.steps li { position: relative; padding: 0 0 18px 34px; color: var(--muted); }
.steps li::before { content: ""; position: absolute; left: 6px; top: 4px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #6d3a42; background: var(--bg); }
.steps li::after { content: ""; position: absolute; left: 13px; top: 22px; bottom: 2px; width: 2px; background: #4a242a; }
.steps li:last-child::after { display: none; }
.steps li.done { color: var(--text); }
.steps li.done::before { background: var(--green); border-color: var(--green); }
.steps li.current { color: var(--text); font-weight: 700; }
.steps li.current::before { background: var(--hot); border-color: var(--hot); box-shadow: 0 0 0 5px rgba(255, 51, 72, .2); }
.big-status { font-family: var(--display); font-size: 26px; color: var(--cheese); letter-spacing: .5px; }
.prose h2 { font-family: var(--display); font-weight: 400; letter-spacing: .5px; margin-top: 28px; }
.prose p, .prose li { color: var(--muted); }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 22px; }
  .hero-art { display: none; }
  .top-call span { display: none; }
  .grid { grid-template-columns: 1fr; }
  .card { grid-template-columns: 76px 1fr; gap: 12px; padding: 12px; }
  .card-img { width: 76px; height: 76px; }
  .card-img svg { width: 70px; height: 56px; }
  .cat-nav { top: 62px; }
  .footer-grid { grid-template-columns: 1fr; }
  .drawer { width: 100%; }
}
@media (min-width: 761px) { .cart-bar { display: none !important; } }

/* Configurator produs */
.card.is-custom [data-open-pm] { cursor: pointer; }
.custom-hint { display: inline-block; font-size: 12px; font-weight: 600; color: var(--cheese); background: rgba(255, 194, 31, .1); border: 1px solid rgba(255, 194, 31, .25); border-radius: 99px; padding: 2px 9px; margin: -2px 0 10px; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .65); z-index: 64; }
.pm {
  position: fixed; z-index: 65; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(560px, calc(100% - 32px)); max-height: min(88vh, 860px); display: flex; flex-direction: column;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); overflow: hidden;
}
.pm-head { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.pm-img { width: 72px; height: 72px; border-radius: 14px; background: radial-gradient(circle at 50% 40%, #8e1226, #3b0912); display: grid; place-items: center; overflow: hidden; }
.pm-img svg { width: 64px; height: 52px; }
.pm-img img { width: 100%; height: 100%; object-fit: cover; }
.pm-head h2 { font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: .5px; margin: 0; line-height: 1.05; }
.pm-head p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.pm-body { overflow-y: auto; padding: 6px 16px 16px; flex: 1; overscroll-behavior: contain; }
.pm-foot { display: flex; gap: 10px; align-items: center; padding: 12px 16px; padding-bottom: max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg-2); }
.pm-foot .qty { margin: 0; }
.pm-foot .btn { flex: 1; }
.og { border: 0; padding: 0; margin: 14px 0 0; min-width: 0; }
.og legend { display: flex; justify-content: space-between; align-items: baseline; width: 100%; padding: 0; margin-bottom: 8px; }
.og legend span { font-family: var(--display); font-size: 19px; letter-spacing: .5px; }
.og legend small { font-size: 12px; color: var(--muted); font-weight: 600; }
.og-items { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opt { position: relative; display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 13px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; font-size: 15px; transition: border-color .12s, background .12s; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .tick { width: 20px; height: 20px; flex: 0 0 auto; border-radius: 6px; border: 2px solid #7a4048; display: grid; place-items: center; }
.opt input[type="radio"] + .tick { border-radius: 50%; }
.opt.on { border-color: var(--hot); background: rgba(255, 51, 72, .12); }
.opt.on .tick { background: var(--hot); border-color: var(--hot); }
.opt.on .tick::after { content: ""; width: 9px; height: 5px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.og.recipe .opt:not(.on) .opt-l { text-decoration: line-through; color: var(--muted); }
.opt.dis { opacity: .45; cursor: not-allowed; }
.opt:has(input:focus-visible) { outline: 2px solid var(--cheese); outline-offset: 2px; }
.opt-l { flex: 1; min-width: 0; }
.opt-p { font-size: 13px; font-weight: 700; color: var(--cheese); white-space: nowrap; }
.pm .field { margin-top: 16px; }
.line-opts { list-style: none; margin: 3px 0 0; padding: 0; font-size: 13px; color: var(--muted); }
.line-opts li { padding: 1px 0; }
.line-ctrl { display: flex; align-items: center; gap: 12px; }
.link-btn { border: 0; background: none; padding: 6px 0 0; color: var(--cheese); font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 760px) {
  .pm { left: 0; right: 0; top: auto; bottom: 0; transform: none; width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0; }
  .opt { padding: 10px; font-size: 14px; gap: 8px; }
}
@media (max-width: 359px) { .og-items { grid-template-columns: 1fr; } }
