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

/* ==========================================
   DESIGN VARIABLES & SYSTEM
   ========================================== */
:root {
  /* Color Palette */
  --color-primary: #0F0E0D; /* Slightly softer premium deep charcoal black */
  --color-white: #FCFCFA; /* Pure minimalist off-white */
  --color-bg: #F9F8F6; /* Minimalist clean warm linen background */
  --color-card: #FCFCFA;
  --color-border: #EAE8E3; /* Slightly cleaner border tint */
  --color-accent: #D01030; /* Premium Cherry crimson red */
  --color-success: #20C997; /* Emerald mint green */
  --color-text-gray: #55524E; /* Warmer readable gray */
  --color-text-light: #9A958F; /* Warmer light gray */
  
  /* Typography */
  --font-family: 'Cairo', sans-serif;
  --font-heading: 'Cairo', sans-serif;
  
  /* Border Radius */
  --radius-sm: 6px; /* Slightly tighter, high-end border radius */
  --radius-md: 12px;
  --radius-lg: 20px;
  
  /* Shadows */
  --shadow-sm: 0 4px 12px rgba(15,14,13,0.03);
  --shadow-md: 0 12px 36px rgba(15,14,13,0.06);
  --shadow-lg: 0 32px 72px rgba(15,14,13,0.1);
  
  /* Transitions */
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); /* Modern ultra-smooth transition */
  --transition-slow: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  
  /* Layout */
  --header-height: 80px;
}

/* ==========================================
   RESET & SYSTEM BASICS
   ========================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

button {
  cursor: pointer;
}

ul, ol {
  list-style: none;
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.2;
}

.text-uppercase {
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.text-center {
  text-align: center;
}

.section-title-wrapper {
  margin-bottom: 3.5rem;
  text-align: center;
}

.section-subtitle {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
  display: block;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--color-primary);
  position: relative;
}

@media (max-width: 768px) {
  .section-title {
    font-size: 1.8rem;
  }
}

/* ==========================================
   LAYOUT UTILITIES
   ========================================== */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (max-width: 768px) {
  .container {
    padding: 0 1.25rem;
  }
}

.section-padding {
  padding: 6.25rem 0;
}

@media (max-width: 768px) {
  .section-padding {
    padding: 4rem 0;
  }
}

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-column { flex-direction: column; }

/* ==========================================
   BUTTONS & UI ELEMENTS
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  border-radius: 0;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  z-index: 1;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: var(--color-accent);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

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

.btn-accent {
  background-color: var(--color-accent);
  color: var(--color-white);
}

.btn-accent:hover {
  background-color: var(--color-primary);
}

/* Ripple effect styles */
.ripple-btn {
  position: relative;
  overflow: hidden;
}

.ripple-span {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: scale(0);
  animation: ripple-effect 0.6s linear;
  pointer-events: none;
}

.btn-secondary .ripple-span {
  background: rgba(0, 0, 0, 0.15);
}

@keyframes ripple-effect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ==========================================
   SKELETON SHIMMER LOADER
   ========================================== */
.skeleton {
  background-color: #f0f0f0;
  background-image: linear-gradient(
    90deg,
    #f0f0f0 25%,
    #f7f7f7 50%,
    #f0f0f0 75%
  );
  background-size: 200% 100%;
  animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ==========================================
   ANIMATIONS (Intersection Observer)
   ========================================== */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Delay modifiers for stagger effects */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* Elegant custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(15, 14, 13, 0.15);
  border-radius: 100px;
  border: 2px solid var(--color-bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent);
}

/* ==========================================
   RTL — RIGHT TO LEFT ARABIC SUPPORT
   ========================================== */
[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}

/* Flip hero label line before text */
[dir="rtl"] .hero-label::before {
  margin-right: 0;
  margin-left: 0.75rem;
  order: 1;
}

/* Flip section subtitle line */
[dir="rtl"] .section-subtitle {
  direction: rtl;
}

/* Flip nav link underline from left to right */
[dir="rtl"] .nav-link::after {
  right: 0;
  left: auto;
}

/* Footer links hover indent */
[dir="rtl"] .footer-links a:hover {
  padding-left: 0;
  padding-right: 4px;
}

/* Cart badge position flip */
[dir="rtl"] .cart-badge {
  right: auto;
  left: -2px;
}

/* Swapped icon position in nav actions */
[dir="rtl"] .nav-actions {
  flex-direction: row-reverse;
}

/* Search icon position RTL */
[dir="rtl"] .shop-search-wrapper .shop-search-icon {
  left: auto;
  right: 1rem;
}

[dir="rtl"] .shop-search-input {
  padding-left: 1rem;
  padding-right: 2.75rem;
}

/* Sort select arrow flip */
[dir="rtl"] .shop-sort-select {
  padding-right: 0.9rem;
  padding-left: 2rem;
  background-position: left 0.75rem center;
}

/* Filter sidebar on left in RTL */
[dir="rtl"] .shop-layout {
  direction: rtl;
}

/* Active filter tag close button */
[dir="rtl"] .active-filter-tag {
  flex-direction: row-reverse;
}

/* Breadcrumb list RTL */
[dir="rtl"] .breadcrumb-list {
  flex-direction: row-reverse;
}

/* Newsletter input arrow flip */
[dir="rtl"] .newsletter-btn {
  padding-left: 0;
  padding-right: 1rem;
}

/* Product gallery thumbnails right-to-left */
[dir="rtl"] .product-gallery {
  direction: rtl;
}

/* Gallery prev/next swap */
[dir="rtl"] .gallery-prev-btn {
  left: auto;
  right: 1rem;
}

[dir="rtl"] .gallery-next-btn {
  right: auto;
  left: 1rem;
}

/* Cart drawer from left in RTL */
[dir="rtl"] .cart-drawer {
  right: auto;
  left: -450px;
}

[dir="rtl"] .cart-drawer.open {
  left: 0;
  right: auto;
}

/* Mobile nav menu from left in RTL */
@media (max-width: 992px) {
  [dir="rtl"] .nav-menu {
    right: auto;
    left: -100%;
  }
  [dir="rtl"] .nav-menu.open {
    left: 0;
    right: auto;
  }
}

/* Filter mobile drawer from right in RTL */
[dir="rtl"] .filter-drawer {
  left: auto;
  right: -320px;
}
[dir="rtl"] .filter-drawer.open {
  right: 0;
  left: auto;
}

/* Hero product card float from right side */
[dir="rtl"] .hero-visual {
  direction: ltr; /* keep absolute positioning correct */
}

/* About split grid visual order fix */
[dir="rtl"] .about-split {
  direction: rtl;
}

/* Font size boost for Arabic readability */
[dir="rtl"] body {
  font-size: 16.5px;
  line-height: 1.8;
}

[dir="rtl"] .btn {
  letter-spacing: 0;
}

[dir="rtl"] .section-subtitle,
[dir="rtl"] .hero-label,
[dir="rtl"] .nav-link,
[dir="rtl"] .feature-title,
[dir="rtl"] .product-card-category,
[dir="rtl"] .filter-group-toggle,
[dir="rtl"] .footer-heading {
  letter-spacing: 0;
}
