/* ============================================================
   نقشینه — فروشگاه لوازم جانبی موبایل
   طراحی RTL ریسپانسیو
   ============================================================ */
:root {
  --primary: #5b21b6;
  --primary-light: #7c3aed;
  --primary-soft: #f3eefe;
  --accent: #f43f5e;
  --accent-dark: #e11d48;
  --gold: #d4af5f;
  --gold-light: #f0d78c;
  --gold-deep: #a67c2d;
  --green: #059669;
  --amber: #f59e0b;
  --text: #212734;
  --muted: #77808f;
  --bg: #f7f8fb;
  --card: #ffffff;
  --border: #e6e9f0;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 2px 6px rgba(23, 27, 45, .05), 0 14px 34px -18px rgba(23, 27, 45, .18);
  --shadow-sm: 0 1px 3px rgba(23, 27, 45, .07);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
/* فقط برای موتور جستجو و اسکرین‌ریدر (از دید کاربر پنهان) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
body {
  font-family: Vazirmatn, Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.8;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 16px; }

/* ============ دکمه‌ها ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 12px; border: 0;
  font-size: 14px; font-weight: 700; transition: all .18s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(120deg, var(--primary-light), var(--primary)); color: #fff; box-shadow: 0 8px 20px -8px rgba(91,33,182,.55); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-accent { background: linear-gradient(120deg, #fb7185, var(--accent-dark)); color: #fff; box-shadow: 0 8px 20px -8px rgba(244,63,94,.55); }
.btn-outline { background: #fff; border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary-light); color: var(--primary-light); }
.btn-ghost { background: var(--primary-soft); color: var(--primary); }
.btn-sm { padding: 7px 14px; font-size: 12.5px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ============ هدر ============ */
.promo-strip {
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 55%, var(--accent) 130%);
  color: #fff; text-align: center; font-size: 12.5px; padding: 7px 12px; font-weight: 500;
}
.site-header {
  background: #fff; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 60; box-shadow: var(--shadow-sm);
}
.header-main { display: flex; align-items: center; gap: 20px; padding: 14px 0; }
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo .logo-img { height: 48px; width: auto; max-width: 170px; object-fit: contain; }
.logo .logo-brand { height: 52px; max-width: 72px; filter: drop-shadow(0 4px 12px rgba(212,175,95,.35)); }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-weight: 800; font-size: 18px; }
.footer-logo-img { height: 48px; width: auto; max-width: 160px; object-fit: contain; }
.logo .logo-mark {
  width: 44px; height: 44px; border-radius: 14px; color: #fff;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  display: grid; place-items: center; font-size: 22px; font-weight: 900;
  box-shadow: 0 8px 18px -8px rgba(124,58,237,.6);
}
.logo .logo-text { font-size: 21px; font-weight: 900; color: var(--primary); letter-spacing: -.5px; }
.logo .logo-text small { display: block; font-size: 10.5px; font-weight: 400; color: var(--muted); letter-spacing: 0; }

.search-wrap { flex: 1; position: relative; max-width: 640px; }
.search-box {
  display: flex; align-items: center; background: var(--bg);
  border: 1.5px solid transparent; border-radius: 14px; overflow: hidden;
  transition: border-color .15s, background .15s;
}
.search-box:focus-within { border-color: var(--primary-light); background: #fff; box-shadow: 0 0 0 4px rgba(124,58,237,.08); }
.search-box input { flex: 1; border: 0; background: none; padding: 12px 16px; font-size: 13.5px; outline: none; }
.search-box .search-btn { background: none; border: 0; padding: 0 16px; font-size: 17px; color: var(--muted); }
.suggest-panel {
  position: absolute; top: calc(100% + 8px); right: 0; left: 0; background: #fff;
  border-radius: 14px; box-shadow: var(--shadow); border: 1px solid var(--border);
  overflow: hidden; display: none; z-index: 70;
}
.suggest-panel.show { display: block; }
.suggest-panel a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 13px; }
.suggest-panel a:last-child { border-bottom: 0; }
.suggest-panel a:hover { background: var(--primary-soft); }
.suggest-panel img { width: 42px; height: 42px; border-radius: 9px; object-fit: cover; background: var(--bg); }
.suggest-panel .s-price { margin-right: auto; color: var(--primary); font-weight: 700; font-size: 12.5px; white-space: nowrap; }

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.icon-btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--border);
  background: #fff; font-size: 13px; font-weight: 600; transition: all .15s;
}
.icon-btn:hover { border-color: var(--primary-light); color: var(--primary-light); }
.icon-btn .cart-badge {
  position: absolute; top: -7px; inset-inline-start: -7px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  min-width: 20px; height: 20px; border-radius: 99px; display: grid; place-items: center; padding: 0 5px;
  border: 2px solid #fff;
}

.header-nav { display: flex; align-items: center; gap: 4px; padding: 0 0 10px; overflow-x: auto; scrollbar-width: none; }
.header-nav::-webkit-scrollbar { display: none; }
.header-nav a {
  padding: 7px 13px; border-radius: 10px; font-size: 13px; font-weight: 600;
  color: #4b5563; white-space: nowrap; transition: all .15s;
}
.header-nav a:hover { background: var(--primary-soft); color: var(--primary); }
.header-nav a.hot { color: var(--accent); }

/* ============ پیام‌ها و توست ============ */
.messages { margin: 14px 0; }
.message { padding: 13px 18px; border-radius: 12px; margin-bottom: 8px; font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow-sm); }
.message.success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.message.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.message.info, .message.warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

.toast-wrap { position: fixed; bottom: calc(90px + env(safe-area-inset-bottom)); inset-inline-start: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; width: min(92vw, 360px); }
.toast {
  background: rgba(18,10,32,.94); color: #fff; padding: 12px 22px; border-radius: 14px;
  font-size: 13px; font-weight: 600; text-align: center;
  border: 1px solid rgba(212,175,95,.35);
  box-shadow: 0 12px 32px rgba(0,0,0,.3); animation: toast-in .25s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; } }

