/* ==========================================================
   ساغر | فروشگاه زعفران
   استایل نهایی سایت (مطابق طرح UI)
   ========================================================== */

@import url("https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css");

:root {
  --burgundy: #7A1F32;
  --burgundy-light: #A0283C;
  --burgundy-glow: #8F2A40;
  --gold: #E8A94A;
  --gold-soft: #F2C879;
  --saffron: #F08A24;
  --brick: #B03A18;
  --cream: #F5F0E4;
  --cream-dark: #EFE8D8;
  --line: #E3D9C2;
  --ink: #3A1520;
  --white: #FFFDF8;
  --muted: #6B5651;
  --olive: #7A5A12;

  --radius: 14px;
  --radius-lg: 24px;
  --shadow: 0 6px 20px rgba(122, 31, 50, .10);

  --icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A1F32' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  --icon-box: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A1F32' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 8 12 3 3 8v8l9 5 9-5Z'/%3E%3Cpath d='m3 8 9 5 9-5M12 13v8'/%3E%3C/svg%3E");
  --icon-tag: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A1F32' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12 12 20 4 12V4h8Z'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.2'/%3E%3C/svg%3E");
  --icon-cart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F2C879' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h2l2.4 11.2a2 2 0 0 0 2 1.6h7.7a2 2 0 0 0 1.9-1.4L21 8H6'/%3E%3Ccircle cx='10' cy='20' r='1.3'/%3E%3Ccircle cx='17' cy='20' r='1.3'/%3E%3C/svg%3E");
  --icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A1F32' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* ---------- پایه ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Vazirmatn", Tahoma, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.8;
}

main {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px 80px;
}

h1, h2, h3, h4 { margin-top: 0; color: var(--burgundy); font-weight: 800; line-height: 1.4; }
p { margin-top: 0; }
a { color: var(--burgundy); text-decoration: none; transition: color .2s; }
a:hover { color: var(--burgundy-light); }
img { display: block; max-width: 45px; height: auto; }

:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }

