/* ============================================================
   ASMON JEWELRY — Design tokens & base
   ============================================================
   A premium jewelry palette inspired by candlelit showrooms:
   warm ivory backgrounds, deep midnight panels for drama,
   antique-gold accents, and refined typography.
   ============================================================ */

:root {
  /* ── Surfaces ─────────────────────────────────────────── */
  --ivory:        #FAF6EE;   /* page bg */
  --ivory-2:      #F3ECDF;   /* warm panel */
  --linen:        #EFE7D6;   /* card */
  --paper:        #FFFFFF;
  --midnight:     #0B0F14;   /* hero / footer */
  --midnight-2:   #131922;
  --midnight-3:   #1C2330;
  --slate:        #2E3744;

  /* ── Brand colors ─────────────────────────────────────── */
  --gold:         #C8A464;   /* primary accent */
  --gold-2:       #B0884A;   /* darker shadow */
  --gold-soft:    #E2C896;   /* highlight */
  --champagne:    #D9C7A4;
  --bronze:       #8C6A3F;

  /* ── Text ─────────────────────────────────────────────── */
  --ink:          #16181C;
  --ink-2:        #2C3038;
  --ink-3:        #535862;
  --muted:        #8A8E97;
  --on-dark:      #F5EFE2;
  --on-dark-mute: #B5AC97;

  /* ── Borders / dividers ───────────────────────────────── */
  --line:         #E5DCC6;
  --line-2:       #D8CDB1;
  --line-dark:    rgba(255,255,255,.10);

  /* ── Status ───────────────────────────────────────────── */
  --success:      #2F855A;
  --danger:       #B23B3B;

  /* ── Radii / shadows / motion ─────────────────────────── */
  --r-sm: 6px;
  --r:    12px;
  --r-lg: 20px;
  --r-pill: 999px;

  --sh-1: 0 1px 2px rgba(20,16,8,.04);
  --sh-2: 0 6px 18px rgba(20,16,8,.08);
  --sh-3: 0 22px 60px rgba(20,16,8,.18);
  --sh-gold: 0 10px 30px rgba(200,164,100,.30);

  --t-fast:    .18s ease;
  --t:         .28s cubic-bezier(.4,.0,.2,1);
  --t-slow:    .5s  cubic-bezier(.4,.0,.2,1);

  --container:  1280px;
  --gutter:     clamp(16px, 4vw, 36px);

  --font-sans:    'Vazirmatn', Tahoma, system-ui, sans-serif;
  --font-display: 'Cormorant Garamond', 'Vazirmatn', serif;
}

/* ── Reset / base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { direction: rtl; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--ivory);
  color: var(--ink);
  font-weight: 400;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--t), opacity var(--t); }
a:hover { color: var(--gold-2); }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
h1,h2,h3,h4,h5,h6 {
  margin: 0 0 .6em;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -.005em;
}
p { margin: 0 0 1em; color: var(--ink-2); }
hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
strong { font-weight: 700; }
::selection { background: var(--gold); color: var(--ink); }

/* ── Layout primitives ─────────────────────────────────── */
.container { width: min(var(--container), 100% - var(--gutter) * 2); margin-inline: auto; }
.container--narrow { max-width: 880px; }
.container--wide   { max-width: 1480px; }
.section { padding: clamp(56px, 8vw, 110px) 0; }
.section--tight { padding: clamp(40px, 5vw, 64px) 0; }
.section--flush-bottom { padding-bottom: 0 !important; }
.section--dark { background: var(--midnight); color: var(--on-dark); }
.section--dark h1,.section--dark h2,.section--dark h3,.section--dark h4 { color: var(--on-dark); }
.section--dark p { color: var(--on-dark-mute); }
.section--cream { background: var(--ivory-2); }

