/* ============================================================
   تخصيص متجر زد — هوية فاخرة (كريمي × عنّابي)
   اللون الرئيسي: #eeddc6  |  اللون الثانوي: #540c26
   يوضع في: لوحة تحكم زد > المتجر > تخصيص التصميم > CSS مخصص
   ============================================================ */

/* ---------- 1) المتغيرات الأساسية والخط ---------- */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap');

:root {
  --brand-cream:      #eeddc6;   /* الخلفيات الناعمة */
  --brand-cream-soft: #f7efe2;   /* درجة أفتح للخلفيات الواسعة */
  --brand-wine:       #540c26;   /* الأزرار والعناوين */
  --brand-wine-dark:  #3d081b;   /* Hover للأزرار */
  --brand-wine-soft:  rgba(84, 12, 38, 0.08);
  --brand-gold:       #c9a56a;   /* لمسة ذهبية للحدود والتفاصيل */
  --text-main:        #2b1a12;
  --radius-lg:        18px;
  --radius-md:        12px;
  --shadow-soft:      0 8px 24px rgba(84, 12, 38, 0.10);
  --shadow-hover:     0 14px 34px rgba(84, 12, 38, 0.18);
  --transition:       all .3s cubic-bezier(.25, .8, .35, 1);
}

body {
  font-family: 'Tajawal', sans-serif !important;
  background-color: var(--brand-cream-soft) !important;
  color: var(--text-main);
}

/* ---------- 2) الهيدر ---------- */
header,
.header,
.navbar,
.site-header {
  background: var(--brand-cream) !important;
  border-bottom: 1px solid rgba(84, 12, 38, 0.12) !important;
  box-shadow: 0 2px 14px rgba(84, 12, 38, 0.06);
}

header a,
.header a,
.navbar a,
.navbar .nav-link {
  color: var(--brand-wine) !important;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
}

/* خط سفلي أنيق عند المرور على روابط القائمة */
.navbar .nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--brand-gold);
  transition: width .3s ease;
}
.navbar .nav-link:hover::after { width: 100%; }
.navbar .nav-link:hover { color: var(--brand-wine-dark) !important; }

/* أيقونات السلة والحساب */
.header-icons svg,
.cart-icon,
.header .icon {
  color: var(--brand-wine) !important;
  fill: var(--brand-wine) !important;
}

/* عدّاد السلة */
.cart-count,
.cart-badge,
.badge {
  background: var(--brand-wine) !important;
  color: var(--brand-cream) !important;
  font-weight: 700;
}

/* ---------- 3) الأزرار ---------- */
.btn,
button[type="submit"],
.btn-primary,
.add-to-cart,
.product-card .btn,
a.button {
  background: var(--brand-wine) !important;
  color: #fff !important;
  border: 1px solid var(--brand-wine) !important;
  border-radius: var(--radius-md) !important;
  font-weight: 700;
  letter-spacing: .3px;
  padding: 10px 22px;
  transition: var(--transition) !important;
}

.btn:hover,
button[type="submit"]:hover,
.btn-primary:hover,
.add-to-cart:hover,
a.button:hover {
  background: var(--brand-wine-dark) !important;
  border-color: var(--brand-gold) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* زر ثانوي (مثل عرض المزيد) */
.btn-outline,
.btn-secondary {
  background: transparent !important;
  color: var(--brand-wine) !important;
  border: 1.5px solid var(--brand-wine) !important;
  border-radius: var(--radius-md) !important;
  transition: var(--transition) !important;
}
.btn-outline:hover,
.btn-secondary:hover {
  background: var(--brand-wine) !important;
  color: var(--brand-cream) !important;
}

/* ---------- 4) العناوين ---------- */
h1, h2, h3,
.section-title,
.category-title {
  color: var(--brand-wine) !important;
  font-weight: 800;
}

/* زخرفة أسفل عناوين الأقسام */
.section-title {
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 50%;
  transform: translateX(50%);
  width: 56px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--brand-gold), var(--brand-wine));
}

/* ---------- 5) كروت المنتجات ---------- */
.product-card,
.card,
.product-item {
  background: #fff !important;
  border: 1px solid rgba(84, 12, 38, 0.08) !important;
  border-radius: var(--radius-lg) !important;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: var(--transition) !important;
}

.product-card:hover,
.card:hover,
.product-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--brand-gold) !important;
}

/* صورة المنتج: تكبير ناعم عند المرور */
.product-card img,
.product-item img {
  transition: transform .5s ease;
}
.product-card:hover img,
.product-item:hover img {
  transform: scale(1.05);
}

/* اسم المنتج والسعر */
.product-card .product-title,
.product-title,
.product-name {
  color: var(--text-main) !important;
  font-weight: 700;
}
.product-price,
.price {
  color: var(--brand-wine) !important;
  font-weight: 800;
  font-size: 1.05rem;
}
.price-before,
.old-price,
del {
  color: #a08b7a !important;
  font-weight: 400;
}

