@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:wght@400;500;600&display=swap');

/* ── Ageia — NOOS brand display face ──────────────────────────
   Drop-in: place ageia.otf / ageia.ttf in /frontend/fonts/.
   Falls back to a high-contrast editorial serif until present.   */
@font-face {
  font-family: 'Ageia';
  src: url('../fonts/ageia.otf') format('opentype'),
       url('../fonts/ageia.ttf') format('truetype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Core — warm darks (logo-matched depth) */
  --ink:       #1C1C1A;
  --ink2:      #252521;
  --ink3:      #323230;
  --slate:     #5C5C54;
  --muted:     #8C8C82;

  /* Surfaces — warm off-whites */
  --surf:      #EEEAE3;
  --mist:      #F7F4EE;
  --warm:      #F5F0E6;
  --white:     #FEFCF8;

  /* Brand Sage Green — extracted from logo background */
  --grn:       #6B7A5A;
  --grn2:      #57684A;
  --grn3:      #35422B;
  --grn-lt:    #C5D4BB;
  --grn-pale:  #E6EDE0;

  /* Cream Accent — extracted from logo letterforms */
  --cream:     #F0E4D4;
  --cream2:    #E4D4C0;

  /* Secondary */
  --gold:      #A0843A;
  --gold-lt:   #F0E8D0;
  --red:       #B03A2E;
  --red-lt:    #F5E8E6;

  /* Borders — warm */
  --border:    #E0DDD6;
  --border2:   #CAC6BC;

  /* ── NOOS Luxury System (dark editorial) ──────────────────────
     Disciplined palette: ~95% noir + ivory, sage as the single
     living accent, bone/champagne for hairlines & metallic warmth. */
  --noir:      #0D0D0D;   /* ground */
  --noir2:     #131312;   /* raised dark surface */
  --noir3:     #1A1A19;   /* cards / inputs on dark */
  --ivory:     #F8F6F2;   /* primary text on dark */
  --ivory-60:  rgba(248,246,242,0.60);
  --ivory-40:  rgba(248,246,242,0.40);
  --ivory-20:  rgba(248,246,242,0.20);
  --ivory-10:  rgba(248,246,242,0.10);
  --sage:      #A5B08F;   /* the one accent — interactive truth only */
  --sage-deep: #828E6C;
  --bone:      #D9D0BE;   /* warm secondary accent */
  --champagne: #E7E1D3;   /* luxury highlight / hairlines */
  --hair:      rgba(231,225,211,0.14);  /* champagne hairline (on dark) */

  /* Warm cream light ground (sampled from the campaign photo) */
  --paper:     #E2DBD3;   /* page ground */
  --paper2:    #EAE5DC;   /* raised cream surface */
  --card:      #F4F1EA;   /* card surface on cream */
  --warmdark:  #23251C;   /* warm olive-charcoal — hero ground (no harsh black) */
  --ink-70:    rgba(28,28,26,0.70);
  --ink-50:    rgba(28,28,26,0.50);
  --hair-d:    rgba(28,28,26,0.12);     /* hairline on cream */

  --ff:    'Ageia', 'Playfair Display', Georgia, serif;
  --fb:    'Inter', system-ui, -apple-system, sans-serif;
  --f-lux: 'Ageia', 'Playfair Display', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  font-family: var(--fb);
  background: var(--mist);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--fb); border: none; background: none; }
input, select, textarea { font-family: var(--fb); }
img { display: block; max-width: 100%; }

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 0;
  font-family: var(--fb);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn-primary:hover { background: var(--ink3); }

