/* =====================================================
   SAFSUF — style.css  (النسخة المحسّنة)
   ألوان اللوجو: أزرق #1565d8 / ذهبي #f5a623 / فيروزي #12d6a7
   ===================================================== */

/* ── المتغيرات ── */
:root {
  /* الخلفيات */
  --bg: #f4f6fb;
  --header: rgba(255,255,255,.92);

  /* الكروت */
  --card: #ffffff;

  /* اللون الأساسي — أزرق اللوجو */
  --primary: #1565d8;
  --primary-light: #e8f0fd;
  --primary-hover: #1152b8;

  /* اللون الثانوي — ذهبي اللوجو */
  --accent: #f5a623;
  --accent-light: #fff8ec;

  /* اللون الثالثي — فيروزي اللوجو */
  --teal: #12d6a7;
  --teal-light: #e6fdf8;

  /* نجاح / خطر */
  --success: #10b981;
  --danger: #ef4444;

  /* نصوص */
  --text: #111827;
  --text-light: #6b7280;

  /* حدود */
  --border: #e5e7eb;

  /* ظلال */
  --shadow: 0 4px 18px rgba(21,101,216,.06);
  --shadow-hover: 0 12px 32px rgba(21,101,216,.13);

  /* حواف */
  --radius: 18px;
  --radius-sm: 12px;
}

/* ── إعادة ضبط عامة ── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Cairo', sans-serif;
  line-height: 1.6;
}

/* حركة خفيفة عند التحوم فقط على العناصر التفاعلية */
a, button, .card, .cat-btn, .store-front-item,
.how-item, .stat-box, .similar-store-card,
.related-card, .popular-card, .country-card {
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}

/* ====================================================
   HEADER
   ==================================================== */
header {
  background: var(--header);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  max-width: 1400px;
  margin: auto;
}

.logo img {
  height: 90px;
  cursor: pointer;
}

/* ── شريط البحث ── */
.search {
  flex: 1;
  position: relative;
}

.search input {
  width: 100%;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text);
  outline: none;
  font-size: 14px;
  font-family: inherit;
}

.search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(21,101,216,.1);
}

#searchResults {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,.1);
  overflow: hidden;
  z-index: 999;
  display: none;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid #f1f1f1;
}

.search-result-item:hover { background: #f8f9ff; }

.search-result-item img { width: 44px; height: 44px; object-fit: contain; }

.search-result-item h4 { margin: 0; font-size: 14px; }

.search-result-item p { margin: 2px 0 0; font-size: 12px; color: #777; }

.no-results { padding: 16px; text-align: center; color: #777; font-size: 14px; }

/* ── أزرار الهيدر ── */
.lang-btn,
#countrySelect {
  border: 1.5px solid var(--border);
  background: #fff;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  white-space: nowrap;
}

.lang-btn:hover,
#countrySelect:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ====================================================
 /* ── CATEGORY SLIDER ── */
.cat-slider-wrapper {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-arrow {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  z-index: 2;
  transition: background .15s, border-color .15s, transform .15s;
  padding: 0;
}

.cat-arrow:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: scale(1.08);
}

.cat-arrow.hidden {
  opacity: 0;
  pointer-events: none;
}

.categories-bar {
  display: flex;
  gap: 0;
  overflow: hidden;
  padding: 16px 4px;
  flex: 1;
  scroll-behavior: smooth;
}

.cat-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  min-width: 86px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0 7px;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}

.cat-circle:hover {
  transform: translateY(-5px) scale(1.09);
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}

.cat-circle.active {
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px rgba(0,0,0,.22);
  transform: translateY(-3px);
}

.cat-circle i {
  font-size: 26px;
  color: #fff;
  margin-bottom: 5px;
  line-height: 1;
  display: block;
}

.cat-circle span {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  line-height: 1.25;
  padding: 0 5px;
}

@media(max-width: 600px) {
  .cat-circle { width: 72px; height: 72px; min-width: 72px; margin: 0 5px; }
  .cat-circle i { font-size: 20px; }
  .cat-circle span { font-size: 9px; }
  .cat-arrow { width: 32px; height: 32px; font-size: 18px; }
}
/* ====================================================
   HERO ROW (banner + store front)
   ==================================================== */
#homeView {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  padding: 12px 0 20px;
}

/* ── بانرات ── */
.banners {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  height: 300px;
  background: #e8f0fd;
}

.track { display: flex; height: 100%; }

.banner {
  min-width: 100%;
  height: 300px;
  background-size: cover;
  background-position: center;
  cursor: pointer;
}