/* ---------- هدر ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 48px;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--burgundy); }
.brand:hover { color: var(--burgundy); }

.brand-symbol {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--burgundy);
  color: var(--gold-soft);
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
}

.brand-name { display: flex; flex-direction: column; line-height: 1.3; }
.brand-name strong { font-size: 1.6rem; font-weight: 800; color: var(--burgundy); }
.brand-name small { font-size: .78rem; color: var(--muted); }

.header-nav { display: flex; align-items: center; gap: 20px; font-weight: 600; }
.header-nav a { padding: 6px 2px; color: var(--ink); }
.header-nav a:hover { color: var(--burgundy); }

.cart-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px !important;
  border-radius: 999px;
  background: var(--burgundy);
  color: var(--cream) !important;
  font-weight: 700;
}
.cart-link::before {
  content: "";
  width: 20px;
  height: 20px;
  background: var(--icon-cart) center / contain no-repeat;
}
.cart-link:hover { background: var(--burgundy-light); }

/* ---------- پیام‌ها ---------- */
.messages { width: 100%; max-width: 1200px; margin: 16px auto 0; padding: 0 48px; }
.message {
  margin-bottom: 8px;
  padding: 12px 18px;
  border-radius: var(--radius);
  background: var(--gold-soft);
  border: 1px solid var(--gold);
  color: var(--ink);
  font-weight: 600;
}
.message-success { background: #F7E7BE; border-color: var(--gold); }
.message-error, .message-danger { background: #F6D9D0; border-color: #E2A593; color: #6E1E0A; }
.message-warning { background: #FBE3C2; border-color: var(--saffron); }
.message-info { background: var(--cream-dark); border-color: var(--line); }

/* ---------- دکمه‌ها ---------- */
.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: background .2s, color .2s, transform .1s;
}
.button:active, button:active { transform: translateY(1px); }

.button-primary {
  min-height: 52px;
  padding: 0 34px;
  background: var(--gold);
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 800;
}
.button-primary:hover { background: var(--saffron); color: var(--ink); }

.button-add {
  min-height: 44px;
  padding: 0 18px;
  background: var(--burgundy);
  color: var(--cream);
  font-size: .9rem;
  white-space: nowrap;
}
.button-add:hover { background: var(--burgundy-light); color: var(--white); }

.button-secondary {
  min-height: 44px;
  padding: 0 18px;
  background: transparent;
  color: var(--burgundy);
  border: 2px solid var(--burgundy);
  font-size: .9rem;
}
.button-secondary:hover { background: var(--burgundy); color: var(--cream); }

.button-disabled,
.button-primary.button-disabled,
.button:disabled {
  background: var(--line);
  color: var(--muted);
  cursor: not-allowed;
  transform: none;
}

.remove-button {
  min-height: 44px;
  padding: 0 6px;
  background: transparent;
  color: var(--brick);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.remove-button:hover { color: #7C230C; }

.text-link { font-weight: 700; color: var(--burgundy); }
.text-link:hover { color: var(--saffron); }

/* ---------- عنوان کوچک ---------- */
.eyebrow {
  display: inline-block;
  direction: ltr;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--burgundy);
}

/* ---------- Hero ---------- */
.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px;
  padding: 72px 0 56px;
}
.hero-content { flex: 1 1 480px; min-width: 0; }
.hero-content .eyebrow {
  padding: 2px 16px;
  border-radius: 999px;
  background: var(--gold-soft);
  letter-spacing: .12em;
}
.hero-content h1 {
  margin: 20px 0;
  font-size: clamp(2.2rem, 5vw, 3.9rem);
  line-height: 1.3;
}
.hero-content p {
  max-width: 480px;
  margin: 0 0 32px;
  font-size: 1.12rem;
  color: #4A2A33;
}

.hero-mark {
  position: relative;
  flex: 1 1 420px;
  min-width: 0;
  min-height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 36px;
  background: var(--burgundy);
}
.hero-mark::before, .hero-mark::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.hero-mark::before { width: 380px; height: 380px; background: var(--burgundy-glow); }
.hero-mark::after { width: 270px; height: 270px; border: 2px solid var(--gold); opacity: .55; }
.hero-mark span {
  position: relative;
  z-index: 1;
  font-size: clamp(6rem, 12vw, 9rem);
  font-weight: 800;
  line-height: 1;
  color: var(--gold-soft);
}
.hero-mark small {
  position: absolute;
  z-index: 1;
  bottom: 28px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: .95rem;
  font-weight: 600;
  color: var(--gold-soft);
}

/* ---------- نوار اعتماد ---------- */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 72px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.trust-strip > div {
  flex: 1 1 260px;
  display: grid;
  grid-template-columns: 52px 1fr;
  column-gap: 16px;
  align-items: center;
  padding: 26px 24px;
}
.trust-strip > div::before {
  content: "";
  grid-row: 1 / span 2;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gold-soft) var(--icon-search) center / 24px no-repeat;
}
.trust-strip > div:nth-child(2)::before { background-image: var(--icon-box); }
.trust-strip > div:nth-child(3)::before { background-image: var(--icon-tag); }
.trust-strip strong { color: var(--burgundy); font-size: 1.05rem; line-height: 1.5; }
.trust-strip span { font-size: .9rem; color: var(--muted); line-height: 1.5; }

/* ---------- عنوان بخش‌ها ---------- */
.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}
.section-heading h2 { margin: 2px 0 0; font-size: clamp(1.7rem, 3vw, 2.4rem); }
.section-heading p { margin: 0; color: var(--muted); }

.products-section { padding-bottom: 24px; }

/* ---------- کارت محصول ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform .25s, box-shadow .25s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.product-art {
  position: relative;
  display: grid;
  place-items: center;
  height: 200px;
  overflow: hidden;
  background: var(--burgundy);
}
.product-art img { width: 100%; height: 100%; object-fit: cover; }
.product-initial { font-size: 5.5rem; font-weight: 800; line-height: 1; color: var(--gold-soft); }
.art-caption {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  text-align: center;
  direction: ltr;
  font-size: .7rem;
  letter-spacing: .25em;
  color: var(--gold);
}
.product-card:nth-child(3n+2) .product-art { background: var(--gold); }
.product-card:nth-child(3n+2) .product-initial,
.product-card:nth-child(3n+2) .art-caption { color: var(--burgundy); }
.product-card:nth-child(3n) .product-art { background: var(--ink); }

.product-info { display: flex; flex-direction: column; flex: 1; gap: 12px; padding: 24px; }
.product-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.product-title-row h3 { margin: 0; font-size: 1.5rem; }
.product-title-row a { color: var(--burgundy); }
.product-title-row a:hover { color: var(--saffron); }
.product-dot {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(232, 169, 74, .25);
}
.product-description { margin: 0; font-size: .95rem; color: var(--muted); }

/* ---------- بسته‌ها ---------- */
.variant-list { display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding-top: 8px; }
.variant-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  padding: 12px 14px;
  background: var(--cream);
  border-radius: var(--radius);
}
.variant-row:has(.out-stock) { background: var(--cream-dark); }
.variant-details { display: flex; flex-direction: column; line-height: 1.5; }
.variant-details strong { font-size: 1rem; }

