/* ===================================================
   ريحانة — CSS آمن ومتوافق مع سلة
=================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&display=swap');

:root {
  --rih-brown: #6f4319;
  --rih-brown-dark: #4e2e0e;
  --rih-green: #4d8b45;
  --rih-green-soft: #edf5ea;
  --rih-bg: #f7f3ea;
  --rih-bg-soft: #fbf7f1;
  --rih-border: #eadfd6;
  --rih-text: #2a1a0e;
  --rih-muted: #7e5b3e;
}

body,
p,
a,
span,
button,
input,
textarea,
select,
li {
  font-family: 'Cairo', sans-serif !important;
}

body {
  background: var(--rih-bg) !important;
  color: var(--rih-text);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Cairo', sans-serif !important;
  font-weight: 800 !important;
}

header,
.s-header,
.s-search,
footer,
.s-footer,
.store-footer,
.main-footer {
  display: revert;
  visibility: visible;
}

.s-header,
header {
  background: rgba(247, 243, 234, 0.96) !important;
  border-bottom: 1px solid var(--rih-border) !important;
}

.s-header a,
.s-header button,
header a,
header button {
  font-family: 'Cairo', sans-serif !important;
}

.s-search-input,
input[type="search"] {
  border-radius: 999px !important;
  border-color: var(--rih-border) !important;
}

#rih-safe-home {
  direction: rtl;
  background: var(--rih-bg);
  font-family: 'Cairo', sans-serif;
}

#rih-safe-home * {
  box-sizing: border-box;
}

#rih-safe-home a {
  text-decoration: none;
}

.rih-home-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 16px 20px;
}

.rih-hero {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  min-height: 430px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.18), transparent 28%),
    linear-gradient(135deg, var(--rih-brown), var(--rih-brown-dark));
  color: #fff;
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 28px;
  align-items: center;
  padding: 42px;
  box-shadow: 0 18px 45px rgba(111, 67, 25, 0.16);
}

.rih-hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -120px auto;
  width: 320px;
  height: 320px;
  background: rgba(77, 139, 69, 0.35);
  border-radius: 50%;
  filter: blur(8px);
}

.rih-hero-content {
  position: relative;
  z-index: 2;
}

.rih-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
}

.rih-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.18;
  font-weight: 900 !important;
  color: #fff;
}

.rih-hero h1 span {
  display: block;
  color: #d8efc5;
}

.rih-hero p {
  margin: 0 0 24px;
  max-width: 520px;
  color: rgba(255,255,255,.82);
  line-height: 1.9;
  font-size: 15px;
}

.rih-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.rih-btn-primary,
.rih-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 11px 22px;
  font-weight: 800;
  font-size: 14px;
  transition: .2s ease;
}

.rih-btn-primary {
  background: #fff;
  color: var(--rih-brown);
}

.rih-btn-primary:hover {
  transform: translateY(-2px);
  color: var(--rih-brown);
}

.rih-btn-secondary {
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.22);
}

.rih-btn-secondary:hover {
  background: rgba(255,255,255,.18);
  color: #fff;
}

.rih-hero-media {
  position: relative;
  z-index: 2;
}

.rih-hero-card {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 28px;
  padding: 12px;
  backdrop-filter: blur(12px);
}

.rih-hero-card img {
  display: block;
  width: 100%;
  height: 330px;
  object-fit: cover;
  border-radius: 22px;
  background: #fff;
}

.rih-hero-note {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.rih-mini-card {
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
  padding: 12px 10px;
  text-align: center;
}

.rih-mini-card strong {
  display: block;
  color: #fff;
  font-size: 13px;
  margin-bottom: 2px;
}

.rih-mini-card span {
  color: rgba(255,255,255,.7);
  font-size: 11px;
}

.rih-trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.rih-trust-item {
  background: #fff;
  border: 1px solid var(--rih-border);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,.035);
}

.rih-trust-item .ico {
  font-size: 24px;
  margin-bottom: 8px;
}

.rih-trust-item strong {
  display: block;
  color: var(--rih-brown);
  font-size: 14px;
  margin-bottom: 4px;
}

.rih-trust-item span {
  color: var(--rih-muted);
  font-size: 12px;
  line-height: 1.6;
}

.rih-wholesale {
  margin-top: 16px;
  background: #2d3b1e;
  color: #fff;
  border-radius: 28px;
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.rih-wholesale small {
  display: block;
  color: #a8c47a;
  font-weight: 700;
  margin-bottom: 6px;
}

.rih-wholesale h2 {
  margin: 0 0 6px;
  color: #fff;
  font-size: clamp(20px, 3vw, 30px);
}

.rih-wholesale p {
  margin: 0;
  color: rgba(255,255,255,.72);
  font-size: 14px;
  line-height: 1.7;
}

.rih-wholesale a {
  flex: 0 0 auto;
  background: #a8c47a;
  color: #1a2510;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 900;
}

.s-product-card-entry,
.s-product-card-content,
.product,
.product-item {
  font-family: 'Cairo', sans-serif !important;
}

.s-product-card-entry {
  background: #fff !important;
  border: 1px solid var(--rih-border) !important;
  border-radius: 24px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 12px rgba(0,0,0,.045) !important;
  transition: transform .25s ease, box-shadow .25s ease !important;
}

.s-product-card-entry:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(111,67,25,.12) !important;
}

.s-product-card-image,
.s-product-card-image img,
.s-product-card-entry img {
  border-radius: 18px !important;
}

.s-product-card-content-title a,
.s-product-card-content-title,
.s-product-card-title {
  color: var(--rih-text) !important;
  font-weight: 800 !important;
}

.s-product-card-price,
.s-product-card-sale-price,
.product-price,
.price,
.sale-price {
  color: var(--rih-brown) !important;
  font-weight: 900 !important;
}

.s-product-card-entry .s-button-element,
.s-product-card-entry button {
  border-radius: 999px !important;
  font-family: 'Cairo', sans-serif !important;
  font-weight: 800 !important;
}

.s-product-card-entry .s-button-primary,
.s-product-card-entry .s-button-element:not(.s-quantity-input-button) {
  background: var(--rih-green) !important;
  border-color: var(--rih-green) !important;
  color: #fff !important;
}

.s-product-card-entry .s-button-primary:hover,
.s-product-card-entry .s-button-element:not(.s-quantity-input-button):hover {
  background: #3f7838 !important;
  border-color: #3f7838 !important;
}

.s-product-card-promotion-title,
.s-product-card-discount,
.sale-badge {
  background: var(--rih-green-soft) !important;
  color: var(--rih-green) !important;
  border-radius: 999px !important;
  font-weight: 800 !important;
}

.s-footer,
footer {
  background: #f4efe5 !important;
  border-top: 1px solid var(--rih-border) !important;
}

@media (max-width: 767.98px) {
  .rih-home-wrap {
    padding: 14px 12px 14px;
  }

  .rih-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 24px 18px;
    border-radius: 24px;
    gap: 18px;
  }

  .rih-hero h1 {
    font-size: 28px;
  }

  .rih-hero p {
    font-size: 13px;
    margin-bottom: 18px;
  }

  .rih-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .rih-btn-primary,
  .rih-btn-secondary {
    width: 100%;
  }

  .rih-hero-card img {
    height: 220px;
  }

  .rih-hero-note {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .rih-mini-card {
    padding: 10px 6px;
  }

  .rih-mini-card strong {
    font-size: 11px;
  }

  .rih-mini-card span {
    font-size: 10px;
  }

  .rih-trust-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .rih-trust-item {
    padding: 12px;
    border-radius: 16px;
  }

  .rih-wholesale {
    display: block;
    padding: 22px 18px;
    border-radius: 22px;
  }

  .rih-wholesale a {
    display: flex;
    justify-content: center;
    margin-top: 16px;
  }

  .s-product-card-entry {
    border-radius: 18px !important;
  }
}
/* إصلاح قص صورة الهيرو في الجوال */
@media (max-width: 767.98px) {
  .rih-hero-card {
    background: #fff !important;
    overflow: hidden !important;
  }

  .rih-hero-card img {
    width: 100% !important;
    height: 260px !important;
    object-fit: contain !important;
    object-position: center center !important;
    background: #fff !important;
    border-radius: 18px !important;
  }
}
/* ===================================================
   ريحانة — شاشة التحميل + قسم الجملة تحت المنتجات
=================================================== */

