/* ==========================================================================
   SpotInn — صفحة متجر المشترك (الميزة 008)
   القوالب بصنف على <body>: sf-tpl-0 كلاسيكي، sf-tpl-1 عصري، sf-tpl-2 أنيق.
   الألوان من --rrh-primary/--rrh-secondary (يضبطها _StorefrontLayout بألوان المتجر)، والخط من --sf-font.
   كل شيء هنا CSS فقط، فالمعاينة الحية في «متجري» تغيّر الصنف والمتغيّرات وترتيب الأقسام دون إعادة تحميل.
   ========================================================================== */

body.sf-page { font-family: var(--sf-font, "Tajawal"), "Segoe UI", Tahoma, sans-serif; background: var(--rrh-bg); }
.sf-page .sf-tint { background: color-mix(in srgb, var(--rrh-primary) 9%, #fff); }

/* ===== شريط الإعلان ===== */
.sf-announce {
  background: var(--rrh-secondary);
  color: var(--sf-on-secondary, var(--rrh-dark));
  text-align: center;
  font-weight: 700;
  padding: .55rem 1rem;
  font-size: .95rem;
}

/* ===== الغلاف ===== */
.sf-hero { position: relative; color: #fff; }
.sf-hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--rrh-primary), color-mix(in srgb, var(--rrh-primary) 70%, #000));
  background-size: cover; background-position: center;
}
.sf-hero-bg.has-cover { background-image: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.6)), var(--sf-cover); }
.sf-hero-inner { position: relative; z-index: 1; }
/* بلا صورة غلاف: الخلفية لون المتجر، فالنص والأزرار بلون التباين (--sf-fg) لا بالأبيض دائمًا */
.sf-hero.no-cover { color: var(--sf-fg, #fff); }
.sf-hero.no-cover .sf-rating-chip { background: rgba(var(--sf-fg-rgb, 255, 255, 255), .18); }
.sf-hero.no-cover .btn-outline-light { color: var(--sf-fg, #fff); border-color: rgba(var(--sf-fg-rgb, 255, 255, 255), .6); }
.sf-logo { height: 84px; width: 84px; object-fit: contain; border-radius: 18px; background: #fff; padding: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.sf-hero h1 { font-weight: 800; }
.sf-hero .sf-tagline { opacity: .92; font-size: 1.15rem; }
.sf-hero-media { display: none; }
.sf-hero-media img { width: 100%; height: 100%; min-height: 280px; object-fit: cover; border-radius: 1.25rem; }
.sf-rating-chip { display: inline-flex; align-items: center; gap: .35rem; background: rgba(255,255,255,.18); border-radius: 50rem; padding: .25rem .8rem; font-weight: 700; }
.sf-rating-chip .bi-star-fill { color: var(--rrh-secondary); }
.sf-btn-wa { background: #25d366; border-color: #25d366; color: #fff; }
.sf-btn-wa:hover { background: #1eb457; border-color: #1eb457; color: #fff; }

/* ===== الأقسام ===== */
.sf-sections { display: flex; flex-direction: column; gap: 2.75rem; padding-top: 2rem; padding-bottom: 2rem; }
.sf-section-title { font-weight: 800; font-size: 1.35rem; margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem; }
.sf-section-title .bi { color: var(--sf-ink, var(--rrh-primary)); }
.sf-empty-hint { border: 2px dashed var(--rrh-border); border-radius: 1rem; padding: 1.25rem; text-align: center; color: var(--rrh-muted); }

/* البحث بالتاريخ */
.sf-search { background: #fff; border-radius: 1.1rem; box-shadow: 0 10px 30px rgba(0,0,0,.08); padding: 1rem 1.25rem; }
.sf-house.is-unavailable { opacity: .55; }
.sf-badge-ok { background: color-mix(in srgb, #198754 14%, #fff); color: #146c43; }
.sf-badge-no { background: color-mix(in srgb, #dc3545 12%, #fff); color: #b02a37; }

/* العروض: بطاقة تذكرة */
.sf-offer { display: flex; background: #fff; border-radius: 1rem; overflow: hidden; border: 1px solid var(--rrh-border); height: 100%; }
.sf-offer-value { background: var(--rrh-primary); color: var(--sf-fg, #fff); min-width: 108px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1rem; font-weight: 800; font-size: 1.7rem; border-inline-end: 2px dashed rgba(255,255,255,.6); }
.sf-offer-value small { font-size: .8rem; font-weight: 500; opacity: .9; }
.sf-offer-code { font-family: ui-monospace, Consolas, monospace; letter-spacing: .08em; background: var(--rrh-bg); border-radius: .5rem; padding: .15rem .6rem; font-weight: 700; }

/* من نحن والأرقام */
.sf-about-text { white-space: pre-line; line-height: 1.9; }
.sf-stat { background: #fff; border: 1px solid var(--rrh-border); border-radius: 1rem; padding: 1rem; text-align: center; height: 100%; }
.sf-stat-value { font-size: 1.8rem; font-weight: 800; color: var(--sf-ink, var(--rrh-primary)); line-height: 1.2; }

/* التقييمات */
.sf-review { background: #fff; border: 1px solid var(--rrh-border); border-radius: 1rem; padding: 1.1rem; height: 100%; }
.sf-stars .bi { color: var(--rrh-secondary); }

/* المعرض */
.sf-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .6rem; }
.sf-gallery button { border: 0; padding: 0; border-radius: .8rem; overflow: hidden; aspect-ratio: 4 / 3; background: var(--rrh-border); }
.sf-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.sf-gallery button:hover img { transform: scale(1.06); }

/* الخريطة */
.sf-map { height: 360px; border-radius: 1rem; overflow: hidden; border: 1px solid var(--rrh-border); }

/* التواصل */
.sf-social { display: flex; flex-wrap: wrap; gap: .6rem; }
.sf-social a { width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--rrh-border); color: var(--sf-ink, var(--rrh-primary)); font-size: 1.25rem; }
.sf-social a:hover { background: var(--rrh-primary); color: #fff; }
.sf-footer-social { display: flex; justify-content: center; gap: 1rem; font-size: 1.2rem; }

/* ===== القالب 0: كلاسيكي — غلاف مستدير داخل الحاوية والنص في الوسط ===== */
.sf-hero-shell { position: relative; overflow: hidden; }
.sf-tpl-0 .sf-hero-wrap { max-width: 1320px; margin: 1.5rem auto 0; padding: 0 .75rem; }
.sf-tpl-0 .sf-hero-shell { border-radius: 1.5rem; }
.sf-tpl-0 .sf-hero-inner { padding: 4rem 1.5rem; text-align: center; }
.sf-tpl-0 .sf-hero-actions { justify-content: center; }

/* ===== القالب 1: عصري — غلاف بعرض الشاشة والنص أسفله، والبحث بطاقة تعلو الغلاف ===== */
.sf-tpl-1 .sf-hero-shell { position: relative; min-height: clamp(420px, 62vh, 640px); display: flex; align-items: flex-end; }
.sf-tpl-1 .sf-hero-inner { padding-block: 6rem 5.5rem; width: 100%; }
.sf-tpl-1 .sf-hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
.sf-tpl-1 .sf-sections { padding-top: 0; }
.sf-tpl-1 .sf-sections > [data-sf-section]:first-child .sf-search { margin-top: -3rem; position: relative; z-index: 2; }
.sf-tpl-1 .rh-card { border: 0; box-shadow: 0 8px 26px rgba(0,0,0,.07); border-radius: 1.25rem; }
.sf-tpl-1 .sf-section-title { font-size: 1.6rem; }
.sf-tpl-1 .sf-section-title::after { content: ""; flex: 0 0 48px; height: 4px; border-radius: 4px; background: var(--rrh-secondary); margin-inline-start: .5rem; }

/* ===== القالب 2: أنيق — غلاف فاتح بعمودين: النص بلون المتجر والصورة في إطار ===== */
.sf-tpl-2 .sf-hero { color: var(--rrh-dark); background: color-mix(in srgb, var(--rrh-primary) 8%, #fff); }
.sf-tpl-2 .sf-hero-bg { display: none; }
.sf-tpl-2 .sf-hero-inner { padding-block: 3.5rem; display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center; }
.sf-tpl-2 .sf-hero-media { display: block; }
.sf-tpl-2 .sf-hero h1 { color: var(--sf-ink, var(--rrh-primary)); font-size: clamp(2rem, 4.5vw, 3rem); }
.sf-tpl-2 .sf-rating-chip { background: #fff; }
.sf-tpl-2 .sf-hero .btn-outline-light { color: var(--sf-ink, var(--rrh-primary)); border-color: var(--sf-ink, var(--rrh-primary)); }
.sf-tpl-2 .sf-hero .btn-outline-light:hover { background: var(--rrh-primary); color: var(--sf-fg, #fff); }
.sf-tpl-2 .sf-hero .btn-light { background: var(--rrh-primary); border-color: var(--rrh-primary); color: var(--sf-fg, #fff); }
.sf-tpl-2 .sf-logo { box-shadow: none; border: 1px solid var(--rrh-border); }
.sf-tpl-2 .rh-card, .sf-tpl-2 .sf-review, .sf-tpl-2 .sf-stat { box-shadow: none; border-color: color-mix(in srgb, var(--rrh-primary) 22%, #fff); }
.sf-tpl-2 .rh-card:hover { transform: none; box-shadow: none; border-color: var(--rrh-primary); }
.sf-tpl-2 .sf-section-title { justify-content: center; text-align: center; font-weight: 700; }
.sf-tpl-2 .sf-section-title .bi { display: none; }
.sf-tpl-2 .sf-section-title::before, .sf-tpl-2 .sf-section-title::after { content: ""; flex: 0 1 60px; height: 1px; background: var(--rrh-primary); opacity: .45; }
@media (min-width: 992px) {
  .sf-tpl-2 .sf-hero-inner { grid-template-columns: 1.1fr 1fr; }
}

/* ===== المعاينة في «متجري» ===== */
.sf-preview-badge { position: fixed; bottom: .75rem; inset-inline-start: .75rem; z-index: 1050; background: rgba(0,0,0,.72); color: #fff; border-radius: 50rem; padding: .3rem .8rem; font-size: .8rem; }
