/* صفحه‌های داخلی: محصولات، صفحه‌ی محصول، سبد، تسویه، تماس و حساب کاربری */

/* ---------- کارت محصول: نشان ناموجود و رنگ‌ها ---------- */
.product-media { position: relative; }
.stock-badge {
  position: absolute; top: 12px; right: 12px;
  background: rgba(33, 31, 29, .82); color: #fff; font-size: 12px;
  padding: 2px 12px; border-radius: 999px;
}
/* کالای ناموجود: عکس با رنگ کامل؛ فقط برچسب «ناموجود» (۱.۰.۳۷) */
.swatches { position: absolute; bottom: 10px; left: 12px; display: flex; gap: 4px; }
.swatches i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }

/* ---------- سربرگ صفحه ---------- */
.page-hero {
  position: relative; overflow: hidden;
  padding: 40px 0 44px;
  background:
    radial-gradient(circle at 12% 30%, var(--butter-tint), transparent 38%),
    radial-gradient(circle at 88% 70%, var(--mint-tint), transparent 40%),
    radial-gradient(circle at 60% 0%, var(--coral-tint), transparent 35%),
    var(--cream);
}
.page-hero h1 { font-size: clamp(26px, 3.4vw, 38px); color: var(--black); }
.page-hero p { margin: 6px 0 0; color: var(--ink-soft); }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--ink-soft); margin-bottom: 10px; }
.crumbs a { color: var(--gold-ink); }
.crumbs a:hover { text-decoration: underline; }
.crumbs span[aria-hidden] { opacity: .5; }

/* ---------- فرم‌ها ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 500; color: var(--black); }
.field .hint { font-size: 12px; color: var(--ink-soft); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  border: 1px solid #ddd3c4; border-radius: 12px; background: #fff;
  font: inherit; font-size: 15px; color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.textarea { min-height: 120px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(176, 141, 87, .2); }
.input[dir="ltr"] { text-align: left; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: #c0392b; }
.field .error { font-size: 12.5px; color: #b03a2e; display: none; }
.field.has-error .error { display: block; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.btn-block { width: 100%; }
.preview-note {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--butter-tint); color: var(--butter-ink);
  border-radius: 12px; padding: 12px 14px; font-size: 13.5px;
}
.preview-note::before { content: "!"; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--butter); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 24px;
  box-shadow: 0 20px 40px -32px rgba(33, 31, 29, .35);
}
.card h2 { font-size: 19px; margin-bottom: 18px; color: var(--black); display: flex; align-items: center; gap: 10px; }
.card h2::before { content: ""; width: 9px; height: 9px; background: var(--gold-grad); transform: rotate(45deg); }

/* دکمه‌ی شمارنده */
.qty {
  display: inline-flex; align-items: center; border: 1px solid #ddd3c4; border-radius: 999px; background: #fff;
  height: 48px;
}
.qty button {
  width: 44px; height: 100%; border: 0; background: none; cursor: pointer; font-size: 20px; color: var(--black);
  border-radius: 999px; transition: background .2s;
}
.qty button:hover { background: var(--cream); }
.qty output { min-width: 32px; text-align: center; font-weight: 600; }
.qty.sm { height: 38px; }
.qty.sm button { width: 34px; font-size: 17px; }