/* ── واجهة المتاجر ── */
.store-front-side {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  height: 300px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.store-front-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.store-front-header h3 { font-size: 16px; margin: 0; }

.all-stores-link {
  border: none;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  font-family: inherit;
}

.store-front-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    overflow-y: auto;
    max-height: 240px;
    padding: 4px;
}

.store-front-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #fff;
    transition: transform .2s, box-shadow .2s;
}

.store-front-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.store-front-img-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9ff;
    padding: 10px;
}

.store-front-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.store-front-name {
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    padding: 6px 4px;
    color: var(--text);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}
/* ====================================================
   HOMEPAGE SECTIONS (popular / trending / new)
   ==================================================== */
.homepage-section {
  max-width: 1400px;
  margin: 0 auto 32px;
  padding: 0 24px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 0;
}

/* ── شبكة المتاجر الشائعة / الجديدة ── */
.stores-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

/* ====================================================
   STORE CARD  (في الأقسام العامة)
   ==================================================== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--teal));
}

.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.card img { width: 68px; height: 68px; object-fit: contain; margin-bottom: 10px; }

.card h3 { margin: 6px 0; font-size: 16px; font-weight: 700; }

.card p { font-size: 13px; color: var(--text-light); line-height: 1.5; }

/* ── خصم ── */
.discount {
  background: var(--teal-light);
  color: var(--success);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  margin: 10px 0;
  font-size: 13px;
}

/* ── مربع الكود (حجم متناسق) ── */
.code {
  background: var(--primary-light);
  color: var(--primary);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  margin-bottom: 12px;
  font-size: 15px;
  letter-spacing: 1.5px;
  border: 1.5px dashed rgba(21,101,216,.3);
  cursor: pointer;
}

/* ── زر ── */
.btn {
  width: 100%;
  border: none;
  background: linear-gradient(135deg, var(--primary), #2d7be8);
  color: #fff;
  padding: 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  font-family: inherit;
}

.btn:hover {
  background: linear-gradient(135deg, var(--primary-hover), var(--primary));
  transform: translateY(-2px);
}

/* ── شارة عدد الكوبونات ── */
.coupon-count-badge {
  background: var(--accent);
  color: #fff;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  margin-inline-start: 6px;
}

/* ── بادجات الكوبونات ── */
.coupon-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.badge.hot      { background: #ffe5e5; color: #ff2d2d; }
.badge.trending { background: var(--accent-light); color: var(--accent); }
.badge.expiring { background: var(--primary-light); color: var(--primary); }

/* ── الكود المخفي ── */
.masked-code { cursor: pointer; }

.masked-code.revealed {
  background: var(--teal-light) !important;
  color: var(--teal) !important;
  border-color: var(--teal) !important;
  transform: scale(1.02);
}

/* ====================================================
   TRENDING COUPONS
   ==================================================== */
#trendingCoupons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.coupon-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 12px;
  text-align: center;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.coupon-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
}

.coupon-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.coupon-card .coupon-badges {
  display: flex;
  justify-content: center;
  margin-bottom: 0;
}

.coupon-card h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
  text-align: center;
}

.coupon-card .code {
  width: 100%;
  background: var(--primary-light);
  color: var(--primary);
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1.5px;
  border: 1.5px dashed rgba(21,101,216,.3);
  text-align: center;
  margin-bottom: 0;
}

.coupon-card .btn {
  width: 100%;
  font-size: 13px;
  padding: 9px;
  border-radius: var(--radius-sm);
  margin-top: auto;
}

/* responsive */
@media(max-width: 600px) {
  #trendingCoupons {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* ====================================================
   MAIN COUPONS GRID  (الكوبونات الرئيسية)
   ==================================================== */
main {
  max-width: 1400px;
  margin: 0 auto 40px;
  padding: 0 24px;
}

#mainTitle {
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 20px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

/* ====================================================
   STORE DETAIL PAGE
   ==================================================== */
#storeDetailPage { display: none; padding: 24px; max-width: 1400px; margin: auto; }

/* ====================================================
   STORE PAGE  (صفحة المتجر المفردة)
   ==================================================== */
.store-container {
  max-width: 1200px;
  margin: auto;
  padding: 28px 20px 60px;
}

.store-topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  position: sticky;
  top: 0;
  z-index: 999;
  backdrop-filter: blur(12px);
}

.back-home {
  text-decoration: none;
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
}

.store-hero {
  background: linear-gradient(135deg, #ffffff, var(--primary-light));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 24px;
  box-shadow: var(--shadow);
}

.store-hero img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  background: #fff;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.store-hero-content { flex: 1; }

.store-hero-content h2 { margin: 0 0 8px; font-size: 28px; font-weight: 800; }

.store-hero-content p { margin: 0; color: var(--text-light); line-height: 1.8; font-size: 15px; }

.store-main h1 { text-align: center; margin-bottom: 24px; font-size: 28px; font-weight: 800; }

.coupons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
}

