/* ============================================================
   Eren Ship Supply — design system
   ============================================================ */
:root {
  --ink: #08182c;
  --navy: #0c2240;
  --navy-2: #123158;
  --navy-3: #1a4173;
  --gold: #f0b429;
  --gold-deep: #d99a1b;
  --teal: #25b1c4;
  --bg: #f4f7fb;
  --card: #ffffff;
  --line: #e2e9f2;
  --text: #22344f;
  --muted: #5d7290;
  --ok: #1f9d61;
  --warn: #d97706;
  --bad: #dc2626;
  --radius: 16px;
  --shadow-sm: 0 1px 3px rgba(8, 24, 44, 0.08);
  --shadow-md: 0 6px 24px rgba(8, 24, 44, 0.10);
  --shadow-lg: 0 18px 50px rgba(8, 24, 44, 0.18);
  --font-display: "Sora", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

.container { width: min(1180px, 92%); margin: 0 auto; }

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.2; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.78rem 1.6rem; border-radius: 999px; border: none;
  font-weight: 600; font-size: 0.97rem; transition: all 0.2s ease;
}
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: var(--ink); box-shadow: 0 4px 14px rgba(240, 180, 41, 0.35); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(240, 180, 41, 0.45); }
.btn-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, 0.45); }
.btn-outline:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-3); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--navy); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.88rem; }

/* ---------- top utility bar ---------- */
.topbar { background: #061224; color: rgba(255, 255, 255, 0.66); font-size: 0.83rem; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 40px; }
.tb-item { display: inline-flex; align-items: center; gap: 0.45rem; color: rgba(255, 255, 255, 0.7); white-space: nowrap; }
.tb-item svg { color: var(--gold); flex: none; }
a.tb-item { transition: color 0.15s; }
a.tb-item:hover { color: #fff; }
.tb-right { display: flex; align-items: center; gap: 1.6rem; }
.tb-badge { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--gold); font-weight: 600; }
.tb-dot { width: 7px; height: 7px; border-radius: 50%; background: #34d399; }
html.anim .tb-dot { animation: tbPulse 2.4s infinite; }
@keyframes tbPulse { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); } 70% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8, 24, 44, 0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 0.7rem; color: #fff; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  display: flex; align-items: center; justify-content: center; color: var(--ink);
}
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; letter-spacing: 0.02em; line-height: 1.1; }
.brand-sub { font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: 1.7rem; list-style: none; }
.nav-links a { color: rgba(255, 255, 255, 0.82); font-size: 0.95rem; font-weight: 500; transition: color 0.15s; }
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-cta { margin-left: 0.6rem; }
/* animated underline on text nav links (desktop) */
@media (min-width: 761px) {
  .nav-links a:not(.nav-cta) { position: relative; padding-bottom: 3px; }
  .nav-links a:not(.nav-cta)::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 2px;
    background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 0.22s ease;
  }
  .nav-links a:not(.nav-cta):hover::after, .nav-links a:not(.nav-cta).active::after { transform: scaleX(1); }
}
/* the gold CTA button keeps its dark ink text in every state (don't inherit the gold active/hover color) */
.nav-links a.nav-cta, .nav-links a.nav-cta:hover, .nav-links a.nav-cta.active { color: var(--ink); }
.nav-toggle { display: none; background: none; border: none; color: #fff; }

/* ---------- hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(37, 177, 196, 0.28), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(240, 180, 41, 0.16), transparent 55%),
    linear-gradient(160deg, #0a1d36 0%, var(--navy) 55%, #0e2c52 100%);
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
}
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 62%;
  opacity: 0.5;
}
html.anim .hero-bg img { animation: kenburns 26s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.12) translateX(-1.5%); } }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(105deg, rgba(7, 21, 39, 0.96) 18%, rgba(10, 29, 54, 0.82) 46%, rgba(12, 34, 64, 0.45) 78%, rgba(10, 29, 54, 0.65) 100%),
    linear-gradient(to top, rgba(7, 21, 39, 0.85), transparent 38%);
}
.hero-inner { padding: 7rem 0 9rem; max-width: 720px; position: relative; z-index: 2; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(240, 180, 41, 0.14); border: 1px solid rgba(240, 180, 41, 0.4);
  color: var(--gold); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.45rem 1rem; border-radius: 999px; margin-bottom: 1.4rem;
}
.hero h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; margin-bottom: 1.2rem; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero p.lead { font-size: 1.15rem; color: rgba(255, 255, 255, 0.78); max-width: 580px; margin-bottom: 2.2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 0.8rem 1.8rem; margin-top: 2.1rem; }
.hero-trust span { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.92rem; color: rgba(255, 255, 255, 0.82); font-weight: 500; }
.hero-trust svg { color: var(--gold); flex: none; }
html.anim .hero .hero-trust { animation: fadeUp 0.85s 1.28s cubic-bezier(0.16, 0.84, 0.28, 1) both; }
.hero-waves { position: absolute; bottom: -1px; left: 0; right: 0; z-index: 1; }
.hero-waves svg { width: 100%; height: 90px; }
.hero-art { position: absolute; right: 2%; top: 50%; transform: translateY(-58%); opacity: 0.6; z-index: 1; pointer-events: none; filter: drop-shadow(0 24px 60px rgba(0, 0, 0, 0.45)); }
.hero .container { position: relative; z-index: 2; }
.hero .glow-orb { z-index: 1; }

/* ---------- stats strip ---------- */
.stats-strip { margin-top: -56px; position: relative; z-index: 5; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md);
}
.stat { background: var(--card); padding: 1.6rem 1.2rem; text-align: center; }
.stat b { display: block; font-family: var(--font-display); font-size: 1.9rem; color: var(--navy); }
.stat span { font-size: 0.86rem; color: var(--muted); }

