/* ==========================================================================
   eee.md — design system (dark, red accent). Tokens, layout, header, footer,
   shared components. Page layouts live in pages.css.
   ========================================================================== */

:root {
  --bg: #0a0a0b;
  --bg-2: #111113;
  --panel: #151518;
  --panel-2: #1b1b1f;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #f3f3f4;
  --mute: #9b9ba3;
  --red: #e8272a;
  --red-2: #ff3b3e;
  --red-dark: #b3161a;
  --red-glow: rgba(232, 39, 42, 0.45);
  --green: #2fbf71;
  --yellow: #ffd600;

  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1240px;
  --gutter: clamp(16px, 3.4vw, 40px);
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
body { font-family: var(--font); font-size: 1rem; line-height: 1.55; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { list-style: none; }
:focus-visible { outline: 2px solid var(--red-2); outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; top: -60px; left: 12px; z-index: 999; padding: 10px 16px; background: var(--red); color: #fff; border-radius: 8px; }
.skip-link:focus { top: 12px; }
main { min-height: 60vh; }

/* ── Type ─────────────────────────────────────── */
h1, h2, h3, h4 { line-height: 1.12; letter-spacing: -0.02em; font-weight: 800; }
.h1 { font-size: clamp(2.2rem, 1.3rem + 3.8vw, 4.4rem); }
.h2 { font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.5rem); }
.h3 { font-size: clamp(1.2rem, 1rem + 0.6vw, 1.5rem); }
.accent { color: var(--red); }
.mute { color: var(--mute); }
.light { font-weight: 300; }
.eyebrow { display: inline-flex; align-items: center; gap: 14px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: #d9d9dc; }
.eyebrow::before { content: ""; width: 3px; height: 22px; background: var(--red); border-radius: 2px; }
/* the dash sits inline, right before the first word, so it stays on the first line when the title wraps */
.dash-title { display: block; }
.dash-title::before { content: ""; display: inline-block; vertical-align: middle; position: relative; top: -0.08em; width: 0.75em; max-width: 30px; min-width: 22px; height: 5px; margin-right: 0.45em; border-radius: 3px; background: linear-gradient(90deg, var(--red-2), var(--red-dark)); box-shadow: 0 0 12px var(--red-glow); }

/* ── Buttons ──────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px;
  border-radius: 12px; border: 1px solid transparent; cursor: pointer; font-weight: 700; font-size: 1rem; white-space: nowrap;
  transition: transform 0.2s var(--ease), box-shadow 0.25s, background 0.2s, border-color 0.2s, color 0.2s;
}
.btn i { font-size: 1.05em; }
.btn-primary { background: linear-gradient(180deg, var(--red-2), var(--red) 55%, var(--red-dark)); color: #fff; box-shadow: 0 10px 30px -10px var(--red-glow), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 38px -10px var(--red-glow), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.btn-outline { background: rgba(255, 255, 255, 0.02); border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.btn-outline:hover { border-color: #fff; background: rgba(255, 255, 255, 0.06); }
.btn-ghost-red { background: transparent; border-color: var(--red); color: #fff; }
.btn-ghost-red:hover { background: rgba(232, 39, 42, 0.12); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 0.875rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn.is-disabled { opacity: 0.45; pointer-events: auto; cursor: not-allowed; box-shadow: none; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center; flex-shrink: 0; border-radius: 10px; border: 1.5px solid var(--red);
  background: rgba(232, 39, 42, 0.06); color: #fff; cursor: pointer; transition: background 0.2s, box-shadow 0.2s;
}
.icon-btn:hover { background: var(--red); box-shadow: 0 0 20px var(--red-glow); }
.link { color: #fff; font-weight: 600; border-bottom: 1px solid var(--line-2); }
.link:hover { border-color: var(--red); }

/* ── Panels, icon boxes, features ────────────── */
.panel { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 30px 60px -40px rgba(0, 0, 0, 0.9); }
.panel-pad { padding: clamp(18px, 2.4vw, 30px); }
.icon-box { width: 52px; height: 52px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; border: 1.5px solid var(--red); color: #fff; font-size: 1.25rem; background: rgba(232, 39, 42, 0.07); box-shadow: 0 0 22px -6px var(--red-glow); }
.icon-ring { width: 72px; height: 72px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); background: radial-gradient(circle at 50% 30%, #222226, #121214); font-size: 1.5rem; }
.feature { display: flex; align-items: center; gap: 14px; font-size: 0.9375rem; line-height: 1.3; color: #e6e6e8; }
.features { display: flex; flex-wrap: wrap; gap: 18px 32px; }
.features-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); }
.features-strip .feature { padding: 26px 20px; justify-content: center; }
.features-strip .feature + .feature { border-left: 1px solid var(--line); }
.divider { height: 1px; background: var(--line); border: 0; margin: 20px 0; }
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; background: var(--red); color: #fff; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 0.8125rem; font-weight: 700; border: 1px solid var(--line-2); }
.pill--ok { border-color: rgba(47, 191, 113, 0.5); color: #6ee7a6; }
.pill--wait { border-color: rgba(255, 214, 0, 0.45); color: #ffe066; }
.pill--red { border-color: rgba(232, 39, 42, 0.6); color: #ff8587; }

/* ── Section scaffolding ─────────────────────── */
.section { padding: clamp(30px, 4vw, 56px) 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: clamp(20px, 3vw, 34px); flex-wrap: wrap; }
.dash-title.section-head { display: block; }
.glow-top { position: relative; }
.glow-top::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--red), transparent); box-shadow: 0 0 24px var(--red); }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ── Header ───────────────────────────────────── */
.header { position: sticky; top: 0; z-index: 100; height: var(--header-h); background: rgba(12, 12, 13, 0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.header .wrap { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand img { width: 46px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text b { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.035em; }
.brand-text b span { color: var(--red); }
.brand-text small { font-size: 0.5625rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: #cfcfd3; margin-top: 4px; }
.nav { display: flex; align-items: stretch; gap: 6px; margin: 0 auto; height: 100%; }
.nav a { position: relative; display: flex; align-items: center; padding: 0 14px; font-weight: 600; font-size: 0.9375rem; color: #e7e7ea; transition: color 0.2s; }
.nav a:hover { color: #fff; }
.nav a[aria-current="page"] { color: #fff; }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--red); box-shadow: 0 0 14px var(--red); }
.header-tools { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.tool { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; border-radius: 10px; cursor: pointer; font-size: 1.2rem; color: #fff; }
.tool:hover { background: rgba(255, 255, 255, 0.06); }
.cart-count { position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 0.6875rem; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 10px var(--red-glow); }

/* drawer menu */
.drawer { position: fixed; inset: 0; z-index: 300; display: flex; justify-content: flex-end; background: rgba(0, 0, 0, 0.55); opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; }
.drawer.is-open { opacity: 1; visibility: visible; }
.drawer-panel { width: min(380px, 88vw); height: 100%; overflow-y: auto; background: var(--bg-2); border-left: 1px solid var(--line); padding: 22px; transform: translateX(100%); transition: transform 0.4s var(--ease); display: flex; flex-direction: column; gap: 6px; }
.drawer.is-open .drawer-panel { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.drawer a.dl { display: flex; justify-content: space-between; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 1.15rem; font-weight: 700; }
.drawer a.dl i { color: var(--mute); font-size: 0.85rem; }
.drawer-foot { margin-top: auto; padding-top: 20px; display: grid; gap: 10px; color: var(--mute); font-size: 0.9375rem; }

/* search overlay */
.search { position: fixed; inset: 0; z-index: 300; background: rgba(5, 5, 6, 0.86); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: 90px var(--gutter) 40px; opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0.25s; }
.search.is-open { opacity: 1; visibility: visible; }
.search-box { max-width: 720px; margin: 0 auto; }
.search-field { display: flex; align-items: center; gap: 12px; padding: 0 18px; height: 64px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel); }
.search-field input { flex: 1; background: none; border: 0; outline: none; font-size: 1.2rem; }
.search-results { margin-top: 14px; display: grid; gap: 8px; max-height: 60vh; overflow-y: auto; }
.search-results a { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); }
.search-results a:hover { border-color: var(--red); }
.search-results img { width: 54px; height: 54px; object-fit: contain; }
.search-results .price { margin-left: auto; font-weight: 800; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 400; transform: translate(-50%, 140%); display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 14px; background: #1d1d21; border: 1px solid var(--line-2); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6); transition: transform 0.4s var(--ease); max-width: calc(100vw - 32px); }
.toast.is-on { transform: translate(-50%, 0); }
.toast i { color: var(--green); font-size: 1.2rem; }
.toast a { color: var(--red-2); font-weight: 700; white-space: nowrap; }

/* ── Forms ────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 0.875rem; font-weight: 600; color: #dcdce0; margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 15px; border-radius: var(--radius-sm); border: 1px solid var(--line-2);
  background: #1c1c20; color: #fff; outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input, .field textarea { -webkit-appearance: none; appearance: none; }
.field input::placeholder, .field textarea::placeholder { color: #6f6f78; opacity: 1; }
.field input:-webkit-autofill, .field textarea:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 40px #1c1c20 inset; caret-color: #fff; transition: background-color 9999s; }

/* custom dropdown (assets/js/select.js) */
.xselect { position: relative; }
.xselect.is-open, .field:has(.xselect.is-open), .calc-product:has(.xselect.is-open) { position: relative; z-index: 60; }
.xselect-native { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; overflow: hidden; font-size: 1px; padding: 0; }
.xselect-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 50px; padding: 12px 15px;
  border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: #1c1c20; color: #fff; text-align: left; cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.xselect-btn:hover { border-color: #4a4a52; background: #202025; }
.xselect-btn:focus-visible, .xselect.is-open .xselect-btn { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(232, 39, 42, 0.2); }
.xselect-btn[aria-invalid="true"] { border-color: var(--red); }
.xselect-btn.is-placeholder .xselect-value { color: #8a8a93; }
.xselect-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xselect-btn > i { flex: none; font-size: 0.8rem; color: #cfcfd3; transition: transform 0.25s var(--ease, ease); }
.xselect.is-open .xselect-btn > i { transform: rotate(180deg); color: var(--red-2); }
.xselect-list {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 8px); max-height: 300px; overflow-y: auto; margin: 0; padding: 6px; list-style: none;
  border-radius: 14px; border: 1px solid var(--line-2); background: #17171b; box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(232, 39, 42, 0.08);
  outline: none; transform-origin: top; animation: xs-in 0.16s ease-out;
}
.xselect.is-up .xselect-list { top: auto; bottom: calc(100% + 8px); transform-origin: bottom; }
.xselect-list [role="option"] { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border-radius: 9px; color: #dcdce0; cursor: pointer; font-size: 0.9375rem; }
.xselect-list [role="option"] i { opacity: 0; color: var(--red-2); font-size: 0.8rem; }
.xselect-list [role="option"].is-active { background: rgba(232, 39, 42, 0.12); color: #fff; }
.xselect-list [role="option"][aria-selected="true"] { color: #fff; font-weight: 600; }
.xselect-list [role="option"][aria-selected="true"] i { opacity: 1; }
@keyframes xs-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
@media (prefers-reduced-motion: reduce) { .xselect-list { animation: none; } }
.field select { appearance: none; -webkit-appearance: none; background: #1c1c20 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 15px center; padding-right: 40px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(232, 39, 42, 0.2); }
.field [aria-invalid="true"] { border-color: var(--red); }
.field-error { display: block; min-height: 1.1em; margin-top: 4px; font-size: 0.8125rem; color: #ff7c7e; }
.phone-field { position: relative; }
.phone-field input { padding-left: 52px; }
.phone-field .flag { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 28px; height: 14px; border-radius: 2px; background: url("../img/flag-md.svg") center / cover no-repeat; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12); }
.choice { position: relative; display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.02); cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .tick { width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; color: transparent; font-size: 0.75rem; transition: all 0.2s; }
.choice:has(input:checked) { border-color: var(--red); box-shadow: 0 0 0 1px var(--red), 0 0 30px -12px var(--red-glow); background: rgba(232, 39, 42, 0.05); }
.choice:has(input:checked) .tick { background: var(--red); border-color: var(--red); color: #fff; }
.choice:has(input:focus-visible) { outline: 2px solid var(--red-2); outline-offset: 3px; }
.choice b { display: block; font-size: 1.05rem; }
.choice small { display: block; color: var(--mute); font-size: 0.875rem; }
.choice .end { margin-left: auto; font-size: 1.6rem; color: #fff; }
.qty { display: inline-flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: #18181b; }
.qty button { width: 50px; border: 0; background: none; color: #fff; font-size: 1.1rem; cursor: pointer; }
.qty button:hover { background: rgba(255, 255, 255, 0.06); }
.qty input { width: 84px; border: 0; border-inline: 1px solid var(--line-2); background: none; text-align: center; font-weight: 700; font-size: 1.1rem; outline: none; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty--sm button { width: 38px; }
.qty--sm input { width: 56px; font-size: 0.95rem; min-height: 38px; }

/* ── Footer ──────────────────────────────────── */
.footer { margin-top: clamp(40px, 6vw, 72px); border-top: 1px solid var(--line); background: linear-gradient(180deg, #0d0d0e, #070708); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding: 48px 0 32px; }
.footer h4 { font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mute); margin-bottom: 14px; }
.footer li + li { margin-top: 8px; }
.footer a:hover { color: var(--red-2); }
.footer p { color: var(--mute); max-width: 34ch; margin-top: 14px; font-size: 0.9375rem; }
.socials { display: flex; gap: 8px; margin-top: 16px; }
.socials a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line-2); }
.socials a:hover { border-color: var(--red); color: #fff; background: rgba(232, 39, 42, 0.12); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 18px 0 26px; border-top: 1px solid var(--line); font-size: 0.8125rem; color: var(--mute); }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 1080px) {
  .nav { display: none; }
  .header .wrap { gap: 12px; }
  .features-strip { grid-template-columns: 1fr 1fr; }
  .features-strip .feature:nth-child(3) { border-left: 0; }
  .features-strip .feature:nth-child(n+3) { border-top: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .brand img { width: 40px; }
  .brand-text b { font-size: 1.45rem; }
  .tool--account { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .features-strip .feature { padding: 18px 12px; justify-content: flex-start; font-size: 0.875rem; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.001s !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* honeypot field for bots (never shown) */
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
