/* ==================================================================
   بلو پیپر — فروشگاه بگ و باکس چاپ اختصاصی
   تم روشن کاغذی، RTL، موبایل‌فرست
   ================================================================== */

@font-face {
  font-family: "Vazirmatn";
  src: url("fonts/Vazirmatn-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("fonts/Vazirmatn-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("fonts/Vazirmatn-Bold.woff2") format("woff2");
  font-weight: 700 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f6f2ea;
  --paper-2: #efe9dd;
  --card: #fffdf8;
  --ink: #0e1b2c;
  --muted: #5f6f84;
  --muted-2: #8695a8;
  --blue: #1d5fd0;
  --blue-2: #3f8bff;
  --blue-soft: #e9f0fe;
  --blue-ink: #0b2a5b;
  --line: rgba(14, 27, 44, 0.1);
  --line-2: rgba(14, 27, 44, 0.16);
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 18px 44px rgba(14, 27, 44, 0.09);
  --shadow-lg: 0 26px 70px rgba(14, 27, 44, 0.16);
  --font: "Vazirmatn", "IRANSansX", "Segoe UI", Tahoma, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 82px;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 520px at 100% -8%, #eaf2ff 0%, transparent 62%),
    radial-gradient(700px 480px at 0% 6%, #fdf3e2 0%, transparent 58%),
    var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.4; font-weight: 700; text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; }

::selection { background: rgba(29, 95, 208, 0.18); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

.shell { width: min(1180px, 100% - 28px); margin-inline: auto; }

.skip-link {
  position: fixed;
  inset-inline-start: 50%;
  top: -70px;
  transform: translateX(50%);
  z-index: 200;
  padding: 10px 18px;
  border-radius: 0 0 14px 14px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0; }

/* -------------------------------- سربرگ -------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 253, 248, 0.82);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 66px;
  padding-block: 8px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--blue);
  background: var(--blue-soft);
  flex: none;
}
.brand-mark svg { width: 30px; height: 30px; }
.brand-mark.sm { width: 34px; height: 34px; border-radius: 10px; }
.brand-mark.sm svg { width: 26px; height: 26px; }

.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-text strong { font-size: 16px; font-weight: 800; }
.brand-text small { font-size: 10.5px; color: var(--muted-2); letter-spacing: 1.2px; direction: ltr; text-align: right; }

.site-nav { display: flex; gap: 2px; margin-inline-start: auto; }
.site-nav a {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  transition: color 0.16s ease, background 0.16s ease;
}
.site-nav a:hover { color: var(--ink); background: rgba(29, 95, 208, 0.07); }

.header-actions { display: flex; align-items: center; gap: 8px; }

.ig-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 13px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  transition: border-color 0.16s ease, transform 0.16s ease;
}
.ig-link svg { width: 17px; height: 17px; color: #d6336c; }
.ig-link:hover { border-color: var(--line-2); transform: translateY(-1px); }

.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.16s ease;
}
.cart-btn svg { width: 20px; height: 20px; }
.cart-btn:hover { border-color: var(--line-2); transform: translateY(-1px); }
.cart-count {
  position: absolute;
  top: -7px;
  inset-inline-start: -7px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 19px;
  text-align: center;
}

/* -------------------------------- دکمه‌ها -------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: scale(0.985); }

.btn-primary {
  background: linear-gradient(135deg, var(--blue-2), var(--blue));
  color: #fff;
  box-shadow: 0 12px 26px rgba(29, 95, 208, 0.26);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 34px rgba(29, 95, 208, 0.32); }

.btn-ghost { background: var(--card); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--line-2); }

.btn-sm { min-height: 40px; padding: 0 15px; font-size: 13px; border-radius: 11px; }
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 15.5px; }
.btn-block { width: 100%; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }

.link-btn {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* --------------------------------- هیرو --------------------------------- */
.hero { padding-block: clamp(22px, 4vw, 54px) clamp(10px, 2vw, 24px); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(18px, 3.5vw, 44px);
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--blue-ink);
  font-size: 12.5px;
  font-weight: 600;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22b07d;
  box-shadow: 0 0 0 0 rgba(34, 176, 125, 0.5);
  animation: pulse 2.6s ease-out infinite;
  flex: none;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 176, 125, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(34, 176, 125, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 176, 125, 0); }
}

.hero h1 {
  margin-top: 14px;
  font-size: clamp(27px, 5.4vw, 46px);
  font-weight: 800;
  line-height: 1.42;
  letter-spacing: -0.4px;
}
.hl {
  background: linear-gradient(100deg, #2f7bff, #1d5fd0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin-top: 12px;
  max-width: 50ch;
  color: var(--muted);
  font-size: clamp(14px, 2.2vw, 16px);
  line-height: 2;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 12.5px;
}
.hero-badges li { display: inline-flex; align-items: center; gap: 7px; }
.hero-badges li::before {
  content: "✓";
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: rgba(29, 95, 208, 0.12);
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

/* -------------------------------- هنر هیرو -------------------------------- */
.hero-art { position: relative; display: grid; place-items: center; min-height: 320px; }
.hero-blob {
  position: absolute;
  inset: 8% 4% 6%;
  border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%;
  background: linear-gradient(150deg, #dbe9ff, #eef4ff 55%, #fbeed7);
  filter: blur(2px);
  animation: blobMorph 16s ease-in-out infinite alternate;
}
@keyframes blobMorph {
  from { border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%; transform: rotate(-2deg) scale(1); }
  to { border-radius: 55% 45% 44% 56% / 42% 56% 44% 58%; transform: rotate(3deg) scale(1.04); }
}
.hero-bag {
  position: relative;
  width: min(320px, 78%);
  filter: drop-shadow(0 26px 34px rgba(14, 27, 44, 0.18));
  animation: floatY 6s ease-in-out infinite alternate;
}
@keyframes floatY {
  from { transform: translateY(0) rotate(-1.5deg); }
  to { transform: translateY(-10px) rotate(1.5deg); }
}
.chip {
  position: absolute;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(14, 27, 44, 0.1);
  font-size: 12px;
  font-weight: 600;
  color: var(--blue-ink);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.chip-1 { top: 12%; inset-inline-start: 0; animation: floatY 7s 0.4s ease-in-out infinite alternate; }
.chip-2 { bottom: 10%; inset-inline-end: 2%; animation: floatY 8s 0.8s ease-in-out infinite alternate-reverse; }

/* -------------------------------- بخش‌ها -------------------------------- */
.section { padding-block: clamp(26px, 4.6vw, 58px); }
.section-head { margin-bottom: clamp(16px, 2.6vw, 26px); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
}
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--blue); opacity: 0.6; }

.section h2 { font-size: clamp(21px, 3.6vw, 31px); font-weight: 800; }
.section-sub { margin-top: 6px; max-width: 62ch; color: var(--muted); font-size: 14px; }

/* ------------------------------- دسته‌بندی ------------------------------- */
.cat-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cat-chips::-webkit-scrollbar { display: none; }
.chip-btn {
  flex: none;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.chip-btn:hover { border-color: var(--line-2); color: var(--ink); }
.chip-btn.is-active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 8px 20px rgba(29, 95, 208, 0.22);
}

/* -------------------------------- محصولات -------------------------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
  gap: 14px;
}
.product {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.product-media {
  position: relative;
  display: grid;
  place-items: center;
  padding: 10px;
  aspect-ratio: 1.16;
  background: linear-gradient(160deg, #f2f6fd, #fdf8ef);
  border-bottom: 1px solid var(--line);
}
.product-media svg { height: 100%; width: auto; max-width: 100%; }
.product-badge {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 10.5px;
  font-weight: 700;
}

.product-body { display: flex; flex-direction: column; gap: 7px; flex: 1; padding: 13px 15px 15px; }
.product h3 { font-size: 14.5px; font-weight: 700; }
.product-desc { color: var(--muted); font-size: 12.3px; line-height: 1.85; }
.product-meta { display: flex; align-items: baseline; gap: 5px; margin-top: auto; }
.price { font-size: 16px; font-weight: 800; color: var(--blue-ink); }
.unit { font-size: 11.5px; color: var(--muted-2); white-space: nowrap; }

.product-actions { display: flex; gap: 8px; }
.product-actions .btn { flex: 1; min-height: 42px; padding: 0 10px; font-size: 12.8px; border-radius: 12px; }

/* ------------------------------- کاستومایزر ------------------------------- */
.cz {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 16px;
  align-items: start;
}

.cz-stage {
  position: sticky;
  top: 82px;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.cz-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.cz-tabs::-webkit-scrollbar { display: none; }
.cz-tab {
  flex: none;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 12.3px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.cz-tab.is-active { background: var(--blue-soft); border-color: rgba(29, 95, 208, 0.35); color: var(--blue); }

.stage-wrap {
  position: relative;
  margin-top: 8px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    radial-gradient(70% 60% at 50% 18%, #ffffff, transparent 72%),
    linear-gradient(160deg, #f3f6fd, #fbf6ec);
  overflow: hidden;
}
.stage-wrap svg { width: 100%; height: auto; max-height: min(58vh, 440px); display: block; touch-action: none; cursor: grab; }
.stage-wrap.dragging svg { cursor: grabbing; }
.stage-hint { margin-top: 8px; text-align: center; color: var(--muted-2); font-size: 11.5px; }

.cz-panel { display: flex; flex-direction: column; gap: 12px; }

.panel-step { padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.panel-step h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13.5px; font-weight: 700; }
.panel-step h3 span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.upload {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1.5px dashed rgba(29, 95, 208, 0.35);
  border-radius: 14px;
  background: var(--blue-soft);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.upload:hover, .upload.is-drag { border-color: var(--blue); background: #dfeaff; }
.upload svg { width: 24px; height: 24px; color: var(--blue); flex: none; }
.upload strong { display: block; font-size: 13.5px; }
.upload small { color: var(--muted); font-size: 11.5px; }
.design-name { margin-top: 9px; color: var(--muted-2); font-size: 12px; line-height: 1.8; }

.swatches { display: flex; gap: 9px; flex-wrap: wrap; }
.swatch {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(14, 27, 44, 0.14);
  transition: transform 0.16s ease, border-color 0.16s ease;
}
.swatch:hover { transform: scale(1.06); }
.swatch.is-active { border-color: var(--blue); }
.swatch.is-active::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.sizes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.size-btn {
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}
.size-btn.is-active { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); font-weight: 700; }

.slider-row {
  display: grid;
  grid-template-columns: 66px 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}
.slider-row input[type="range"] { width: 100%; accent-color: var(--blue); }

.panel-buy {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.panel-buy .btn-block { grid-column: 1 / -1; }

.qty { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.qty button { width: 34px; height: 42px; border: 0; background: #fff; color: var(--muted); font-size: 17px; cursor: pointer; }
.qty button:hover { color: var(--blue); background: var(--blue-soft); }
.qty input {
  width: 46px;
  height: 42px;
  border: 0;
  background: transparent;
  text-align: center;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.price-box { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.5; }
.price-box .unit { font-size: 11.5px; color: var(--muted-2); }
.price-box small { font-size: 10.5px; color: var(--muted-2); }
.price-box strong { font-size: 17px; color: var(--blue-ink); }

/* ------------------------------ طرح‌های آماده ------------------------------ */
.design-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; }
.design-card {
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.design-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }
.design-thumb {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f5f1e8;
}
.design-thumb img { width: 100%; height: 100%; object-fit: cover; }
.design-card strong { display: block; margin-top: 7px; font-size: 12.5px; }
.design-card small { color: var(--muted-2); font-size: 10.5px; }

/* --------------------------------- سوالات --------------------------------- */
.faq { display: grid; gap: 8px; max-width: 840px; }
.faq details { padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--blue); font-size: 18px; font-weight: 700; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq p { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.95; }

/* -------------------------------- دعوت به تماس -------------------------------- */
.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(20px, 3vw, 30px);
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(120deg, #eaf2ff, #fdf6ea 78%);
}
.cta-copy h2 { font-size: clamp(19px, 3vw, 26px); }
.cta-copy p { margin-top: 6px; max-width: 52ch; color: var(--muted); font-size: 13.5px; }
.cta .btn { flex: none; }

/* -------------------------------- پانوشت -------------------------------- */
.site-footer {
  margin-top: 8px;
  padding-block: 20px 24px;
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.6);
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px 18px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand strong { display: block; font-size: 13.5px; }
.footer-brand small { color: var(--muted-2); font-size: 11.5px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--muted); }
.footer-links a:hover { color: var(--blue); }
.copy { color: var(--muted-2); font-size: 11.5px; }

/* -------------------------------- سبد کشویی -------------------------------- */
.drawer-backdrop,
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(14, 27, 44, 0.42);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.modal-backdrop { z-index: 100; }

.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  inset-inline-end: 0;
  z-index: 110;
  display: flex;
  flex-direction: column;
  width: min(400px, 94vw);
  background: var(--card);
  box-shadow: 0 0 60px rgba(14, 27, 44, 0.25);
  transform: translateX(105%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.22, 0.8, 0.3, 1), visibility 0.3s;
}
.drawer.open { transform: none; visibility: visible; pointer-events: auto; }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}
.drawer-head h2 { font-size: 16px; font-weight: 800; }

.drawer-body { flex: 1; display: flex; flex-direction: column; gap: 9px; padding: 12px 14px; overflow-y: auto; }

.cart-item {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.cart-thumb {
  display: grid;
  place-items: center;
  width: 62px;
  height: 72px;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f5f1e8;
}
.cart-thumb svg { height: 100%; width: auto; }
.cart-info { min-width: 0; }
.cart-info strong { display: block; font-size: 12.8px; }
.cart-info small { display: block; color: var(--muted-2); font-size: 11px; }
.cart-line { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.cart-qty { display: flex; align-items: center; gap: 3px; }
.cart-qty button {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.cart-qty button:hover { color: var(--blue); border-color: var(--blue); }
.cart-qty span { min-width: 20px; text-align: center; font-size: 12.5px; font-weight: 700; }
.cart-line strong { font-size: 12.5px; color: var(--blue-ink); }
.cart-remove {
  align-self: start;
  border: 0;
  background: none;
  color: #c0392b;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 0;
}

.drawer-empty { flex: 1; display: grid; place-items: center; align-content: center; gap: 10px; padding: 24px; text-align: center; color: var(--muted); }

.drawer-foot {
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.total-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.total-row span { color: var(--muted); font-size: 13px; }
.total-row strong { font-size: 17px; color: var(--blue-ink); }
.drawer-note { margin-top: 8px; text-align: center; color: var(--muted-2); font-size: 11px; }

/* --------------------------------- مودال --------------------------------- */
.modal {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 110;
  max-height: 92vh;
  padding: 16px;
  overflow-y: auto;
  background: var(--card);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -20px 60px rgba(14, 27, 44, 0.25);
  transform: translateY(102%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.22, 0.8, 0.3, 1), visibility 0.3s;
}
.modal.open { transform: none; visibility: visible; pointer-events: auto; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.modal-head h2 { font-size: 16.5px; font-weight: 800; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 12.3px; }
.field-wide { grid-column: 1 / -1; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.field textarea { resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(29, 95, 208, 0.12);
}
.field.is-error input,
.field.is-error textarea { border-color: #d64545; background: #fff7f7; }

.checkout-summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue-ink);
  font-size: 12.5px;
}
.form-note { margin-top: 8px; text-align: center; color: var(--muted-2); font-size: 11px; }

.success-body { padding: 6px 2px 2px; text-align: center; }
.success-ico {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: #e7f7ef;
  color: #1a9e6c;
  font-size: 26px;
  font-weight: 700;
}
.success-body h2 { font-size: 19px; }
.success-body p { margin-top: 6px; color: var(--muted); font-size: 13px; }
.success-body #orderCode { color: var(--blue-ink); }
.success-note { font-size: 12px; }
.success-actions { display: flex; gap: 8px; margin: 14px 0 10px; }
.success-actions .btn { flex: 1; padding: 0 12px; font-size: 13px; }

.toast {
  position: fixed;
  inset-inline: 0;
  bottom: calc(84px + env(safe-area-inset-bottom));
  z-index: 200;
  width: max-content;
  max-width: 86vw;
  margin-inline: auto;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 12.5px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.show { opacity: 1; transform: none; }

/* ----------------------------- نوار پایین موبایل ----------------------------- */
.mobile-bar { display: none; }

/* ------------------------------ ظاهر شدن در اسکرول ------------------------------ */
.js-ready .section-head,
.js-ready .product,
.js-ready .design-card,
.js-ready .cz,
.js-ready .cta,
.js-ready .faq details {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 0.8, 0.3, 1);
}
.js-ready .is-in { opacity: 1; transform: none; }

/* -------------------------------- واکنش‌گرا -------------------------------- */
@media (min-width: 760px) {
  .modal {
    top: 50%;
    bottom: auto;
    left: 50%;
    inset-inline: auto;
    width: min(620px, 92vw);
    max-height: 88vh;
    padding: 20px;
    border-radius: 22px;
    transform: translateX(50%) translateY(-46%) scale(0.97);
    opacity: 0;
    transition: transform 0.26s ease, opacity 0.26s ease;
  }
  .modal.open { transform: translateX(50%) translateY(-50%) scale(1); opacity: 1; }
  .modal-sm { width: min(460px, 92vw); }
}

@media (max-width: 980px) {
  .cz { grid-template-columns: 1fr; }
  .cz-stage { position: static; }
}

@media (max-width: 860px) {
  .site-nav { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; min-height: 250px; }
  .hero-bag { width: min(230px, 62%); }
  .hero h1 { font-size: clamp(26px, 7.4vw, 36px); }
}

@media (max-width: 760px) {
  body { padding-bottom: 76px; }
  .ig-link { width: 40px; height: 38px; padding: 0; justify-content: center; }
  .ig-link span { display: none; }

  .mobile-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 80;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    background: rgba(255, 253, 248, 0.94);
    border-top: 1px solid var(--line);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }
  .bar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
  }
  .bar-primary {
    border-color: var(--blue);
    background: linear-gradient(135deg, var(--blue-2), var(--blue));
    color: #fff;
  }
  .bar-count {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 10.5px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
  }
  .bar-primary .bar-count { background: rgba(255, 255, 255, 0.25); color: #fff; }

  .form-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cta { flex-direction: column; align-items: stretch; }
  .cta .btn { width: 100%; }
  .checkout-summary { flex-direction: column; gap: 2px; }
  .success-actions { flex-direction: column; }
  .toast { bottom: calc(78px + env(safe-area-inset-bottom)); }
}

@media (max-width: 480px) {
  .hero-actions .btn { width: 100%; }
  .product-body { padding: 10px 11px 12px; gap: 6px; }
  .product h3 { font-size: 13px; }
  .product-desc { display: none; }
  .product-actions { flex-direction: column; }
  .product-actions .btn { font-size: 12px; }
  .design-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js-ready .section-head,
  .js-ready .product,
  .js-ready .design-card,
  .js-ready .cz,
  .js-ready .cta,
  .js-ready .faq details { opacity: 1; transform: none; }
}