/* ---------- sections ---------- */
.section { padding: 5.5rem 0; }
.section.alt { background: #fff; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 3.2rem; }
.section-kicker { color: var(--gold-deep); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin: 0.5rem 0 0.8rem; }
.section-head p { color: var(--muted); }

/* ---------- services ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.svc-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.9rem 1.6rem; transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.svc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.svc-icon {
  width: 52px; height: 52px; border-radius: 14px; margin-bottom: 1.1rem;
  background: linear-gradient(135deg, var(--navy-2), var(--navy)); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
}
.svc-card h3 { font-size: 1.12rem; margin-bottom: 0.5rem; }
.svc-card p { font-size: 0.93rem; color: var(--muted); }

/* ---------- category showcase ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.cat-tile {
  position: relative; border-radius: var(--radius); padding: 1.5rem; color: #fff; overflow: hidden;
  min-height: 130px; display: flex; flex-direction: column; justify-content: flex-end;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cat-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.cat-tile .ct-icon { position: absolute; top: 1.1rem; right: 1.1rem; opacity: 0.85; }
.cat-tile h3 { color: #fff; font-size: 1.05rem; }
.cat-tile span { font-size: 0.82rem; opacity: 0.85; }

/* ---------- about / why ---------- */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 3.5rem; align-items: center; }
.split h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1rem; }
.split p { color: var(--muted); margin-bottom: 1rem; }
.check-list { list-style: none; margin-top: 1.2rem; }
.check-list li { display: flex; gap: 0.7rem; align-items: flex-start; margin-bottom: 0.85rem; font-weight: 500; }
.check-list svg { flex: none; margin-top: 3px; color: var(--ok); }
.about-panel {
  background: linear-gradient(160deg, var(--navy), var(--navy-3));
  border-radius: 20px; padding: 2.6rem; color: #fff; box-shadow: var(--shadow-lg);
}
.about-panel h3 { color: var(--gold); font-size: 1.05rem; margin-bottom: 1.4rem; letter-spacing: 0.06em; text-transform: uppercase; }
.about-rows { display: grid; gap: 1.15rem; }
.about-row { display: flex; gap: 1rem; align-items: flex-start; }
.about-row svg { flex: none; color: var(--gold); margin-top: 2px; }
.about-row b { display: block; font-size: 0.97rem; }
.about-row span { font-size: 0.86rem; color: rgba(255, 255, 255, 0.72); }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.contact-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; text-align: center; }
.contact-card .svc-icon { margin: 0 auto 1rem; }
.contact-card h3 { font-size: 1.02rem; margin-bottom: 0.35rem; }
.contact-card p { color: var(--muted); font-size: 0.93rem; }
.contact-card a { color: var(--navy-3); font-weight: 600; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, 0.75); padding: 3.6rem 0 1.8rem; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2.4rem; padding-bottom: 2.4rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.site-footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 1rem; letter-spacing: 0.04em; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.55rem; font-size: 0.92rem; }
.site-footer a:hover { color: var(--gold); }
.footer-note { padding-top: 1.6rem; font-size: 0.85rem; color: rgba(255, 255, 255, 0.45); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem; }
.footer-credit a { color: var(--gold); font-weight: 600; transition: color 0.15s; }
.footer-credit a:hover { color: #fff; }

/* ============================================================
   SHOP
   ============================================================ */
.shop-hero { background: linear-gradient(150deg, #0a1d36, var(--navy-2)); color: #fff; padding: 3.2rem 0 4.4rem; position: relative; overflow: hidden; }
.shop-hero .hero-bg img { opacity: 0.35; object-position: center 55%; animation: none; }
.shop-hero .hero-bg::after {
  background:
    linear-gradient(100deg, rgba(7, 21, 39, 0.96) 25%, rgba(10, 29, 54, 0.8) 65%, rgba(12, 34, 64, 0.6) 100%);
}
.shop-hero .container { position: relative; z-index: 2; }
.shop-hero h1 { color: #fff; font-size: clamp(1.7rem, 3.6vw, 2.5rem); margin-bottom: 0.5rem; }
.shop-hero p { color: rgba(255, 255, 255, 0.75); max-width: 620px; }

.shop-layout { display: grid; grid-template-columns: 264px 1fr; gap: 2rem; align-items: start; padding: 2.4rem 0 5rem; }

/* sidebar */
.shop-side { position: sticky; top: 88px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; max-height: calc(100vh - 110px); overflow: auto; }
.shop-side-head { display: flex; align-items: center; justify-content: space-between; }
.shop-side h3 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin: 0.4rem 0 0.9rem; }
.side-close { display: none; background: none; border: none; font-size: 1.7rem; line-height: 1; color: var(--muted); }
.side-veil { display: none; }
.filter-btn { display: none; }
.cat-list { list-style: none; }
.cat-item > button {
  width: 100%; display: flex; align-items: center; gap: 0.6rem; text-align: left;
  background: none; border: none; padding: 0.55rem 0.6rem; border-radius: 10px;
  font-size: 0.94rem; font-weight: 600; color: var(--text);
}
.cat-item > button:hover { background: var(--bg); }
.cat-item.active > button { background: var(--navy); color: #fff; }
.cat-item .count { margin-left: auto; font-size: 0.78rem; font-weight: 600; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 0.1rem 0.55rem; }
.cat-item.active .count { background: rgba(255, 255, 255, 0.18); color: #fff; }
.sub-list { list-style: none; margin: 0.2rem 0 0.4rem 2rem; display: none; }
.cat-item.open .sub-list { display: block; }
.sub-list button {
  width: 100%; text-align: left; background: none; border: none; padding: 0.34rem 0.55rem;
  font-size: 0.88rem; color: var(--muted); border-radius: 8px;
}
.sub-list button:hover { color: var(--navy); background: var(--bg); }
.sub-list li.active button { color: var(--gold-deep); font-weight: 700; }

/* toolbar */
.shop-toolbar { display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.3rem; }
.search-box { flex: 1; min-width: 220px; position: relative; }
.search-box svg { position: absolute; left: 0.95rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box input {
  width: 100%; padding: 0.78rem 1rem 0.78rem 2.7rem; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--card); font-size: 0.96rem;
}
.search-box input:focus { outline: none; border-color: var(--navy-3); }
.shop-toolbar select { padding: 0.74rem 0.9rem; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); font-size: 0.92rem; color: var(--text); }
.result-meta { font-size: 0.9rem; color: var(--muted); margin-bottom: 1.1rem; display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 0.4rem; background: var(--navy); color: #fff; border-radius: 999px; padding: 0.25rem 0.8rem; font-size: 0.82rem; font-weight: 600; }
.chip button { background: none; border: none; color: rgba(255,255,255,0.7); font-size: 1rem; line-height: 1; padding: 0; }
.chip button:hover { color: #fff; }

/* product grid */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.2rem; }
.p-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.p-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.p-visual { height: 120px; display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, 0.92); position: relative; }
.p-visual .brand-tag {
  position: absolute; top: 0.7rem; left: 0.7rem; background: rgba(8, 24, 44, 0.5);
  color: #fff; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
  padding: 0.18rem 0.6rem; border-radius: 999px; text-transform: uppercase; backdrop-filter: blur(4px);
}
.p-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.p-sub { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.p-name { font-weight: 600; font-size: 0.97rem; color: var(--ink); line-height: 1.35; flex: 1; }
.p-price { font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; color: var(--navy); }
.p-price small { font-size: 0.78rem; color: var(--muted); font-weight: 500; font-family: var(--font-body); }
.p-variant select { width: 100%; padding: 0.5rem 0.6rem; border-radius: 10px; border: 1.5px solid var(--line); font-size: 0.86rem; background: #fff; }
.p-actions { display: flex; gap: 0.55rem; align-items: stretch; }
.qty-box { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty-box button { width: 30px; background: none; border: none; font-size: 1rem; color: var(--navy); font-weight: 700; }
.qty-box input { width: 36px; border: none; text-align: center; font-size: 0.92rem; font-weight: 600; -moz-appearance: textfield; }
.qty-box input::-webkit-outer-spin-button, .qty-box input::-webkit-inner-spin-button { -webkit-appearance: none; }
.add-btn {
  flex: 1; border: none; border-radius: 999px; background: var(--navy); color: #fff;
  font-weight: 600; font-size: 0.88rem; display: flex; align-items: center; justify-content: center; gap: 0.4rem;
  transition: background 0.15s;
}
.add-btn:hover { background: var(--navy-3); }
.add-btn.added { background: var(--ok); }
.poa { font-size: 0.84rem; color: var(--warn); font-weight: 600; }
.load-more-wrap { text-align: center; margin-top: 2rem; }

/* cart FAB + drawer */
.cart-fab {
  position: fixed; right: 1.6rem; bottom: 1.6rem; z-index: 90;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: var(--ink);
  border: none; border-radius: 999px; padding: 0.95rem 1.5rem; font-weight: 700; font-size: 0.98rem;
  display: flex; align-items: center; gap: 0.6rem; box-shadow: var(--shadow-lg);
  transition: transform 0.15s;
}
.cart-fab:hover { transform: translateY(-2px) scale(1.02); }
.cart-fab .bubble { background: var(--ink); color: var(--gold); border-radius: 999px; min-width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; padding: 0 6px; }

.drawer-veil { position: fixed; inset: 0; background: rgba(8, 24, 44, 0.55); z-index: 200; opacity: 0; pointer-events: none; transition: opacity 0.25s; }
.drawer-veil.show { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); z-index: 210;
  background: #fff; box-shadow: var(--shadow-lg); transform: translateX(105%);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.25, 1); display: flex; flex-direction: column;
}
.cart-drawer.show { transform: translateX(0); }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 1.3rem 1.5rem; border-bottom: 1px solid var(--line); }
.cart-head h3 { font-size: 1.15rem; }
.cart-head button { background: none; border: none; font-size: 1.5rem; color: var(--muted); line-height: 1; }
.cart-items { flex: 1; overflow: auto; padding: 1rem 1.5rem; }
.cart-empty { text-align: center; color: var(--muted); padding: 3rem 1rem; }
.ci { display: flex; gap: 0.9rem; padding: 0.9rem 0; border-bottom: 1px solid var(--line); align-items: center; }
.ci-info { flex: 1; min-width: 0; }
.ci-name { font-weight: 600; font-size: 0.92rem; color: var(--ink); }
.ci-meta { font-size: 0.8rem; color: var(--muted); }
.ci-price { font-weight: 700; font-size: 0.95rem; color: var(--navy); white-space: nowrap; }
.ci-remove { background: none; border: none; color: var(--bad); font-size: 0.78rem; font-weight: 600; padding: 0; margin-top: 2px; }
.cart-foot { border-top: 1px solid var(--line); padding: 1.3rem 1.5rem; background: var(--bg); }
.cart-total-row { display: flex; justify-content: space-between; font-size: 1.05rem; margin-bottom: 1rem; }
.cart-total-row b { font-family: var(--font-display); font-size: 1.3rem; color: var(--navy); }

/* checkout modal */
.modal-veil { position: fixed; inset: 0; background: rgba(8, 24, 44, 0.6); z-index: 300; display: none; align-items: flex-start; justify-content: center; overflow: auto; padding: 3rem 1rem; }
.modal-veil.show { display: flex; }
.modal { background: #fff; border-radius: 20px; width: min(680px, 100%); box-shadow: var(--shadow-lg); overflow: hidden; }
.modal-head { background: var(--navy); color: #fff; padding: 1.5rem 2rem; display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { color: #fff; font-size: 1.25rem; }
.modal-head button { background: none; border: none; color: rgba(255,255,255,0.7); font-size: 1.6rem; line-height: 1; }
.modal-body { padding: 2rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.2rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.84rem; font-weight: 600; color: var(--ink); }
.field label .req { color: var(--bad); }
.field input, .field select, .field textarea {
  padding: 0.7rem 0.9rem; border: 1.5px solid var(--line); border-radius: 10px; font-size: 0.95rem; background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy-3); }
.field textarea { resize: vertical; min-height: 80px; }
.form-errors { background: #fef2f2; border: 1px solid #fecaca; color: var(--bad); border-radius: 10px; padding: 0.8rem 1rem; font-size: 0.9rem; margin-bottom: 1rem; display: none; }
.form-errors.show { display: block; }
.order-summary-mini { background: var(--bg); border-radius: 12px; padding: 1rem 1.2rem; margin: 1.2rem 0; font-size: 0.92rem; display: flex; justify-content: space-between; }
.order-summary-mini b { color: var(--navy); }

/* success state */
.success-box { text-align: center; padding: 2.5rem 2rem; }
.success-box .big-check { width: 84px; height: 84px; margin: 0 auto 1.4rem; border-radius: 50%; background: #e8f7ef; color: var(--ok); display: flex; align-items: center; justify-content: center; }
.success-box h3 { font-size: 1.5rem; margin-bottom: 0.6rem; }
.success-box .order-no { font-family: var(--font-display); font-size: 1.25rem; color: var(--navy); background: var(--bg); display: inline-block; border-radius: 10px; padding: 0.5rem 1.2rem; margin: 0.8rem 0 1.2rem; font-weight: 700; }
.success-box p { color: var(--muted); }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 2rem; transform: translate(-50%, 150%); z-index: 400;
  background: var(--ink); color: #fff; padding: 0.85rem 1.5rem; border-radius: 999px; font-size: 0.93rem; font-weight: 500;
  box-shadow: var(--shadow-lg); transition: transform 0.3s ease; max-width: 90vw;
}
.toast.show { transform: translate(-50%, 0); }

/* ============================================================
   ADMIN
   ============================================================ */
.admin-app { background: var(--bg); min-height: 100vh; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem;
  background: radial-gradient(900px 500px at 80% -10%, rgba(37,177,196,0.18), transparent 60%), linear-gradient(160deg, #0a1d36, var(--navy) 60%, #0e2c52); }
.login-card { background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg); padding: 2.8rem; width: min(420px, 100%); text-align: center; }
.login-card .brand-mark { margin: 0 auto 1.2rem; width: 56px; height: 56px; }
.login-card h2 { margin-bottom: 0.4rem; }
.login-card p { color: var(--muted); font-size: 0.93rem; margin-bottom: 1.6rem; }
.login-card input { width: 100%; padding: 0.85rem 1rem; border: 1.5px solid var(--line); border-radius: 12px; margin-bottom: 1rem; font-size: 1rem; }
.login-card input:focus { outline: none; border-color: var(--navy-3); box-shadow: 0 0 0 4px rgba(37,177,196,0.14); }
.login-error { color: var(--bad); font-size: 0.88rem; margin-bottom: 0.8rem; display: none; }
.login-error.show { display: block; }
.login-back { display: inline-block; margin-top: 1.3rem; font-size: 0.86rem; color: var(--muted); font-weight: 500; }
.login-back:hover { color: var(--navy); }

/* ---------- app shell ---------- */
.admin-shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }

.admin-sidebar {
  background: linear-gradient(180deg, #0b2038, #0c2240); color: #fff;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.as-brand { display: flex; align-items: center; gap: 0.7rem; padding: 1.4rem 1.5rem; color: #fff; border-bottom: 1px solid rgba(255,255,255,0.08); }
.as-brand .brand-mark { width: 40px; height: 40px; flex: none; }
.as-brand-text b { font-family: var(--font-display); font-size: 1.05rem; letter-spacing: 0.04em; display: block; line-height: 1.1; }
.as-brand-text small { font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.as-nav { padding: 1.2rem 0.9rem; flex: 1; }
.as-section { font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255,255,255,0.4); font-weight: 700; padding: 0 0.7rem; margin-bottom: 0.7rem; }
.as-link {
  width: 100%; display: flex; align-items: center; gap: 0.85rem; padding: 0.72rem 0.9rem;
  border: none; background: none; color: rgba(255,255,255,0.72); font-size: 0.96rem; font-weight: 500;
  border-radius: 11px; margin-bottom: 0.2rem; transition: all 0.15s; position: relative;
}
.as-link svg { width: 19px; height: 19px; flex: none; }
.as-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.as-link.active { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: var(--ink); font-weight: 600; box-shadow: 0 6px 16px rgba(240,180,41,0.25); }
.as-badge { margin-left: auto; background: rgba(255,255,255,0.16); color: #fff; font-size: 0.74rem; font-weight: 700; min-width: 22px; height: 22px; border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 6px; }
.as-link.active .as-badge { background: rgba(8,24,44,0.22); color: var(--ink); }
.as-foot { padding: 0.9rem; border-top: 1px solid rgba(255,255,255,0.08); display: flex; flex-direction: column; gap: 0.15rem; }
.as-foot-link { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.9rem; border: none; background: none; color: rgba(255,255,255,0.6); font-size: 0.9rem; font-weight: 500; border-radius: 10px; transition: all 0.15s; text-align: left; }
.as-foot-link svg { width: 17px; height: 17px; flex: none; }
.as-foot-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
#logoutBtn:hover { color: #ffb4b4; }

/* ---------- content ---------- */
.admin-content { display: flex; flex-direction: column; min-width: 0; }
.ac-topbar { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 2rem; background: rgba(255,255,255,0.85); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.ac-burger { display: none; background: none; border: none; color: var(--navy); }
.ac-title h1 { font-size: 1.35rem; line-height: 1.1; }
.ac-title p { font-size: 0.84rem; color: var(--muted); }
.ac-actions { margin-left: auto; display: flex; gap: 0.6rem; }
.ac-scroll { padding: 1.8rem 2rem 3rem; }

/* ---------- stat cards (dashboard) ---------- */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; margin-bottom: 1.6rem; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.stat-card .sc-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 0.9rem; }
.stat-card .sc-icon svg { width: 21px; height: 21px; }
.stat-card b { display: block; font-family: var(--font-display); font-size: 1.85rem; color: var(--ink); line-height: 1; }
.stat-card span { font-size: 0.85rem; color: var(--muted); }
.sc-blue .sc-icon { background: #eff6ff; color: #2563eb; }
.sc-amber .sc-icon { background: #fffbeb; color: var(--warn); }
.sc-green .sc-icon { background: #ecfdf5; color: var(--ok); }
.stat-card.feature { background: linear-gradient(140deg, var(--navy), var(--navy-3)); border: none; color: #fff; }
.stat-card.feature b { color: #fff; }
.stat-card.feature span { color: rgba(255,255,255,0.72); }
.stat-card.feature .sc-icon { background: rgba(240,180,41,0.2); color: var(--gold); }

/* ---------- dashboard grid ---------- */
.dash-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 1.3rem; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 1.2rem 1.4rem; border-bottom: 1px solid var(--line); }
.panel-head h3 { font-size: 1.05rem; }
.panel-sub { font-size: 0.82rem; color: var(--muted); }
.link-btn { background: none; border: none; color: var(--navy-3); font-weight: 600; font-size: 0.86rem; }
.link-btn:hover { color: var(--gold-deep); }

/* pipeline */
.pipeline { padding: 1.3rem 1.4rem; display: flex; flex-direction: column; gap: 1rem; }
.pl-row { display: grid; grid-template-columns: 110px 1fr 38px; align-items: center; gap: 0.8rem; }
.pl-label { display: flex; align-items: center; gap: 0.45rem; font-size: 0.88rem; font-weight: 600; color: var(--text); }
.pl-dot { width: 9px; height: 9px; border-radius: 50%; }
.pl-bar { height: 9px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.pl-fill { height: 100%; border-radius: 999px; transition: width 0.6s cubic-bezier(0.16,0.84,0.28,1); }
.pl-count { font-weight: 700; font-size: 0.92rem; color: var(--ink); text-align: right; }

/* revenue by period */
.revenue-panel { margin-bottom: 1.3rem; }
.rev-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.rev-cell { padding: 1.2rem 1.4rem; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 0.25rem; }
.rev-cell:last-child { border-right: none; }
.rev-label { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.rev-cell b { font-family: var(--font-display); font-size: 1.5rem; color: var(--navy); line-height: 1.1; }
.rev-cell small { font-size: 0.8rem; color: var(--muted); }
@media (max-width: 760px) {
  .rev-grid { grid-template-columns: 1fr 1fr; }
  .rev-cell { border-right: none; border-bottom: 1px solid var(--line); }
  .rev-cell:nth-child(odd) { border-right: 1px solid var(--line); }
  .rev-cell:nth-last-child(-n+2) { border-bottom: none; }
}

/* recent list */
.recent-list { padding: 0.5rem 0; max-height: 360px; overflow: auto; }
.recent-item { display: flex; align-items: center; gap: 0.9rem; padding: 0.7rem 1.4rem; cursor: pointer; transition: background 0.12s; }
.recent-item:hover { background: #f8fafd; }
.ri-avatar { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, var(--navy-2), var(--navy)); color: var(--gold); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.82rem; flex: none; font-family: var(--font-display); }
.ri-info { flex: 1; min-width: 0; }
.ri-info b { font-size: 0.92rem; color: var(--ink); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ri-info small { font-size: 0.79rem; color: var(--muted); }
.ri-meta { text-align: right; flex: none; }
.ri-meta .total { font-weight: 700; color: var(--navy); font-size: 0.92rem; display: block; }

/* ---------- toolbar (orders + products) ---------- */
.toolbar { display: flex; gap: 0.8rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.3rem; }
.toolbar .search-box { flex: 1; min-width: 220px; max-width: 360px; }
.toolbar select { padding: 0.7rem 0.9rem; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-size: 0.9rem; color: var(--text); }
.chip-row { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.f-chip { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 0.45rem 1rem; font-size: 0.86rem; font-weight: 600; color: var(--muted); transition: all 0.15s; }
.f-chip:hover { border-color: var(--navy-3); color: var(--navy); }
.f-chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.result-meta { font-size: 0.86rem; color: var(--muted); margin-left: auto; }

/* ---------- data tables ---------- */
.data-table { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.dt-head { background: var(--bg); font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); border-bottom: 1px solid var(--line); padding: 0.85rem 1.4rem; display: grid; gap: 0.8rem; align-items: center; }
.ta-c { text-align: center; } .ta-r { text-align: right; }
.ot-cols { grid-template-columns: 1.2fr 1.5fr 1.3fr 1fr 0.6fr 0.9fr 1fr; }
.pt-cols { grid-template-columns: 60px 2fr 1.1fr 0.7fr 0.7fr; }

.ot-row { display: grid; grid-template-columns: 1.2fr 1.5fr 1.3fr 1fr 0.6fr 0.9fr 1fr; gap: 0.8rem; padding: 0.95rem 1.4rem; align-items: center; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 0.92rem; transition: background 0.12s; }
.ot-row:hover { background: #f8fafd; }
.ot-row:last-child { border-bottom: none; }
.ot-row .onum { font-weight: 700; color: var(--navy); font-family: var(--font-display); font-size: 0.9rem; }
.ot-row .vessel { font-weight: 600; color: var(--ink); }
.ot-row .total { font-weight: 700; color: var(--navy); text-align: right; }
.ot-row .ta-c { text-align: center; }
.ot-empty { padding: 3.5rem; text-align: center; color: var(--muted); }
.ot-empty svg { color: var(--line); margin-bottom: 0.8rem; }

/* status badge */
.status-badge { display: inline-flex; align-items: center; gap: 0.35rem; border-radius: 999px; padding: 0.24rem 0.7rem; font-size: 0.74rem; font-weight: 700; text-transform: capitalize; width: fit-content; }
.status-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-new { background: #eff6ff; color: #2563eb; }
.st-confirmed { background: #f0f9ff; color: #0284c7; }
.st-preparing { background: #fffbeb; color: var(--warn); }
.st-delivered { background: #ecfdf5; color: var(--ok); }
.st-cancelled { background: #fef2f2; color: var(--bad); }

/* skeleton rows */
.sk-row { display: grid; gap: 0.8rem; padding: 1rem 1.4rem; border-bottom: 1px solid var(--line); align-items: center; }
.sk-cell { height: 13px; border-radius: 6px; background: linear-gradient(90deg,#eef3f8 25%,#f7fafc 40%,#eef3f8 60%); background-size: 300% 100%; animation: shimmer 1.3s linear infinite; }

/* ---------- order detail drawer ---------- */
.order-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); z-index: 210;
  background: var(--bg); box-shadow: var(--shadow-lg); transform: translateX(105%);
  transition: transform 0.3s cubic-bezier(0.2,0.8,0.25,1); display: flex; flex-direction: column;
}
.order-drawer.show { transform: translateX(0); }
.od-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 1.4rem 1.6rem; background: var(--navy); color: #fff; }
.od-num { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; display: block; }
.od-date { font-size: 0.84rem; color: rgba(255,255,255,0.65); }
.od-close { background: rgba(255,255,255,0.12); border: none; color: #fff; width: 32px; height: 32px; border-radius: 9px; font-size: 1.3rem; line-height: 1; flex: none; }
.od-close:hover { background: rgba(255,255,255,0.22); }
.od-drawer-body { flex: 1; overflow: auto; padding: 1.5rem 1.6rem; }
.od-status-banner { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1.4rem; }
.od-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem 1.3rem; margin-bottom: 1.2rem; }
.od-card h4 { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.9rem; }
.od-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.2rem; }
.od-field b { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 2px; }
.od-field span { font-size: 0.94rem; color: var(--ink); font-weight: 500; word-break: break-word; }
.od-field a { color: var(--navy-3); }
.od-items { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.od-items th { text-align: left; padding: 0.5rem 0; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); border-bottom: 1px solid var(--line); }
.od-items td { padding: 0.6rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.od-items .ta-r { text-align: right; }
.od-items tfoot td { font-weight: 700; color: var(--navy); border-bottom: none; padding-top: 0.8rem; }
.od-item-img { width: 34px; height: 34px; border-radius: 7px; object-fit: cover; vertical-align: middle; margin-right: 0.5rem; border: 1px solid var(--line); }
.od-set { margin-bottom: 0.7rem; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 700; }
.od-status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.st-btn { border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 0.5rem 0.6rem; font-size: 0.84rem; font-weight: 600; color: var(--text); text-transform: capitalize; transition: all 0.15s; }
.st-btn:hover { border-color: var(--navy); }
.st-btn.current { background: var(--navy); border-color: var(--navy); color: #fff; }
.od-drawer-foot { display: flex; gap: 0.6rem; padding: 1rem 1.6rem; border-top: 1px solid var(--line); background: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  .cards-grid, .cat-grid, .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 2.4rem; }
}
@media (max-width: 860px) {
  /* admin: collapse sidebar to a slide-in drawer */
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 248px; z-index: 220;
    transform: translateX(-105%); transition: transform 0.28s cubic-bezier(0.2,0.8,0.25,1);
  }
  .admin-sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .ac-burger { display: block; }
  .ac-scroll { padding: 1.3rem 1.1rem 3rem; }
  .ot-cols { display: none; }
  .ot-row { grid-template-columns: 1fr auto; gap: 0.4rem 0.8rem; }
  .ot-row > span:nth-child(3), .ot-row > span:nth-child(4), .ot-row > span:nth-child(5) { display: none; }
}
@media (max-width: 760px) {
  .nav-links {
    position: fixed; top: 72px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--ink); padding: 0.6rem 0 1.2rem; display: none; border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; text-align: center; }
  .nav-links a { display: block; padding: 0.8rem; }
  .nav-toggle { display: block; }
  .nav-cta { margin: 0.5rem 0 0; }
  .topbar { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { padding: 4.5rem 0 7rem; }
  .cards-grid, .cat-grid, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: 1fr; }
  .od-grid { grid-template-columns: 1fr 1fr; }
  .hide-sm { display: none; }
  .ac-topbar { padding: 0.9rem 1.1rem; }
  .order-drawer { width: 100vw; }

  /* ---- STORE: mobile layout ---- */
  .shop-hero { padding: 2rem 0 2.4rem; }
  .shop-hero p { font-size: 0.92rem; }
  .shop-layout { grid-template-columns: 1fr; gap: 0; padding: 1rem 0 5.5rem; }

  /* category list becomes an off-canvas drawer */
  .shop-side {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 210; width: min(310px, 86vw);
    max-height: none; border: none; border-radius: 0; padding: 1.1rem 1.1rem 2rem;
    transform: translateX(-105%); transition: transform 0.28s cubic-bezier(0.2,0.8,0.25,1);
    box-shadow: var(--shadow-lg);
  }
  .shop-side.open { transform: translateX(0); }
  .shop-side-head { position: sticky; top: 0; background: var(--card); padding-bottom: 0.6rem; margin-bottom: 0.3rem; }
  .shop-side h3 { font-size: 1rem; text-transform: none; letter-spacing: 0; color: var(--ink); margin: 0.2rem 0; }
  .side-close { display: block; }
  .cat-item > button { padding: 0.7rem 0.6rem; font-size: 1rem; }
  .sub-list button { padding: 0.5rem 0.55rem; font-size: 0.92rem; }
  .side-veil { display: block; position: fixed; inset: 0; background: rgba(8,24,44,0.5); z-index: 205; opacity: 0; pointer-events: none; transition: opacity 0.25s; }
  .side-veil.show { opacity: 1; pointer-events: auto; }

  /* sticky toolbar: search on top, filter + sort below */
  .shop-toolbar {
    position: sticky; top: 62px; z-index: 40; display: grid; gap: 0.55rem;
    grid-template-columns: 1fr 1fr; grid-template-areas: "search search" "filter sort";
    margin: 0 -4vw 1rem; padding: 0.7rem 4vw 0.8rem; background: rgba(244,247,251,0.96); backdrop-filter: blur(8px);
  }
  .search-box { grid-area: search; min-width: 0; }
  .search-box input { padding: 0.7rem 0.8rem 0.7rem 2.5rem; font-size: 0.92rem; }
  .filter-btn {
    grid-area: filter; display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    padding: 0.7rem 0.85rem; border-radius: 999px; border: 1.5px solid var(--line);
    background: var(--card); font-size: 0.9rem; font-weight: 600; color: var(--navy);
  }
  .filter-btn.filtered { background: var(--navy); border-color: var(--navy); color: #fff; }
  .filter-btn span { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .shop-toolbar select { grid-area: sort; width: 100%; }

  /* 2-column compact product grid */
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
  .p-visual { height: 124px; }
  .p-body { padding: 0.7rem 0.75rem 0.85rem; gap: 0.45rem; }
  .p-sub { font-size: 0.62rem; letter-spacing: 0.06em; }
  .p-name { font-size: 0.85rem; line-height: 1.3; }
  .p-price { font-size: 1.02rem; }
  .p-price small { display: block; font-size: 0.7rem; }
  .p-variant select { padding: 0.45rem 0.5rem; font-size: 0.8rem; }
  .p-actions { flex-direction: column; gap: 0.45rem; }
  .p-actions .qty-box { width: 100%; justify-content: space-between; }
  .p-actions .qty-box button { width: 38px; height: 36px; }
  .p-actions .qty-box input { flex: 1; height: 36px; }
  .add-btn { width: 100%; padding: 0.6rem; font-size: 0.86rem; }
  .brand-tag { font-size: 0.62rem; }

  /* cart item rows: stack name/meta over qty + price */
  .ci {
    display: grid; grid-template-columns: auto 1fr auto;
    grid-template-areas: "thumb info info" "thumb qty price";
    column-gap: 0.7rem; row-gap: 0.55rem; align-items: center;
  }
  .ci-thumb { grid-area: thumb; align-self: start; }
  .ci-info { grid-area: info; }
  .ci .qty-box { grid-area: qty; width: fit-content; }
  .ci-price { grid-area: price; align-self: center; }
  .ci-name { font-size: 0.9rem; }

  /* cart FAB: compact, safe-area aware */
  .cart-fab { right: 1rem; bottom: 1rem; padding: 0.8rem 1.2rem; font-size: 0.92rem; }
}

@media (max-width: 380px) {
  .product-grid { gap: 0.55rem; }
  .p-body { padding: 0.6rem 0.6rem 0.75rem; }
  .p-name { font-size: 0.8rem; }
}

/* ============================================================
   ANIMATIONS — high-end motion layer (JS adds html.anim)
   ============================================================ */

/* header elevation on scroll */
.site-header { transition: background 0.3s ease, box-shadow 0.3s ease; }
.site-header .container { transition: height 0.3s ease; }
.site-header.scrolled { background: rgba(8, 24, 44, 0.98); box-shadow: 0 12px 32px rgba(8, 24, 44, 0.35); }
.site-header.scrolled .container { height: 62px; }

/* scroll progress bar */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1000;
  background: linear-gradient(90deg, var(--gold), var(--teal));
  transform: scaleX(0); transform-origin: 0 50%; pointer-events: none;
}

/* reveal-on-scroll */
html.anim .reveal { opacity: 0; transform: translateY(26px); }
html.anim .reveal.in {
  opacity: 1; transform: none;
  transition: opacity 0.75s cubic-bezier(0.16, 0.84, 0.28, 1) var(--d, 0ms),
              transform 0.75s cubic-bezier(0.16, 0.84, 0.28, 1) var(--d, 0ms);
}
html.anim .section-head h2::after {
  content: ""; display: block; width: 58px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-deep));
  margin: 0.9rem auto 0; transform: scaleX(0); transform-origin: 50% 50%;
  transition: transform 0.7s cubic-bezier(0.16, 0.84, 0.28, 1) 0.35s;
}
html.anim .section-head.in h2::after { transform: scaleX(1); }

/* hero intro */
html.anim .hero .hero-kicker { animation: fadeDown 0.7s 0.08s cubic-bezier(0.16, 0.84, 0.28, 1) both; }
html.anim .hero p.lead { animation: fadeUp 0.85s 0.95s cubic-bezier(0.16, 0.84, 0.28, 1) both; }
html.anim .hero .hero-actions { animation: fadeUp 0.85s 1.12s cubic-bezier(0.16, 0.84, 0.28, 1) both; }
.hero h1 .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.13em; margin-bottom: -0.13em; }
.hero h1 .w > span { display: inline-block; transform: translateY(112%); animation: wordUp 0.85s cubic-bezier(0.16, 0.84, 0.28, 1) both; }
@keyframes wordUp { to { transform: translateY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: none; } }

/* hero glow orbs */
.glow-orb { position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none; z-index: 1; will-change: transform; }
.orb-a { width: 420px; height: 420px; right: 8%; top: -120px; background: rgba(37, 177, 196, 0.22); animation: orbFloat 11s ease-in-out infinite alternate; }
.orb-b { width: 360px; height: 360px; left: -90px; bottom: -60px; background: rgba(240, 180, 41, 0.13); animation: orbFloat 14s ease-in-out infinite alternate-reverse; }
@keyframes orbFloat { from { translate: 0 0; } to { translate: 24px 30px; } }

/* animated layered waves */
.hero-waves { height: 96px; overflow: hidden; }
.hero-waves svg { position: absolute; bottom: 0; left: 0; width: 200%; height: 90px; }
.hero-waves .wave-back { bottom: 12px; opacity: 0.45; animation: waveSlide 26s linear infinite reverse; }
.hero-waves .wave-front { animation: waveSlide 15s linear infinite; }
@keyframes waveSlide { to { transform: translateX(-50%); } }

/* gold button sheen */
.btn-gold { position: relative; overflow: hidden; }
.btn-gold::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 36%; left: -60%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg); transition: left 0.55s ease;
}
.btn-gold:hover::after { left: 130%; }

/* brand marquee */
.brand-marquee { overflow: hidden; padding: 2.1rem 0 0.4rem; position: relative; }
.brand-marquee::before, .brand-marquee::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 110px; z-index: 2; pointer-events: none;
}
.brand-marquee::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.brand-marquee::after { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }
.bm-track { display: flex; width: max-content; animation: bmScroll 36s linear infinite; }
.brand-marquee:hover .bm-track { animation-play-state: paused; }
.bm-item { display: flex; align-items: center; white-space: nowrap; }
.bm-item span {
  font-family: var(--font-display); font-weight: 700; font-size: 0.82rem;
  letter-spacing: 0.2em; text-transform: uppercase; color: #9fb1c7; padding: 0 1.6rem;
  display: flex; align-items: center; gap: 3.2rem;
}
.bm-item span::after { content: "·"; color: var(--gold); font-size: 1.1rem; }
@keyframes bmScroll { to { transform: translateX(-50%); } }

/* product card skeletons */
.p-card.sk { pointer-events: none; }
.sk-visual, .sk-line {
  background: linear-gradient(90deg, #e8eef6 25%, #f6f9fc 40%, #e8eef6 60%);
  background-size: 300% 100%; animation: shimmer 1.3s linear infinite;
}
.sk-visual { height: 120px; }
.sk-line { height: 12px; border-radius: 6px; margin-top: 10px; }
.sk-line.w40 { width: 40%; }
.sk-line.w80 { width: 80%; }
.sk-line.w60 { width: 60%; }
@keyframes shimmer { to { background-position: -300% 0; } }

/* fly-to-cart dot + FAB bump */
.fly-dot {
  position: fixed; z-index: 500; width: 16px; height: 16px; margin: -8px 0 0 -8px;
  border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffd97a, var(--gold-deep));
  box-shadow: 0 4px 14px rgba(240, 180, 41, 0.6); pointer-events: none;
  transition: transform 0.58s cubic-bezier(0.3, 0.7, 0.3, 1), opacity 0.58s ease;
}
.cart-fab.bump { animation: fabBump 0.45s cubic-bezier(0.3, 1.6, 0.4, 1); }
@keyframes fabBump { 35% { transform: scale(1.14); } }

/* cart drawer item entrance (only while opening) */
.cart-drawer.animate-in .ci { opacity: 0; animation: ciIn 0.45s cubic-bezier(0.16, 0.84, 0.28, 1) calc(0.08s + var(--i, 0) * 50ms) forwards; }
@keyframes ciIn { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }

/* shop hero entrance (CSS-only) */
html.anim .shop-hero h1 { animation: fadeUp 0.7s 0.05s both; }
html.anim .shop-hero p { animation: fadeUp 0.7s 0.18s both; }
html.anim .shop-toolbar { animation: fadeUp 0.6s 0.3s both; }

/* admin login entrance (CSS-only) */
html.anim .login-card { animation: cardPop 0.6s cubic-bezier(0.16, 0.84, 0.28, 1) both; }
@keyframes cardPop { from { opacity: 0; transform: translateY(26px) scale(0.97); } to { opacity: 1; transform: none; } }

/* search focus glow */
.search-box input:focus { box-shadow: 0 0 0 4px rgba(37, 177, 196, 0.15); }

/* sidebar / tile icon colors (SVG icon set) */
.cat-item > button > svg { color: var(--navy-3); flex: none; }
.cat-item.active > button > svg { color: var(--gold); }
.cat-tile .ct-icon svg { color: rgba(255, 255, 255, 0.9); }
.cart-empty svg { margin: 0 auto 0.8rem; color: var(--line); }

/* ---------- admin: product management ---------- */
.pt-row { display: grid; grid-template-columns: 60px 2fr 1.1fr 0.7fr 0.7fr; gap: 0.8rem; padding: 0.65rem 1.4rem; align-items: center; border-bottom: 1px solid var(--line); font-size: 0.92rem; transition: background 0.12s; }
.pt-row:last-child { border-bottom: none; }
.pt-row:hover { background: #f8fafd; }
.pt-thumb { width: 50px; height: 50px; border-radius: 10px; overflow: hidden; display: block; color: #fff; }
.pt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pt-price { font-weight: 700; color: var(--navy); text-align: right; }
.badge-custom { display: inline-block; background: #ecfdf5; color: var(--ok); font-size: 0.66rem; font-weight: 700; padding: 0.08rem 0.5rem; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.05em; vertical-align: 1px; }
.edit-image-row { display: flex; gap: 1.1rem; align-items: center; }
.edit-thumb { width: 86px; height: 86px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; flex: none; color: var(--muted); }
.edit-thumb img, .edit-thumb span { width: 100%; height: 100%; object-fit: cover; display: flex; align-items: center; justify-content: center; }
.hint { font-size: 0.78rem; color: var(--muted); margin-top: 0.5rem; }

/* product images on store cards + cart */
.p-visual .p-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.p-visual .brand-tag { z-index: 2; }
.ci-thumb { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex: none; border: 1px solid var(--line); }

@media (max-width: 860px) {
  .pt-cols { display: none; }
  .pt-row { grid-template-columns: 50px 1fr auto; }
  .pt-row > span:nth-child(3), .pt-row > span:nth-child(4) { display: none; }
}

/* 404 page */
.notfound {
  min-height: calc(100vh - 72px); display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 3rem 1.5rem;
  background: linear-gradient(160deg, #0a1d36 0%, var(--navy) 60%, #0e2c52 100%); color: #fff;
}
.notfound h1 { color: var(--gold); font-size: clamp(4rem, 12vw, 7rem); line-height: 1; }
.notfound h2 { color: #fff; margin: 0.6rem 0 0.9rem; }
.notfound p { color: rgba(255, 255, 255, 0.72); max-width: 460px; margin: 0 auto 1.8rem; }

/* reduced motion: kill everything */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .scroll-progress, .fly-dot { display: none !important; }
  .bm-track { animation: none !important; }
}

/* ---------- invoice ---------- */
.invoice-wrap { width: min(820px, 100%); margin: auto; display: flex; flex-direction: column; gap: 1rem; }
.invoice-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: #fff; }
.invoice-toolbar > span { font-weight: 600; font-size: 1rem; }
.invoice-toolbar-actions { display: flex; gap: 0.6rem; }

.invoice-sheet {
  background: #fff; color: #1a2433; border-radius: 12px; box-shadow: var(--shadow-lg);
  padding: 2.6rem 2.8rem; font-size: 0.92rem; line-height: 1.5;
}
.inv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; padding-bottom: 1.4rem; border-bottom: 3px solid var(--navy); }
.inv-brand { display: flex; gap: 0.8rem; align-items: center; max-width: 60%; }
.inv-logo { width: 46px; height: 46px; border-radius: 11px; flex: none; background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.inv-brand-text b { display: block; font-family: var(--font-display); font-size: 0.96rem; color: var(--navy); line-height: 1.25; letter-spacing: 0.01em; }
.inv-brand-text span { font-size: 0.8rem; color: #64748b; }
.inv-title { text-align: right; flex: none; }
.inv-title h1 { font-family: var(--font-display); font-size: 2rem; letter-spacing: 0.08em; color: var(--navy); line-height: 1; }
.inv-title span { display: block; font-size: 0.85rem; color: #64748b; margin-top: 0.25rem; }

.inv-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem 2.4rem; padding: 1.4rem 0; }
.inv-meta-h { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold-deep); font-weight: 700; margin-bottom: 0.6rem; }
.inv-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.22rem 0; border-bottom: 1px dotted #e2e8f0; }
.inv-row b { color: #64748b; font-weight: 500; }
.inv-row span { color: #1a2433; font-weight: 600; text-align: right; }

.inv-table { width: 100%; border-collapse: collapse; margin-top: 0.6rem; }
.inv-table thead th { background: var(--navy); color: #fff; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.6rem 0.8rem; text-align: left; }
.inv-table th.ta-r, .inv-table td.ta-r { text-align: right; }
.inv-table th.ta-c, .inv-table td.ta-c { text-align: center; }
.inv-table tbody td { padding: 0.6rem 0.8rem; border-bottom: 1px solid #e8edf3; }
.inv-table tbody tr:nth-child(even) td { background: #f8fafc; }
.inv-variant { color: #94a3b8; font-size: 0.85em; }
.inv-table tfoot td { padding: 0.85rem 0.8rem; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--navy); border-top: 2px solid var(--navy); }

.inv-notes { margin-top: 1.2rem; font-size: 0.86rem; color: #475569; background: #f8fafc; border-left: 3px solid var(--gold); padding: 0.7rem 1rem; border-radius: 0 8px 8px 0; }

.inv-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid #e2e8f0; }
.inv-foot-company b { display: block; font-size: 0.82rem; color: var(--navy); margin-bottom: 0.25rem; }
.inv-foot-company span { display: block; font-size: 0.78rem; color: #64748b; line-height: 1.55; }
.inv-sign { text-align: center; font-size: 0.78rem; color: #64748b; flex: none; }
.inv-sign-line { display: block; width: 180px; border-bottom: 1.5px solid #94a3b8; margin-bottom: 0.5rem; height: 38px; }

@media (max-width: 640px) {
  .invoice-sheet { padding: 1.5rem 1.3rem; }
  .inv-head { flex-direction: column; }
  .inv-title { text-align: left; }
  .inv-meta { grid-template-columns: 1fr; gap: 1rem; }
  .inv-foot { flex-direction: column; align-items: stretch; }
  .inv-table thead th, .inv-table tbody td { padding: 0.5rem 0.5rem; font-size: 0.84rem; }
}

/* ---------- invoice print (PDF) ---------- */
@media print {
  @page { size: A4; margin: 12mm; }
  body.printing-invoice { background: #fff !important; }
  body.printing-invoice > * { display: none !important; }
  body.printing-invoice > #invoiceVeil {
    display: block !important; position: static !important; background: #fff !important;
    padding: 0 !important; overflow: visible !important;
  }
  body.printing-invoice .invoice-toolbar { display: none !important; }
  body.printing-invoice .invoice-wrap { display: block !important; width: 100% !important; max-width: 100% !important; margin: 0 !important; gap: 0 !important; }
  body.printing-invoice .invoice-sheet { box-shadow: none !important; border-radius: 0 !important; margin: 0 !important; padding: 0 !important; width: 100% !important; max-width: 100% !important; }
  .inv-table thead th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
