/* چیدمان سفارشی ویترین (ویرایشگر «محل هر فیلد»). فقط وقتی فروشنده چیدمان ساخته باشد لود می‌شود
   و فقط روی کلاس‌های lay-* / hdr-* اثر می‌گذارد؛ ظاهر قالب‌ها دست‌نخورده می‌ماند. */

/* --- هدر: سه ناحیه‌ی راست / وسط / چپ (صفحه RTL است؛ اولین ناحیه سمت راست می‌افتد) --- */
.shop-header .hdr-regions {
  display: flex; justify-content: space-between; align-items: center; gap: 18px; flex: 1 1 100%;
}
.hdr-region { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; min-width: 0; flex: 0 1 auto; }
.hdr-region.hdr-right { justify-content: flex-start; margin-inline-end: auto; }
.hdr-region.hdr-center { justify-content: center; text-align: center; flex: 1 1 auto; }
.hdr-region.hdr-left { justify-content: flex-end; margin-inline-start: auto; }
.hdr-region .hdr-name { margin: 0; }
.hdr-region .hdr-desc { flex-basis: 100%; margin: 0; }
.hdr-region .logo-img { margin: 0; }
.hdr-region .contact { text-align: inherit; }
@media (max-width: 640px) {
  .shop-header .hdr-regions { flex-direction: column; align-items: stretch; }
  .hdr-region, .hdr-region.hdr-center { justify-content: flex-start; text-align: right; }
}

/* --- منو --- */
.site-nav.nav-align-center .container { justify-content: center; }
.site-nav.nav-align-left .container { justify-content: flex-end; }

/* --- بلوک‌های صفحه‌ی اصلی / فوتر --- */
.lay-block { margin: 18px 0; }
.lay-block.al-right { text-align: right; }
.lay-block.al-center { text-align: center; }
.lay-block.al-left { text-align: left; }
.lay-block.al-center .product-grid, .lay-block.al-left .product-grid { text-align: initial; }
.lay-block .home-hero-banner { max-width: 100%; border-radius: 12px; }
.lay-block.lay-hero h1 { margin: 0 0 8px; }
.lay-block.lay-hero p { margin: 0; color: var(--muted); }
.lay-footer-block { margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 14px; }
.lay-footer-block.al-center { justify-content: center; text-align: center; }
.lay-footer-block.al-right { justify-content: flex-start; text-align: right; }
.lay-footer-block.al-left { justify-content: flex-end; text-align: left; }

/* --- صفحه‌ی محصول --- */
.product-detail.gal-left { direction: ltr; }
.product-detail.gal-left > * { direction: rtl; }
.product-detail.gal-top { grid-template-columns: 1fr; }
.product-detail.gal-top .gallery { max-width: 520px; margin-inline: auto; width: 100%; }

/* --- بلوک‌های سفارشی صفحه‌ی اصلی (متن/تصویر/دکمه/بنر تبلیغاتی/فاصله/خط) --- */
.lay-custom.pad-none { padding: 0; }
.lay-custom.pad-sm { padding: 10px 14px; }
.lay-custom.pad-md { padding: 20px 22px; }
.lay-custom.pad-lg { padding: 40px 28px; }
.lay-custom[style] { border-radius: var(--ui-radius, 12px); }
.lay-custom .lay-body { white-space: pre-line; line-height: 1.9; margin: 0 0 12px; }
.lay-custom.lay-image img { max-width: 100%; height: auto; border-radius: var(--ui-radius, 12px); display: inline-block; }
.lay-custom.lay-promo { position: relative; overflow: hidden; min-height: 140px; }
.lay-custom.lay-promo .promo-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; opacity: .35; }
.lay-custom.lay-promo > *:not(.promo-bg) { position: relative; z-index: 1; }
.lay-custom.lay-divider { border: 0; border-top: 1px solid rgba(100, 116, 139, .3); margin: 18px 0; }
.lay-custom.lay-spacer { display: block; }

/* --- طراحی: اندازه‌ی فونت، سبک دکمه، رنگ زمینه/متن --- */
body.ui-font-sm { font-size: 14px; }
body.ui-font-lg { font-size: 18px; }
body.ui-btn-outline .btn-primary { background: transparent; color: var(--ink); border: 2px solid var(--ink); }
body.ui-btn-pill .btn { border-radius: 999px; }
body.ui-custom-colors { background: var(--lay-bg, inherit); color: var(--lay-text, inherit); }

/* ---- بنر تبلیغاتیِ تصویری (طراحی با هوش مصنوعی): هیروی کامل با تصویر پس‌زمینه، لایه‌ی تیره و متن خوانا ---- */
.lay-custom.lay-promo:has(.promo-bg) { min-height: clamp(260px, 38vw, 440px); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; border-radius: var(--lay-radius, 16px); }
.lay-custom.lay-promo:has(.promo-bg) .promo-bg { opacity: .55; }
.lay-custom.lay-promo:has(.promo-bg)::after { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,.42)); pointer-events: none; }
.lay-custom.lay-promo:has(.promo-bg) .section-title { font-size: clamp(24px, 4.2vw, 44px); line-height: 1.5; text-shadow: 0 2px 14px rgba(0,0,0,.35); margin: 0; }
.lay-custom.lay-promo:has(.promo-bg) .lay-body { font-size: clamp(14px, 1.7vw, 19px); max-width: 640px; margin: 0; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.lay-custom.lay-text.pad-sm { opacity: .75; font-size: 12px; }