/* ── Typography helpers ────────────────────────────────── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: .78rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold-2);
  margin-bottom: 14px;
}
.eyebrow::before {
  content:""; width: 28px; height: 1px; background: currentColor;
}
.section--dark .eyebrow { color: var(--gold-soft); }

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.85rem, 3.6vw, 3rem);
  margin: 0 0 .35em;
  letter-spacing: -.01em;
}
.section-sub {
  color: var(--ink-3);
  font-size: 1.02rem;
  max-width: 640px;
  margin: 0 0 36px;
}
.section--dark .section-sub { color: var(--on-dark-mute); }

.section-head { margin-bottom: 48px; }
.section-head--row {
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 24px;
  margin-bottom: 48px;
}
.section-head--row .section-title { margin-bottom: 0; }

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-weight: 600; font-size: .95rem;
  border-radius: var(--r-pill);
  transition: transform var(--t), background var(--t), color var(--t), border-color var(--t), box-shadow var(--t);
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: var(--midnight);
  box-shadow: var(--sh-gold);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--gold-2), var(--bronze)); color: #fff; }

.btn-dark {
  background: var(--midnight);
  color: var(--on-dark);
}
.btn-dark:hover { background: var(--midnight-2); color: var(--gold-soft); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-2);
}
.btn-ghost:hover { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.section--dark .btn-ghost { color: var(--on-dark); border-color: var(--line-dark); }
.section--dark .btn-ghost:hover { background: var(--gold); color: var(--midnight); border-color: var(--gold); }

.btn-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; color: var(--gold-2);
  border-bottom: 1px solid currentColor;
  padding: 4px 0;
}
.btn-link:hover { color: var(--bronze); }

.btn-sm { padding: 10px 18px; font-size: .85rem; }
.btn-lg { padding: 16px 36px; font-size: 1rem; }
.btn-block { display: flex; width: 100%; }

/* ── Form base ─────────────────────────────────────────── */
input[type="text"], input[type="email"], input[type="search"],
input[type="tel"], input[type="number"], input[type="password"],
input[type="url"], textarea, select {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px 16px;
  width: 100%;
  font-size: .95rem;
  color: var(--ink);
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(200,164,100,.18);
}
label { display: block; font-weight: 500; margin-bottom: 6px; font-size: .9rem; color: var(--ink-2); }

/* ── Cards / surfaces ──────────────────────────────────── */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-2); border-color: var(--line-2); }
.card-body { padding: 24px; }

/* ── Icons ─────────────────────────────────────────────── */
.asmon-icon { display: inline-block; flex: none; }

/* ── Skip link / a11y ──────────────────────────────────── */
.screen-reader-text {
  position: absolute !important;
  clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden;
}
.skip-link {
  position: absolute; right: 0; top: -48px;
  background: var(--midnight); color: var(--gold-soft);
  padding: 10px 16px; z-index: 9999; border-radius: 0 0 0 12px;
}
.skip-link:focus { top: 0; }

/* ── Cart count pulse on add ───────────────────────────── */
@keyframes cartPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.3); }
}
.cart-pulse { animation: cartPulse .55s ease; }

/* ── Reveal on scroll ──────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .product-card, .cat-card, .mag-card, .trust-card {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .6s ease;
  }
  .is-in-view {
    opacity: 1 !important;
    transform: translateY(0) !important;
  }
}

/* ── Generic transitions for cart fragment ─────────────── */
.woocommerce-cart-form *, .woocommerce-checkout * { transition: background var(--t), color var(--t); }

/* ── Page hero (used by archives, pages, blog) ─────────── */
.page-hero {
  background: linear-gradient(180deg, var(--midnight) 0%, var(--midnight-2) 100%);
  color: var(--on-dark);
  padding: clamp(72px, 9vw, 140px) 0 clamp(56px, 7vw, 96px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content:""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(200,164,100,.22), transparent 60%);
  pointer-events: none;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  color: var(--on-dark);
  margin: 0 0 14px;
  position: relative;
}
.page-hero p { color: var(--on-dark-mute); max-width: 640px; margin: 0 auto; position: relative; }
.page-hero .eyebrow { color: var(--gold-soft); justify-content: center; }

/* ── Breadcrumbs ───────────────────────────────────────── */
.bc {
  font-size: .85rem;
  color: var(--ink-3);
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  background: var(--ivory);
}
.bc a { color: var(--ink-3); }
.bc a:hover { color: var(--gold-2); }
.bc-sep { margin: 0 6px; color: var(--line-2); }

/* ── Site content scaffold ─────────────────────────────── */
.site-content { min-height: 30vh; }

/* ── Generic prose / single content ────────────────────── */
.prose {
  font-size: 1.02rem; line-height: 1.95; color: var(--ink-2);
  max-width: 760px; margin-inline: auto;
}
.prose h2, .prose h3 {
  font-family: var(--font-display); font-weight: 600;
  margin-top: 1.8em;
}
.prose h2 { font-size: 1.7rem; }
.prose h3 { font-size: 1.35rem; }
.prose img, .prose figure { border-radius: var(--r-lg); margin: 1.8em 0; }
.prose blockquote {
  border-right: 3px solid var(--gold);
  padding: 0 20px;
  margin: 1.8em 0;
  font-style: italic; color: var(--ink-2);
}
.prose ul, .prose ol { padding-right: 1.4em; }
.prose a { color: var(--gold-2); border-bottom: 1px solid currentColor; }