/* ============ هیرو ============ */
.hero-section { display: grid; grid-template-columns: 1fr 300px; gap: 16px; margin: 18px 0; }
.hero-slider { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.hero-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hero-track::-webkit-scrollbar { display: none; }
.hero-slide { flex: 0 0 100%; scroll-snap-align: start; position: relative; }
.hero-slide img { width: 100%; height: 340px; object-fit: cover; }
.hero-caption {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  padding: 40px; background: linear-gradient(90deg, rgba(17,10,40,.65), transparent 65%); color: #fff;
}
.hero-caption h2 { font-size: 30px; font-weight: 900; margin-bottom: 8px; }
.hero-caption p { font-size: 15px; opacity: .9; margin-bottom: 18px; }
/* دکمه هیرو نباید کل عرض کپشن را بگیرد (کپشن flex ستونی است) */
.hero-btn { align-self: flex-start; width: max-content; max-width: 100%; }
.hero-dots { position: absolute; bottom: 14px; right: 50%; transform: translateX(50%); display: flex; gap: 6px; }
.hero-dots button { width: 8px; height: 8px; border-radius: 99px; border: 0; background: rgba(255,255,255,.5); transition: all .2s; padding: 0; }
.hero-dots button.active { width: 22px; background: #fff; }
.side-banners { display: grid; grid-template-rows: 1fr 1fr; gap: 16px; }
.side-banners a { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.side-banners img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.side-banners a:hover img { transform: scale(1.04); }

/* ============ سکشن‌ها ============ */
.section { margin: 34px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 10px; }
.section-head h2 { font-size: 19px; font-weight: 800; display: flex; align-items: center; gap: 9px; }
.section-head h2::before { content: ''; width: 5px; height: 24px; border-radius: 6px; background: linear-gradient(180deg, var(--primary-light), var(--accent)); }
.section-head .see-all { color: var(--primary-light); font-size: 13px; font-weight: 700; }

/* ============ شگفت‌انگیز ============ */
.amazing-section {
  background: linear-gradient(120deg, #e11d48 0%, #be123c 50%, #9f1239 100%);
  border-radius: 20px; padding: 22px 18px; color: #fff;
  box-shadow: 0 18px 44px -18px rgba(225,29,72,.55);
  position: relative; overflow: hidden;
}
.amazing-section::before {
  content: '';
  position: absolute; inset: 0; opacity: .14; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 5l7 18 18 7-18 7-7 18-7-18-18-7 18-7z' fill='%23ffffff'/%3E%3C/svg%3E");
  background-size: 60px;
}
.amazing-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; position: relative; }
.amazing-head h2 { font-size: 20px; font-weight: 900; }
.countdown { display: flex; gap: 6px; align-items: center; direction: ltr; }
.countdown .unit {
  background: rgba(255,255,255,.18);
  border-radius: 10px; min-width: 42px; padding: 5px 6px; text-align: center;
  font-size: 17px; font-weight: 800; border: 1px solid rgba(255,255,255,.25);
}
.countdown .unit small { display: block; font-size: 9px; font-weight: 400; opacity: .85; }
.countdown .sep { font-weight: 900; opacity: .7; }
.amazing-track { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 8px; scroll-snap-type: x proximity; scrollbar-width: none; position: relative; }
.amazing-track::-webkit-scrollbar { display: none; }
.amazing-track .product-card { flex: 0 0 190px; scroll-snap-align: start; border: 0; }

/* ============ کارت محصول ============ */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.product-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  display: flex; flex-direction: column; position: relative;
  transition: transform .18s ease, box-shadow .18s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.product-card .card-img { position: relative; background: #fff; display: block; }
.product-card .card-img img { width: 100%; aspect-ratio: 1; object-fit: contain; padding: 14px; }
.product-card .card-img .no-img { width: 100%; aspect-ratio: 1; display: grid; place-items: center; font-size: 44px; background: var(--bg); }
.product-card .discount-badge {
  position: absolute; top: 10px; inset-inline-start: 10px;
  background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 800;
  padding: 3px 9px; border-radius: 99px; box-shadow: 0 4px 10px -3px rgba(244,63,94,.6);
}
.product-card .amazing-badge { position: absolute; top: 10px; inset-inline-end: 10px; font-size: 16px; }
.product-card .card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card .p-name { font-size: 13px; font-weight: 600; line-height: 1.7; height: 44px; overflow: hidden; }
.product-card .p-meta { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--muted); }
.product-card .p-price-row { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.product-card .p-price { font-size: 15.5px; font-weight: 800; color: var(--text); white-space: nowrap; }
.product-card .p-price small { font-size: 10.5px; font-weight: 400; color: var(--muted); }
.product-card .p-compare { font-size: 12px; color: #b3b9c4; text-decoration: line-through; }
.product-card .add-cart-btn {
  width: 38px; height: 38px; border-radius: 12px; border: 0; font-size: 17px; flex-shrink: 0;
  background: var(--primary-soft); color: var(--primary); transition: all .15s;
}
.product-card .add-cart-btn:hover { background: var(--primary); color: #fff; }
.product-card .out-stock { font-size: 11.5px; color: var(--accent); font-weight: 700; }

/* ============ دسته‌بندی‌ها ============ */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.category-item {
  background: var(--card); border-radius: var(--radius); border: 1px solid var(--border);
  padding: 20px 10px; text-align: center; transition: all .18s;
}
.category-item:hover { border-color: var(--primary-light); box-shadow: var(--shadow); transform: translateY(-3px); }
.category-item .cat-icon {
  width: 58px; height: 58px; margin: 0 auto 10px; border-radius: 18px;
  background: linear-gradient(135deg, var(--primary-soft), #fdf2f8);
  display: grid; place-items: center; font-size: 27px;
}
.category-item .cat-name { font-size: 12.5px; font-weight: 700; }

/* ============ ویژگی‌ها ============ */
.features-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.feature-item {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 12px; text-align: center; font-size: 12.5px; font-weight: 600;
}
.feature-item .f-icon { font-size: 26px; display: block; margin-bottom: 6px; }

/* ============ برندها ============ */
.brand-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.brand-strip::-webkit-scrollbar { display: none; }
.brand-strip a {
  flex-shrink: 0; background: var(--card); border: 1px solid var(--border);
  border-radius: 99px; padding: 9px 22px; font-size: 13px; font-weight: 700; color: #4b5563;
  transition: all .15s;
}
.brand-strip a:hover { border-color: var(--primary-light); color: var(--primary); }

.middle-banners { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.middle-banners a { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.middle-banners img { width: 100%; height: 170px; object-fit: cover; transition: transform .3s; }
.middle-banners a:hover img { transform: scale(1.03); }

/* ============ صفحه فروشگاه ============ */
.shop-layout { display: grid; grid-template-columns: 260px 1fr; gap: 18px; margin: 18px 0; align-items: start; }
.filter-sidebar { position: sticky; top: 130px; }
.filter-card { background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); padding: 18px; margin-bottom: 14px; }
.filter-card h3 { font-size: 13.5px; font-weight: 800; margin-bottom: 12px; }
.filter-card ul { list-style: none; display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; }
.filter-card ul a { display: block; padding: 7px 10px; border-radius: 9px; font-size: 13px; color: #4b5563; }
.filter-card ul a:hover, .filter-card ul a.active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.filter-card .price-inputs { display: flex; gap: 8px; align-items: center; }
.filter-card input[type=number], .filter-card select {
  width: 100%; padding: 9px 12px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 13px;
}
.filter-card .check-row { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 0; }
.filter-card .check-row input { width: 17px; height: 17px; accent-color: var(--primary); }

.shop-toolbar {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 16px; display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap;
}
.shop-toolbar .sort-links { display: flex; gap: 4px; flex-wrap: wrap; }
.shop-toolbar .sort-links a { padding: 6px 13px; border-radius: 99px; font-size: 12.5px; color: var(--muted); }
.shop-toolbar .sort-links a.active { background: var(--primary); color: #fff; font-weight: 700; }
.shop-toolbar .result-count { margin-right: auto; font-size: 12.5px; color: var(--muted); }

/* ============ صفحه محصول ============ */
.product-page { background: var(--card); border-radius: 20px; border: 1px solid var(--border); padding: 24px; margin: 18px 0; }
.product-top { display: grid; grid-template-columns: 400px 1fr 300px; gap: 26px; }
.gallery .main-img { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; }
.gallery .main-img img { width: 100%; aspect-ratio: 1; object-fit: contain; padding: 20px; }
.gallery .main-img .no-img { width: 100%; aspect-ratio: 1; display: grid; place-items: center; font-size: 80px; background: var(--bg); }
.gallery .thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery .thumbs img {
  width: 64px; height: 64px; border-radius: 10px; object-fit: contain; background: #fff;
  border: 1.5px solid var(--border); cursor: pointer; padding: 6px; transition: border-color .15s;
}
.gallery .thumbs img.active, .gallery .thumbs img:hover { border-color: var(--primary-light); }

.product-info h1 { font-size: 19px; font-weight: 800; line-height: 1.9; margin-bottom: 10px; }
.product-info .info-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; margin-bottom: 16px; }
.product-info .info-meta b { color: var(--primary); }
.rating-stars { color: var(--amber); letter-spacing: 2px; }
.variant-list { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 16px; }
.variant-list label { cursor: pointer; }
.variant-list input { display: none; }
.variant-list .v-chip {
  display: inline-block; padding: 8px 16px; border-radius: 12px; border: 1.5px solid var(--border);
  font-size: 13px; font-weight: 600; transition: all .15s; background: #fff;
}
.variant-list input:checked + .v-chip { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.spec-mini { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #4b5563; }
.spec-mini li::before { content: '•'; color: var(--primary-light); margin-left: 8px; }

.buy-box {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; position: sticky; top: 140px;
}
.buy-box .bb-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); padding: 8px 0; border-bottom: 1px dashed var(--border); }
.buy-box .price-line { padding: 14px 0 6px; text-align: left; }
.buy-box .compare { color: #b3b9c4; text-decoration: line-through; font-size: 13px; }
.buy-box .final { font-size: 23px; font-weight: 900; color: var(--text); }
.buy-box .final small { font-size: 12px; font-weight: 400; color: var(--muted); }
.buy-box .off-chip { background: var(--accent); color: #fff; border-radius: 99px; font-size: 12px; font-weight: 700; padding: 2px 10px; margin-right: 8px; }
.qty-picker { display: inline-flex; align-items: center; border: 1.5px solid var(--border); border-radius: 12px; overflow: hidden; background: #fff; }
.qty-picker button { width: 38px; height: 40px; border: 0; background: none; font-size: 17px; color: var(--primary); }
.qty-picker input { width: 44px; text-align: center; border: 0; font-size: 14px; font-weight: 700; outline: none; }

/* ============ تب‌ها ============ */
.tabs { margin-top: 30px; }
.tab-header { display: flex; gap: 4px; border-bottom: 2px solid var(--border); overflow-x: auto; }
.tab-header button {
  background: none; border: 0; padding: 12px 20px; font-size: 14px; font-weight: 700;
  color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap;
}
.tab-header button.active { color: var(--primary); border-color: var(--primary); }
.tab-content { padding: 22px 4px; display: none; }
.tab-content.active { display: block; }
.spec-table { width: 100%; border-collapse: collapse; max-width: 700px; }
.spec-table td { padding: 11px 16px; font-size: 13.5px; }
.spec-table tr:nth-child(odd) { background: var(--bg); }
.spec-table td:first-child { color: var(--muted); width: 220px; border-radius: 0 10px 10px 0; }
.spec-table td:last-child { border-radius: 10px 0 0 10px; font-weight: 600; }

.review-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; background: #fff; }
.review-item .r-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 12.5px; color: var(--muted); }

/* ============ سبد خرید ============ */
.cart-layout { display: grid; grid-template-columns: 1fr 330px; gap: 18px; margin: 18px 0; align-items: start; }
.cart-items-card, .summary-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.cart-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.cart-item:last-child { border-bottom: 0; }
.cart-item img { width: 88px; height: 88px; object-fit: contain; border-radius: 12px; border: 1px solid var(--border); background: #fff; padding: 6px; }
.cart-item .ci-body { flex: 1; min-width: 0; }
.cart-item .ci-title { font-size: 13.5px; font-weight: 700; margin-bottom: 6px; }
.cart-item .ci-actions { display: flex; align-items: center; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.cart-item .ci-price { font-size: 15px; font-weight: 800; white-space: nowrap; }
.remove-link { color: var(--accent); font-size: 12.5px; background: none; border: 0; font-weight: 600; }

.summary-card { position: sticky; top: 130px; }
.summary-card .sum-row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 9px 0; color: #4b5563; }
.summary-card .sum-row.total { border-top: 2px dashed var(--border); margin-top: 8px; padding-top: 14px; font-size: 15px; font-weight: 800; color: var(--text); }
.summary-card .sum-row .green { color: var(--green); font-weight: 700; }
.coupon-form { display: flex; gap: 8px; margin-top: 14px; }
.coupon-form input { flex: 1; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 11px; font-size: 13px; }

/* ============ فرم‌ها (عمومی) ============ */
.form-card { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 26px; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 12px;
  font-size: 13.5px; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 4px rgba(124,58,237,.09);
}
.field .errorlist { list-style: none; color: var(--accent); font-size: 12px; margin-top: 4px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

/* ============ صفحه ورود ============ */
.auth-wrap { max-width: 420px; margin: 44px auto; padding: 0 16px; }
.auth-card { background: var(--card); border-radius: 22px; box-shadow: var(--shadow); padding: 34px 30px; text-align: center; border-top: 5px solid var(--primary); }
.auth-card .auth-logo { font-size: 40px; margin-bottom: 8px; }
.auth-card h1 { font-size: 19px; font-weight: 800; margin-bottom: 6px; }
.auth-card .auth-sub { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.auth-card input.mobile-input {
  width: 100%; text-align: center; font-size: 17px; letter-spacing: 2px; direction: ltr;
  padding: 13px; border: 1.5px solid var(--border); border-radius: 13px;
}
.auth-card input.mobile-input:focus { outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 4px rgba(124,58,237,.1); }
.otp-inputs { display: flex; gap: 9px; justify-content: center; direction: ltr; margin: 8px 0 4px; }
.otp-inputs input {
  width: 46px; height: 54px; text-align: center; font-size: 22px; font-weight: 800;
  border: 1.5px solid var(--border); border-radius: 13px; transition: all .15s;
}
.otp-inputs input:focus { outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 4px rgba(124,58,237,.12); }

/* ============ پنل کاربری ============ */
.account-layout { display: grid; grid-template-columns: 260px 1fr; gap: 18px; margin: 18px 0; align-items: start; }
.account-nav { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; position: sticky; top: 130px; }
.account-nav .user-chip { display: flex; align-items: center; gap: 12px; padding: 10px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.account-nav .user-chip .avatar {
  width: 46px; height: 46px; border-radius: 99px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  color: #fff; display: grid; place-items: center; font-size: 19px; font-weight: 800;
}
.account-nav a.nav-item { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 11px; font-size: 13.5px; font-weight: 600; color: #4b5563; }
.account-nav a.nav-item:hover { background: var(--bg); }
.account-nav a.nav-item.active { background: var(--primary-soft); color: var(--primary); }

.order-row { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; background: #fff; }
.order-row .o-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 13px; }
.chip { display: inline-block; padding: 3px 12px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.chip-pending   { background: #fef3c7; color: #92400e; }
.chip-paid      { background: #dbeafe; color: #1d4ed8; }
.chip-processing{ background: #ede9fe; color: #6d28d9; }
.chip-sent      { background: #cffafe; color: #0e7490; }
.chip-delivered { background: #d1fae5; color: #047857; }
.chip-cancelled { background: #fee2e2; color: #b91c1c; }

/* ============ تایم‌لاین پیگیری ============ */
.timeline { display: flex; justify-content: space-between; margin: 30px 0; position: relative; }
.timeline::before { content: ''; position: absolute; top: 21px; right: 8%; left: 8%; height: 3px; background: var(--border); border-radius: 4px; }
.timeline .t-step { position: relative; z-index: 1; text-align: center; flex: 1; }
.timeline .t-dot {
  width: 44px; height: 44px; margin: 0 auto 8px; border-radius: 99px; font-size: 18px;
  background: #fff; border: 2.5px solid var(--border); display: grid; place-items: center; color: var(--muted);
}
.timeline .t-step.done .t-dot { background: var(--green); border-color: var(--green); color: #fff; }
.timeline .t-step.current .t-dot { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 6px rgba(124,58,237,.15); }
.timeline .t-label { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.timeline .t-step.done .t-label, .timeline .t-step.current .t-label { color: var(--text); }

/* ============ فوتر ============ */
.site-footer { background: #131b2e; color: #cbd5e1; margin-top: 60px; padding: 40px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 30px; }
.site-footer h3 { color: #fff; font-size: 15px; font-weight: 800; margin-bottom: 14px; }
.site-footer a { display: block; padding: 4px 0; font-size: 13px; color: #94a3b8; }
.site-footer a:hover { color: #fff; }
.site-footer p { font-size: 13px; line-height: 2.1; color: #94a3b8; }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-logo .footer-logo-img { height: 46px; width: auto; max-width: 180px; object-fit: contain; background: #fff; padding: 5px 8px; border-radius: 10px; }
.footer-logo .logo-mark { width: 42px; height: 42px; border-radius: 13px; background: linear-gradient(135deg, var(--primary-light), var(--accent)); display: grid; place-items: center; font-size: 20px; font-weight: 900; color: #fff; }
.footer-logo span { font-size: 19px; font-weight: 900; color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 30px; padding-top: 18px; text-align: center; font-size: 12px; color: #64748b; }
/* نمادهای اعتماد (اینماد و ...) */
.trust-badges { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; margin-top: 28px; }
.site-footer .trust-badges a { display: inline-block; padding: 0; background: #fff; border-radius: 12px; line-height: 0; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.site-footer .trust-badges a:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgba(0,0,0,.6); }
.trust-badges img { display: block; height: 96px; width: auto; max-width: 100%; }
@media (max-width: 520px) { .trust-badges img { height: 82px; } }
/* نشان زرین‌پال با اسکریپت تزریق می‌شود و معلوم نیست <a> بدهد یا فقط <img>.
   پس ظرفش را مثل بقیه‌ی نشان‌ها می‌کنیم تا در هر دو حالت هم‌شکل بماند.
   عمداً width ثابتِ مثال زرین‌پال (۸۰px) را نگذاشتیم: کنار height ثابت سایت،
   تصویر را کش می‌آورد. ارتفاع یکسان + عرض خودکار نسبت تصویر را حفظ می‌کند. */
.trust-badges #zarinpal { line-height: 0; display: inline-block; }
.trust-badges #zarinpal img {
  height: 96px; width: auto; display: block;
  background: #fff; border-radius: 12px;
}
@media (max-width: 520px) { .trust-badges #zarinpal img { height: 82px; } }
.social-row { display: flex; gap: 10px; margin-top: 12px; }
.social-row a { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.07); display: grid; place-items: center; font-size: 17px; padding: 0; }
.social-row a:hover { background: var(--primary); }

/* ============ نوار پایین موبایل (شناور با دکمه مرکزی) ============ */
.mobile-nav {
  display: none; position: fixed; z-index: 80;
  bottom: calc(10px + env(safe-area-inset-bottom));
  inset-inline: 12px;
}
.mobile-nav .mn-inner {
  /* --mn-lift و --mn-circle در یک جا تعریف می‌شوند تا دایره و آیکون هرگز
     از هم جدا نیفتند؛ قبلاً دو عدد جدا بودند و هم‌مرکز نمی‌شدند. */
  --mn-lift: 20px;
  --mn-circle: 52px;
  display: flex; align-items: center; justify-content: space-between;
  position: relative;  /* مبنای موقعیت دایره نشانگر */
  background: #fff; border-radius: 24px; padding: 7px 6px;
  box-shadow: 0 12px 32px -10px rgba(23,27,45,.30), 0 2px 10px -4px rgba(23,27,45,.14);
}
.mobile-nav a {
  flex: 1; min-width: 0; text-align: center; font-size: 10.5px; font-weight: 600;
  color: var(--muted); display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 5px 0; position: relative; z-index: 1;
  /* هدف لمس حداقل ۴۴ پیکسل حتی وقتی آیکون کوچک است */
  min-height: 44px; justify-content: center;
  transition: color .25s ease;
}
.mobile-nav a .mn-icon {
  display: block; line-height: 0;
  transition: transform .34s cubic-bezier(.34,1.4,.5,1), color .25s ease;
}
.mobile-nav a .mn-icon svg { width: 22px; height: 22px; }

/* گزینه فعال: آیکون داخل دایره بالا می‌رود و سفید می‌شود.
   مقدار بالا رفتن دقیقاً همان --mn-lift دایره است تا هم‌مرکز بمانند. */
.mobile-nav a.active { color: var(--primary); font-weight: 800; }
.mobile-nav a.active .mn-icon {
  color: #fff;
  transform: translateY(calc(-1 * var(--mn-lift)));
}
.mobile-nav a.active .mn-icon svg { width: 24px; height: 24px; }

/* دایره نشانگر — موقعیتش با JS تنظیم می‌شود و روی گزینه انتخابی سُر می‌خورد */
.mn-indicator {
  /* left/top ثابت صفر می‌ماند و جابه‌جایی فقط با transform انجام می‌شود:
     transform روی کارت گرافیک اجرا می‌شود و برخلاف انیمیشنِ left، هر فریم
     مرورگر را مجبور به بازچینش نمی‌کند. */
  position: absolute; top: 0; left: 0;
  width: var(--mn-circle); height: var(--mn-circle); border-radius: 50%;
  background: linear-gradient(150deg, var(--primary-light) 0%, var(--primary) 70%);
  border: 4px solid #fff;
  box-shadow: 0 10px 20px -6px rgba(91,33,182,.55), 0 3px 8px -3px rgba(91,33,182,.4);
  pointer-events: none; z-index: 0; opacity: 0;
  transition: opacity .2s ease;
  will-change: transform;
}
/* تا وقتی JS جایش را تعیین نکرده، دیده نمی‌شود تا از گوشه نپرد */
.mn-indicator.ready {
  opacity: 1;
  transition: transform .42s cubic-bezier(.34,1.32,.44,1), opacity .2s ease;
}

.mobile-nav .cart-badge {
  position: absolute; top: 0; inset-inline-end: calc(50% - 20px);
  background: var(--accent); color: #fff; font-size: 10px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 99px; display: grid; place-items: center;
  padding: 0 4px; border: 2px solid #fff; z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .mn-indicator.ready, .mobile-nav a .mn-icon { transition: none; }
}

/* ============ صفحه‌بندی ============ */
.pagination { display: flex; gap: 6px; justify-content: center; margin: 22px 0; }
.pagination a, .pagination span {
  min-width: 36px; height: 36px; display: grid; place-items: center; padding: 0 9px;
  border-radius: 10px; background: #fff; border: 1.5px solid var(--border); font-size: 13px;
}
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

.empty-state { text-align: center; color: var(--muted); padding: 60px 16px; }
.empty-state .icon { font-size: 52px; display: block; margin-bottom: 12px; }

/* ---- placeholder تصویر (به‌جای ایموجی، همیشه رندر می‌شود) ---- */
.no-img { width: 100%; aspect-ratio: 1; display: grid; place-items: center; background: var(--bg); color: #c3c8d4; }
.no-img svg { width: 42%; height: 42%; }
.gallery .main-img .no-img svg { width: 34%; height: 34%; }

/* ---- پاپ‌آپ اطلاع‌رسانی ---- */
.popup-overlay {
  position: fixed; inset: 0; z-index: 300; background: rgba(17,12,32,.62);
  display: none; align-items: center; justify-content: center; padding: 20px;
  animation: fadein .25s ease;
}
.popup-overlay.show { display: flex; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.popup-box {
  position: relative; background: var(--card); border-radius: 22px; overflow: hidden;
  max-width: 420px; width: 100%; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5);
  animation: popin .3s cubic-bezier(.2,1.2,.4,1);
}
@keyframes popin { from { transform: scale(.85) translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.popup-close {
  position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2;
  width: 34px; height: 34px; border-radius: 99px; border: 0; cursor: pointer;
  background: rgba(0,0,0,.35); color: #fff; font-size: 15px; backdrop-filter: blur(4px);
}
.popup-img { width: 100%; max-height: 240px; object-fit: cover; display: block; }
.popup-body { padding: 22px 24px 26px; text-align: center; }
.popup-body h3 { font-size: 19px; font-weight: 800; margin-bottom: 10px; }
.popup-body p { font-size: 13.5px; color: var(--muted); line-height: 2; }

/* ---- کیف پول ---- */
.wallet-hero {
  background: linear-gradient(120deg, var(--primary), var(--primary-light) 60%, var(--accent));
  color: #fff; border-radius: 20px; padding: 26px 24px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.wallet-hero::after { content: '👛'; position: absolute; inset-inline-start: 18px; bottom: -10px; font-size: 78px; opacity: .18; }
.wallet-label { font-size: 13px; opacity: .9; }
.wallet-amount { font-size: 32px; font-weight: 900; margin: 6px 0; }
.wallet-amount span { font-size: 15px; font-weight: 400; opacity: .85; }
.wallet-hint { font-size: 11.5px; opacity: .8; }
.wallet-option {
  display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--border);
  border-radius: 14px; padding: 14px; margin-bottom: 14px; cursor: pointer; transition: all .15s;
  background: linear-gradient(120deg, var(--primary-soft), #fff);
}
.wallet-option:hover { border-color: var(--primary-light); }
.wallet-option input { width: 20px; height: 20px; accent-color: var(--primary); }
.wallet-option .w-info { flex: 1; }
.wallet-option .w-info b { font-size: 13.5px; }
.wallet-option .w-info small { display: block; color: var(--muted); font-size: 12px; }
.wallet-option .w-amount { font-weight: 800; color: var(--primary); white-space: nowrap; }

.page-title { font-size: 20px; font-weight: 800; margin: 22px 0 16px; }

/* ============ ریسپانسیو ============ */
@media (max-width: 1080px) {
  .product-top { grid-template-columns: 340px 1fr; }
  .product-top .buy-box-col { grid-column: 1 / -1; }
  .buy-box { position: static; }
}
@media (max-width: 900px) {
  .hero-section { grid-template-columns: 1fr; }
  .side-banners { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .side-banners img { height: 130px; }
  .hero-slide img { height: 240px; }
  .hero-caption { padding: 22px; }
  .hero-caption h2 { font-size: 21px; }
  .shop-layout { grid-template-columns: 1fr; }
  .filter-sidebar { position: static; }
  .cart-layout { grid-template-columns: 1fr; }
  .summary-card { position: static; }
  .account-layout { grid-template-columns: 1fr; }
  .account-nav { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  /* جا برای نوار شناور + دکمه مرکزی که بالاتر می‌نشیند */
  body { padding-bottom: 106px; font-size: 13.5px; }
  .mobile-nav { display: block; }
  .header-main { flex-wrap: wrap; gap: 10px; padding: 12px 0; }
  .search-wrap { order: 3; flex: 1 0 100%; max-width: none; }
  .header-actions .hide-mobile { display: none; }
  .logo .logo-img { height: 40px; max-width: 132px; }
  .hero-slide img { height: 190px; }
  .hero-caption { padding: 16px 18px; background: linear-gradient(90deg, rgba(17,10,40,.78), rgba(17,10,40,.15) 85%); }
  .hero-caption h2 { font-size: 16px; margin-bottom: 4px; }
  .hero-caption p { font-size: 11.5px; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .hero-btn { padding: 7px 14px; font-size: 12px; border-radius: 10px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-card .p-name { font-size: 12px; }
  .product-top { grid-template-columns: 1fr; }
  .product-page { padding: 16px; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .amazing-track .product-card { flex-basis: 160px; }
  .section { margin: 24px 0; }
  .timeline .t-dot { width: 36px; height: 36px; font-size: 14px; }
  .timeline .t-label { font-size: 10px; }
  .site-footer { padding-bottom: 20px; }
}
@media (max-width: 380px) {
  .hero-slide img { height: 165px; }
  .hero-caption p { display: none; }
}

/* ============================================================
   دکمه شناور پشتیبانی (حرفه‌ای)
   ============================================================ */
.support-fab {
  position: fixed; inset-inline-start: 22px; bottom: 26px; z-index: 85;
  display: inline-flex; align-items: center; gap: 9px;
  height: 54px; padding: 0 20px 0 17px; border-radius: 99px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #fff; font-size: 14px; font-weight: 700;
  box-shadow: 0 12px 30px -8px rgba(91,33,182,.6), 0 4px 10px -4px rgba(0,0,0,.25);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.support-fab:hover { transform: translateY(-3px); filter: brightness(1.07); box-shadow: 0 18px 40px -10px rgba(91,33,182,.7); }
.support-fab:active { transform: translateY(-1px) scale(.98); }
.support-fab .support-fab-icon { display: grid; place-items: center; width: 26px; height: 26px; }
.support-fab .support-fab-icon svg { width: 23px; height: 23px; }
.support-fab .support-fab-text { white-space: nowrap; }
/* پالس نرم برای جلب توجه */
.support-fab::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(124,58,237,.45); animation: fabPulse 2.6s infinite;
}
@keyframes fabPulse {
  0% { box-shadow: 0 0 0 0 rgba(124,58,237,.45); }
  70% { box-shadow: 0 0 0 14px rgba(124,58,237,0); }
  100% { box-shadow: 0 0 0 0 rgba(124,58,237,0); }
}
@media (prefers-reduced-motion: reduce) {
  .support-fab::before { animation: none; }
}
/* در موبایل: فقط آیکون گرد، و بالاتر از نوار پایین تا روی آن نیفتد */
@media (max-width: 640px) {
  .support-fab { bottom: calc(112px + env(safe-area-inset-bottom)); inset-inline-start: 16px; height: 50px; padding: 0; width: 50px; justify-content: center; }
  .support-fab .support-fab-text { display: none; }
  .support-fab .support-fab-icon { width: 24px; height: 24px; }
}

/* ============================================================
   پرداخت‌های تصویری و پولیش طراحی (خفن‌تر)
   ============================================================ */
/* هدر شیشه‌ای هنگام اسکرول */
.site-header { backdrop-filter: saturate(1.4) blur(8px); background: rgba(255,255,255,.92); }
/* عنوان هیرو خواناتر */
.hero-caption h2 { text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.hero-caption p { text-shadow: 0 1px 8px rgba(0,0,0,.3); }
.hero-btn { box-shadow: 0 10px 24px -8px rgba(244,63,94,.65); }
/* افکت شاین روی کارت محصول هنگام هاور */
.product-card { will-change: transform; }
.product-card .card-img::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .6s ease;
}
.product-card:hover .card-img::after { transform: translateX(120%); }
/* دکمه افزودن به سبد کمی گردتر و با سایه */
.product-card .add-cart-btn:hover { box-shadow: 0 8px 18px -6px rgba(91,33,182,.6); transform: translateY(-1px); }
/* آیتم‌های دسته‌بندی جذاب‌تر */
.category-item .cat-icon { transition: transform .2s ease; }
.category-item:hover .cat-icon { transform: scale(1.08) rotate(-4deg); }
/* ورود نرم سکشن‌ها */
@media (prefers-reduced-motion: no-preference) {
  .section { animation: sectionIn .5s ease both; }
  @keyframes sectionIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
}
/* اسکرول‌بار ظریف */
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }

/* ============================================================
   لایه طراحی خلاقانه (نسخه پیشرفته)
   ============================================================ */
/* نوار تبلیغاتی با گرادینت متحرک */
.promo-strip {
  background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--accent), var(--primary-light), var(--primary));
  background-size: 300% 100%;
  animation: promoShift 12s linear infinite;
}
@keyframes promoShift { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }
@media (prefers-reduced-motion: reduce) { .promo-strip { animation: none; } }

/* هیرو: بزرگ‌نمایی ملایم تصویر */
.hero-slide img { transition: transform 6s ease; }
.hero-slider:hover .hero-slide img { transform: scale(1.05); }

/* عنوان سکشن با زیرخط گرادینتی */
.section-head h2 { position: relative; }

/* ویژگی‌ها: آیکون داخل دایره گرادینتی + هاور */
.features-strip { gap: 14px; }
.feature-item {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.feature-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.feature-item .f-icon {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  margin-bottom: 8px; font-size: 24px;
  background: linear-gradient(135deg, var(--primary-soft), #fdf2f8);
}

/* دسته‌بندی: قاب گرادینتی هنگام هاور */
.category-item { position: relative; overflow: hidden; }
.category-item::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .2s ease;
}
.category-item:hover::after { opacity: 1; }

/* بج تخفیف کمی درخشان‌تر */
.product-card .discount-badge { background: linear-gradient(135deg, #fb7185, var(--accent-dark)); }

/* دکمه‌ها: هاله نرم هنگام هاور */
.btn-primary, .btn-accent { position: relative; overflow: hidden; }
.btn-primary::after, .btn-accent::after {
  content: ''; position: absolute; top: 0; left: -80%; width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-18deg); transition: left .5s ease;
}
.btn-primary:hover::after, .btn-accent:hover::after { left: 130%; }

/* کارت‌ها با گوشه‌های نرم‌تر و سایه بهتر روی هاور */
.product-card:hover { box-shadow: 0 18px 40px -20px rgba(23,27,45,.35); }

/* نوار پیشرفت اسکرول */
.scroll-progress {
  position: fixed; top: 0; right: 0; left: 0; height: 3px; z-index: 100;
  transform-origin: right center; transform: scaleX(0);
  background: linear-gradient(90deg, var(--gold), var(--primary-light), var(--accent));
  pointer-events: none;
}

/* بازگشت به بالا */
.back-top {
  position: fixed; bottom: calc(88px + env(safe-area-inset-bottom)); inset-inline-end: 18px;
  width: 46px; height: 46px; border-radius: 14px; border: 0; z-index: 55;
  background: linear-gradient(145deg, var(--primary-light), var(--primary));
  color: #fff; font-size: 18px; font-weight: 800;
  box-shadow: 0 12px 28px -10px rgba(91,33,182,.55);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: .25s ease; cursor: pointer;
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { filter: brightness(1.08); transform: translateY(-2px); }

/* انیمیشن ظاهر شدن با اسکرول */
.reveal {
  opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.22,1,.36,1);
}
.reveal.in { opacity: 1; transform: none; }
.reveal-stagger > *:nth-child(1) { transition-delay: .04s; }
.reveal-stagger > *:nth-child(2) { transition-delay: .08s; }
.reveal-stagger > *:nth-child(3) { transition-delay: .12s; }
.reveal-stagger > *:nth-child(4) { transition-delay: .16s; }
.reveal-stagger > *:nth-child(5) { transition-delay: .2s; }
.reveal-stagger > *:nth-child(6) { transition-delay: .24s; }
.reveal-stagger > *:nth-child(7) { transition-delay: .28s; }
.reveal-stagger > *:nth-child(8) { transition-delay: .32s; }

.product-card {
  transition: transform .28s ease, box-shadow .28s ease;
}
.product-card:hover { transform: translateY(-6px); }
.product-card .card-img img { transition: transform .45s ease; }
.product-card:hover .card-img img { transform: scale(1.06); }

.category-item { transition: transform .25s ease, box-shadow .25s ease, border-color .25s; }
.category-item:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 14px 28px -18px rgba(212,175,95,.55); }

.hero-section { animation: fadeUp .8s cubic-bezier(.22,1,.36,1) both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.recent-rail {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px;
  scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.recent-rail::-webkit-scrollbar { height: 6px; }
.recent-rail .product-card { min-width: 180px; max-width: 180px; scroll-snap-align: start; flex-shrink: 0; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .product-card, .hero-section { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .product-card:hover { transform: none; }
}

@media (max-width: 640px) {
  .back-top { bottom: calc(112px + env(safe-area-inset-bottom)); inset-inline-end: 14px; width: 42px; height: 42px; }
}

/* ============================================================
   دکمه خرید و افزودن به سبد — نسخه نمایشی
   ============================================================ */
.btn-cart {
  position: relative; overflow: hidden; isolation: isolate;
  border: 0; cursor: pointer; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px; border-radius: 14px;
  font-size: 14.5px; font-weight: 800; font-family: inherit;
  background: linear-gradient(115deg, var(--accent) 0%, #fb7185 28%, var(--primary-light) 68%, var(--primary) 100%);
  background-size: 260% 100%;
  animation: bcFlow 7s ease-in-out infinite;
  box-shadow: 0 12px 28px -12px rgba(244,63,94,.7), 0 3px 8px -3px rgba(91,33,182,.45);
  transition: transform .2s cubic-bezier(.34,1.5,.5,1), box-shadow .25s ease, filter .2s ease;
}
@keyframes bcFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.btn-cart:hover {
  transform: translateY(-2px) scale(1.015);
  box-shadow: 0 18px 36px -12px rgba(244,63,94,.8), 0 4px 10px -3px rgba(91,33,182,.5);
  filter: brightness(1.05);
}
.btn-cart:active { transform: translateY(0) scale(.97); }
.btn-cart:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* برق عبوری روی دکمه */
.btn-cart::before {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.4) 48%, transparent 62%);
  transform: translateX(-120%);
}
.btn-cart:hover::before { animation: bcShine .85s ease; }
@keyframes bcShine { to { transform: translateX(120%); } }

/* موج کلیک */
.btn-cart .bc-ripple {
  position: absolute; border-radius: 50%; z-index: 0; pointer-events: none;
  background: rgba(255,255,255,.45); transform: translate(-50%, -50%) scale(0);
  animation: bcRipple .6s ease-out forwards;
}
@keyframes bcRipple { to { transform: translate(-50%, -50%) scale(1); opacity: 0; } }

/* لایه‌های متن/چرخنده/تیک روی هم می‌نشینند تا عرض دکمه نپرد */
.btn-cart .bc-face {
  display: inline-flex; align-items: center; gap: 9px; z-index: 2;
  transition: opacity .22s ease, transform .28s cubic-bezier(.34,1.5,.5,1);
}
.btn-cart .bc-wait, .btn-cart .bc-ok {
  position: absolute; inset: 0; display: inline-flex; align-items: center;
  justify-content: center; gap: 8px; opacity: 0; transform: translateY(10px); z-index: 2;
  transition: opacity .22s ease, transform .28s cubic-bezier(.34,1.5,.5,1);
}
.btn-cart .bc-spin {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff;
  animation: bcSpin .7s linear infinite;
}
@keyframes bcSpin { to { transform: rotate(360deg); } }

.btn-cart.is-loading .bc-face { opacity: 0; transform: translateY(-10px); }
.btn-cart.is-loading .bc-wait { opacity: 1; transform: translateY(0); }
.btn-cart.is-done .bc-face { opacity: 0; transform: translateY(-10px); }
.btn-cart.is-done .bc-ok { opacity: 1; transform: translateY(0); }
.btn-cart.is-done {
  background: linear-gradient(120deg, #10b981, #059669);
  box-shadow: 0 12px 28px -12px rgba(16,185,129,.75);
  animation: none;
}
.btn-cart .bc-ok svg { width: 20px; height: 20px; }
.btn-cart.is-done .bc-ok svg path {
  stroke-dasharray: 26; stroke-dashoffset: 26;
  animation: bcCheck .4s .08s ease forwards;
}
@keyframes bcCheck { to { stroke-dashoffset: 0; } }

/* دکمه کوچک روی کارت محصول */
.product-card .add-cart-btn.is-loading, .product-card .add-cart-btn.is-done {
  background: var(--primary); color: #fff;
}
.product-card .add-cart-btn.is-done { background: #10b981; animation: bcPop .45s ease; }
@keyframes bcPop {
  0% { transform: scale(1); } 45% { transform: scale(1.28); } 100% { transform: scale(1); }
}

/* عکس محصول که به سمت سبد پرواز می‌کند */
.fly-item {
  position: fixed; z-index: 999; pointer-events: none; border-radius: 12px;
  object-fit: cover; box-shadow: 0 14px 30px -10px rgba(23,27,45,.55);
  transition: transform .85s cubic-bezier(.55,-0.1,.4,1), opacity .85s ease, width .85s ease, height .85s ease;
}

/* تپش بج سبد وقتی عدد عوض می‌شود */
.cart-badge.bump { animation: bcBadge .55s cubic-bezier(.34,1.6,.5,1); }
@keyframes bcBadge {
  0% { transform: scale(1); } 35% { transform: scale(1.55); background: #10b981; } 100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .btn-cart, .btn-cart::before, .btn-cart .bc-ripple,
  .cart-badge.bump, .product-card .add-cart-btn.is-done { animation: none !important; }
  .fly-item { display: none !important; }
}

/* ============================================================
   مجله / مقالات
   ============================================================ */
.crumbs { font-size: 12.5px; color: var(--muted); margin: 16px 0 10px; }
.crumbs a:hover { color: var(--primary); }

.mag-head { margin: 6px 0 18px; }
.mag-head h1 { font-size: 27px; font-weight: 900; margin-bottom: 6px; }
.mag-head p { color: var(--muted); font-size: 14px; max-width: 720px; }

.mag-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 18px; scrollbar-width: none; }
.mag-tabs::-webkit-scrollbar { display: none; }
.mag-tabs a {
  padding: 8px 16px; border-radius: 99px; font-size: 13px; font-weight: 600;
  background: #fff; border: 1.5px solid var(--border); color: var(--muted); white-space: nowrap;
}
.mag-tabs a.active, .mag-tabs a:hover { background: var(--primary-soft); color: var(--primary); border-color: var(--primary-light); }

.mag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.mag-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.mag-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -22px rgba(23,27,45,.4); }
.mag-cover { display: block; aspect-ratio: 16/9; background: var(--primary-soft); overflow: hidden; }
.mag-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.mag-card:hover .mag-cover img { transform: scale(1.05); }
.mag-cover-fallback { display: grid; place-items: center; height: 100%; font-size: 40px; opacity: .5; }
.mag-body { padding: 15px 16px 17px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.mag-tag {
  align-self: flex-start; font-size: 11.5px; font-weight: 700; padding: 4px 10px;
  border-radius: 99px; background: var(--primary-soft); color: var(--primary);
}
.mag-body h2 { font-size: 16px; font-weight: 800; line-height: 1.7; }
.mag-body h2 a:hover { color: var(--primary); }
.mag-body p { font-size: 13px; color: var(--muted); line-height: 2; flex: 1; }
.mag-meta { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--border); padding-top: 10px; }

/* ---- صفحه مقاله ---- */
.post { max-width: 780px; margin: 0 auto; }
.post-head { margin-bottom: 18px; }
.post-head h1 { font-size: 30px; font-weight: 900; line-height: 1.6; margin: 10px 0; }
.post-lead { font-size: 15.5px; color: #4b5563; line-height: 2.1; }
.post-meta { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); margin-top: 12px; }
.post-cover { width: 100%; border-radius: var(--radius); margin-bottom: 22px; object-fit: cover; }

/* تایپوگرافی متن بلند فارسی: خط بلند خسته‌کننده است، پس عرض و ارتفاع خط کنترل می‌شود */
.post-body { font-size: 15.5px; line-height: 2.25; color: #2c3342; }
.post-body p { margin-bottom: 18px; }
.post-body h2 {
  font-size: 21px; font-weight: 900; margin: 34px 0 12px; padding-inline-start: 12px;
  border-inline-start: 4px solid var(--primary-light); line-height: 1.8;
}
.post-body h3 { font-size: 17.5px; font-weight: 800; margin: 26px 0 10px; color: var(--primary); }
.post-body ul, .post-body ol { margin: 0 0 18px; padding-inline-start: 22px; }
.post-body li { margin-bottom: 9px; }
.post-body strong { font-weight: 800; color: var(--text); }
.post-body a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.post-body a:hover { color: var(--accent); }
.post-body blockquote {
  margin: 22px 0; padding: 14px 18px; border-radius: 12px;
  background: var(--primary-soft); border-inline-start: 4px solid var(--primary);
  font-size: 14.5px; color: #3f3357;
}

.empty-box { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty-box p { margin-bottom: 14px; }

@media (max-width: 640px) {
  .mag-head h1 { font-size: 22px; }
  .post-head h1 { font-size: 23px; }
  .post-body { font-size: 15px; line-height: 2.15; }
  .post-body h2 { font-size: 19px; }
}

/* فهرست مطالب و پرسش‌های متداول مقاله */
.post-toc {
  background: var(--primary-soft); border: 1px solid rgba(124,58,237,.18);
  border-radius: 14px; padding: 16px 20px; margin-bottom: 26px;
}
.post-toc b { display: block; font-size: 14px; margin-bottom: 10px; color: var(--primary); }
.post-toc ol { margin: 0; padding-inline-start: 20px; }
.post-toc li { margin-bottom: 7px; font-size: 13.5px; line-height: 1.9; }
.post-toc a { color: #3f3357; }
.post-toc a:hover { color: var(--primary); text-decoration: underline; }

.post-faq { max-width: 780px; margin: 34px auto 0; }
.post-faq h2 { font-size: 21px; font-weight: 900; margin-bottom: 14px; }
.post-faq details {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 18px; margin-bottom: 10px;
}
.post-faq summary {
  cursor: pointer; font-weight: 700; font-size: 14.5px; list-style: none;
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
}
.post-faq summary::-webkit-details-marker { display: none; }
.post-faq summary::after { content: '+'; font-size: 20px; color: var(--primary); font-weight: 400; }
.post-faq details[open] summary::after { content: '−'; }
.post-faq details p { margin-top: 10px; font-size: 14px; line-height: 2.1; color: #4b5563; }

/* نشان پرداخت اقساطی ترب‌پی */
/* ============ پرداخت اقساطی ترب‌پی ============ */
/* نشان صفحه محصول — عدد قسط را نشان می‌دهد، نه یک شعار کلی. */
.installment-note {
  position: relative; margin-top: 13px; padding: 13px 15px 14px;
  border-radius: 15px; overflow: hidden;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(212,175,95,.16), transparent 58%),
    linear-gradient(180deg, #fffdf7, #fff9ed);
  border: 1px solid #ecd9a8;
  box-shadow: 0 1px 2px rgba(120,85,20,.05), 0 12px 26px -20px rgba(120,85,20,.45);
}
.installment-note::before {
  content: ''; position: absolute; inset-inline-start: 0; inset-block: 0; width: 3px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold-deep));
}
.ins-head { display: flex; align-items: center; gap: 10px; }
.installment-note .ins-badge {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center; font-weight: 900; font-size: 14.5px;
  color: #4a3410; background: linear-gradient(145deg, var(--gold-light), var(--gold));
  box-shadow: 0 5px 12px -6px rgba(166,124,45,.75);
}
.ins-title { font-size: 13.5px; font-weight: 800; color: #6b4c14; line-height: 1.5; }
.ins-title em { font-style: normal; color: var(--gold-deep); }
.ins-amount { font-size: 15px; font-weight: 900; color: #4a3410; letter-spacing: -.2px; }
.ins-amount span { font-size: 11.5px; font-weight: 700; color: var(--gold-deep); }
/* نوار چهارقسمتی: خودِ شکل، «چهار قسط» را می‌رساند. */
.ins-bar { display: flex; gap: 4px; margin-top: 11px; }
.ins-bar i {
  flex: 1; height: 5px; border-radius: 3px; background: rgba(166,124,45,.2);
}
.ins-bar i:first-child { background: linear-gradient(90deg, var(--gold), var(--gold-deep)); }
.ins-foot {
  display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 9px;
  font-size: 11.5px; color: #8a6a2a; font-weight: 600;
}
.ins-foot span { display: inline-flex; align-items: center; gap: 4px; }
.ins-foot span::before { content: '✓'; font-weight: 900; color: var(--gold-deep); }

/* دکمه پرداخت اقساطی */
.installment-btn {
  background: linear-gradient(120deg, var(--gold-light), var(--gold) 55%, var(--gold-deep));
  color: #3d2a0b; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  box-shadow: 0 10px 22px -10px rgba(166,124,45,.85);
}
.installment-btn:hover { filter: brightness(1.05); color: #3d2a0b; }
.installment-btn .ins-badge {
  width: 24px; height: 24px; border-radius: 8px; font-size: 12px;
  background: rgba(255,255,255,.35); display: grid; place-items: center;
  box-shadow: none; color: #3d2a0b;
}

/* ============ صفحه انتخاب روش پرداخت ============ */
.paymethod-wrap { max-width: 940px; padding-block: 26px 40px; }
.paymethod-head { text-align: center; margin-bottom: 22px; }
.paymethod-head h1 { font-size: 21px; font-weight: 900; color: var(--text); }
.paymethod-head p { margin-top: 7px; font-size: 13px; color: var(--muted); }
.paymethod-total { color: var(--primary); font-size: 14.5px; }
.paymethod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }

.paycard {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 19px 18px 18px; box-shadow: var(--shadow-sm);
  transition: box-shadow .18s ease, transform .18s ease;
}
.paycard:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.paycard-ins {
  border-color: #e6cf9c;
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(212,175,95,.13), transparent 55%),
    var(--card);
}
.paycard-flag {
  position: absolute; top: 14px; inset-inline-end: 16px;
  font-size: 10.5px; font-weight: 800; color: #4a3410; padding: 4px 9px;
  border-radius: 999px; background: linear-gradient(120deg, var(--gold-light), var(--gold));
}
.paycard-top { display: flex; align-items: center; gap: 12px; }
.paycard-logo {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center; font-weight: 900; font-size: 18px;
}
.paycard-logo-ins {
  color: #4a3410; background: linear-gradient(145deg, var(--gold-light), var(--gold));
  box-shadow: 0 7px 16px -8px rgba(166,124,45,.8);
}
.paycard-logo-bank {
  color: #fff; background: linear-gradient(145deg, var(--primary-light), var(--primary));
  box-shadow: 0 7px 16px -8px rgba(91,33,182,.7);
}
.paycard h2 { font-size: 15.5px; font-weight: 800; color: var(--text); }
.paycard-by { font-size: 11.5px; color: var(--muted); font-weight: 600; }

/* نقشه اقساط: هر قسط با مبلغ و زمانش */
.ins-plan {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  margin-top: 16px; padding: 13px 10px 11px; border-radius: 12px;
  background: #fffaf0; border: 1px dashed #e6cf9c; position: relative;
}
.ins-plan::before {
  content: ''; position: absolute; top: 19px; inset-inline: 24px; height: 2px;
  background: repeating-linear-gradient(90deg, rgba(166,124,45,.28) 0 5px, transparent 5px 10px);
}
.ins-plan-step { position: relative; text-align: center; }
.ins-plan-dot {
  display: block; width: 11px; height: 11px; margin: 0 auto 8px; border-radius: 50%;
  background: #fffaf0; border: 2px solid rgba(166,124,45,.42); position: relative; z-index: 1;
}
.ins-plan-step.is-now .ins-plan-dot {
  background: var(--gold-deep); border-color: var(--gold-deep);
  box-shadow: 0 0 0 3px rgba(212,175,95,.32);
}
.ins-plan-step b { display: block; font-size: 12.5px; font-weight: 800; color: #4a3410; }
.ins-plan-step small { display: block; font-size: 10.5px; color: #8a6a2a; margin-top: 2px; }
.ins-plan-step.is-now b { color: var(--gold-deep); }

.paycard-amount {
  margin-top: 16px; padding: 15px 14px; border-radius: 12px;
  background: var(--primary-soft); text-align: center;
}
.paycard-amount small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.paycard-amount b { font-size: 21px; font-weight: 900; color: var(--primary); letter-spacing: -.4px; }
.paycard-amount b span { font-size: 12px; font-weight: 700; }

.paycard-points { list-style: none; margin: 15px 0 0; padding: 0; display: grid; gap: 7px; }
.paycard-points li {
  position: relative; padding-inline-start: 20px;
  font-size: 12.5px; color: var(--muted); line-height: 1.65;
}
.paycard-points li::before {
  content: '✓'; position: absolute; inset-inline-start: 0; top: 0;
  font-weight: 900; color: var(--green);
}
/* margin-top:auto دکمه را به کف کارت می‌چسباند تا در هر دو کارت هم‌تراز
   بماند حتی وقتی تعداد بندهای بالایشان فرق دارد. فاصله‌ی حداقلی را
   margin-bottom خودِ فهرست تأمین می‌کند، نه margin-top دکمه — وگرنه
   مقدار ثابت، auto را خنثی می‌کند. */
.paycard .btn { margin-top: auto; padding-top: 12px; padding-bottom: 12px; }
.paycard-points { margin-bottom: 17px; }

.paymethod-foot {
  margin-top: 18px; text-align: center; font-size: 12px; color: var(--muted); line-height: 1.8;
}

/* وقتی اقساط در دسترس نیست، کارت تنها نباید نصف صفحه پهن بماند */
.paymethod-grid.is-single { grid-template-columns: minmax(0, 420px); justify-content: center; }
/* هشدار شکست پرداخت اقساطی */
.paymethod-alert {
  margin-bottom: 16px; padding: 12px 15px; border-radius: 12px;
  background: #fff5f5; border: 1px solid #f7c7c7;
  color: #9b2c2c; font-size: 13px; line-height: 1.8;
}
.paymethod-alert p + p { margin-top: 5px; }

/* دکمه دوخطی: عنوان + مبلغ. عمداً ساختاریافته است تا شکستن خط
   اتفاقی به نظر نرسد و مبلغ در هر دو کارت هم‌تراز بماند. */
.paycard-cta {
  flex-direction: column; gap: 2px; line-height: 1.45;
}
.paycard-cta b { font-size: 14px; font-weight: 800; }
.paycard-cta small { font-size: 12px; font-weight: 700; opacity: .85; }

/* ---- موبایل ---- */
@media (max-width: 760px) {
  .paymethod-grid { grid-template-columns: 1fr; }
  .paymethod-wrap { padding-block: 18px 30px; }
  .paymethod-head h1 { font-size: 18px; }
  /* کارت اقساط اول بیاید: گزینه‌ی متمایزکننده باید اول دیده شود. */
  .paycard-ins { order: -1; }
}
@media (max-width: 400px) {
  /* چهار ستون در عرض کم خرد می‌شود؛ دو در دو خواناتر است. */
  .ins-plan { grid-template-columns: repeat(2, 1fr); gap: 12px 6px; }
  .ins-plan::before { display: none; }
  .ins-foot { gap: 3px 9px; font-size: 11px; }
}


/* ============ جعبه شگفت‌انگیز صفحه محصول ============ */
.amazing-box {
  margin-top: 14px; border-radius: 14px; overflow: hidden;
  border: 1px solid #f5b8c4;
  box-shadow: 0 1px 2px rgba(190,24,60,.05), 0 14px 28px -20px rgba(190,24,60,.5);
}
.amazing-box-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 13px;
  background: linear-gradient(100deg, var(--accent), var(--accent-dark));
  color: #fff;
}
.ab-title { font-size: 13.5px; font-weight: 800; white-space: nowrap; }
.ab-countdown { display: inline-flex; align-items: center; gap: 3px; }
.ab-countdown .unit {
  display: inline-flex; flex-direction: column; align-items: center;
  min-width: 30px; padding: 3px 4px; border-radius: 7px;
  background: rgba(255,255,255,.22); font-size: 13px; font-weight: 800;
  font-variant-numeric: tabular-nums; line-height: 1.15;
}
.ab-countdown .unit small { font-size: 8.5px; font-weight: 600; opacity: .85; }
.ab-countdown .sep { font-weight: 800; opacity: .7; }
.ab-countdown.is-over .unit { background: rgba(255,255,255,.12); opacity: .55; }

.amazing-box-body {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 13px; background: #fff5f7;
}
.ab-off {
  flex-shrink: 0; padding: 5px 11px; border-radius: 999px;
  background: linear-gradient(120deg, var(--accent), var(--accent-dark));
  color: #fff; font-size: 14px; font-weight: 900;
  box-shadow: 0 6px 14px -7px rgba(190,24,60,.8);
}
.ab-prices { display: flex; flex-direction: column; gap: 2px; }
.ab-was { font-size: 12.5px; color: var(--muted); text-decoration: line-through; }
.ab-save { font-size: 12.5px; font-weight: 800; color: var(--accent-dark); }
.ab-stock { margin-inline-start: auto; min-width: 132px; }
.ab-stock-bar {
  height: 6px; border-radius: 4px; background: #fadfe5; overflow: hidden;
}
.ab-stock-bar i {
  display: block; height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
}
.ab-stock small {
  display: block; margin-top: 5px; font-size: 11.5px;
  font-weight: 700; color: var(--accent-dark);
}
/* مهلت تمام شد: جعبه خاموش می‌شود تا پیام غلط ندهد */
.amazing-box.is-over { filter: grayscale(.85); opacity: .7; }

@media (max-width: 480px) {
  .amazing-box-head { flex-direction: column; align-items: stretch; gap: 8px; }
  .ab-title { text-align: center; }
  .ab-countdown { justify-content: center; }
  .ab-stock { margin-inline-start: 0; width: 100%; }
}

/* ============ جدول و جعبه‌های مقاله ============ */
/* جدول در ظرف اسکرول‌دار: جدول فنی چهارستونی در موبایل ۳۷۵ پیکسلی
   وگرنه کل صفحه را افقی می‌شکند. */
.post-body .table-wrap {
  overflow-x: auto; margin: 18px 0; border-radius: 12px;
  border: 1px solid var(--border); -webkit-overflow-scrolling: touch;
}
.post-body table {
  width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 420px;
}
.post-body thead th {
  background: var(--primary-soft); color: var(--primary);
  font-weight: 800; font-size: 13px; text-align: right;
  padding: 11px 13px; white-space: nowrap;
}
.post-body tbody td {
  padding: 10px 13px; border-top: 1px solid var(--border);
  color: var(--text); line-height: 1.7;
}
.post-body tbody tr:nth-child(even) { background: #fafbfd; }

.post-body .callout {
  display: flex; gap: 11px; align-items: flex-start;
  margin: 18px 0; padding: 13px 15px; border-radius: 12px;
  font-size: 13.5px; line-height: 1.9;
}
.post-body .callout-icon { flex-shrink: 0; font-size: 16px; line-height: 1.5; }
.post-body .callout-tip {
  background: #f0fdf4; border: 1px solid #bbf7d0; color: #14532d;
}
.post-body .callout-warn {
  background: #fff7ed; border: 1px solid #fed7aa; color: #7c2d12;
}
.post-body .callout-important {
  background: var(--primary-soft); border: 1px solid #ddd0fb; color: #4c1d95;
}
.post-body .callout strong { font-weight: 800; }

@media (max-width: 480px) {
  .post-body table { font-size: 12.5px; }
  .post-body thead th, .post-body tbody td { padding: 9px 10px; }
}