/* ============================================================
   DJSE Diamonds — Unified Brand Stylesheet
   Single source of truth for colors, header, footer, buttons.
   Loaded on every page; page-specific CSS stays inline per-page.
   ============================================================ */

:root {
  color-scheme: dark;
  /* Brand palette — dark mode */
  --gold: #d9b25c;
  --gold-light: #f2d28a;
  --gold-dim: #b8923f;

  --bg: #2e0812;
  --bg2: #3a0c18;
  --bg3: #3e0f1b;
  --bg4: #5a1a2b;

  --card: #46111f;
  --border: #7a2c3d;

  --text: #f8ecd4;
  --text-dim: #ecdcc0;
  --text-muted: #bf9d8a;
  --white: #ffffff;

  --ok: #4fbf7a;
  --bad: #e06666;

  --radius: 6px;
  --shadow: 0 18px 40px rgba(0,0,0,0.45);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Montserrat', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #a04a58; border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ── Top info bar (identical on every customer-facing page) ── */
.topbar { background: #1f050c; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--text-dim); }
.topbar-inner {
  max-width: 1280px; margin: 0 auto; min-height: 40px; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.topbar-item { display: flex; align-items: center; gap: 7px; letter-spacing: .3px; }
.topbar-item svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; flex-shrink: 0; }
@media (max-width: 720px) {
  .topbar-inner { justify-content: center; padding: 8px 16px; }
  .topbar-right .topbar-item:nth-child(2) { display: none; }
}

/* ── Site header (identical on every customer-facing page) ── */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(46,8,18,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  box-shadow: 0 2px 18px rgba(0,0,0,0.5);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 76px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gold);
  white-space: nowrap;
  flex-shrink: 0;
}
.logo img { height: 46px; width: auto; display: block; object-fit: contain; filter: drop-shadow(0 2px 8px rgba(0,0,0,.35)); }
/* Wordmark — Cinzel: classical Roman capitals, matches the engraved look of the DJSÉ logo */
.logo-text { display: flex; flex-direction: column; line-height: 1; font-family: 'Cinzel', 'Trajan Pro', 'Cormorant Garamond', serif; }
.logo-text b { font-size: 25px; font-weight: 700; letter-spacing: 6px; color: var(--gold-light); text-transform: uppercase; }
.logo-text small { font-size: 9.5px; font-weight: 500; letter-spacing: 7.5px; color: var(--gold); text-transform: uppercase; margin-top: 5px; padding-left: 2px; }
.logo:hover { opacity: 0.88; }

.nav-links { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.nav-links a {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 6px 14px;
  white-space: nowrap;
  position: relative;
  transition: color .2s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 14px; right: 14px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform .2s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a.cart-link { display: flex; align-items: center; gap: 6px; position: relative; padding-right: 18px; }
.nav-links a.cart-link svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.cart-badge {
  display: none;
  position: absolute; top: -6px; right: 2px;
  background: var(--gold); color: #3a0c18;
  font-size: 10px; font-weight: 700;
  border-radius: 999px; min-width: 16px; height: 16px; line-height: 16px;
  text-align: center; padding: 0 4px;
}

@media (max-width: 720px) {
  header.site-header { padding: 0 16px; }
  .header-inner { min-height: 64px; gap: 12px; }
  .logo img { height: 36px; }
  .logo-text b { font-size: 19px; letter-spacing: 4px; }
  .logo-text small { font-size: 8px; letter-spacing: 5px; margin-top: 4px; }
}

/* ── Buttons ── */
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 30px; border-radius: 3px;
  font-size: 13px; font-weight: 600; letter-spacing: 1.1px; text-transform: uppercase;
  transition: .2s ease; cursor: pointer; border: none;
}
.btn-primary { background: var(--gold); color: #3a0c18; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-secondary { border: 1px solid var(--border); color: var(--text-dim); background: transparent; }
.btn-secondary:hover { border-color: var(--gold); color: var(--gold-light); }

/* ── Site footer (identical on every customer-facing page) ── */
footer.site-footer {
  background: #1c040b;
  border-top: 1px solid var(--border);
  color: rgba(255,255,255,0.68);
  padding: 48px 24px 0;
}
.site-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.site-footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.site-footer-brand img { height: 42px; width: auto; }
.site-footer-brand .logo-text b { font-size: 20px; letter-spacing: 5px; }
.site-footer-brand .logo-text small { font-size: 8px; letter-spacing: 6px; }
.site-footer p { font-size: 13px; line-height: 1.8; max-width: 320px; }
.site-footer h4 {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold-light);
  margin-bottom: 14px; font-weight: 600;
}
.site-footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.site-footer-links a { font-size: 13px; color: rgba(255,255,255,0.68); transition: color .2s; }
.site-footer-links a:hover { color: var(--gold-light); }
.site-footer-bottom {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding: 18px 0; font-size: 12px; color: rgba(255,255,255,0.45);
}
.site-footer-bottom a { color: rgba(255,255,255,0.45); }
.site-footer-bottom a:hover { color: var(--gold-light); }

@media (max-width: 720px) {
  .site-footer-inner { grid-template-columns: 1fr; gap: 28px; text-align: left; }
  .site-footer-bottom { justify-content: center; text-align: center; }
}


/* ═════════ Navigation: desktop dropdown + mobile hamburger ═════════ */
.nav-item { position: relative; display: flex; align-items: center; }
.nav-parent .caret { display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.sub-toggle, .nav-toggle { display: none; }
.submenu {
  position: absolute; top: calc(100% + 14px); left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 340px; padding: 12px; z-index: 120;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px;
  background: #2a0a12; border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 24px 50px rgba(0,0,0,.6), 0 0 0 1px rgba(217,178,92,.08);
  opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s;
}
.submenu::before { content: ''; position: absolute; left: 0; right: 0; top: -22px; height: 22px; } /* hover bridge */
.nav-links .submenu a {
  font-size: 11px; letter-spacing: 1.6px; padding: 10px 12px; border-radius: 8px;
  text-align: left; color: var(--text-dim); white-space: nowrap;
}
.nav-links .submenu a::after { display: none; }
.nav-links .submenu a:hover { background: rgba(217,178,92,.12); color: var(--gold-light); }
.nav-links .submenu a.sub-all { grid-column: 1 / -1; color: var(--gold-light); border-bottom: 1px solid var(--border); border-radius: 8px 8px 0 0; margin-bottom: 6px; }
.nav-item.has-sub:hover .submenu, .nav-item.has-sub:focus-within .submenu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav-item.has-sub:hover .caret { transform: rotate(225deg) translateY(-1px); }

@media (max-width: 860px) {
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 0 11px; margin-left: auto;
    background: transparent; border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
  }
  .nav-toggle span { display: block; height: 2px; width: 100%; background: var(--gold-light); border-radius: 2px; transition: transform .25s, opacity .2s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0; margin-left: 0;
    flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 0;
    background: #1f050c;
    border-bottom: 1px solid var(--gold-dim); box-shadow: 0 24px 40px rgba(0,0,0,.55);
    max-height: 0; overflow: hidden; opacity: 0; visibility: hidden; padding: 0 20px;
    transition: max-height .3s ease, opacity .2s, padding .3s, visibility .3s;
  }
  .nav-links.open { max-height: calc(100vh - 70px); overflow-y: auto; opacity: 1; visibility: visible; padding: 6px 20px 20px; }
  .nav-links > a, .nav-links .nav-parent { font-size: 12px; letter-spacing: 2.4px; padding: 16px 4px; text-align: left; border-bottom: 1px solid var(--border); }
  .nav-links a::after { display: none; }
  .nav-item { flex-wrap: wrap; }
  .nav-item .nav-parent { flex: 1; }
  .nav-parent .caret { display: none; }
  .sub-toggle {
    display: block; width: 52px; align-self: stretch; background: transparent; border: 0; border-bottom: 1px solid var(--border); cursor: pointer; position: relative;
  }
  .sub-toggle::before { content: ''; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--gold-light); border-bottom: 2px solid var(--gold-light); transform: translate(-50%,-70%) rotate(45deg); transition: transform .2s; }
  .nav-item.open .sub-toggle::before { transform: translate(-50%,-30%) rotate(225deg); }
  .submenu {
    position: static; width: 100%; transform: none; opacity: 1; visibility: visible;
    display: none; padding: 10px 0 6px; background: transparent; border: 0; box-shadow: none; border-radius: 0;
    grid-template-columns: 1fr 1fr; gap: 4px 10px;
  }
  .submenu::before { display: none; }
  .nav-item.open .submenu { display: grid; }
  .nav-item.has-sub:hover .submenu, .nav-item.has-sub:focus-within .submenu { transform: none; }
  .nav-links .submenu a { font-size: 11px; padding: 11px 12px; background: rgba(217,178,92,.06); border: 1px solid var(--border); border-radius: 8px; }
  .nav-links .submenu a.sub-all { border-radius: 8px; margin-bottom: 0; }
}