/* شاشة التحميل */
#rih-loader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: #f7f3ea;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .45s ease, visibility .45s ease;
}

#rih-loader.rih-loader-hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.rih-loader-box {
  text-align: center;
}

.rih-loader-logo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  padding: 10px;
  box-shadow: 0 12px 32px rgba(111,67,25,.16);
  margin-bottom: 18px;
}

.rih-loader-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #e4d6c3;
  border-top-color: #6f4319;
  border-radius: 50%;
  margin: 0 auto 10px;
  animation: rihSpin .8s linear infinite;
}

.rih-loader-text {
  color: #6f4319;
  font-weight: 800;
  font-size: 13px;
  font-family: 'Cairo', sans-serif;
}

@keyframes rihSpin {
  to {
    transform: rotate(360deg);
  }
}

/* إصلاح قص صورة الهيرو في الجوال */
@media (max-width: 767.98px) {
  .rih-hero-card {
    background: #fff !important;
    overflow: hidden !important;
  }

  .rih-hero-card img {
    width: 100% !important;
    height: 260px !important;
    object-fit: contain !important;
    object-position: center center !important;
    background: #fff !important;
    border-radius: 18px !important;
  }
}

/* قسم الجملة لما يكون تحت المنتجات */
#rih-wholesale-after-products {
  direction: rtl;
  font-family: 'Cairo', sans-serif;
  max-width: 1240px;
  margin: 28px auto 28px;
  padding: 0 16px;
}

#rih-wholesale-after-products .rih-wholesale {
  margin-top: 0;
}

@media (max-width: 767.98px) {
  #rih-wholesale-after-products {
    margin: 18px auto 22px;
    padding: 0 12px;
  }
}