/* ── Product price (used in cards & PDP) ───────────────── */
.price { font-weight: 700; color: var(--ink); font-size: 1rem; }
.price del { color: var(--muted); font-weight: 400; margin-left: 6px; opacity: .7; }
.price ins { text-decoration: none; color: var(--gold-2); }
.price .woocommerce-Price-amount { color: inherit; }

/* ── Tag/badge ─────────────────────────────────────────── */
.tag {
  display: inline-flex; align-items: center;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  padding: 5px 10px; border-radius: var(--r-pill);
  background: var(--midnight); color: var(--gold-soft);
}
.tag--sale { background: var(--danger); color: #fff; }
.tag--new  { background: var(--gold); color: var(--midnight); }

/* ── WooCommerce notices ───────────────────────────────── */
.woocommerce-notices-wrapper {
  margin: 16px 0;
}
.woocommerce-message, .woocommerce-info, .woocommerce-error {
  background: var(--ivory-2);
  border-right: 3px solid var(--gold);
  padding: 14px 18px;
  border-radius: var(--r);
  list-style: none;
  margin: 0 0 16px;
}
.woocommerce-error { border-color: var(--danger); }

/* ── Pagination ────────────────────────────────────────── */
.asmon-pagination, .woocommerce-pagination {
  display: flex; justify-content: center; gap: 8px;
  margin: 40px 0 0;
}
.asmon-pagination a, .asmon-pagination span,
.woocommerce-pagination a, .woocommerce-pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--r);
  font-weight: 600; color: var(--ink-2);
  transition: all var(--t);
}
.asmon-pagination .current,
.woocommerce-pagination .current {
  background: var(--midnight); color: var(--gold-soft); border-color: var(--midnight);
}
.asmon-pagination a:hover, .woocommerce-pagination a:hover {
  border-color: var(--gold); color: var(--gold-2);
}

/* ============================================================
   FOOTER (sitewide)
   ============================================================ */
.site-footer {
  background: var(--midnight);
  color: var(--on-dark);
  margin-top: clamp(40px, 6vw, 80px);
}
.footer-main { padding: clamp(48px, 6vw, 80px) 0 clamp(32px, 4vw, 56px); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
  gap: clamp(28px, 4vw, 64px);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand-col .brand .brand-name { color: var(--on-dark); }
.footer-brand-col .brand .brand-sub { color: var(--on-dark-mute); }
.footer-desc {
  color: var(--on-dark-mute);
  font-size: .92rem; line-height: 1.85;
  margin: 16px 0 22px;
  max-width: 320px;
}
.footer-social { display: flex; gap: 8px; }
.footer-social a {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  color: var(--gold-soft);
  border: 1px solid var(--line-dark);
  transition: background var(--t), color var(--t);
}
.footer-social a:hover { background: var(--gold); color: var(--midnight); }

.footer-title {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 600;
  color: var(--on-dark);
  margin: 0 0 18px;
}
.footer-menu, .footer-contact {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.footer-menu a, .footer-contact a {
  color: var(--on-dark-mute);
  font-size: .92rem;
  transition: color var(--t);
}
.footer-menu a:hover, .footer-contact a:hover { color: var(--gold-soft); }
.footer-contact li {
  display: flex; align-items: flex-start; gap: 8px;
  color: var(--on-dark-mute);
  font-size: .9rem;
}
.footer-contact .asmon-icon { color: var(--gold); margin-top: 4px; flex: none; }

.footer-bottom {
  border-top: 1px solid var(--line-dark);
  padding: 22px 0;
  font-size: .82rem;
  color: var(--on-dark-mute);
}
.footer-bottom-row {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 14px;
}
.footer-copy { margin: 0; }
.footer-credits { margin: 0; color: var(--gold-soft); }

/* Footer trust strip (above main footer) */
.footer-trust-strip {
  background: var(--ivory-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
}
.footer-trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .footer-trust-grid { grid-template-columns: repeat(2, 1fr); } }
.footer-trust-item {
  display: flex; align-items: center; gap: 14px;
  color: var(--ink-2);
}
.footer-trust-item .asmon-icon { color: var(--gold-2); flex: none; }
.footer-trust-item strong { display: block; font-size: .95rem; color: var(--ink); font-weight: 600; }
.footer-trust-item span { display: block; font-size: .82rem; color: var(--ink-3); }

/* ── Responsive grids helpers ──────────────────────────── */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1024px) {
  .grid-4, .grid-6 { grid-template-columns: repeat(3, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4, .grid-6 { grid-template-columns: repeat(2, 1fr); }
  .section-head--row { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 420px) {
  .grid-3, .grid-4, .grid-6 { grid-template-columns: 1fr; }
}