.stock-status { font-size: .8rem; font-weight: 600; }
.in-stock { color: var(--olive); }
.in-stock::before { content: "● "; color: var(--gold); }
.out-stock { color: var(--brick); }
.out-stock::before { content: "● "; }

.variant-purchase { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.variant-purchase form { margin: 0; }

.price { color: var(--burgundy); font-weight: 700; font-size: 1.05rem; }
.price small { font-weight: 400; font-size: .75rem; color: var(--muted); }
.price.unavailable { color: var(--muted); font-size: .85rem; font-weight: 400; }

.empty-products {
  padding: 56px 16px;
  text-align: center;
  background: var(--white);
  border: 2px dashed var(--gold-soft);
  border-radius: var(--radius-lg);
}
.empty-products p { margin-bottom: 0; color: var(--muted); }

/* ---------- مسیر صفحه ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 32px 0 28px;
  font-size: .9rem;
  color: var(--muted);
}
.breadcrumbs a { font-weight: 700; }
.breadcrumbs span:last-child { color: var(--ink); }

/* ---------- جزئیات محصول ---------- */
.detail-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  padding: 36px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 32px;
}

.detail-visual {
  position: relative;
  flex: 1 1 400px;
  min-width: 0;
  min-height: 460px;
  display: flex;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--gold);
}
.detail-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.detail-placeholder {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.detail-placeholder::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 340px;
  height: 340px;
  max-width: 90%;
  border-radius: 50%;
  background: var(--gold-soft);
  transform: translate(-50%, -50%);
}
.detail-placeholder span {
  position: relative;
  font-size: clamp(7rem, 14vw, 11rem);
  font-weight: 800;
  line-height: 1;
  color: var(--burgundy);
}
.detail-placeholder small {
  position: relative;
  direction: ltr;
  font-size: .75rem;
  letter-spacing: .3em;
  color: var(--burgundy);
}
.detail-image-caption {
  position: absolute;
  right: 0;
  left: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--burgundy);
  color: var(--gold-soft);
  font-size: .9rem;
  font-weight: 600;
}
.detail-image-caption span:first-child { direction: ltr; letter-spacing: .2em; }

.detail-content { flex: 1 1 440px; min-width: 0; }
.detail-content h1 { margin: 4px 0 14px; font-size: clamp(1.9rem, 4vw, 2.8rem); }
.detail-description { color: #4A2A33; font-size: 1.05rem; }
.detail-description p { margin: 0 0 12px; }

.detail-divider { width: 72px; height: 4px; margin: 28px 0; border-radius: 999px; background: var(--gold); }
.choice-title { margin-bottom: 14px; font-size: 1.2rem; }

.field-label { display: block; margin: 16px 0 6px; }
.variant-select, .quantity-input { max-width: 100%; }
.quantity-input { width: 140px; }

.selected-price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding: 16px 20px;
  background: var(--cream);
  border: 1px solid var(--gold-soft);
  border-radius: 16px;
}
.selected-price span { color: var(--muted); }
.selected-price strong { font-size: 1.5rem; color: var(--burgundy); }

.selection-stock { margin: 8px 0 0; font-size: .9rem; font-weight: 600; color: var(--olive); }

.purchase-button { width: 100%; min-height: 56px; margin-top: 24px; font-size: 1.1rem; border-radius: 16px; }
.purchase-note { margin: 12px 0 0; text-align: center; font-size: .88rem; color: var(--muted); }
.empty-detail {
  padding: 20px;
  text-align: center;
  background: var(--cream);
  border: 2px dashed var(--gold-soft);
  border-radius: var(--radius);
  color: var(--muted);
}

/* ---------- محصولات مرتبط ---------- */
.related-section { margin-top: 64px; }
.related-section .section-heading { padding-bottom: 14px; border-bottom: 2px solid var(--gold-soft); }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.related-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.related-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--gold); color: var(--ink); }
.related-card img, .related-symbol {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
}
.related-symbol {
  display: grid;
  place-items: center;
  background: var(--burgundy);
  color: var(--gold-soft);
  font-size: 2.2rem;
  font-weight: 800;
}
.related-card > span:last-child { display: flex; flex-direction: column; line-height: 1.6; }
.related-card strong { font-size: 1.1rem; color: var(--burgundy); }
.related-card small { font-weight: 600; color: var(--muted); }

