/* =========================================
   Custom CSS for LMSAH Store
   Premium UI/UX with Dark Mode Support
   ========================================= */

:root {
  /* --- 1. ألوان الهوية الأساسية (ثابتة لا تتغير) --- */
  --brand-primary: #2E4031;    /* أخضر غامق */
  --brand-secondary: #558B2F;  /* أخضر متوسط */
  --brand-accent: #AED581;     /* أخضر فاتح */
  
  /* --- 2. ألوان الوضع النهاري (Light Mode) --- */
  --bg-main: #F8F9FA;          /* خلفية المتجر */
  --bg-card: #FFFFFF;          /* خلفية بطاقات المنتجات */
  --bg-surface: #DCEDC8;       /* خلفية مميزات المتجر وأسفل الفوتر */
  --text-main: #2E4031;        /* لون النصوص الأساسية (عناوين) */
  --text-muted: #558B2F;       /* لون النصوص الفرعية (وصف) */
  --border-color: #AED581;     /* لون الإطارات */
  
  /* إعدادات الحركة */
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --- 3. ألوان الوضع الليلي (Dark Mode) --- */
/* هذه الأسطر تجعل المتجر يتكيف تلقائياً مع الوضع الليلي في منصة سلة */
.dark, .s-dark, html[class*="dark"], body.dark {
  --bg-main: #121212;          /* خلفية المتجر في الليل (أسود) */
  --bg-card: #1E231F;          /* خلفية بطاقات المنتجات (رمادي مخضر داكن) */
  --bg-surface: #19211B;       /* خلفية مميزات المتجر (داكنة جداً) */
  --text-main: #E8F5E9;        /* لون النصوص الأساسية (أبيض مخضر مريح للعين) */
  --text-muted: #AED581;       /* لون النصوص الفرعية (أخضر فاتح) */
  --border-color: #2E4031;     /* لون الإطارات في الليل */
}

/* --- General Body & Background --- */
body {
  background: url('https://i.postimg.cc/52sZ6kGh/666666666.png') repeat;
  background-color: var(--bg-main); 
  color: var(--text-main);
  transition: background-color 0.3s, color 0.3s;
}

/* --- Navbar & Header --- */
.navbar-brand {
  width: 100px;
  max-width: 100%;
  display: inline-block;
}

.navbar-brand img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.bg-inherit {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary)) !important;
}

/* --- Add to Cart Button --- */
.s-button-btn {
  color: var(--text-main);
  background-color: transparent;
  border: 1.5px solid var(--brand-secondary);
  border-radius: 8px;
  transition: var(--transition-smooth);
}

.s-button-btn:hover {
  color: #FFFFFF;
  background-color: var(--brand-secondary);
  border-color: var(--brand-secondary);
  box-shadow: 0 4px 10px rgba(85, 139, 47, 0.3);
}

/* --- Banners --- */
.s-block--banners > div:not(.s-block__title):has(.square-photos) {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

a.banner-entry.square-photos {
  flex: 1 1 calc(25% - 15px);
  min-width: 160px;
  height: auto !important;
  position: relative !important;
  padding: 0 !important;
  aspect-ratio: 2/1.13;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  transition: var(--transition-smooth);
}

a.banner-entry.square-photos:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

a.banner-entry.square-photos .lazy__bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* --- Product Card --- */
.s-product-card-vertical {
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  border-radius: 12px;
  transition: var(--transition-smooth);
  overflow: hidden;
}

.s-product-card-vertical:hover {
  border-color: var(--brand-secondary);
  box-shadow: 0 12px 24px rgba(85, 139, 47, 0.15);
  transform: translateY(-4px);
}

.s-product-card-vertical .s-product-card-image img {
  transition: transform 0.6s ease;
}

.s-product-card-vertical:hover .s-product-card-image img {
  transform: scale(1.08);
}

/* --- Store Features Icons --- */
.s-block--features__item {
  background-color: var(--bg-surface);
  border-radius: 12px;
  padding: 20px;
  transition: var(--transition-smooth);
}

.s-block--features__item:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.s-block--features__item .feature-icon {
  background-color: var(--brand-secondary);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
}

.s-block--features__item .feature-icon i {
  color: #FFFFFF;
  font-size: 24px;
}

.s-block--features__item h2 {
  color: var(--text-main);
  font-weight: bold;
}

.s-block--features__item p {
  color: var(--text-muted);
}

/* --- Footer --- */
.store-footer {
  text-align: center;
}

.store-footer__inner {
  background-color: var(--brand-primary) !important;
  padding-bottom: 2rem;
}

/* فوتر الحقوق السفلي */
.store-footer > div:not(.store-footer__inner) {
  background-color: var(--bg-surface);
  color: var(--text-main);
  padding: 15px 0;
}

.store-footer > div:not(.store-footer__inner) p,
.store-footer > div:not(.store-footer__inner) a {
  color: var(--text-main);
  font-weight: 500;
}

.store-footer h3 {
  color: #FFFFFF;
  margin-bottom: 15px;
}

footer a {
  color: var(--brand-accent);
  transition: var(--transition-smooth);
  text-decoration: none;
}

footer a:hover {
  color: #FFFFFF;
  padding-inline-start: 6px;
}

.store-footer__inner > div > div:first-of-type p {
  color: #DCEDC8; /* لون ثابت يناسب خلفية الفوتر الداكنة */
  line-height: 1.7;
}

/* --- Footer Logo --- */
.store-footer__inner > div > div:first-of-type {
  position: relative;
  padding-top: 6rem;
}

.store-footer__inner > div > div:first-of-type::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  height: 60px;
  width: 180px;
  background: url('') no-repeat center;
  background-size: contain;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
  a.banner-entry.square-photos {
    flex: 1 1 calc(50% - 15px);
  }
}