/* =========================================================
   كافولوجي — تحسين مظهر الثيم (زد)
   الألوان مأخوذة من هوية المتجر الحالية:
   كحلي #303591 · سماوي #3ec7ea · خلفية كريمي #fffaf5
   ========================================================= */

:root {
  --cf-navy: #303591;
  --cf-navy-dark: #22266e;
  --cf-sky: #3ec7ea;
  --cf-sky-soft: #e6f7fc;
  --cf-cream: #fffaf5;
  --cf-card: #ffffff;
  --cf-line: #ece6df;
  --cf-red: #d64545;
  --cf-green: #1f9d55;
  --cf-radius: 14px;
  --cf-shadow: 0 4px 18px rgba(48, 53, 145, .08);
}

body { background: var(--cf-cream); }

/* ---------- شريط الإعلان ---------- */
.announcement-marquee a {
  text-decoration: none !important;
  font-weight: 600;
  color: var(--cf-navy) !important;
}

/* ---------- الهيدر ---------- */
header.bg-secondary {
  box-shadow: 0 2px 12px rgba(48, 53, 145, .06);
  border-bottom: 0 !important;
}

/* ---------- واجهة ترحيبية فوق المنتجات ---------- */
main#main::before {
  content: "أسّس مقهاك صح من أول مرة\A أدلة عملية مبنية على تجربة تشغيل فعلية، توفّر عليك أخطاء التأسيس المكلفة";
  white-space: pre-line;
  display: block;
  margin: 16px 16px 0;
  padding: 28px 20px;
  border-radius: var(--cf-radius);
  background:
    radial-gradient(circle at 15% 20%, rgba(62, 199, 234, .35), transparent 55%),
    linear-gradient(135deg, var(--cf-navy) 0%, var(--cf-navy-dark) 100%);
  color: #fff;
  font-size: 14px;
  line-height: 1.9;
  text-align: center;
  font-weight: 400;
}
main#main::first-line { font-size: 22px; font-weight: 700; }

/* ---------- عنوان القسم (تصحيح "أحدث") ---------- */
.section-products h2 {
  font-size: 0 !important;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-products h2::before {
  content: "";
  width: 5px;
  height: 22px;
  border-radius: 3px;
  background: var(--cf-sky);
}
.section-products h2::after {
  content: "ملفات التأسيس";
  font-size: 20px;
  font-weight: 700;
  color: var(--cf-navy);
}

.section-testimonials h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cf-navy) !important;
  font-weight: 700 !important;
}
.section-testimonials h2::before {
  content: "";
  width: 5px;
  height: 22px;
  border-radius: 3px;
  background: var(--cf-sky);
}

/* ---------- شبكة المنتجات: منتجين جنب بعض في الجوال ---------- */
.section-products { padding-top: 24px !important; }

.section-products [data-grid-root] {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
  align-items: stretch;
}

@media (min-width: 768px) {
  .section-products [data-grid-root] {
    grid-template-columns: repeat(2, minmax(0, 340px)) !important;
    justify-content: center;
    gap: 28px !important;
  }
}

/* ---------- كرت المنتج ---------- */
[data-product-card] {
  background: var(--cf-card);
  border: 1px solid var(--cf-line);
  border-radius: var(--cf-radius);
  box-shadow: var(--cf-shadow);
  overflow: hidden;
  gap: 0 !important;
  transition: transform .2s ease, box-shadow .2s ease;
}
[data-product-card]:active,
[data-product-card]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(48, 53, 145, .14);
}

/* صورة موحّدة المقاس عشان الكرتين يطلعون بنفس الطول */
[data-product-card] > a {
  border-radius: 0 !important;
  aspect-ratio: 9 / 10;
  background: #fff;
}
[data-product-card] > a img {
  width: 100%;
  height: 100% !important;
  object-fit: contain;
}

/* شارة "خصم حصري" */
[data-product-card] .absolute.top-4 span,
[data-product-card] .absolute.top-4 div {
  font-size: 10px !important;
  padding: 3px 8px !important;
  border-radius: 999px !important;
}

/* زر المفضلة أصغر */
[data-product-card] [data-wishlist-btn] {
  width: 28px !important;
  height: 28px !important;
  background: rgba(255, 255, 255, .85) !important;
  border-radius: 50% !important;
  bottom: 8px !important;
}

/* النصوص */
[data-product-card] > div:nth-of-type(1) {
  padding: 10px 10px 0;
  gap: 6px !important;
}
[data-product-card] h3 {
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.6;
  color: var(--cf-navy) !important;
  min-height: 42px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* السعر */
[data-product-card] p.font-semibold {
  font-size: 17px !important;
  font-weight: 800 !important;
  color: var(--cf-navy) !important;
}
[data-product-card] .line-through {
  font-size: 12px !important;
  color: #9a9a9a !important;
}
[data-product-card] .text-success {
  background: #e7f6ee !important;
  color: var(--cf-green) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  border-radius: 999px !important;
  padding: 2px 8px !important;
}

/* زر الإضافة للسلة */
[data-product-card] > div.mt-auto {
  padding: 12px 10px 12px;
}
[data-product-card] [data-add-to-cart] {
  height: 42px !important;
  min-height: 42px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: var(--cf-navy) !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  transition: background .2s ease;
}
[data-product-card] [data-add-to-cart]:hover {
  background: var(--cf-navy-dark) !important;
}

/* ---------- آراء العملاء ---------- */
.section-testimonials { background: #fff; }
.section-testimonials article {
  border: 1px solid var(--cf-line) !important;
  border-radius: var(--cf-radius) !important;
  background: var(--cf-cream) !important;
  box-shadow: var(--cf-shadow);
  position: relative;
}
.section-testimonials article::before {
  content: "”";
  position: absolute;
  top: 6px;
  left: 16px;
  font-size: 54px;
  line-height: 1;
  color: var(--cf-sky);
  opacity: .5;
  font-family: Georgia, serif;
}
.section-testimonials article svg { color: #f5b301 !important; fill: #f5b301 !important; }
.section-testimonials article p { line-height: 1.9; }
.section-testimonials article h3 { color: var(--cf-navy) !important; }
.embla__progress-bar { background: var(--cf-sky) !important; }

/* ---------- الفوتر ---------- */
footer#footer {
  background: var(--cf-navy) !important;
  border-radius: 22px 22px 0 0;
}
footer#footer,
footer#footer .text-foreground,
footer#footer p,
footer#footer a,
footer#footer h3 {
  color: #fff !important;
}
footer#footer h3 { color: var(--cf-sky) !important; font-weight: 700 !important; }
footer#footer p { opacity: .85; line-height: 1.9; }
footer#footer > div > div:first-child img:first-child {
  background: #fff;
  padding: 6px 10px;
  border-radius: 10px;
}
footer#footer .border-t { border-color: rgba(255, 255, 255, .15) !important; }
footer#footer a[href*="zid"] img { filter: brightness(0) invert(1); }
footer#footer img.object-contain {
  background: #fff;
  padding: 2px 4px;
}

/* ---------- الجوال الصغير جدًا ---------- */
@media (max-width: 360px) {
  [data-product-card] h3 { font-size: 12px !important; }
  [data-product-card] p.font-semibold { font-size: 15px !important; }
  [data-product-card] [data-add-to-cart] { font-size: 13px !important; }
}