#storeCoupons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  justify-content: center;
}

#storeCoupons .card { padding: 22px; }

#storeCoupons .discount {
  background: linear-gradient(90deg, #dff8ef, #eafaf7);
  padding: 14px;
  border-radius: var(--radius-sm);
  font-size: 18px;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 14px;
}

#storeCoupons .code {
  padding: 12px;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 16px;
}

#storeCoupons .btn { width: 100%; padding: 14px; font-size: 16px; }

.store-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}

.store-header img { width: 90px; height: 90px; object-fit: contain; }

.store-header h2 { margin: 0; font-size: 28px; }

.store-header p { margin-top: 8px; color: var(--text-light); font-size: 15px; line-height: 1.7; }

#storeH1 { margin: 24px 0; font-size: 32px; font-weight: 800; text-align: center; }

/* ====================================================
   HOW IT WORKS
   ==================================================== */
#howItWorks {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 24px;
}

#howTitle { text-align: center; margin-bottom: 24px; font-size: 24px; font-weight: 800; }

.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.how-item {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.how-item h3 {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  color: #fff;
  font-size: 18px;
}

/* ====================================================
   ABOUT SECTION
   ==================================================== */
.about-safsuf {
  max-width: 1400px;
  margin: 0 auto 40px;
  padding: 40px 32px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: fadeUp .5s ease;
}

.about-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}

