:root {
  --ink: #12151c;
  --paper: #fbfaf8;
  --panel: #ffffff;
  --line: #e6e3dc;
  --accent: #1f6f5c;
  --accent-ink: #ffffff;
  --muted: #6b7178;
  --success: #1f6f5c;
  --radius: 10px;
  --font-display: 'Iowan Old Style', 'Georgia', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
}

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

a { color: inherit; text-decoration: none; }

/* Topbar */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(251,250,248,0.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.brand span { color: var(--accent); }
.nav { display: flex; gap: 28px; }
.nav a { font-size: 14px; font-weight: 600; color: var(--muted); }
.nav a:hover { color: var(--ink); }
.topbar-right { display: flex; align-items: center; gap: 14px; }
#currency-select { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; background: var(--panel); font-size: 13px; }
.cart-btn { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 8px 14px; font-size: 14px; cursor: pointer; }
.mobile-nav-toggle { display: none; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; width: 38px; height: 38px; font-size: 17px; cursor: pointer; align-items: center; justify-content: center; }

/* Hero */
.hero { padding: 72px 0 48px; text-align: center; }
.eyebrow { color: var(--accent); font-weight: 700; letter-spacing: 0.04em; font-size: 13px; text-transform: uppercase; margin-bottom: 16px; }
.hero h1 { font-family: var(--font-display); font-size: clamp(32px, 5vw, 52px); line-height: 1.1; margin: 0 0 20px; max-width: 780px; margin-inline: auto; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero-sub { color: var(--muted); font-size: 18px; max-width: 600px; margin: 0 auto 32px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; margin-bottom: 56px; }
.hero-stats { display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; align-items: center; }
.hero-stats strong { font-family: var(--font-display); font-size: 26px; }
.hero-stats span { color: var(--muted); font-size: 13px; }

.btn { display: inline-block; padding: 13px 26px; border-radius: 999px; font-weight: 700; font-size: 15px; cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { opacity: 0.92; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-block { width: 100%; text-align: center; border: none; }

/* Trust strip */
.trust-strip { background: var(--ink); color: #fff; padding: 14px 0; }
.trust-strip-inner { display: flex; justify-content: center; gap: 32px; flex-wrap: wrap; font-size: 13px; opacity: 0.9; }

/* Shop */
.section-title { font-family: var(--font-display); font-size: 30px; text-align: center; margin: 64px 0 8px; }
.section-title em { color: var(--accent); font-style: normal; }
.section-sub { text-align: center; color: var(--muted); max-width: 520px; margin: 0 auto 32px; }

.filters-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-chip { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 8px 16px; font-size: 13px; cursor: pointer; font-weight: 600; color: var(--muted); }
.filter-chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.sort-select-wrap { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.sort-select-wrap select { border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; background: var(--panel); font-size: 13px; color: var(--ink); }

@media (max-width: 640px) {
  .filters-row { justify-content: flex-start; }
}

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; margin-bottom: 24px; }
.loading { text-align: center; color: var(--muted); grid-column: 1 / -1; }

.product-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.product-card img { width: 100%; height: 140px; object-fit: cover; background: #eee; }
.product-card .no-image { width: 100%; height: 140px; display: flex; align-items: center; justify-content: center; background: #f1efe9; font-size: 40px; }
.product-card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card h4 { margin: 0; font-size: 16px; }
.product-card p { margin: 0; color: var(--muted); font-size: 13px; flex: 1; }
.product-card .price-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.product-card .price { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.stock-badge { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.stock-badge.in { background: #e6f4ef; color: var(--success); }
.stock-badge.out { background: #fbe9e7; color: #b3261e; }
.add-to-cart { margin-top: 8px; border: none; background: var(--ink); color: #fff; padding: 10px; border-radius: 8px; font-weight: 700; cursor: pointer; }
.add-to-cart:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }

.feature-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; margin: 56px 0; }
.feature { text-align: center; }
.feature-icon { font-size: 28px; }
.feature h3 { font-size: 15px; margin: 10px 0 6px; }
.feature p { font-size: 13px; color: var(--muted); margin: 0; }

/* FAQ */
.faq { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 40px 0 64px; }
.faq-list { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq-list details { border: 1px solid var(--line); border-radius: 8px; padding: 14px 18px; background: var(--paper); }
.faq-list summary { cursor: pointer; font-weight: 600; }
.faq-list p { color: var(--muted); margin: 10px 0 0; font-size: 14px; }

/* Contact */
.contact { padding: 56px 0; }
.contact-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }

/* Footer */
.footer { background: var(--ink); color: #fff; padding: 40px 0; text-align: center; }
.footer .brand { justify-content: center; }
.footer p { color: rgba(255,255,255,0.7); font-size: 13px; }
.fine-print { font-size: 12px; color: var(--muted); }

/* Cart drawer + overlay */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); opacity: 0; pointer-events: none; transition: opacity 0.2s; z-index: 90; }
.overlay.show { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: -380px; width: 360px; max-width: 90vw; height: 100%; background: var(--panel); z-index: 100; transition: right 0.25s ease; display: flex; flex-direction: column; }
.drawer.open { right: 0; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid var(--line); }
.cart-items { flex: 1; overflow-y: auto; padding: 16px 20px; }
.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.cart-item button { border: none; background: none; color: #b3261e; cursor: pointer; font-size: 13px; }
.drawer-foot { padding: 20px; border-top: 1px solid var(--line); }
.cart-total { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 12px; }
.icon-btn { border: none; background: none; font-size: 18px; cursor: pointer; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 110; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,0.5); }
.modal.open { display: flex; }
.modal-inner { background: var(--panel); border-radius: var(--radius); padding: 28px; width: 400px; max-width: 90vw; position: relative; }
.modal-close { position: absolute; top: 16px; right: 16px; }
.modal-inner label { display: block; margin-bottom: 14px; font-size: 13px; font-weight: 600; color: var(--muted); }
.modal-inner input, .modal-inner select { width: 100%; margin-top: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.error-text { color: #b3261e; font-size: 13px; min-height: 18px; }
.pay-amount { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.pay-address { word-break: break-all; background: var(--paper); padding: 10px; border-radius: 6px; font-family: monospace; font-size: 13px; }
.pay-status { color: var(--muted); font-size: 13px; }
.hidden { display: none; }
#delivered-keys { background: var(--paper); border-radius: 6px; padding: 10px; font-family: monospace; font-size: 13px; word-break: break-all; }

@media (max-width: 640px) {
  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 12px;
    box-shadow: 0 8px 16px -8px rgba(0,0,0,0.12);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: none; }
  .mobile-nav-toggle { display: flex; }
  .hero { padding: 48px 0 32px; }
}