.btn-green {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  background: var(--grn);
  color: #fff;
  border: none;
  border-radius: 0;
  font-family: var(--fb);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn-green:hover { background: var(--grn2); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  background: transparent;
  color: var(--slate);
  border: 0.5px solid var(--border2);
  border-radius: 0;
  font-family: var(--fb);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.btn-outline:hover { border-color: var(--grn); color: var(--grn); }

/* Forms */
.form-group { display: flex; flex-direction: column; gap: 5px; }

.form-label {
  font-family: var(--fb);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--white);
  border: 0.5px solid var(--border2);
  border-radius: 0;
  font-family: var(--fb);
  font-size: 12px;
  color: var(--ink);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus { border-color: var(--grn); }

.form-textarea { height: 80px; resize: none; }

/* Status Pills */
.pill {
  display: inline-block;
  padding: 3px 9px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
}
.pill-pending    { background: #F5F0DC; color: #7A6020; }
.pill-processing { background: var(--grn-pale); color: var(--grn2); }
.pill-shipped    { background: var(--surf); color: var(--slate); }
.pill-delivered  { background: #E0EDE0; color: #2A562A; }
.pill-cancelled  { background: var(--red-lt); color: var(--red); }

/* Breadcrumb */
.breadcrumb {
  background: var(--surf);
  border-bottom: 0.5px solid var(--border);
  padding: 10px 22px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
}
.breadcrumb .current { color: var(--ink3); font-weight: 500; }

/* Toast */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-family: var(--fb);
  border-left: 3px solid var(--grn);
  animation: slideIn 0.2s ease;
}
.toast.error { border-left-color: var(--red); }
.toast.success { border-left-color: var(--grn); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Auth Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal-box {
  background: var(--white);
  width: 340px;
  padding: 28px 24px;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 18px;
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: none;
}
.modal-title {
  font-family: var(--ff);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 20px;
}
.modal-tabs {
  display: flex;
  border-bottom: 0.5px solid var(--border);
  margin-bottom: 20px;
}
.modal-tab {
  flex: 1;
  padding: 8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  text-align: center;
  cursor: pointer;
  background: none;
  border: none;
}
.modal-tab.active { color: var(--ink); border-bottom: 2px solid var(--grn); }
.modal-form { display: flex; flex-direction: column; gap: 14px; }
.modal-switch { font-size: 11px; color: var(--muted); text-align: center; margin-top: 10px; }
.modal-switch a { color: var(--grn); cursor: pointer; }

/* Product Card shared */
.product-card {
  background: var(--white);
  border: 0.5px solid var(--border);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}
.product-card:hover {
  border-color: rgba(107,122,90,0.18);
  box-shadow: 0 8px 32px rgba(28,28,26,0.10);
  transform: translateY(-3px);
}
.product-card__image {
  aspect-ratio: 3/4;
  background: var(--surf);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.product-card__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.38s ease;
}
.product-card:hover .product-card__image img { transform: scale(1.05); }
.product-card__badge {
  position: absolute;
  top: 0;
  left: 0;
  padding: 4px 8px;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  z-index: 2;
}
.badge-new        { background: var(--ink); color: #fff; }
.badge-bestseller { background: var(--grn); color: #fff; }
.badge-sale       { background: var(--red); color: #fff; }
.badge-limited    { background: var(--gold); color: #fff; }

.product-card__wish {
  position: absolute;
  top: 0;
  right: 0;
  width: 30px;
  height: 30px;
  background: rgba(255,255,255,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.18s ease, background 0.18s ease;
}
.product-card:hover .product-card__wish { opacity: 1; }
.product-card__wish.active { opacity: 1; background: #fff; }
.product-card__wish i { font-size: 14px; color: var(--ink); }
.product-card__wish.active i { color: var(--red); }

.product-card__info { padding: 12px 14px 10px; flex: 1; }
.product-card__cat {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grn);
  margin-bottom: 3px;
}
.product-card__name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-card__price {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 2px;
}
.price-current { font-size: 13px; font-weight: 500; color: var(--ink); }
.price-old { font-size: 11px; color: var(--muted); text-decoration: line-through; }
.price-sale { font-size: 10px; color: var(--red); }
.price-discount {
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--red);
  background: var(--red-lt);
  padding: 2px 5px;
}
.product-card__colours {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}
.colour-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0.5px solid var(--border);
}

/* Cart sidebar */
.cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 900;
}
.cart-overlay.active { display: block; }
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -360px;
  width: 360px;
  height: 100vh;
  background: var(--white);
  z-index: 901;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
}
.cart-sidebar.open { right: 0; }
.cart-header {
  padding: 16px 18px;
  border-bottom: 0.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-header h3 { font-family: var(--ff); font-size: 22px; font-weight: 600; letter-spacing: 0.01em; }
.cart-close { font-size: 18px; color: var(--muted); }
.cart-items { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.cart-item {
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 0.5px solid var(--border);
}
.cart-item__img {
  width: 56px;
  height: 72px;
  background: var(--surf);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.cart-item__img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item__info { flex: 1; min-width: 0; }
.cart-item__name { font-size: 12px; font-weight: 500; margin-bottom: 2px; }
.cart-item__variant { font-size: 10px; color: var(--muted); margin-bottom: 6px; }
.cart-item__row { display: flex; align-items: center; justify-content: space-between; }
.cart-item__price { font-size: 12px; font-weight: 500; }
.cart-item__qty { display: flex; align-items: center; gap: 6px; }
.cart-item__qty button { width: 22px; height: 22px; border: 0.5px solid var(--border2); font-size: 14px; display: flex; align-items: center; justify-content: center; }
.cart-item__qty span { font-size: 12px; font-weight: 500; min-width: 18px; text-align: center; }
.cart-item__remove { color: var(--red); font-size: 14px; cursor: pointer; }
.cart-footer {
  padding: 14px 18px;
  border-top: 0.5px solid var(--border);
}
.cart-totals { margin-bottom: 12px; }
.cart-total-row { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.cart-total-row.main { font-size: 13px; font-weight: 500; color: var(--ink); border-top: 0.5px solid var(--border); padding-top: 8px; margin-top: 4px; }
.cart-checkout { width: 100%; }
.cart-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); }
.cart-empty i { font-size: 40px; opacity: 0.3; }

/* Order Progress Tracker */
.order-tracker {
  display: flex;
  align-items: center;
  position: relative;
  padding: 12px 0;
}
.tracker-step { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; position: relative; }
.tracker-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border2);
  position: relative;
  z-index: 1;
}
.tracker-dot.done { background: var(--grn); }
.tracker-dot.current { background: var(--grn); outline: 3px solid var(--grn-pale); outline-offset: 1px; }
.tracker-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.tracker-label.done, .tracker-label.current { color: var(--grn); }
.tracker-line {
  flex: 1;
  height: 1px;
  background: var(--border2);
  position: relative;
  top: -14px;
}
.tracker-line.done { background: var(--grn); }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Footer responsive grid */
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 20px;
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
}
@media (max-width: 400px) {
  .footer-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* Breadcrumb mobile */
@media (max-width: 480px) {
  .breadcrumb { padding: 8px 14px; font-size: 10px; overflow-x: auto; white-space: nowrap; }
}

/* Responsive base font */
@media (max-width: 768px) { html { font-size: 15px; } }
@media (max-width: 480px) { html { font-size: 14px; } }

/* Quick View overlay (inside image area) */
.quick-view-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 38px;
  background: rgba(13,13,13,0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--fb);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  opacity: 0;
  transition: opacity 0.22s ease;
  cursor: pointer;
  border: none;
  border-radius: 0;
  z-index: 2;
}
.product-card:hover .quick-view-overlay { opacity: 1; }

/* Card Add to Cart button (always visible below info) */
.card-atc-btn {
  width: 100%;
  height: 38px;
  background: var(--ink);
  color: #fff;
  border: none;
  font-family: var(--fb);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 0;
  flex-shrink: 0;
  transition: background 0.18s ease;
}
.card-atc-btn:hover { background: var(--grn); }

/* Colour dot (small circles in card) */
.colour-dot { border: 1px solid rgba(0,0,0,0.15); }
.pdot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.15);
  display: inline-block;
  flex-shrink: 0;
}

/* Quick View Modal */
.qv-box {
  width: 620px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 24px;
  position: relative;
}
.qv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.qv-left {
  background: var(--surf);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.qv-img-wrap {
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surf);
  flex-shrink: 0;
}
.qv-img-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.qv-img-wrap .placeholder-icon {
  font-size: 60px;
  color: var(--border2);
}
.qv-thumbs {
  display: flex;
  gap: 4px;
  padding: 6px 8px;
  flex-wrap: wrap;
  background: var(--surf);
}
.qv-thumb {
  width: 36px;
  height: 46px;
  background: var(--white);
  border: 1.5px solid transparent;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
}
.qv-thumb.active { border-color: var(--ink); }
.qv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qv-brand {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grn);
  margin-bottom: 2px;
}
.qv-name { font-family: var(--ff); font-size: 22px; font-weight: 600; letter-spacing: 0.01em; margin-bottom: 6px; line-height: 1.05; }
.qv-full-link { display: block; margin-top: 10px; font-size: 11px; color: var(--grn); font-weight: 500; letter-spacing: 0.08em; }
.qv-full-link:hover { text-decoration: underline; }
.qv-loading { display: flex; align-items: center; justify-content: center; min-height: 120px; }
.qv-spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--grn);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Mini Variant Modal */
.mv-box { width: 340px; max-width: calc(100vw - 32px); padding: 24px; }

