/* ====================================================================
   RAQMI.TOP — الهوية البصرية الجديدة للمتجر (Modern Bento Store UI)
   تتغيّر ألوانها ديناميكياً من theme_renklar_settings.php
   ==================================================================== */

:root {
  --bg-page: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --ink-main: #0f172a;
  --ink-mute: #64748b;
  --border-soft: rgba(15, 23, 42, 0.07);
  --radius-card: 16px;
  --radius-btn: 12px;
  --shadow-card: 0 3px 14px rgba(15, 23, 42, 0.05);
  --shadow-hover: 0 12px 26px var(--shadow-primary, rgba(37, 99, 235, 0.16));
}

html, body {
  background-color: var(--bg-page) !important;
  color: var(--ink-main);
  font-family: 'Cairo', 'Tajawal', system-ui, -apple-system, sans-serif !important;
}
body { overflow-x: clip; }

.en-num, .price-num {
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: embed;
}

/* ─── الهيرو المضغوط والحديث ─── */
.hero-section {
  border-radius: 0 0 22px 22px !important;
  padding: 16px 14px 20px !important;
  box-shadow: 0 8px 24px var(--shadow-primary, rgba(0, 0, 0, 0.12)) !important;
}
.hero-btn {
  border-radius: 999px !important;
  padding: 8px 18px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16) !important;
}

/* ─── الأزرار الموحدة ─── */
.btn-brand,
.btn-primary-theme,
.btn-buy-now,
.btn-add-cart {
  background: var(--gradient-main) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: var(--radius-btn) !important;
  font-weight: 800 !important;
  box-shadow: 0 5px 16px var(--shadow-primary, rgba(0, 0, 0, 0.14)) !important;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease !important;
}
.btn-brand:hover,
.btn-primary-theme:hover,
.btn-buy-now:hover,
.btn-add-cart:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  color: #ffffff !important;
}
.btn-outline-brand {
  background: var(--surface) !important;
  color: var(--primary) !important;
  border: 1.5px solid var(--primary) !important;
  border-radius: var(--radius-btn) !important;
  font-weight: 800 !important;
}
.btn-outline-brand:hover {
  background: var(--primary) !important;
  color: #ffffff !important;
}

/* ─── شبكة الأقسام والمنتجات (مضغوطة ومنظمة) ─── */
.cats-grid,
.products-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 6px !important;
  padding: 4px 10px 16px !important;
}
@media (min-width: 576px) {
  .cats-grid, .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 11px !important;
    padding: 6px 14px 18px !important;
  }
}
@media (min-width: 992px) {
  .cats-grid, .products-grid {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 14px !important;
  }
}
@media (min-width: 1200px) {
  .cats-grid, .products-grid {
    grid-template-columns: repeat(6, 1fr) !important;
  }
}

/* ─── تصميم البطاقات الجديد (Bento Clean Card) ─── */
.cat-card,
.product-card,
.prod-card,
.item-card,
.modern-card {
  position: relative;
  background: var(--surface) !important;
  border: 1px solid var(--border-soft) !important;
  border-radius: var(--radius-card) !important;
  box-shadow: var(--shadow-card) !important;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease !important;
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
}
.cat-card::after,
.product-card::after,
.prod-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--gradient-main);
  opacity: 0;
  transition: opacity .22s ease;
}
.cat-card:hover,
.product-card:hover,
.prod-card:hover,
.item-card:hover,
.modern-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover) !important;
  border-color: var(--primary-light, var(--primary)) !important;
}
.cat-card:hover::after,
.product-card:hover::after,
.prod-card:hover::after {
  opacity: 1;
}

.cat-img-wrap,
.product-img-wrap {
  aspect-ratio: 1 / 1;
  background: var(--surface-soft) !important;
  overflow: hidden !important;
  border-bottom: 1px solid var(--border-soft) !important;
}
.cat-img-wrap img,
.product-img-wrap img,
.product-img-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.cat-card:hover .cat-img-wrap img,
.product-card:hover .product-img-wrap img {
  transform: scale(1.06);
}

.cat-name,
.product-name {
  padding: 7px 6px 9px !important;
  text-align: center;
}
.cat-name,
.product-name h6 {
  font-size: 11.5px !important;
  font-weight: 800 !important;
  color: var(--ink-main) !important;
  margin: 0 !important;
  line-height: 1.3 !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── عناوين الأقسام ─── */
.section-hdr {
  padding: 8px 12px 4px !important;
}
.section-hdr-title {
  font-size: 14px !important;
  font-weight: 900 !important;
  color: var(--ink-main) !important;
}

/* ─── ترويسة الصفحات الداخلية ─── */
.page-hero-bar {
  background: var(--gradient-main) !important;
  color: #ffffff !important;
  border-radius: 16px !important;
  padding: 14px 18px !important;
  margin-bottom: 14px !important;
  box-shadow: 0 8px 22px var(--shadow-primary, rgba(0, 0, 0, 0.14)) !important;
}

/* ─── تحسينات الموبايل (استغلال المساحات + تصغير الأيقونات والبطاقات) ─── */
@media (max-width: 640px) {
  .hero-section {
    padding: 10px 10px 14px !important;
    border-radius: 0 0 16px 16px !important;
  }
  .hero-section h1, .hero-section h2 {
    font-size: 1rem !important;
    margin-bottom: 4px !important;
  }
  .hero-section p {
    font-size: 11.5px !important;
    margin-bottom: 8px !important;
  }
  .hero-btn {
    padding: 6px 13px !important;
    font-size: 11.5px !important;
  }
  .cats-grid, .products-grid {
    gap: 5px !important;
    padding: 4px 6px 12px !important;
  }
  .cat-card, .product-card, .prod-card, .item-card, .modern-card {
    border-radius: 11px !important;
  }
  .cat-name, .product-name {
    padding: 5px 4px 7px !important;
  }
  .cat-name, .product-name h6 {
    font-size: 11px !important;
    line-height: 1.25 !important;
  }
  .section-hdr {
    padding: 6px 10px 2px !important;
  }
  .section-hdr-title {
    font-size: 12.5px !important;
  }
  .page-hero-bar {
    border-radius: 11px !important;
    padding: 10px 12px !important;
    margin-bottom: 10px !important;
  }
  /* تصغير الأيقونات العامة والفوتر على الموبايل */
  .site-footer {
    padding-top: 14px !important;
  }
  .footer-col-title {
    font-size: 12px !important;
    margin-bottom: 6px !important;
  }
  .footer-links a {
    font-size: 11px !important;
    padding: 2px 0 !important;
  }
  .fas, .fab, .far {
    font-size: 0.9em;
  }
}

/* تثبيت شريط الموبايل السفلي دائماً أسفل الشاشة */
body { overflow-x: clip !important; }
.mobile-bottom-nav {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 9990 !important;
}

@media (max-width: 767px) { body { padding-bottom: 64px !important; } }