/* ---------- فروشگاه ---------- */
.shop { padding: 40px 0 80px; }
.shop-layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start; }
.filters { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 22px; }
.filter-group h3 { font-size: 15px; margin-bottom: 10px; color: var(--black); }
.cat-filter { display: flex; flex-direction: column; gap: 4px; }
.cat-filter label {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; cursor: pointer;
  font-size: 14.5px; transition: background .2s;
}
.cat-filter label:hover { background: var(--cream); }
.cat-filter input { position: absolute; opacity: 0; pointer-events: none; }
.cat-filter .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--dc); box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--dc); opacity: .45; transition: opacity .2s, transform .3s var(--ease); }
.cat-filter input:checked + .dot { opacity: 1; transform: scale(1.15); }
.cat-filter input:checked ~ .name { font-weight: 600; color: var(--black); }
.cat-filter input:focus-visible + .dot { outline: 2px solid var(--gold); outline-offset: 4px; }
.cat-filter .n { margin-inline-start: auto; font-size: 12px; color: var(--ink-soft); }
.price-range { display: flex; flex-direction: column; gap: 8px; }
.price-range input[type="range"] { width: 100%; accent-color: var(--gold); }
.price-range output { font-size: 13.5px; color: var(--ink-soft); }
.switch { display: flex; align-items: center; gap: 10px; font-size: 14.5px; cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--gold); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 22px; }
.toolbar .search { flex: 1 1 220px; position: relative; }
.toolbar .search svg { position: absolute; right: 14px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; fill: none; stroke: var(--ink-soft); stroke-width: 1.8; }
.toolbar .search .input { padding-right: 42px; }
.toolbar .select { width: auto; min-width: 170px; }
.result-count { font-size: 14px; color: var(--ink-soft); }
.filter-toggle { display: none; }
.shop .product-grid { grid-template-columns: repeat(3, 1fr); }
.chips-active { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 18px; }
.chips-active button { border: 0; cursor: pointer; font: inherit; }
.chips-active .chip::after { content: "×"; margin-inline-start: 4px; font-size: 15px; }
.empty {
  text-align: center; padding: 56px 20px; border: 1px dashed #dccfbb; border-radius: 20px; background: #fff;
}
.empty img { width: 150px; margin: 0 auto 14px; border-radius: 50%; }
.empty h2 { font-size: 20px; color: var(--black); }
.empty p { color: var(--ink-soft); margin: 6px 0 20px; }

/* ---------- صفحه‌ی محصول ---------- */
.product-page { padding: 32px 0 72px; }
.pdp { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
.gallery { position: sticky; top: 96px; }
.gallery-main {
  position: relative; overflow: hidden; border-radius: 24px; cursor: zoom-in;
  box-shadow: 0 30px 60px -36px rgba(33, 31, 29, .5);
}
.gallery-main img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .35s ease, opacity .35s; }
.gallery-main.zoom img { transform: scale(1.7); }
.gallery-main .tag { position: absolute; top: 14px; left: 14px; }
.thumbs { display: flex; gap: 10px; margin-top: 14px; }
.thumbs button {
  width: 76px; height: 76px; padding: 0; border-radius: 14px; overflow: hidden; cursor: pointer;
  border: 2px solid transparent; background: none; transition: border-color .25s, transform .25s var(--ease);
}
.thumbs button[aria-pressed="true"] { border-color: var(--gold); }
.thumbs button:hover { transform: translateY(-3px); }
.pdp-info h1 { font-size: clamp(24px, 3vw, 34px); color: var(--black); margin: 8px 0 6px; }
.sku { font-size: 13px; color: var(--ink-soft); }
.pdp-price { display: flex; align-items: baseline; gap: 8px; margin: 18px 0; font-size: 15px; color: var(--ink-soft); }
.pdp-price .amount { font-size: 30px; font-weight: 800; color: var(--black); }
.stock { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; }
.stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.stock.ok { color: var(--mint-ink); }
.stock.low { color: var(--butter-ink); }
.stock.out { color: var(--coral-ink); }
.opt-label { font-size: 14px; font-weight: 600; margin: 22px 0 10px; color: var(--black); }
.opt-label span { font-weight: 400; color: var(--ink-soft); }
.color-opts { display: flex; gap: 10px; }
.color-opts button {
  width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; background: var(--sw);
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--line); transition: box-shadow .25s, transform .25s var(--ease);
}
.color-opts button:hover { transform: scale(1.08); }
.color-opts button[aria-pressed="true"] { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--gold); }
.buy-row { display: flex; gap: 12px; margin-top: 26px; }
.buy-row .btn-primary { flex: 1; }
.wish {
  width: 50px; height: 50px; flex: none; border-radius: 50%; border: 1px solid #ddd3c4; background: #fff; cursor: pointer;
  display: grid; place-items: center; color: var(--coral-ink); transition: transform .3s var(--ease), background .3s;
}
.wish svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: fill .3s; }
.wish[aria-pressed="true"] { background: var(--coral-tint); border-color: var(--coral); }
.wish[aria-pressed="true"] svg { fill: currentColor; animation: pop .45s var(--ease); }
.perks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 26px; }
.perk { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; font-size: 13.5px; }
.perk svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabs { margin-top: 56px; }
.tab-list { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.tab-list button {
  position: relative; border: 0; background: none; cursor: pointer; font: inherit; font-size: 15.5px; font-weight: 500;
  padding: 12px 18px; color: var(--ink-soft); white-space: nowrap;
}
.tab-list button::after {
  content: ""; position: absolute; inset-inline: 12px; bottom: -1px; height: 2px; background: var(--gold);
  transform: scaleX(0); transition: transform .35s var(--ease);
}
.tab-list button[aria-selected="true"] { color: var(--black); }
.tab-list button[aria-selected="true"]::after { transform: scaleX(1); }
.tab-panel { animation: fade-up .45s var(--ease); max-width: 760px; color: var(--ink); }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } }
.spec-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.spec-table th, .spec-table td { padding: 12px 14px; text-align: right; border-bottom: 1px solid var(--line); }
.spec-table th { width: 38%; font-weight: 500; color: var(--ink-soft); background: var(--cream); }
.related { padding: 64px 0 80px; }