/* شارة الخصم */
.discount-badge,
.sale-badge {
  background: var(--brand-gold) !important;
  color: var(--brand-wine-dark) !important;
  font-weight: 700;
  border-radius: 8px;
}

/* ---------- 6) البنرات والسلايدر ---------- */
.banner,
.hero,
.slider,
.carousel-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.banner img,
.carousel-item img {
  transition: transform 6s ease;
}
.banner:hover img { transform: scale(1.03); }

/* نقاط السلايدر */
.carousel-indicators [data-bs-target],
.slider-dots button {
  background-color: var(--brand-wine) !important;
  opacity: .35;
}
.carousel-indicators .active,
.slider-dots .active {
  opacity: 1;
  background-color: var(--brand-wine) !important;
}

/* ---------- 7) قسم "منتج مميز" (يستخدم مع كود HTML المرفق) ---------- */
.featured-product {
  display: flex;
  align-items: center;
  gap: 40px;
  background: linear-gradient(135deg, var(--brand-cream) 0%, var(--brand-cream-soft) 100%);
  border: 1px solid var(--brand-gold);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin: 48px auto;
  max-width: 1100px;
  box-shadow: var(--shadow-soft);
}

.featured-product__img {
  flex: 0 0 42%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.featured-product__img img {
  width: 100%;
  display: block;
  transition: transform .6s ease;
}
.featured-product:hover .featured-product__img img { transform: scale(1.06); }

.featured-product__body { flex: 1; }

.featured-product__label {
  display: inline-block;
  background: var(--brand-wine);
  color: var(--brand-cream);
  font-size: .8rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 30px;
  margin-bottom: 14px;
}

.featured-product__title {
  color: var(--brand-wine);
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0 0 10px;
}

.featured-product__desc {
  color: #5c4536;
  line-height: 1.8;
  margin-bottom: 18px;
}

.featured-product__price {
  color: var(--brand-wine);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 22px;
}

.featured-product__btn {
  display: inline-block;
  background: var(--brand-wine);
  color: #fff !important;
  padding: 13px 34px;
  border-radius: var(--radius-md);
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
}
.featured-product__btn:hover {
  background: var(--brand-wine-dark);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

/* ---------- 8) الفوتر ---------- */
footer,
.footer,
.site-footer {
  background: var(--brand-wine) !important;
  color: var(--brand-cream) !important;
  border-top: 3px solid var(--brand-gold);
}

footer a,
.footer a {
  color: var(--brand-cream) !important;
  opacity: .85;
  transition: var(--transition);
}
footer a:hover,
.footer a:hover {
  opacity: 1;
  color: var(--brand-gold) !important;
}

footer h4, footer h5, footer .footer-title {
  color: #fff !important;
  font-weight: 700;
}

/* أيقونات التواصل في الفوتر */
footer .social a,
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--brand-gold);
  transition: var(--transition);
}
footer .social a:hover,
.footer-social a:hover {
  background: var(--brand-gold);
  transform: translateY(-3px);
}

/* ---------- 9) عناصر عامة ---------- */
input, select, textarea {
  border-radius: var(--radius-md) !important;
  border: 1px solid rgba(84, 12, 38, 0.2) !important;
  transition: var(--transition);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand-wine) !important;
  box-shadow: 0 0 0 3px var(--brand-wine-soft) !important;
  outline: none;
}

::selection {
  background: var(--brand-wine);
  color: var(--brand-cream);
}

/* شريط التمرير */
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: var(--brand-cream-soft); }
::-webkit-scrollbar-thumb {
  background: var(--brand-wine);
  border-radius: 10px;
}

/* زر العودة للأعلى (يعمل مع كود الجافاسكربت) */
#backToTop {
  position: fixed;
  bottom: 24px;
  left: 24px;               /* يسار لأن المتجر RTL */
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--brand-wine);
  color: var(--brand-cream);
  border: 1px solid var(--brand-gold);
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: var(--transition);
  z-index: 999;
  box-shadow: var(--shadow-soft);
}
#backToTop.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
#backToTop:hover {
  background: var(--brand-wine-dark);
  transform: translateY(-3px);
}

/* حركة الظهور عند التمرير (تعمل مع الجافاسكربت) */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* احترام تفضيل تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 10) التوافق مع الجوال (Responsive) ---------- */
@media (max-width: 991px) {
  .featured-product {
    flex-direction: column;
    padding: 26px;
    gap: 24px;
  }
  .featured-product__img { flex: 0 0 auto; width: 100%; }
  .featured-product__title { font-size: 1.4rem; }
}

@media (max-width: 576px) {
  .btn, .add-to-cart { padding: 9px 16px; font-size: .9rem; }
  .section-title { font-size: 1.3rem; }
  #backToTop { width: 42px; height: 42px; bottom: 18px; left: 18px; }
  .product-card:hover { transform: none; } /* تعطيل الرفع على اللمس */
}