.about-safsuf h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 24px;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.stat-box {
  background: var(--primary-light);
  border: 1px solid rgba(21,101,216,.12);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.stat-box:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.stat-box h3 { font-size: 30px; color: var(--primary); margin-bottom: 8px; font-weight: 900; }

.stat-box p { color: var(--text-light); font-size: 14px; margin: 0; }

.about-content { font-size: 16px; line-height: 2.1; color: #4b5563; }

.about-content p { margin-bottom: 14px; }

.about-content strong { color: var(--text); }

html[dir="ltr"] .about-content { text-align: left; }

/* ====================================================
   FOOTER
   ==================================================== */
footer {
  text-align: center;
  padding: 22px 24px;
  background: #fff;
  border-top: 1px solid var(--border);
  color: var(--text-light);
  font-size: 13px;
}

/* ====================================================
   BREADCRUMB
   ==================================================== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  font-size: 13px;
}

.breadcrumb a { color: var(--primary); text-decoration: none; font-weight: 700; }

.breadcrumb a:hover { opacity: .8; }

.breadcrumb span { color: var(--text-light); font-weight: 600; }

/* ====================================================
   FAQ
   ==================================================== */
.faq-section { margin-top: 50px; padding: 0 4px; }

.faq-section h2 { text-align: center; margin-bottom: 20px; font-size: 24px; }

.faq-item {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.faq-item h3 { margin-top: 0; color: var(--primary); }

.faq-item p { color: var(--text-light); line-height: 1.8; }

/* ====================================================
   SIMILAR STORES
   ==================================================== */
.similar-section { margin-top: 50px; }

.similar-section h2 { text-align: center; font-size: 24px; margin-bottom: 24px; }

.similar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.similar-store-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.similar-store-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.similar-store-card img { width: 80px; height: 80px; object-fit: contain; margin-bottom: 12px; }

.similar-store-card h3 { margin: 0; font-size: 15px; font-weight: 700; }

/* ====================================================
   SEO CONTENT
   ==================================================== */
.seo-content {
  margin-top: 50px;
  background: #fff;
  border-radius: var(--radius);
  padding: 30px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.seo-content h2 { margin-top: 0; font-size: 24px; color: var(--text); margin-bottom: 16px; }

.seo-content p { line-height: 2; font-size: 16px; color: var(--text-light); margin-bottom: 14px; }

.seo-content strong { color: var(--primary); }

/* ====================================================
   CATEGORY PAGE
   ==================================================== */
.category-page { max-width: 1300px; margin: 36px auto; padding: 0 20px; }

.category-header { text-align: center; margin-bottom: 32px; }

.category-header h1 { font-size: 32px; font-weight: 800; color: var(--text); margin-bottom: 10px; }

.category-header p { font-size: 16px; color: var(--text-light); line-height: 1.8; }

.category-stores {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.related-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border-radius: var(--radius);
  padding: 16px 20px;
  text-decoration: none;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  min-height: 100px;
}

.related-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.related-card img { width: 76px; height: 76px; object-fit: contain; flex-shrink: 0; }

.related-card h3 { margin: 0; font-size: 16px; line-height: 1.6; color: var(--text); font-weight: 700; }

/* ====================================================
   POPULAR CARD
   ==================================================== */
.popular-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.popular-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }

.popular-card img { width: 80px; height: 80px; object-fit: contain; margin-bottom: 12px; }

.popular-card h3 { font-size: 16px; margin-bottom: 6px; }

.popular-card span {
  display: inline-block;
  margin-top: 8px;
  background: var(--primary-light);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

/* ====================================================
   COUNTRY CARD
   ==================================================== */
.country-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
}

.country-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }

.country-card img { width: 60px; height: 60px; object-fit: contain; }

.country-card h3 { flex: 1; font-size: 17px; margin: 0; }

.country-btn {
  background: var(--primary);
  color: #fff;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
}

.empty-country { text-align: center; padding: 50px 20px; }

/* ====================================================
   RELATED ARTICLE / SEO
   ==================================================== */
.related-article-section {
  margin-top: 36px;
  padding: 20px;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.seo-article-link {
  display: block;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.seo-article-link:hover { background: var(--primary-light); color: var(--primary); }

/* ====================================================
   COPY TOAST
   ==================================================== */
#copyToast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  z-index: 999999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, bottom .3s ease;
}

#copyToast.show { opacity: 1; bottom: 40px; }

/* ====================================================
   STORE DISCOUNT LABEL
   ==================================================== */
.store-discount { margin-top: 4px; font-size: 13px; color: var(--text-light); }

.no-similar {
  text-align: center;
  font-size: 16px;
  color: var(--text-light);
  background: #fff;
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* ====================================================
   ANIMATIONS
   ==================================================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ====================================================
   RESPONSIVE  — 900px
   ==================================================== */
@media(max-width: 900px) {
  .hero-row { grid-template-columns: 1fr; }

  .header-inner { flex-wrap: wrap; }

  .store-front-grid { grid-template-columns: repeat(4, 1fr); }

  .banners, .banner { height: 260px; }

  .store-front-side { height: auto; }

  .about-stats { grid-template-columns: repeat(3, 1fr); }
}

/* ====================================================
   RESPONSIVE  — 768px
   ==================================================== */
@media(max-width: 768px) {
  .store-hero { flex-direction: column; text-align: center; padding: 24px; }

  .store-hero img { width: 80px; height: 80px; }

  .store-hero-content h2 { font-size: 22px; }

  .store-header { flex-direction: column; text-align: center; }

  #storeH1 { font-size: 24px; }

  .similar-grid { grid-template-columns: repeat(2, 1fr); }

  .similar-store-card { padding: 16px; }

  .about-safsuf { padding: 26px 18px; }

  .about-safsuf h2 { font-size: 20px; }

  .about-stats { grid-template-columns: repeat(3, 1fr); gap: 10px; }

  .stat-box h3 { font-size: 24px; }

  .about-content { font-size: 14px; line-height: 1.9; }

  .seo-content { padding: 20px; }

  .seo-content h2 { font-size: 20px; }

  .seo-content p { font-size: 14px; }

  .category-header h1 { font-size: 24px; }

  .category-header p { font-size: 14px; }

  .category-stores { grid-template-columns: 1fr; }

  .related-card { min-height: 90px; padding: 14px; }

  .related-card img { width: 64px; height: 64px; }

  .related-card h3 { font-size: 14px; }
}

/* ====================================================
   RESPONSIVE  — 600px
   ==================================================== */
@media(max-width: 600px) {
  #homeView { padding: 0 14px; }

  .homepage-section { padding: 0 14px; }

  main { padding: 0 14px 32px; }

  .hero-row { padding: 8px 0 16px; }

  .banners, .banner { height: 200px; }

  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }

  .card { padding: 14px; border-radius: 14px; }

  .card img { width: 54px; height: 54px; }

  .card h3 { font-size: 13px; }

  .discount { font-size: 12px; padding: 7px 10px; }

  .code { font-size: 13px; padding: 8px 10px; }

  .btn { font-size: 12px; padding: 10px; }

  .stores-row { grid-template-columns: repeat(2, 1fr); }

  #trendingCoupons { grid-template-columns: repeat(2, 1fr); }

  .about-stats { grid-template-columns: 1fr; gap: 10px; }

  .stat-box h3 { font-size: 26px; }

  #mainTitle { font-size: 20px; }

  .categories-bar { padding: 10px 14px 8px; }

  .store-front-grid { grid-template-columns: repeat(3, 1fr); }
}
/* ====================================================
   HOMEPAGE INFO ACCORDION (Hero / Intro / Why / ... )
   ==================================================== */
.home-info-section {
  max-width: 1400px;
  margin: 0 auto 40px;
  padding: 0 24px;
}

.home-info-section .section-main-heading {
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  margin: 40px 0 20px;
}

.home-info-section .section-main-heading .lang-en { display: none; }
html[dir="ltr"] .home-info-section .section-main-heading .lang-ar { display: none; }
html[dir="ltr"] .home-info-section .section-main-heading .lang-en { display: inline; }

.info-accordion {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  overflow: hidden;
}

.info-accordion:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.info-accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  user-select: none;
  line-height: 1.6;
}

.info-accordion summary::-webkit-details-marker { display: none; }

.info-accordion summary::before {
  content: attr(data-icon);
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1.6;
}

.info-accordion summary::after {
  content: "›";
  margin-inline-start: auto;
  flex-shrink: 0;
  font-size: 22px;
  color: var(--primary);
  transform: rotate(90deg);
  transition: transform .25s ease;
  line-height: 1.6;
}

.info-accordion[open] summary::after { transform: rotate(-90deg); }

.info-accordion-content {
  padding: 0 20px 20px;
  animation: fadeUp .25s ease;
}

.info-accordion-content p {
  font-size: 14px;
  line-height: 1.9;
  color: var(--text-light);
  margin: 0 0 12px;
}

.info-accordion-content p:last-child { margin-bottom: 0; }

/* ── إعادة استخدام faq-item كـ accordion ── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::before {
  content: attr(data-icon);
  font-size: 15px;
  flex-shrink: 0;
}

.faq-item summary::after {
  content: "›";
  margin-inline-start: auto;
  font-size: 20px;
  color: var(--primary);
  transform: rotate(90deg);
  transition: transform .25s ease;
}

.faq-item[open] summary::after { transform: rotate(-90deg); }

.faq-item p {
  margin-top: 12px;
  animation: fadeUp .2s ease;
}

@media(max-width: 600px) {
  .home-info-section { padding: 0 14px; }
  .home-info-section .section-main-heading { font-size: 19px; }
  .info-accordion summary { font-size: 13px; padding: 14px 16px; }
  .info-accordion-content { padding: 0 16px 16px; }
  .info-accordion-content p { font-size: 13px; }
}

/* ====================================================
   STORE PAGE — SIDEBAR LAYOUT
   ==================================================== */
.store-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}

html[dir="rtl"] .store-layout { direction: rtl; }

.store-sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.store-main-content {
  min-width: 0;
}

@media(max-width: 900px) {
  .store-layout { grid-template-columns: 1fr; }
  .store-sidebar { position: static; order: 2; }
  .store-main-content { order: 1; }
}

/* ── صندوق الإحصائيات ── */
.store-stats-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.store-stats-box h3 {
  margin: 0 0 14px;
  font-size: 15px;
  color: var(--text);
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.stat-row:last-child { border-bottom: none; }

.stat-label { color: var(--text-light); }

.stat-value {
  font-weight: 800;
  color: var(--primary);
}

/* ── صندوق النشرة البريدية ── */
.store-newsletter-box {
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.store-newsletter-box h3 {
  margin: 0 0 6px;
  font-size: 15px;
  color: var(--text);
}

.store-newsletter-box p {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--text-light);
  line-height: 1.6;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.newsletter-form input {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-family: inherit;
  font-size: 13px;
  outline: none;
}

.newsletter-form input:focus {
  border-color: var(--primary);
}

.newsletter-form button {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}

.newsletter-form button:hover { background: var(--primary-hover); }

.newsletter-msg {
  margin: 10px 0 0;
  font-size: 12px;
  font-weight: 700;
  min-height: 16px;
}

/* ── صندوق المشاركة ── */
.store-share-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.store-share-box h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.store-share-box p {
  margin: 0 0 14px;
  font-size: 12.5px;
  color: var(--text-light);
}

.share-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.share-copy-btn,
.share-whatsapp-btn {
  display: block;
  text-align: center;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text);
  text-decoration: none;
  font-family: inherit;
}

.share-copy-btn:hover { border-color: var(--primary); color: var(--primary); }

.share-whatsapp-btn {
  background: #25d366;
  border-color: #25d366;
  color: #fff;
}

.share-whatsapp-btn:hover { background: #1ebc59; }

/* ── بادچ "جديد" على الكوبونات ── */
.badge.new-badge {
  background: var(--teal-light);
  color: var(--teal);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

/* ── تحويل faq-item العادي لأكورديون في صفحات المتاجر ── */
.faq-list { display: flex; flex-direction: column; gap: 10px; }