/* ---------- سبد خرید و تسویه ---------- */
.cart-page, .checkout-page { padding: 40px 0 80px; }
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }
.cart-list { display: flex; flex-direction: column; gap: 14px; }
.cart-item {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 16px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 12px;
  animation: fade-up .4s var(--ease);
}
.cart-item img { width: 96px; height: 96px; border-radius: 14px; object-fit: cover; }
.cart-item h3 { font-size: 15px; color: var(--black); }
.cart-item .meta { font-size: 13px; color: var(--ink-soft); }
.cart-item .line { font-weight: 700; color: var(--black); white-space: nowrap; }
.cart-item .actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.remove { border: 0; background: none; cursor: pointer; color: var(--ink-soft); font: inherit; font-size: 13px; padding: 4px; }
.remove:hover { color: var(--coral-ink); }
.cart-item.leaving { animation: leave .3s ease forwards; }
@keyframes leave { to { opacity: 0; transform: translateX(-30px); } }
.summary { position: sticky; top: 96px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 14.5px; }
.summary-row.total { border-top: 1px dashed #dccfbb; margin-top: 8px; padding-top: 14px; font-size: 17px; font-weight: 800; color: var(--black); }
.summary .btn { margin-top: 18px; }
.summary .muted { color: var(--ink-soft); font-size: 13px; }
.mini-items { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.mini-item { display: flex; gap: 10px; align-items: center; font-size: 13.5px; }
.mini-item img { width: 48px; height: 48px; border-radius: 10px; }
.mini-item span:last-child { margin-inline-start: auto; font-weight: 600; white-space: nowrap; }
.steps { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 13.5px; flex-wrap: wrap; }
.steps li { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); }
.steps li b {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; border: 1px solid #dccfbb; font-weight: 600; font-size: 13px;
}
.steps li.done b { background: var(--mint); border-color: var(--mint); color: #fff; }
.steps li.now { color: var(--black); font-weight: 600; }
.steps li.now b { background: var(--gold-surface); border-color: var(--gold); color: var(--black); }
.steps li + li::before { content: ""; width: 26px; height: 1px; background: #dccfbb; }
.pay-opts { display: flex; flex-direction: column; gap: 10px; }
.pay-opt {
  display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid #ddd3c4; border-radius: 14px; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.pay-opt:has(input:checked) { border-color: var(--gold); background: #fffaf0; }
.pay-opt input { accent-color: var(--gold); width: 18px; height: 18px; }
.pay-opt small { display: block; color: var(--ink-soft); font-size: 12.5px; }

/* ---------- تماس ---------- */
.contact-page { padding: 40px 0 80px; }
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.contact-card {
  display: flex; gap: 14px; align-items: center; padding: 20px; border-radius: 20px;
  transition: transform .4s var(--ease);
}
.contact-card:hover { transform: translateY(-4px); }
.contact-card .ic { width: 48px; height: 48px; border-radius: 14px; background: #fff; display: grid; place-items: center; flex: none; }
.contact-card svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.contact-card h3 { font-size: 15px; color: var(--black); }
.contact-card p { margin: 2px 0 0; font-size: 14px; }
.contact-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: start; }
.map-box {
  position: relative; min-height: 360px; border-radius: 20px; overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,255,255,.55) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(0deg, rgba(255,255,255,.55) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(135deg, var(--mint-tint), var(--sky-tint));
  display: grid; place-items: center; text-align: center; color: var(--sky-ink);
}
.map-box .pin { width: 46px; height: 46px; margin: 0 auto 10px; animation: bounce 2.2s ease-in-out infinite; }
.map-box .pin svg { width: 100%; height: 100%; fill: var(--coral); }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- حساب کاربری ---------- */
.account-page { padding: 48px 0 88px; }
.account-wrap { max-width: 460px; margin: 0 auto; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--cream); border-radius: 999px; padding: 4px; margin-bottom: 22px; position: relative; }
.seg button { position: relative; z-index: 1; border: 0; background: none; cursor: pointer; font: inherit; font-size: 15px; font-weight: 500; padding: 10px; border-radius: 999px; color: var(--ink-soft); transition: color .3s; }
.seg button[aria-selected="true"] { color: var(--black); }
.seg .thumb { position: absolute; z-index: 0; top: 4px; bottom: 4px; width: calc(50% - 4px); right: 4px; border-radius: 999px; background: var(--gold-surface); box-shadow: 0 6px 14px -8px rgba(138,106,58,.8); transition: transform .45s var(--ease); }
.seg[data-tab="register"] .thumb { transform: translateX(-100%); }
.form-stack { display: flex; flex-direction: column; gap: 16px; }
.row-between { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; }
.row-between a { color: var(--gold-ink); }

/* ---------- واکنش‌گرا ---------- */
@media (max-width: 1024px) {
  .shop-layout { grid-template-columns: 220px 1fr; gap: 24px; }
  .shop .product-grid { grid-template-columns: repeat(2, 1fr); }
  .pdp { gap: 32px; }
  .cart-layout { grid-template-columns: 1fr 320px; }
  .contact-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .page-hero { padding: 26px 0 30px; }
  .shop { padding-top: 24px; }
  .shop-layout { grid-template-columns: 1fr; }
  .filter-toggle { display: inline-flex; }
  .filters {
    position: fixed; inset: 0 0 0 auto; z-index: 50; width: min(320px, 86vw);
    background: var(--bg); padding: 22px 20px; overflow-y: auto;
    box-shadow: -20px 0 40px -20px rgba(0,0,0,.3);
    transform: translateX(105%); transition: transform .45s var(--ease);
  }
  .filters.open { transform: none; }
  .filters-head { display: flex !important; justify-content: space-between; align-items: center; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(33,31,29,.35); opacity: 0; pointer-events: none; transition: opacity .3s; }
  .scrim.open { opacity: 1; pointer-events: auto; }
  .toolbar .select { flex: 1; min-width: 0; }
  .shop .product-grid { grid-template-columns: repeat(2, 1fr); }

  .pdp { grid-template-columns: 1fr; gap: 22px; }
  .gallery { position: static; }
  .thumbs button { width: 64px; height: 64px; }
  .perks { grid-template-columns: 1fr; }
  .buy-row { position: sticky; bottom: 10px; z-index: 5; background: rgba(255,253,249,.92); backdrop-filter: blur(8px); padding: 8px; margin-inline: -8px; border-radius: 999px; }

  .cart-layout { grid-template-columns: 1fr; }
  .cart-item { grid-template-columns: 76px 1fr; }
  .cart-item img { width: 76px; height: 76px; }
  .cart-item .actions { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .summary { position: static; }
  .form-grid { grid-template-columns: 1fr; }

  .contact-cards { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .map-box { min-height: 220px; }
  .card { padding: 18px; }
}
.filters-head { display: none; }
.scrim { display: none; }
@media (prefers-reduced-motion: reduce) {
  .map-box .pin { animation: none; }
}


/* ---------- سربرگ تصویری صفحه‌ها (۱.۰.۱۹) ---------- */
.page-hero.has-media { padding: 34px 0 38px; }
.hero-band { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; align-items: center; }
.page-hero:not(.has-media) .hero-band { display: block; }
.hero-copy { min-width: 0; }
.hero-meta {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 14px;
  font-size: 13.5px; font-weight: 600; color: var(--gold-ink);
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px;
}
.hero-meta::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold-grad); }
.hero-pic { margin: 0; position: relative; padding: 0 0 16px 16px; }
.hero-pic::before {
  content: ""; position: absolute; inset: 16px 16px 0 0; border-radius: 26px;
  border: 1.5px solid var(--gold-light); pointer-events: none;
}
.hero-pic-frame {
  display: block; position: relative; overflow: hidden; border-radius: 24px;
  aspect-ratio: 16 / 9; background: var(--cream-2);
  box-shadow: 0 30px 60px -36px rgba(33, 31, 29, .55);
}
.hero-pic-frame img { width: 100%; height: 100%; object-fit: cover; animation: hero-drift 18s ease-in-out infinite alternate; }
@keyframes hero-drift { from { transform: scale(1.02) translateX(0); } to { transform: scale(1.1) translateX(-2%); } }
.page-hero.is-compact .hero-pic-frame { aspect-ratio: 21 / 8; }
.page-hero.is-compact.has-media { padding: 24px 0 26px; }

/* صفحه‌ی دسته: زیردسته‌ها و دسته‌های دیگر */
.sub-cats { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 22px; }
.sub-cat {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: 14.5px; font-weight: 500;
  transition: border-color .25s, transform .3s var(--ease), box-shadow .3s;
}
.sub-cat img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--cream); }
.sub-cat:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 12px 24px -16px rgba(33, 31, 29, .4); }
.other-cats { background: var(--cream); margin-top: 20px; }
.other-cats .cat-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }

@media (max-width: 900px) {
  .hero-band { grid-template-columns: 1fr; gap: 20px; }
  .hero-pic { order: -1; padding: 0 0 10px 10px; }
  .hero-pic::before { inset: 10px 10px 0 0; border-radius: 20px; }
  .hero-pic-frame { border-radius: 18px; aspect-ratio: 16 / 8; }
  .page-hero.is-compact .hero-pic-frame { aspect-ratio: 16 / 6; }
  .page-hero.has-media { padding: 18px 0 26px; }
}
@media (max-width: 760px) {
  .other-cats .cat-grid { display: flex; }
}
@media (prefers-reduced-motion: reduce) { .hero-pic-frame img { animation: none; } }
.hero-pic-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-media picture { display: contents; }
/* عکس صفحه‌ها: موضوع در سمت چپ عکس است؛ در قاب باریک سبد خرید هم دیده شود (۱.۰.۲۶) */
.hero-pic-frame picture { display: contents; }
.hero-pic-frame img[src*="page-"] { object-position: 22% 60%; }
