/* ==========================================================================
   1. المتغيرات والأساسيات (CSS Variables & Base Rules)
   ========================================================================== */
:root {
  --brand-gold: #B49A62;
  --brand-gold-dark: #967F4E;
  --brand-beige: #A59686;
  --brand-dark: #2B2927; 
  --brand-light: #FCFBF9;
  --white: #FFFFFF;
  --font-family-arabic: "IBM Plex Sans Arabic", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* تطبيق الخط العام والتنظيف */
body, 
button, 
input, 
textarea, 
select, 
header, 
footer, 
.site-header, 
.top-header, 
.main-menu, 
h1, h2, h3, h4, h5, h6, 
a {
  font-family: var(--font-family-arabic) !important;
}

body {
  background-color: var(--brand-light);
  color: var(--brand-dark);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--brand-dark);
  font-weight: 600;
}

a {
  transition: color 0.3s ease;
  text-decoration: none;
}

a:hover {
  color: var(--brand-gold);
}

/* ==========================================================================
   2. الهيدر والقائمة الرئيسية (Header & Navigation)
   ========================================================================== */
header,
.site-header,
.top-header {
  background-color: var(--white);
}

header a,
.site-header a,
.main-menu a {
  transition: color 0.3s ease;
}

header a:hover,
.site-header a:hover,
.main-menu a:hover {
  color: var(--brand-gold);
}

.nav-tabs .nav-link.active {
  color: var(--brand-gold);
  border-color: var(--brand-gold);
}

/* ==========================================================================
   3. الأزرار وحقول المدخلات (Buttons & Inputs)
   ========================================================================== */
.btn-primary,
.s-button-element,
button[type="submit"] {
  background-color: var(--brand-gold);
  border: 1px solid var(--brand-gold);
  color: var(--white);
  border-radius: 6px;
  font-weight: 600;
  padding: 8px 16px;
  transition: all 0.3s ease;
}

.btn-primary:hover,
.s-button-element:hover,
button[type="submit"]:hover {
  background-color: var(--brand-gold-dark);
  border-color: var(--brand-gold-dark);
  color: var(--white);
}

.btn-secondary {
  background-color: transparent;
  border: 1px solid var(--brand-gold);
  color: var(--brand-gold);
  border-radius: 6px;
  padding: 8px 16px;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background-color: var(--brand-gold);
  color: var(--white);
}

/* حقول الإدخال */
input, textarea, select {
  border-radius: 6px;
  border: 1px solid rgba(165, 150, 134, 0.4);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--brand-gold);
  outline: none;
  box-shadow: 0 0 0 3px rgba(180, 154, 98, 0.15);
}

/* ==========================================================================
   4. كروت المنتجات والسلة (Products & Cart)
   ========================================================================== */
.s-product-card {
  background-color: var(--white);
  border: 1px solid rgba(165, 150, 134, 0.25);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.s-product-card:hover {
  border-color: var(--brand-gold);
  box-shadow: 0 8px 24px rgba(23, 22, 21, 0.08);
}

.s-product-card img {
  transition: transform 0.4s ease;
}

.s-product-card:hover img {
  transform: scale(1.03);
}

.s-product-card-title {
  color: var(--brand-dark);
  font-weight: 600;
}

.s-product-card-price {
  color: var(--brand-gold);
  font-weight: 700;
}

.s-product-card-sale,
.s-product-card-badge {
  background-color: var(--brand-gold);
  color: var(--white);
  border-radius: 4px;
}

/* أيقونات وشارات السلة */
.sicon-cart,
.cart-icon {
  color: var(--brand-gold);
}

.cart-badge,
.badge-count {
  background-color: var(--brand-gold);
  color: var(--white);
  border-radius: 50%;
}

/* ==========================================================================
   5. الفوتر (Footer)
   ========================================================================== */
footer,
.site-footer,
.footer-main {
  background-color: var(--brand-dark);
  color: var(--brand-beige);
  border-top: 2px solid var(--brand-gold);
}

footer h1, footer h2, footer h3, footer h4, footer h5, footer h6,
footer .footer-title,
footer .store-title,
footer .brand-name,
footer p.h1,
footer p.h2 {
  color: var(--brand-gold);
  font-weight: 700;
}

footer a,
footer .footer-links a,
footer .footer-text,
footer p,
footer .tax-info,
footer .cr-number,
footer .vat-number {
  color: var(--brand-beige);
}

footer a:hover,
footer .footer-links a:hover {
  color: var(--brand-gold);
}

footer .social-icons a,
footer .contact-info,
footer .footer-icon,
footer svg {
  color: var(--brand-gold);
  fill: var(--brand-gold);
}

/* ==========================================================================
   6. شريط التمرير (Custom Scrollbar)
   ========================================================================== */
::-webkit-scrollbar {
  width: 7px;
}

::-webkit-scrollbar-track {
  background: var(--brand-light);
}

::-webkit-scrollbar-thumb {
  background: var(--brand-gold);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brand-gold-dark);
}

/* ==========================================================================
   7. تجاوب الأحجام لجميع الشاشات (Responsive Design)
   ========================================================================== */

/* الشاشات الصغيرة (الجوال) */
@media (max-width: 767px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.3rem; }
  h3 { font-size: 1.1rem; }
  
  .btn-primary, .btn-secondary, .s-button-element {
    padding: 10px 14px;
    font-size: 14px;
  }
  
  .s-product-card {
    border-radius: 8px;
  }
}

/* الشاشات المتوسطة (الآيباد والتابلت) */
@media (min-width: 768px) and (max-width: 1024px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
}

/* الشاشات الكبيرة (الكمبيوتر) */
@media (min-width: 1025px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }
}