/* ---------- عنوان صفحه‌ها (سبد و ثبت سفارش) ---------- */
.page-heading {
  margin: 48px 0 28px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--gold-soft);
}
.page-heading h1 { margin: 4px 0 6px; font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
.page-heading p { margin: 0; color: var(--muted); }

/* ---------- مراحل خرید ---------- */
.checkout-steps { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
.checkout-step { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.checkout-step:not(:last-child) { flex: 1; }
.checkout-step:not(:last-child)::after {
  content: "";
  flex: 1;
  min-width: 20px;
  height: 2px;
  margin-inline-start: 6px;
  background: var(--line);
}
.checkout-step span {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--cream-dark);
  border: 1px solid var(--line);
  font-weight: 700;
}
.checkout-step strong { font-size: .95rem; font-weight: 600; white-space: nowrap; }
.checkout-step.active { color: var(--burgundy); }
.checkout-step.active span { background: var(--burgundy); border-color: var(--burgundy); color: var(--gold-soft); }
.checkout-step.active strong { font-weight: 800; }

/* ---------- سبد خرید ---------- */
.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr);
  gap: 32px;
  align-items: start;
}

.cart-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 20px;
  align-items: start;
  margin-bottom: 16px;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
}
.cart-product-symbol {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: var(--burgundy);
  color: var(--gold-soft);
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1;
}
.cart-product-info h2 { margin: 0 0 6px; font-size: 1.25rem; }
.cart-product-info p { margin: 2px 0; font-size: .92rem; color: var(--muted); }
.cart-unit-price strong { color: var(--ink); }

.cart-item-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 14px; }
.cart-item-actions form { margin: 0; }
.cart-update-form { display: flex; align-items: center; gap: 10px; }
.cart-update-form label { font-size: .9rem; }
.cart-update-form input[type="number"] { width: 84px; padding: 8px 12px; text-align: center; }

.cart-line-total { display: flex; flex-direction: column; align-items: flex-end; text-align: left; }
.cart-line-total small { color: var(--muted); }
.cart-line-total strong { font-size: 1.15rem; color: var(--burgundy); white-space: nowrap; }

.cart-bottom-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 8px; }
.cart-bottom-actions form { margin: 0; }

.cart-summary,
.checkout-form-card,
.checkout-summary {
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.cart-summary h2, .checkout-form-card h2, .checkout-summary h2 {
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gold-soft);
  font-size: 1.3rem;
}

.cart-summary, .checkout-summary { position: sticky; top: 96px; }

.cart-summary-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; }
.cart-summary-row span { color: var(--muted); }
.cart-total { margin-top: 8px; padding-top: 16px; border-top: 2px solid var(--gold-soft); }
.cart-total span { color: var(--ink); font-weight: 600; }
.cart-total strong { font-size: 1.3rem; color: var(--burgundy); }

.cart-shipping-note, .cart-secure-note { margin: 14px 0 0; font-size: .88rem; color: var(--muted); }
.cart-checkout-button { width: 100%; margin-top: 18px; min-height: 56px; }
.cart-secure-note { text-align: center; }

.cart-help { margin-top: 32px; padding: 20px 24px; border-radius: 16px; background: rgba(242, 200, 121, .35); }
.cart-help strong { color: var(--burgundy); }
.cart-help p { margin: 4px 0 0; font-size: .95rem; }

.cart-empty {
  max-width: 560px;
  margin: 24px auto 0;
  padding: 56px 24px;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 28px;
}
.cart-empty-symbol {
  display: grid;
  place-items: center;
  width: 110px;
  height: 110px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--burgundy);
  color: var(--gold-soft);
  font-size: 3.8rem;
  font-weight: 800;
  line-height: 1;
}
.cart-empty h2 { font-size: 1.5rem; }
.cart-empty p { margin-bottom: 24px; color: var(--muted); }

/* ---------- ثبت سفارش ---------- */
.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr);
  gap: 32px;
  align-items: start;
}

