:root {
  --navy: #0B2545;
  --navy-soft: #1D3A63;
  --red: #E63946;
  --red-dark: #C6303B;
  --bg: #FFFFFF;
  --bg-alt: #F5F7FA;
  --panel: #FFFFFF;
  --ink: #17203A;
  --ink-soft: #5B6478;
  --line: #E4E8EF;

  --font-display: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;

  --radius: 6px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.4em;
  color: var(--navy);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1rem; font-weight: 600; }

.accent { color: var(--red); }

p { margin: 0 0 1em; color: var(--ink-soft); max-width: 62ch; }

a { color: inherit; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--red);
  margin: 0 0 0.8em;
}
.eyebrow-light { color: rgba(255,255,255,0.75); }

/* Announcement bar */
.announce {
  background: var(--navy);
  color: #fff;
  text-align: center;
  font-size: 0.82rem;
  padding: 8px 16px;
  font-weight: 500;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--navy);
  text-decoration: none;
}
.logo svg { color: var(--red); }

.main-nav { display: flex; gap: 26px; }
.main-nav a { text-decoration: none; font-size: 0.92rem; font-weight: 600; color: var(--ink); }
.main-nav a:hover { color: var(--red); }

.cart-btn {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.88rem;
  background: var(--navy);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cart-btn:hover { background: var(--navy-soft); }

.cart-count {
  font-family: var(--font-body);
  font-weight: 700;
  background: var(--red);
  color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

/* Hero */
.hero { padding: 56px 0 44px; background: linear-gradient(180deg, #F1F4FB 0%, #FFFFFF 100%); }
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}
.lede { font-size: 1.05rem; }
.hero-actions { display: flex; gap: 14px; margin-top: 8px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  text-decoration: none;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  border: 1.5px solid transparent;
  text-align: center;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-outline:hover { background: rgba(11,37,69,0.06); }

.hero-art { aspect-ratio: 4 / 3.4; }

/* Trust strip */
.trust-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px 0; background: var(--bg-alt); }
.trust-inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.trust-item { display: flex; gap: 12px; align-items: center; color: var(--navy); }
.trust-item p { margin: 0; font-size: 0.9rem; color: var(--ink); font-weight: 500; max-width: none; }

/* Category tiles */
.categories { padding: 56px 0 16px; }
.cat-tiles {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.cat-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 12px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--navy);
  font-weight: 700;
  font-size: 0.92rem;
  text-align: center;
  border: 1px solid var(--line);
  cursor: pointer;
}
.cat-tile:hover { border-color: var(--red); color: var(--red); }
.cat-tile svg { width: 30px; height: 30px; }

/* Rails (New arrivals / Best sellers) */
.rail { padding: 48px 0; }
.rail-alt { background: var(--bg-alt); }
.rail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
}
.rail-head h2 { margin: 0 0 2px; }
.rail-sub { margin: 0; font-size: 0.9rem; }
.rail-link {
  background: none;
  border: none;
  color: var(--red);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  white-space: nowrap;
}
.rail-grid { grid-template-columns: repeat(4, 1fr) !important; }

/* Shop */
.shop { padding: 56px 0 64px; }
.shop-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}
.shop-head h2 { margin: 0; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-btn {
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 600;
  background: transparent;
  border: 1.5px solid var(--line);
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink-soft);
}
.filter-btn.active { background: var(--navy); color: #fff; border-color: var(--navy); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}

.product-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.product-card:hover { border-color: var(--navy); box-shadow: 0 6px 18px rgba(11,37,69,0.08); }
.product-card { cursor: pointer; }
.product-card .qty-control,
.product-card .product-footer { cursor: default; }

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 4px 9px;
  border-radius: 4px;
  color: #fff;
  z-index: 1;
}
.badge-new { background: var(--navy); }
.badge-bestseller { background: var(--red); }

.product-icon { width: 100%; height: 90px; }
.product-icon svg { width: 100%; height: 100%; }

.product-photo {
  width: 100%;
  height: 160px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}

.product-card h3 { margin: 0; color: var(--ink); }
.product-cat { font-size: 0.76rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.03em; font-weight: 600; margin: -6px 0 0; }
.product-spec { font-size: 0.85rem; color: var(--ink-soft); margin: 0; min-height: 2.6em; }

