/* ============ گالری رهنما — gold on dark (دیزاین لوکس) ============ */

/* فونت وزیر محلی (موجود در پروژه) */
@font-face {
  font-family: 'Vazir';
  src: url('../fonts/Vazir/Vazir.woff') format('woff'),
       url('../fonts/Vazir/Vazir.ttf') format('truetype');
  font-weight: 300 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazir';
  src: url('../fonts/Vazir/Vazir-Medium.ttf') format('truetype');
  font-weight: 500 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazir';
  src: url('../fonts/Vazir/Vazir-Bold.woff') format('woff'),
       url('../fonts/Vazir/Vazir-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #2a1215;
  --bg2: color-mix(in oklab, var(--bg), #fff8e0 2.5%);
  --surface: color-mix(in oklab, var(--bg), #fff8e0 5%);
  --surface-2: color-mix(in oklab, var(--bg), #fff8e0 9%);
  --gold: #d4af37;
  --gold-2: color-mix(in oklab, var(--gold), #fff8e0 45%);
  --gold-deep: color-mix(in oklab, var(--gold), #1a1408 48%);
  --line: color-mix(in oklab, var(--gold) 18%, transparent);
  --line-strong: color-mix(in oklab, var(--gold) 45%, transparent);
  --ink: #ece6d7;
  --ink-2: #a89e87;
  --ink-3: #6f6753;
  --radius: 4px;
  --serif: 'Markazi Text', 'Vazir', serif;
  --sans: 'Vazir', 'Vazirmatn', sans-serif;
  --hdr-h: 68px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
button { font-family: var(--sans); cursor: pointer; }
input, textarea, select { font-family: var(--sans); }
a { color: inherit; text-decoration: none; }
::selection { background: color-mix(in oklab, var(--gold) 35%, transparent); }

/* ---------- gold text + shimmer ---------- */
.goldtext { color: var(--gold); }
@media (prefers-reduced-motion: no-preference) {
  .lux .goldtext {
    background: linear-gradient(105deg, var(--gold) 0%, var(--gold) 40%, var(--gold-2) 50%, var(--gold) 60%, var(--gold) 100%);
    background-size: 260% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: rg-shimmer 7s linear infinite;
  }
  @keyframes rg-shimmer {
    from { background-position: 230% 0; }
    to   { background-position: -130% 0; }
  }
}
/* header logo: keep solid gold — clipped gradient text can vanish in the compact header */
.hdr .logo { white-space: nowrap; }
.lux .hdr .logo {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: var(--gold);
  animation: none;
}

/* ---------- fancy motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rg-up {
    from { opacity: 0; transform: translateY(18px); filter: blur(5px); }
    to   { opacity: 1; transform: none; filter: none; }
  }
  @keyframes rg-pop {
    0% { transform: scale(.3); }
    55% { transform: scale(1.35); }
    100% { transform: scale(1); }
  }
  @keyframes rg-twinkle {
    0%, 100% { opacity: .12; transform: scale(.65) rotate(0deg); }
    50% { opacity: .95; transform: scale(1.15) rotate(45deg); }
  }
  @keyframes rg-draw { from { transform: scaleX(0); } }
  @keyframes rg-fade { from { opacity: 0; } }
  .page { animation: rg-fade .45s ease both; }
  .hero-title { animation: rg-up .9s ease .05s both; }
  .hero-sub { animation: rg-up .9s ease .25s both; }
  .hero .ornament i { animation: rg-draw 1s ease .15s both; }
  .hero .ornament i:first-child { transform-origin: right center; }
  .hero .ornament i + i { transform-origin: left center; }
  .cart-badge { animation: rg-pop .45s cubic-bezier(.3,1.4,.5,1); }
  .gallery { animation: rg-up .6s ease .08s both; }
  .dinfo > * { animation: rg-up .6s ease both; }
  .dinfo > *:nth-child(2) { animation-delay: .05s; }
  .dinfo > *:nth-child(3) { animation-delay: .1s; }
  .dinfo > *:nth-child(4) { animation-delay: .15s; }
  .dinfo > *:nth-child(5) { animation-delay: .2s; }
  .dinfo > *:nth-child(6) { animation-delay: .25s; }
  .dinfo > *:nth-child(7) { animation-delay: .3s; }
  .dinfo > *:nth-child(8) { animation-delay: .35s; }
  .dinfo > *:nth-child(9) { animation-delay: .4s; }
  .dinfo > *:nth-child(10) { animation-delay: .45s; }
}
.spark { position: absolute; color: var(--gold); pointer-events: none; opacity: 0; line-height: 1; }
.lux .spark { animation: rg-twinkle 4.4s ease-in-out infinite; }
.spark.s1 { top: 44px; inset-inline-start: 13%; font-size: 14px; }
.spark.s2 { top: 118px; inset-inline-end: 9%; font-size: 10px; animation-delay: 1.5s !important; }
.spark.s3 { bottom: 26px; inset-inline-start: 23%; font-size: 8px; animation-delay: 2.8s !important; }

/* ---------- ornament divider ---------- */
.ornament { display: flex; align-items: center; gap: 14px; margin: 18px 0; }
.ornament i { display: block; height: 1px; flex: 1; background: linear-gradient(to var(--orn-dir, left), var(--line-strong), transparent); }
.ornament i + i { background: linear-gradient(to right, var(--line-strong), transparent); }
.ornament i:first-child { background: linear-gradient(to left, transparent, var(--line-strong)); }
.ornament b { color: var(--gold); font-size: 9px; line-height: 1; }

/* ---------- header ---------- */
.hdr {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 84%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.hdr-inner {
  max-width: 1280px; margin: 0 auto; height: var(--hdr-h);
  padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between;
}
.hdr-nav { display: flex; gap: 28px; font-size: 13.5px; color: var(--ink-2); }
.hdr-nav a { transition: color .25s; letter-spacing: .02em; }
.hdr-nav a:hover { color: var(--gold); }
.logo { font-family: var(--serif); font-size: 31px; font-weight: 600; letter-spacing: .01em; line-height: 1; }
.hdr-cart { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.hdr-login-btn {
  font-size: 13px; font-family: var(--sans); color: var(--gold);
  border: 1px solid rgba(200,170,100,.35); border-radius: 99px;
  padding: 5px 16px; white-space: nowrap;
  transition: background .22s, border-color .22s;
}
.hdr-login-btn:hover { background: rgba(200,170,100,.1); border-color: rgba(200,170,100,.6); }
.hdr-logout-btn { color: rgba(220,120,100,.85); border-color: rgba(220,120,100,.3); }
.hdr-logout-btn:hover { background: rgba(220,120,100,.1); border-color: rgba(220,120,100,.6); color: rgba(220,120,100,1); }
.dest-links { display: flex; flex-direction: column; gap: 0; margin-top: 28px; }
.dest-links a {
  font-family: var(--serif); font-size: 19px; font-weight: 600;
  color: var(--gold); text-align: center;
  padding: 14px 0; transition: opacity .2s;
  border-top: 1px solid var(--line);
}
.dest-links a:hover { opacity: .65; }
.cartbtn {
  position: relative; width: 44px; height: 44px;
  display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line);
  border-radius: 999px; color: var(--ink-2);
  transition: color .25s, border-color .25s;
}
.cartbtn:hover { color: var(--gold); border-color: var(--line-strong); }
.cart-badge {
  position: absolute; top: -5px; inset-inline-end: -5px;
  min-width: 19px; height: 19px; padding: 0 5px;
  display: grid; place-items: center;
  background: var(--gold); color: var(--on-gold, #14110a);
  font-size: 11px; font-weight: 700; border-radius: 999px;
}

/* ---------- hero ---------- */
.hero { position: relative; max-width: 760px; margin: 0 auto; padding: 58px 32px 34px; text-align: center; }
.hero .ornament { max-width: 280px; margin: 0 auto 10px; }
.hero-title { font-family: var(--serif); font-size: 58px; font-weight: 600; line-height: 1.15; }
.hero-sub { color: var(--ink-2); font-size: 15px; font-weight: 300; margin-top: 6px; letter-spacing: .02em; }

/* ---------- category bar ---------- */
.catbar {
  position: sticky; top: var(--hdr-h); z-index: 40;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-block: 1px solid var(--line);
  margin-bottom: 30px;
}
.catbar-wrap { position: relative; max-width: 1280px; margin: 0 auto; }
.catbar-track {
  padding: 0 32px;
  display: flex; gap: 6px;
  overflow-x: auto; scrollbar-width: none;
}
.catbar-track::-webkit-scrollbar { display: none; }
.catfade {
  position: absolute; top: 0; bottom: 0; width: 76px;
  pointer-events: none; z-index: 2;
  opacity: 0; transition: opacity .3s;
}
.catfade.show { opacity: 1; }
.f-right { right: 0; background: linear-gradient(to left, var(--bg) 18%, transparent); }
.f-left { left: 0; background: linear-gradient(to right, var(--bg) 18%, transparent); }
.catarrow {
  position: absolute; z-index: 3; top: 0; bottom: 0;
  width: 44px; padding: 0;
  display: grid; place-items: center;
  background: transparent; border: none;
  color: var(--gold);
  transition: color .25s;
}
.catarrow:hover { color: var(--gold-2); }
.catarrow svg { filter: drop-shadow(0 1px 4px rgba(0,0,0,.4)); }
.ar-right { right: 0; }
.ar-left { left: 0; }
.cat {
  flex: 0 0 auto;
  background: none; border: none;
  border-bottom: 1px solid transparent;
  padding: 13px 14px 11px;
  color: var(--ink-2); font-size: 13.5px;
  transition: color .25s, border-color .25s;
}
.cat:hover { color: var(--ink); }
.cat.active { color: var(--gold); border-bottom-color: var(--gold); }

/* ---------- product grid ---------- */
.grid {
  max-width: 1280px; margin: 0 auto; padding: 0 32px;
  display: grid; gap: 14px;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 92px;
  grid-auto-flow: dense;
}
.sw2 { grid-column: span 2; }
.sh3 { grid-row: span 3; }
.sh4 { grid-row: span 4; }
.sh5 { grid-row: span 5; }

/* ---------- card ---------- */
.card {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: box-shadow .35s;
}
.card:hover { box-shadow: inset 0 0 0 1px var(--line-strong), 0 18px 44px rgba(0,0,0,.45); }
@media (prefers-reduced-motion: no-preference) {
  .anim .card {
    opacity: 0; transform: translateY(18px) scale(.985);
    transition: opacity .7s ease var(--rd, 0s), transform .7s ease var(--rd, 0s), box-shadow .35s;
  }
  .anim .card.in { opacity: 1; transform: none; }
}
.card-media { position: absolute; inset: 0; transition: transform .8s cubic-bezier(.2,.6,.2,1); }
.card:hover .card-media { transform: scale(1.045); }

.card-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-veil {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(13,5,6,.93) 0%, rgba(13,5,6,.45) 26%, transparent 52%);
}
.sheen {
  position: absolute; inset: -10%; pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255,244,205,.09) 50%, transparent 62%);
  transform: translateX(-170%);
}
@media (prefers-reduced-motion: no-preference) {
  .lux .card:hover .sheen { transform: translateX(170%); transition: transform 1.1s ease; }
}
.card-info { position: absolute; bottom: 0; inset-inline: 0; padding: 14px 16px 13px; pointer-events: none; }
.card-name {
  font-family: var(--serif); font-size: 25px; font-weight: 500; line-height: 1.45; color: #f3ecdc;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-sub { font-size: 11px; color: rgba(240,233,218,.5); letter-spacing: .04em; }
.card-price { color: var(--gold); font-size: 13.5px; font-weight: 500; margin-top: 3px; }
.oos .card-price { color: var(--ink-3); }
.oos .card-media { filter: saturate(.4) brightness(.85); }

.chip {
  position: absolute; top: 12px; inset-inline-start: 12px;
  padding: 3px 11px 2px; border-radius: 999px;
  font-size: 11px; letter-spacing: .03em;
  border: 1px solid var(--line);
  background: rgba(14,6,7,.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.chip-new { color: var(--gold-2); border-color: var(--line-strong); }
.chip-oos { color: #c98f8f; border-color: rgba(201,143,143,.3); }
.chip-stock { color: #9fc9a0; border-color: rgba(159,201,160,.3); }

.addbtn {
  position: absolute; bottom: 14px; inset-inline-end: 14px;
  padding: 8px 18px;
  background: rgba(14,6,7,.55);
  border: 1px solid var(--gold);
  color: var(--gold-2);
  border-radius: 999px;
  font-size: 12.5px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0; transform: translateY(8px);
  transition: opacity .35s, transform .35s, background .25s, color .25s;
}
.card:hover .addbtn, .btns-always .addbtn { opacity: 1; transform: none; }
.btns-always .card-info { padding-inline-end: 132px; }
.addbtn:hover { background: var(--gold); color: var(--on-gold, #14110a); }

.scroll-hint { text-align: center; color: var(--ink-3); font-size: 12px; padding: 36px 0 10px; letter-spacing: .05em; }
.lux-sentinel { height: 72px; display: flex; align-items: center; justify-content: center; }
.lux-sentinel.loading::after {
  content: ''; display: block;
  width: 28px; height: 28px;
  border: 2px solid rgba(200,170,100,.25);
  border-top-color: var(--gold, #c8aa64);
  border-radius: 50%;
  animation: lux-spin .75s linear infinite;
}
@keyframes lux-spin { to { transform: rotate(360deg); } }
.grid-empty { grid-column: 1 / -1; text-align: center; color: var(--ink-2); padding: 60px 0; }

/* ---------- detail page ---------- */
.detail { max-width: 1280px; margin: 0 auto; padding: 30px 32px 0; }
.crumb { display: flex; gap: 10px; align-items: center; font-size: 12.5px; color: var(--ink-3); margin-bottom: 30px; flex-wrap: wrap; }
.crumb a:hover { color: var(--gold); }
.crumb b { color: var(--ink-2); font-weight: 400; }
.detail-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 60px; align-items: start; }

.gallery-main {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.gallery-main video { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: #000; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gthumb {
  position: relative;
  width: 78px; height: 78px; padding: 0;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); overflow: hidden;
  transition: border-color .25s;
}
.gthumb.active { border-color: var(--gold); }
.gthumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.gthumb .gthumb-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--gold-2); background: rgba(14,6,7,.35); font-size: 18px;
}

.dinfo-cat { color: var(--ink-3); font-size: 12.5px; letter-spacing: .08em; }
.dinfo-name { font-family: var(--serif); font-size: 52px; font-weight: 600; line-height: 1.12; margin: 2px 0 10px; }
.dinfo-meta { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.dinfo-meta .chip { position: static; }
.dinfo-code { color: var(--ink-3); font-size: 12px; letter-spacing: .05em; direction: ltr; }
.dinfo-price { font-size: 26px; color: var(--gold); font-weight: 500; }
.dinfo-price .old { color: var(--ink-3); font-size: 17px; text-decoration: line-through; margin-inline-start: 10px; }
.dinfo-price .coupon { display: inline-block; font-size: 12px; color: var(--gold-2); border: 1px dashed var(--line-strong); border-radius: 999px; padding: 2px 12px; margin-inline-start: 10px; vertical-align: middle; }
.dinfo .ornament { max-width: 100%; margin: 20px 0 24px; }
.dinfo-desc { color: var(--ink-2); font-size: 13.5px; }

.opt { margin-bottom: 22px; }
.opt-label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 9px; letter-spacing: .04em; }
.opt-row { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  background: transparent; border: 1px solid var(--line);
  border-radius: 999px; color: var(--ink-2); font-size: 12.5px;
  transition: border-color .25s, color .25s;
}
.swatch i { width: 14px; height: 14px; border-radius: 50%; display: block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.35); }
.swatch.active { border-color: var(--gold); color: var(--ink); }
.sizepill {
  padding: 8px 18px;
  background: transparent; border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--ink-2); font-size: 13px;
  transition: border-color .25s, color .25s;
}
.sizepill.active { border-color: var(--gold); color: var(--gold-2); }

.variant-status { font-size: 12.5px; min-height: 22px; }
.variant-status.is-hint { color: var(--ink-2); }
.variant-status.is-out { color: #c98f8f; }
.variant-status.is-in { color: #9fc9a0; }

.buyrow { display: flex; gap: 14px; align-items: stretch; margin: 28px 0 26px; }
.qty {
  display: flex; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.qty button {
  width: 44px; height: 100%; min-height: 50px;
  background: transparent; border: none;
  color: var(--ink-2); font-size: 18px;
  transition: color .2s, background .2s;
}
.qty button:hover { color: var(--gold); background: var(--surface); }
.qty span { min-width: 36px; text-align: center; font-size: 15px; }
.buybtn {
  flex: 1;
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 30px;
  background: linear-gradient(120deg, var(--gold-deep), var(--gold) 45%, var(--gold-2) 110%);
  border: none; border-radius: var(--radius);
  color: var(--on-gold, #14110a); font-size: 15px; font-weight: 600; letter-spacing: .02em;
  transition: filter .25s, box-shadow .25s, opacity .25s;
  text-align: center;
}
.buybtn::after {
  content: ''; position: absolute; inset: -30%; pointer-events: none;
  background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.4) 50%, transparent 60%);
  transform: translateX(-190%);
}
@media (prefers-reduced-motion: no-preference) {
  .buybtn:hover::after { transform: translateX(190%); transition: transform .9s ease; }
}
.buybtn:hover { filter: brightness(1.1); box-shadow: 0 10px 30px color-mix(in oklab, var(--gold) 22%, transparent); }
.buybtn.is-disabled { opacity: .45; filter: saturate(.5); cursor: not-allowed; box-shadow: none; }

.notice {
  display: flex; gap: 13px; align-items: baseline;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
  padding: 14px 18px; margin-bottom: 12px;
  font-size: 13px; color: var(--ink-2); line-height: 2;
}
.notice b { color: var(--gold); font-size: 9px; }
.notice em { font-style: normal; color: var(--gold-2); font-weight: 500; }
.notice-ship { background: transparent; }

/* features table */
.spec-table { width: 100%; border-collapse: collapse; margin-bottom: 12px; font-size: 13px; }
.spec-table th, .spec-table td { border: 1px solid var(--line); padding: 8px 14px; text-align: right; }
.spec-table th { color: var(--ink-2); font-weight: 400; width: 38%; background: var(--surface); }
.spec-table td { color: var(--ink); }

/* preorder (سفارش ویژه برای ناموجود) */
.preorder { border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); padding: 22px; margin: 24px 0; }
.preorder h4 { font-family: var(--serif); font-size: 24px; font-weight: 500; color: var(--gold-2); margin-bottom: 6px; }
.preorder-hint { font-size: 12.5px; color: var(--ink-2); margin-bottom: 14px; }
.preorder label { display: block; font-size: 12.5px; color: var(--ink-2); margin: 10px 0 5px; }
.preorder input, .preorder textarea {
  width: 100%; padding: 10px 14px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); font-size: 13.5px;
}
.preorder input:focus, .preorder textarea:focus { outline: none; border-color: var(--line-strong); }
.preorder textarea { min-height: 90px; resize: vertical; }
.preorder-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.preorder .err { color: #c98f8f; font-size: 12px; margin-top: 4px; }
.preorder a { color: var(--gold); }

.favline { margin: 4px 0 0; }
.favline a { font-size: 12.5px; color: var(--ink-2); transition: color .25s; }
.favline a:hover { color: var(--gold); }

.sec-title { display: grid; grid-template-columns: 1fr max-content 1fr; align-items: center; gap: 18px; max-width: 1280px; margin: 64px auto 26px; padding: 0 32px; }
.sec-title span { white-space: nowrap; font-family: var(--serif); font-size: 32px; font-weight: 600; color: var(--ink); }
.sec-title .ornament { margin: 0; }
.detail .related-grid { padding: 0; max-width: none; }
.detail .related { max-width: 1216px; margin: 0 auto; }
.detail .sec-title { padding: 0; }

/* mobile sticky buy bar */
.buybar {
  display: none;
  position: fixed; bottom: 0; inset-inline: 0; z-index: 60;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  align-items: center; gap: 14px;
}
.buybar-price { color: var(--gold); font-weight: 500; font-size: 15px; white-space: nowrap; }
.buybar .buybtn { padding: 11px 20px; font-size: 14px; }

/* ---------- footer ---------- */
.ftr { margin-top: 84px; border-top: 1px solid var(--line); background: var(--bg2); }
.ftr-inner {
  max-width: 1280px; margin: 0 auto; padding: 52px 32px 40px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
}
.ftr-brand .logo { font-size: 27px; color: var(--gold); }
.ftr-brand p { color: var(--ink-2); font-size: 13px; margin-top: 10px; max-width: 320px; }
.ftr-brand .ftr-dim { color: var(--ink-3); font-size: 12px; margin-top: 4px; }
.ftr-social { display: flex; gap: 14px; margin-top: 14px; }
.ftr-social a { color: var(--ink-2); font-size: 13px; transition: color .25s; }
.ftr-social a:hover { color: var(--gold); }
.ftr-col { display: flex; flex-direction: column; gap: 9px; }
.ftr-col h4 { font-size: 13px; color: var(--ink); font-weight: 600; letter-spacing: .04em; margin-bottom: 6px; }
.ftr-col a { color: var(--ink-2); font-size: 13px; transition: color .25s; width: fit-content; }
.ftr-col a:hover { color: var(--gold); }
.ftr-phone { font-size: 19px !important; color: var(--gold) !important; font-weight: 600; letter-spacing: .04em; }
.ftr-base {
  border-top: 1px solid var(--line);
  text-align: center; padding: 16px; font-size: 11.5px; color: var(--ink-3);
}
.ftr-base a:hover { color: var(--gold); }

/* ---------- wallet (کیف پول در هدر) ---------- */
.wallet-wrap { position: relative; }
.walletbtn {
  display: flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 14px;
  background: transparent; border: 1px solid var(--line);
  border-radius: 999px; color: var(--gold-2);
  font-size: 12.5px; white-space: nowrap;
  transition: color .25s, border-color .25s;
}
.walletbtn:hover { color: var(--gold); border-color: var(--line-strong); }
.walletbtn svg { flex: 0 0 auto; }
.wallet-menu {
  position: absolute; top: calc(100% + 10px); inset-inline-end: 0; z-index: 70;
  min-width: 250px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 18px 44px rgba(0,0,0,.5);
  padding: 16px 18px;
  font-size: 12.5px; color: var(--ink-2);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .25s, transform .25s, visibility .25s;
}
.wallet-wrap:hover .wallet-menu, .wallet-wrap.open .wallet-menu { opacity: 1; visibility: visible; transform: none; }
.wallet-menu .wm-balance { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.wallet-menu .wm-balance strong { color: var(--gold); font-size: 15px; white-space: nowrap; }
.wallet-menu .wm-note { margin-top: 8px; color: var(--ink-3); line-height: 1.9; }

/* ---------- auth (ورود / ثبت‌نام / فعال‌سازی) ---------- */
.auth-wrap { max-width: 460px; margin: 0 auto; padding: 48px 24px 20px; }
.auth-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
  padding: 36px 34px;
}
.auth-card .ornament { max-width: 220px; margin: 0 auto 8px; }
.auth-title { font-family: var(--serif); font-size: 40px; font-weight: 600; text-align: center; line-height: 1.2; }
.auth-sub { text-align: center; color: var(--ink-2); font-size: 13px; margin: 4px 0 24px; }
.auth-foot { text-align: center; font-size: 13px; color: var(--ink-2); margin-top: 18px; }
.auth-foot a { color: var(--gold); }
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------- فرم‌های عمومی ---------- */
.f-label { display: block; font-size: 12.5px; color: var(--ink-2); margin: 14px 0 6px; letter-spacing: .04em; }
.f-input, .f-select, .f-textarea {
  width: 100%; padding: 11px 15px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); font-size: 14px;
  transition: border-color .25s;
}
.f-input:focus, .f-select:focus, .f-textarea:focus { outline: none; border-color: var(--line-strong); }
.f-input::placeholder, .f-textarea::placeholder { color: var(--ink-3); }
.f-select { appearance: none; }
.f-select option { background: var(--bg2); color: var(--ink); }
.f-textarea { min-height: 80px; resize: vertical; }
.f-err { color: #c98f8f; font-size: 12px; margin-top: 5px; }
input[type="date"].f-input { color-scheme: dark; }

/* ---------- cart (سبد خرید) ---------- */
.cart-page { max-width: 1280px; margin: 0 auto; padding: 30px 32px 0; }
.cart-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 44px; align-items: start; }
.cart-lines { display: flex; flex-direction: column; }
.cart-line {
  display: grid; grid-template-columns: 84px 1fr auto auto auto; gap: 18px; align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.cart-line:first-child { border-top: 1px solid var(--line); }
.cart-line-img { width: 84px; height: 84px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); display: block; }
.cart-line-name { font-family: var(--serif); font-size: 23px; font-weight: 500; line-height: 1.4; }
.cart-line-name a:hover { color: var(--gold-2); }
.cart-line-price { color: var(--gold); font-size: 14px; white-space: nowrap; }
.cart-line .qty button { min-height: 42px; width: 38px; }
.cart-remove {
  background: none; border: none; color: var(--ink-3); font-size: 12.5px;
  display: flex; align-items: center; gap: 6px;
  transition: color .25s;
}
.cart-remove:hover { color: #c98f8f; }
.cart-coupon { display: flex; gap: 10px; margin-top: 22px; max-width: 420px; }
.cart-coupon .f-input { flex: 1; }
.cart-coupon .buybtn { flex: 0 0 auto; padding: 11px 26px; font-size: 13.5px; }

.cart-sum {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
  padding: 26px 26px 22px;
  position: sticky; top: calc(var(--hdr-h) + 20px);
}
.cart-sum h3 { font-family: var(--serif); font-size: 28px; font-weight: 600; margin-bottom: 14px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--ink-2); padding: 7px 0; }
.sum-row b { font-weight: 400; color: var(--ink); }
.sum-row.total { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 14px; font-size: 15px; color: var(--ink); }
.sum-row.total b { color: var(--gold); font-size: 19px; font-weight: 600; }
.sum-voucher { font-size: 12px; color: var(--gold-2); padding: 4px 0; }
.ship-opts { margin: 14px 0 4px; }
.ship-opts .opt-label { margin-bottom: 6px; }
.ship-opt { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-2); padding: 4px 0; }
.ship-opt input { accent-color: var(--gold); }
.ship-opt em { font-style: normal; color: var(--gold-2); }

.addr-box { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px; }
.addr-current { font-size: 12.5px; color: var(--gold-2); margin-bottom: 10px; }
.addr-new summary { cursor: pointer; font-size: 13px; color: var(--gold); margin: 10px 0 4px; }
.addr-note {
  font-size: 12px; color: #9fc9a0;
  border: 1px solid rgba(159,201,160,.3); border-radius: var(--radius);
  padding: 8px 12px; margin: 8px 0; line-height: 1.9;
}
.cart-empty { text-align: center; padding: 70px 0 30px; color: var(--ink-2); }
.cart-empty .ornament { max-width: 240px; margin: 0 auto 14px; }
.cart-empty h2 { font-family: var(--serif); font-size: 36px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.cart-empty .buybtn { display: inline-flex; margin-top: 18px; padding: 12px 38px; }

/* ---------- account (حساب کاربری) ---------- */
.acc-page { max-width: 1280px; margin: 0 auto; padding: 30px 32px 0; }
.acc-grid { display: grid; grid-template-columns: 270px 1fr; gap: 40px; align-items: start; }
.acc-side {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
  padding: 22px 0 10px;
  position: sticky; top: calc(var(--hdr-h) + 20px);
}
.acc-user { display: flex; align-items: center; gap: 14px; padding: 0 22px 18px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.acc-avatar {
  width: 52px; height: 52px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-deep), var(--gold));
  color: var(--on-gold, #14110a);
  font-family: var(--serif); font-size: 26px; font-weight: 600;
}
.acc-username { font-size: 14.5px; color: var(--ink); }
.acc-usermobile { font-size: 12px; color: var(--ink-3); direction: ltr; text-align: right; }
.acc-nav { display: flex; flex-direction: column; }
.acc-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 22px;
  background: none; border: none; border-inline-start: 2px solid transparent;
  color: var(--ink-2); font-size: 13.5px; text-align: right;
  transition: color .25s, border-color .25s, background .25s;
  cursor: pointer;
}
.acc-link svg { width: 18px; height: 18px; flex: 0 0 auto; }
.acc-link:hover { color: var(--ink); }
.acc-link.active { color: var(--gold); border-inline-start-color: var(--gold); background: color-mix(in oklab, var(--gold) 6%, transparent); }
.acc-link.logout { color: #c98f8f; margin-top: 8px; }

.acc-pane { display: none; }
.acc-pane.active { display: block; }
.acc-title { font-family: var(--serif); font-size: 32px; font-weight: 600; margin-bottom: 16px; }
.acc-hint { font-size: 12.5px; color: var(--ink-3); margin-top: 14px; line-height: 2; }

/* کارت کیف پول */
.wallet-card {
  max-width: 460px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background:
    radial-gradient(ellipse at top right, color-mix(in oklab, var(--gold) 16%, transparent), transparent 60%),
    var(--surface-2);
  padding: 26px 28px;
}
.wallet-card .wc-label { font-size: 12.5px; color: var(--ink-2); }
.wallet-card .wc-amount { font-family: var(--serif); font-size: 44px; font-weight: 600; color: var(--gold); line-height: 1.3; }
.wallet-card .wc-amount span { font-size: 18px; color: var(--gold-2); }
.wallet-card .wc-exp { font-size: 12.5px; color: var(--ink-3); }

/* چیپ وضعیت سفارش ویژه */
.st-chip { display: inline-block; padding: 3px 13px 2px; border-radius: 999px; font-size: 11.5px; border: 1px solid var(--line); white-space: nowrap; }
.st-pending  { color: var(--gold-2); border-color: var(--line-strong); }
.st-approved { color: #9fb9e8; border-color: rgba(159,185,232,.35); }
.st-rejected { color: #c98f8f; border-color: rgba(201,143,143,.35); }
.st-paid     { color: #9fc9a0; border-color: rgba(159,201,160,.35); }

/* کارت سفارش / آدرس */
.acc-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
  padding: 18px 22px; margin-bottom: 14px;
}
.acc-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.acc-card-head strong { font-family: var(--serif); font-size: 21px; font-weight: 500; color: var(--ink); }
.acc-card-head .muted { color: var(--ink-3); font-size: 12px; font-family: var(--sans); }
.acc-card-body { color: var(--ink-2); font-size: 13px; line-height: 2.1; margin-top: 8px; }
.acc-card-body .price { color: var(--gold); font-weight: 500; }
.acc-card-note { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 13px; margin-top: 6px; font-size: 12.5px; }
.acc-card .buybtn { padding: 10px 28px; font-size: 13.5px; margin-top: 12px; }
.acc-empty { text-align: center; color: var(--ink-2); padding: 40px 0; font-size: 13.5px; }

/* صفحه‌بندی */
.lux-pagination { display: flex; justify-content: center; gap: 10px; margin: 26px 0 6px; }
.lux-pagination a, .lux-pagination span {
  padding: 8px 22px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2);
  transition: color .25s, border-color .25s;
}
.lux-pagination a:hover { color: var(--gold); border-color: var(--line-strong); }
.lux-pagination .disabled { opacity: .35; }

/* فاکتور (برگه‌ی سفید روی زمینه‌ی تیره) */
.invoice-wrap { max-width: 920px; margin: 0 auto; }
.invoice-wrap .gr-invoice { box-shadow: 0 24px 60px rgba(0,0,0,.45); }
.invoice-back { text-align: center; margin-top: 22px; }
.invoice-back a { color: var(--gold); font-size: 13.5px; }

/* ---------- نوبار پایین موبایل (مشابه اپلیکیشن) ---------- */
.tabbar { display: none; }
@media (max-width: 760px) {
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; bottom: 0; inset-inline: 0; z-index: 65;
    background: color-mix(in oklab, var(--bg) 92%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
    padding: 7px 4px calc(7px + env(safe-area-inset-bottom));
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    font-size: 10px; color: var(--ink-2); letter-spacing: .02em;
    transition: color .25s;
  }
  .tabbar a.active { color: var(--gold); }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar .tb-ico { position: relative; display: grid; place-items: center; }
  .tabbar .tb-badge {
    position: absolute; top: -4px; inset-inline-end: -8px;
    min-width: 16px; height: 16px; padding: 0 4px;
    display: grid; place-items: center;
    background: var(--gold); color: var(--on-gold, #14110a);
    font-size: 10px; font-weight: 700; border-radius: 999px;
  }

  /* جا برای نوبار پایین */
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .ftr { margin-bottom: 0; }
  /* نوار خرید محصول بالای نوبار قرار بگیرد */
  .buybar { bottom: calc(62px + env(safe-area-inset-bottom)); padding-bottom: 10px; }
  .toast { bottom: calc(78px + env(safe-area-inset-bottom)); }
}

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 80;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  padding: 11px 24px; border-radius: 999px;
  font-size: 13px;
  box-shadow: 0 14px 40px rgba(0,0,0,.5);
  white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis;
}
@media (prefers-reduced-motion: no-preference) {
  .toast { animation: rg-toast .45s cubic-bezier(.2,.9,.3,1.2); }
  @keyframes rg-toast { from { opacity: 0; transform: translate(-50%, 16px); } }
}

/* ============ mobile ============ */
@media (max-width: 760px) {
  :root { --hdr-h: 56px; }
  .hdr-inner { padding: 0 16px; }
  .hdr-nav { display: none; }
  .cartbtn { width: 40px; height: 40px; }
  .hdr-login-btn { display: none; }

  .hero { padding: 36px 20px 22px; }
  .hero-title { font-size: 38px; }
  .hero-sub { font-size: 13px; }

  .catbar { margin-bottom: 18px; }
  .catbar-track { padding: 0 16px; }
  .catarrow { width: 32px; }
  .ar-right { right: 0; }
  .ar-left { left: 0; }
  .catfade { width: 54px; }
  .cat { padding: 11px 11px 9px; font-size: 13px; }

  .grid { padding: 0 14px; gap: 10px; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 64px; }
  .card-info { padding: 11px 12px 10px; padding-inline-end: 116px; }
  .card-name { font-size: 20px; }
  .card-sub { display: none; }
  .card-price { font-size: 12.5px; margin-top: 1px; }
  .addbtn { opacity: 1; transform: none; padding: 6px 13px; font-size: 11.5px; bottom: 10px; inset-inline-end: 10px; }
  .chip { top: 8px; inset-inline-start: 8px; }

  .detail { padding: 18px 16px 0; }
  .crumb { margin-bottom: 18px; }
  .detail-grid { grid-template-columns: 1fr; gap: 30px; }
  .dinfo-name { font-size: 38px; }
  .dinfo-price { font-size: 21px; }
  .buyrow { display: none; }
  .buybar { display: flex; }
  .preorder-row { grid-template-columns: 1fr; }
  .sec-title span { font-size: 25px; }
  .detail { padding-bottom: 76px; }

  .ftr-inner { grid-template-columns: 1fr; gap: 30px; padding: 38px 20px 30px; }
  .ftr { margin-top: 46px; }

  /* هدر موبایل: لوگو وسط، کیف پول + سبد کنار هم */
  .hdr-inner { grid-template-columns: 1fr auto 1fr; }
  .hdr-inner .logo { grid-column: 2; }
  .hdr-cart { grid-column: 3; gap: 8px; }
  .walletbtn { height: 40px; padding: 0 10px; }
  .walletbtn .wallet-amount { display: none; }

  .auth-wrap { padding: 28px 16px 10px; }
  .auth-card { padding: 26px 20px; }
  .auth-title { font-size: 32px; }
  .auth-row { grid-template-columns: 1fr; gap: 0; }

  .acc-page { padding: 18px 16px 0; }
  .acc-grid { grid-template-columns: 1fr; gap: 22px; }
  .acc-side { position: static; padding: 16px 0 6px; }
  .acc-nav { flex-direction: row; flex-wrap: wrap; gap: 2px; padding: 0 10px; }
  .acc-link { padding: 9px 13px; border-inline-start: none; border-bottom: 2px solid transparent; }
  .acc-link.active { border-inline-start: none; border-bottom-color: var(--gold); background: none; }
  .acc-link.logout { margin-top: 0; }
  .acc-title { font-size: 26px; }
  .wallet-card .wc-amount { font-size: 34px; }

  .cart-page { padding: 18px 16px 0; }
  .cart-grid { grid-template-columns: 1fr; gap: 28px; }
  .cart-line { grid-template-columns: 64px 1fr; grid-template-rows: auto auto; gap: 6px 14px; padding: 14px 0; }
  .cart-line-img { width: 64px; height: 64px; grid-row: span 2; }
  .cart-line-name { font-size: 19px; }
  .cart-line-tools { grid-column: 2; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
  .cart-sum { position: static; padding: 20px 18px 16px; }
}
@media (min-width: 761px) {
  .cart-line-tools { display: contents; }
}

/* ===== تخفیفات و سفارش ویژه ===== */

/* بج تخفیف روی کارت‌ها */
.chip-sale { color: #e8a87c; border-color: rgba(232,168,124,.35); font-weight: 600; }

/* قیمت خط‌خورده در کارت */
.card-price .card-new-price { color: var(--gold); }
.card-price .card-old-price { color: var(--ink-3); font-size: 11px; text-decoration: line-through; margin-inline-start: 5px; }

/* تایمر تخفیف در صفحه‌ی محصول */
.discount-timer {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 10px 0 18px; padding: 9px 14px;
  background: rgba(232,168,124,.08); border: 1px solid rgba(232,168,124,.25);
  border-radius: var(--radius); font-size: 12.5px; color: var(--ink-2);
}
.dt-cal { font-size: 15px; }
.dt-label { flex: 1 1 auto; }
.dt-badge {
  padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  background: rgba(232,168,124,.15); color: #e8a87c;
  border: 1px solid rgba(232,168,124,.3);
}
.dt-badge.dt-soon { background: rgba(201,143,143,.12); color: #c98f8f; border-color: rgba(201,143,143,.3); }
.dt-badge.dt-today { background: rgba(201,143,143,.2); color: #c96060; border-color: rgba(201,143,143,.4); font-size: 12px; }

/* بخش سفارش ویژه برای محصولات موجود */
.special-order-wrap { margin: 4px 0 22px; }
.special-order-toggle {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 11px 16px;
  background: transparent; border: 1px dashed var(--line-strong);
  border-radius: var(--radius); color: var(--ink-2); font-size: 13px;
  cursor: pointer; text-align: start; transition: border-color .2s, color .2s;
}
.special-order-toggle:hover,
.special-order-toggle.active { border-color: var(--gold-2); color: var(--gold-2); }
.sp-arrow { margin-inline-start: auto; font-size: 11px; }
.special-order-form { margin-top: 6px; }

/* منوی سایت — لینک تخفیفات */
.hdr-nav-sale { color: #e8a87c !important; }
.hdr-nav-sale.active { color: var(--gold) !important; }

/* صفحه‌ی تخفیفات */
.disc-page { padding: 28px var(--content-pad) 60px; max-width: var(--max-w); margin: 0 auto; }

/* صفحه‌بندی عمومی (در صفحه‌ی تخفیفات و سفارش‌های ویژه) */
.lux-pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 36px 0 0; }
.lux-pagination a, .lux-pagination span {
  padding: 7px 18px; border-radius: var(--radius);
  border: 1px solid var(--line); font-size: 13px; color: var(--ink-2);
}
.lux-pagination a { color: var(--gold); border-color: var(--line-strong); }
.lux-pagination a:hover { background: var(--surface); }
.lux-pagination .disabled { opacity: .4; }