/* Mobile cart sidebar — full width */
@media (max-width: 480px) {
  .cart-sidebar { width: 100%; right: -100%; }
  .cart-sidebar.open { right: 0; }
  .qv-box { padding: 14px; }
  .qv-grid { grid-template-columns: 1fr; }
  .qv-img-wrap { aspect-ratio: 3/2; max-height: 220px; }
}

@media (max-width: 640px) {
  .qv-grid { grid-template-columns: 1fr; }
  .qv-box { width: calc(100vw - 32px); }
}

/* ── Shared cream-luxury page chrome (scoped to .lux-page) ── */
body.lux-page { background: var(--paper); color: var(--ink); }
.lux-page .breadcrumb {
  background: var(--paper2);
  border-bottom-color: var(--hair-d);
  color: var(--ink-50);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 10px;
}
.lux-page .breadcrumb a { color: var(--ink-70); }
.lux-page .breadcrumb a:hover { color: var(--grn2); }
.lux-page .breadcrumb .current { color: var(--ink); }

/* Hamburger + Mobile Nav */
.nav-hamburger {
  display: none;
  width: 34px;
  height: 54px;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.65);
  font-size: 22px;
  background: none;
  border: none;
  cursor: pointer;
}
.mobile-nav {
  display: none;
  position: fixed;
  top: 54px;
  left: 0;
  right: 0;
  background: var(--ink);
  padding: 8px 0;
  z-index: 499;
  border-top: 0.5px solid rgba(255,255,255,0.1);
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block;
  padding: 14px 22px;
  font-family: var(--fb);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  border-bottom: 0.5px solid rgba(255,255,255,0.08);
  text-decoration: none;
}
.mobile-nav a:hover, .mobile-nav a.active { color: #fff; }
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}