.form-field { margin-bottom: 18px; }
.form-field label { display: block; margin-bottom: 6px; }
.form-field textarea { min-height: 110px; resize: vertical; }
.field-error { display: block; margin-top: 4px; font-size: .88rem; color: var(--brick); }
.form-field:has(.field-error) input,
.form-field:has(.field-error) textarea,
.form-field:has(.field-error) select { border-color: var(--brick); }

.form-errors {
  margin-bottom: 20px;
  padding: 12px 18px;
  background: #F6D9D0;
  border: 1px solid #E2A593;
  border-radius: var(--radius);
  color: #6E1E0A;
}
.form-errors p { margin: 4px 0; }

.checkout-submit { width: 100%; min-height: 56px; margin-top: 8px; }

.summary-product {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--gold-soft);
}
.summary-product > div { display: flex; flex-direction: column; line-height: 1.6; }
.summary-product strong { color: var(--burgundy); }
.summary-product small { color: var(--muted); }
.summary-product > span { font-weight: 600; white-space: nowrap; }

.summary-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; }
.summary-row span { color: var(--muted); }
.summary-row:last-of-type { margin-top: 8px; padding-top: 16px; border-top: 2px solid var(--gold-soft); }
.summary-row:last-of-type strong { font-size: 1.15rem; color: var(--burgundy); }

.checkout-note {
  margin: 16px 0 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(242, 200, 121, .35);
  font-size: .88rem;
  line-height: 1.9;
}

/* ---------- فرم‌ها ---------- */
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="tel"], input[type="search"],
textarea, select {
  width: 100%;
  padding: 11px 16px;
  background: var(--white);
  color: var(--ink);
  border: 1px solid #E8C98F;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
}
select {
  appearance: none;
  -webkit-appearance: none;
  padding-left: 42px;
  background-image: var(--icon-chevron);
  background-repeat: no-repeat;
  background-position: left 14px center;
  background-size: 18px;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--saffron);
  box-shadow: 0 0 0 3px rgba(240, 138, 36, .25);
}
label { font-weight: 600; color: var(--burgundy); }
.errorlist { margin: 4px 0; padding: 0; list-style: none; font-size: .88rem; color: var(--brick); }

/* ---------- جدول عمومی ---------- */
table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; }
th { padding: 12px; text-align: right; background: var(--burgundy); color: var(--cream); }
td { padding: 12px; border-bottom: 1px solid var(--line); }

/* ---------- فوتر ---------- */
.site-footer {
  padding: 40px 24px;
  text-align: center;
  background: var(--ink);
  color: #EBE3D0;
  border-top: 4px solid var(--gold);
}
.footer-brand { display: inline-block; font-size: 1.8rem; font-weight: 800; color: var(--gold-soft); }
.footer-brand:hover { color: var(--saffron); }
.site-footer p { margin: 2px 0 16px; }
.site-footer span { font-size: .85rem; color: #D9CFB8; }

/* ---------- ریسپانسیو ---------- */
@media (max-width: 900px) {
  .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .cart-summary, .checkout-summary { position: static; }
  .checkout-summary { order: -1; }
}

@media (max-width: 700px) {
  main { padding: 0 20px 56px; }
  .site-header { padding: 12px 20px; }
  .messages { padding: 0 20px; }
  .header-nav { gap: 12px; }
  .brand-name small { display: none; }

  .hero { gap: 28px; padding: 40px 0 32px; }
  .hero-mark { min-height: 260px; border-radius: 28px; }
  .hero-mark::before { width: 220px; height: 220px; }
  .hero-mark::after { width: 160px; height: 160px; }
  .hero-mark span { font-size: 5.5rem; }

  .trust-strip { margin-bottom: 48px; }
  .detail-layout { gap: 28px; padding: 20px; border-radius: 24px; }
  .detail-visual { min-height: 320px; }

  .cart-item { grid-template-columns: 56px 1fr; gap: 14px; padding: 16px; }
  .cart-product-symbol { width: 56px; height: 56px; font-size: 1.8rem; border-radius: 12px; }
  .cart-line-total { grid-column: 1 / -1; flex-direction: row; align-items: baseline; justify-content: space-between; text-align: right; padding-top: 12px; border-top: 1px dashed var(--gold-soft); }

  .checkout-steps { gap: 6px; }
  .checkout-step strong { display: none; }
  .checkout-step.active strong { display: inline; }

  .cart-summary, .checkout-form-card, .checkout-summary { padding: 20px; }
  .product-grid { grid-template-columns: 1fr; }
}