.product-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-add-cart {
  flex: 1;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0 12px;
  height: 34px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-add-cart:hover { background: var(--navy-soft); }
.btn-add-cart.added { background: #1E8E5A; }

.price { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--navy); }

.qty-control {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
}
.qty-control button {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
}
.qty-control span {
  font-weight: 700;
  font-size: 0.88rem;
  min-width: 20px;
  text-align: center;
}

/* How it works */
.how { padding: 48px 0 72px; background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 28px; }
.steps li { display: flex; gap: 18px; align-items: flex-start; }
.step-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  background: var(--navy);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.steps h3 { margin-bottom: 4px; }
.steps p { margin: 0; }

/* Contact */
.contact { padding: 64px 0; }
.contact-inner { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: start; }
.contact-list { margin: 0; }
.contact-list div { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 10px 0; max-width: 420px; }
.contact-list dt { color: var(--ink-soft); font-size: 0.9rem; }
.contact-list dd { margin: 0; font-weight: 700; }

.payid-card {
  background: var(--navy);
  color: #fff;
  padding: 24px;
  border-radius: var(--radius);
}
.payid-value { font-weight: 700; font-size: 1.3rem; margin: 0 0 10px; }
.payid-note { color: rgba(255,255,255,0.7); font-size: 0.85rem; margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 24px 0; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer-inner p { margin: 0; font-size: 0.85rem; color: var(--ink-soft); }
.footer-edit-note code { font-family: monospace; background: var(--bg-alt); padding: 2px 6px; border-radius: 2px; }

/* Product detail modal */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(11, 37, 69, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 45;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }

.product-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -48%);
  width: min(760px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(11,37,69,0.25);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  padding: 20px;
}
.product-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  background: var(--bg-alt);
  border: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  color: var(--ink);
  z-index: 2;
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.modal-main-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--bg-alt);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.modal-main-photo img { width: 100%; height: 100%; object-fit: contain; padding: 20px; }
.modal-main-photo svg { width: 60%; height: 60%; }

.modal-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.modal-thumb {
  width: 56px; height: 56px;
  border-radius: 4px;
  border: 1.5px solid var(--line);
  background: var(--bg-alt);
  cursor: pointer;
  overflow: hidden;
  padding: 0;
}
.modal-thumb.active { border-color: var(--red); }
.modal-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }

.modal-info { display: flex; flex-direction: column; padding-top: 6px; }
.modal-info h2 { margin: 0 0 8px; font-size: 1.5rem; }
.modal-price { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--navy); margin: 0 0 14px; }
.modal-desc { margin-bottom: 20px; }
.modal-footer { margin-top: auto; display: flex; gap: 12px; align-items: center; }
.modal-footer .qty-control { flex-shrink: 0; }
.modal-footer .qty-control button { width: 34px; height: 34px; font-size: 1.1rem; }
.modal-footer .btn { flex: 1; }

@media (max-width: 640px) {
  .modal-body { grid-template-columns: 1fr; }
}

/* Cart drawer */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(11, 37, 69, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 30;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100%;
  width: min(420px, 92vw);
  background: #fff;
  z-index: 40;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(11,37,69,0.12);
}
.drawer.open { transform: translateX(0); }

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}
.drawer-head h2 { margin: 0; font-size: 1.25rem; }
.drawer-close {
  background: none; border: none; cursor: pointer;
  font-size: 1.1rem; color: var(--ink);
}

.drawer-body { padding: 20px 22px; overflow-y: auto; flex: 1; }

.cart-list { list-style: none; padding: 0; margin: 0; }
.cart-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.cart-item-name { font-weight: 600; }
.cart-item-meta { color: var(--ink-soft); font-size: 0.82rem; }
.cart-item-remove { background: none; border: none; color: var(--red); cursor: pointer; font-size: 0.8rem; text-decoration: underline; padding: 0; }

.cart-empty { color: var(--ink-soft); font-size: 0.9rem; }

.cart-total-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 16px 0; margin-top: 6px; border-top: 2px solid var(--navy);
  font-weight: 700;
}
.cart-total { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--navy); }

.payment-choice { margin-top: 20px; }
.field-label { font-size: 0.85rem; font-weight: 700; margin: 16px 0 8px; color: var(--navy); }
.payment-choice label { display: flex; gap: 8px; align-items: center; font-size: 0.92rem; margin-bottom: 8px; }

.payid-inline { background: var(--bg-alt); border: 1px solid var(--line); padding: 14px; border-radius: var(--radius); margin: 10px 0 6px; }
.payid-inline .payid-value { color: var(--navy); font-size: 1.05rem; margin: 0; }
.payid-inline .eyebrow { margin-bottom: 4px; }

.send-buttons { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.send-buttons .btn { width: 100%; }

@media (max-width: 900px) {
  .cat-tiles { grid-template-columns: repeat(3, 1fr); }
  .rail-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 780px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 280px; margin: 0 auto; }
  .trust-inner { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .cat-tiles { grid-template-columns: repeat(2, 1fr); }
  .rail-grid { grid-template-columns: 1fr 1fr !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .drawer, .drawer-backdrop { transition: none; }
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
