/* ============================================================
   TIENS Morocco - Design System
   Brand Color: #137D52 (Green)
   Fonts loaded via optimized preconnected <link> in HTML for 0 render blocking
   ============================================================ */

/* ---- CSS Variables ---- */
:root {
  --primary: #137D52;
  --primary-dark: #0e5e3e;
  --primary-light: #1a9e68;
  --primary-glow: rgba(19, 125, 82, 0.15);
  --primary-gradient: linear-gradient(135deg, #137D52, #1a9e68);
  --secondary: #0D1B2A;
  --accent: #E8C547;
  --bg: #FAFBFC;
  --bg-card: #FFFFFF;
  --bg-dark: #0D1B2A;
  --text: #1a1a2e;
  --text-secondary: #5a5a7a;
  --text-light: #8a8aaa;
  --text-on-primary: #FFFFFF;
  --border: #e8e8f0;
  --border-light: #f0f0f5;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
  --shadow-glow: 0 0 30px rgba(19, 125, 82, 0.2);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-ar: 'Cairo', sans-serif;
  --font-fr: 'Inter', sans-serif;
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-ar);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
  direction: rtl;
  text-align: right;
}

body[dir="ltr"] {
  direction: ltr;
  text-align: left;
  font-family: var(--font-fr);
}

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

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
  transition: var(--transition);
}

input, textarea, select {
  font-family: inherit;
  outline: none;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.95rem;
  transition: var(--transition);
  width: 100%;
  background: var(--bg-card);
  color: var(--text);
}

input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title h2 {
  color: var(--text);
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--primary-gradient);
  border-radius: 2px;
}

.section-title p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 16px auto 0;
}

/* ---- Navigation ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
  padding: 0 24px;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-sm);
}

.nav-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo svg {
  height: 36px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg);
  border-radius: 50px;
  padding: 4px;
  border: 1px solid var(--border);
}

.lang-toggle button {
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  background: transparent;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.lang-toggle button.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(19, 125, 82, 0.3);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  padding: 8px;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
  border-radius: 2px;
}

/* ---- Hero Section ---- */
/* ---- Fullscreen Background Hero Slider ---- */
.hero-fullscreen {
  position: relative;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding-top: 72px;
  background: var(--secondary);
}

.hero-bg-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
}

.hero-bg-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), transform 7s ease-out;
  transform: scale(1.08);
  display: flex;
  align-items: center;
}

.hero-bg-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  z-index: 2;
}

.hero-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(13, 27, 42, 0.88) 0%,
    rgba(13, 27, 42, 0.75) 45%,
    rgba(19, 125, 82, 0.5) 100%
  );
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 1;
}

.hero-slide-inner {
  position: relative;
  z-index: 3;
  width: 100%;
  padding-top: 40px;
  padding-bottom: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-text-content {
  max-width: 1050px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeInUp 0.8s ease-out;
  color: white;
}

.hero-text-content .hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(19, 125, 82, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 22px;
  border-radius: 50px;
  margin: 0 auto 24px auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.hero-text-content h1 {
  color: #ffffff;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 20px;
  text-shadow: 0 4px 25px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.hero-text-content h1 span.text-glow {
  color: #4ade80;
  text-shadow: 0 0 35px rgba(74, 222, 128, 0.6);
}

.hero-text-content p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.15rem;
  line-height: 1.85;
  margin-bottom: 36px;
  max-width: 1000px;
  width: 100%;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.btn-white {
  background: #ffffff;
  color: var(--secondary);
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.btn-white:hover {
  background: #f0fdf4;
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn-outline-white {
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.8);
  color: #ffffff;
  font-weight: 600;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-outline-white:hover {
  background: #ffffff;
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

/* Nav Arrows */
.hero-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: white;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.hero-nav-arrow:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-50%) scale(1.12);
  box-shadow: 0 0 25px rgba(19, 125, 82, 0.7);
}

.hero-nav-arrow.prev {
  left: 24px;
}

.hero-nav-arrow.next {
  right: 24px;
}

/* Pagination Dots */
.hero-pagination-dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.hero-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-dot.active {
  width: 38px;
  border-radius: 20px;
  background: var(--primary-light);
  border-color: #4ade80;
  box-shadow: 0 0 15px rgba(74, 222, 128, 0.6);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-xl);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 4px 16px rgba(19, 125, 82, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(19, 125, 82, 0.4);
}

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

.btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

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

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 16px 40px;
  font-size: 1.05rem;
}

/* ---- About Section ---- */
.about {
  padding: 100px 0;
  background: white;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 36px;
}

.stat-card {
  text-align: center;
  padding: 20px 12px;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--border-light);
}

.stat-card .number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
}

.stat-card .label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.about-image {
  position: relative;
}

.about-image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.about-image::before {
  content: '';
  position: absolute;
  top: -15px;
  right: -15px;
  width: 100%;
  height: 100%;
  border: 3px solid var(--primary);
  border-radius: var(--radius-lg);
  opacity: 0.2;
  z-index: -1;
  pointer-events: none;
}

@media (max-width: 768px) {
  .about-image::before {
    display: none;
  }
}

/* ---- Values Section ---- */
.values {
  padding: 80px 0;
  background: var(--bg);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.value-card {
  background: white;
  padding: 32px 24px;
  border-radius: var(--radius-md);
  text-align: center;
  border: 1px solid var(--border-light);
  transition: var(--transition);
}

.value-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.value-card .icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.5rem;
}

.value-card h4 {
  color: var(--text);
  margin-bottom: 8px;
}

.value-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ---- Products/Catalog Section ---- */
.catalog {
  padding: 100px 0;
  background: white;
}

.catalog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 48px;
  flex-wrap: wrap;
  gap: 20px;
}

.price-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.price-toggle-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.price-toggle-label.active-label {
  color: var(--primary);
  font-weight: 700;
}

.price-toggle {
  position: relative;
  width: 56px;
  height: 30px;
  background: var(--border);
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.price-toggle.active {
  background: var(--primary);
}

.price-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  width: 24px;
  height: 24px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* LTR (French): starts on left (Customer), moves right (Partner) */
body[dir="ltr"] .price-toggle::after {
  left: 3px;
  right: auto;
  transform: translateX(0);
}

body[dir="ltr"] .price-toggle.active::after {
  transform: translateX(26px);
}

/* RTL (Arabic): starts on right (Customer), moves left (Partner) */
body[dir="rtl"] .price-toggle::after {
  right: 3px;
  left: auto;
  transform: translateX(0);
}

body[dir="rtl"] .price-toggle.active::after {
  transform: translateX(-26px);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}

.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
  transition: var(--transition);
  position: relative;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(19, 125, 82, 0.2);
}

.product-card-image {
  position: relative;
  overflow: hidden;
  height: 280px;
  background: #f8f9fa;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-card-image img {
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--primary);
  color: white;
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 2;
}

body[dir="ltr"] .product-badge {
  right: auto;
  left: 16px;
}

.product-card-body {
  padding: 24px;
}

.product-card-body h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--text);
  line-height: 1.4;
}

.product-card-body .product-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.product-price {
  display: flex;
  flex-direction: column;
}

.product-price .price-current {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
}

.product-price .price-original {
  font-size: 0.85rem;
  color: var(--text-light);
  text-decoration: line-through;
  display: none;
}

.product-price .price-original.show {
  display: block;
}

.product-card .btn-sm {
  white-space: nowrap;
}

/* ---- Product Landing Page ---- */
.product-hero {
  padding: 120px 0 60px;
  background: linear-gradient(135deg, #f0faf5 0%, #ffffff 100%);
}

.product-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.product-gallery {
  position: sticky;
  top: 100px;
}

.product-gallery-main {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
  background: #f8f9fa;
  aspect-ratio: 1;
}

.product-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.product-gallery-thumbs {
  display: flex;
  gap: 12px;
}

.product-gallery-thumbs img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  opacity: 0.6;
}

.product-gallery-thumbs img.active,
.product-gallery-thumbs img:hover {
  border-color: var(--primary);
  opacity: 1;
}

.product-info {
  padding: 16px 0;
}

.product-info .product-category {
  display: inline-block;
  background: var(--primary-glow);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.product-info h1 {
  font-size: 2rem;
  margin-bottom: 16px;
  color: var(--text);
}

.product-info .product-price-large {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 24px;
}

.product-info .product-price-large .original {
  font-size: 1.2rem;
  color: var(--text-light);
  text-decoration: line-through;
  margin-right: 12px;
  display: none;
}

.product-info .product-price-large .original.show {
  display: inline;
}

.product-info .product-price-large .discount-badge {
  font-size: 0.8rem;
  background: #fee2e2;
  color: #dc2626;
  padding: 4px 12px;
  border-radius: 50px;
  display: none;
  vertical-align: middle;
}

.product-info .product-price-large .discount-badge.show {
  display: inline;
}

.product-description {
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 32px;
}

.product-features {
  margin-bottom: 32px;
}

.product-features h3 {
  margin-bottom: 16px;
  color: var(--text);
  font-size: 1.1rem;
}

.product-features ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.product-features li::before {
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-glow);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
}

/* Product Order Form */
.product-order-form {
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 28px;
  border: 1px solid var(--border);
}

.product-order-form h3 {
  margin-bottom: 20px;
  color: var(--text);
  font-size: 1.1rem;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-group .required {
  color: #dc2626;
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quantity-selector button {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 1.2rem;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-selector button:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.quantity-selector input {
  width: 60px;
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.form-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-top: 2px solid var(--border);
  margin-top: 16px;
  margin-bottom: 16px;
}

.form-total .total-label {
  font-weight: 600;
  color: var(--text);
}

.form-total .total-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

/* ---- Partners Page ---- */
.partners-hero {
  padding: 140px 0 80px;
  background: linear-gradient(135deg, var(--secondary) 0%, #1a3a5c 100%);
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.partners-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23137D52' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.partners-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 16px;
  position: relative;
}

.partners-hero p {
  font-size: 1.15rem;
  opacity: 0.85;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.steps-section {
  padding: 80px 0;
  background: white;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  counter-reset: step;
}

.step-card {
  text-align: center;
  padding: 36px 24px;
  position: relative;
  counter-increment: step;
}

.step-card::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: white;
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0 auto 20px;
  box-shadow: 0 4px 16px rgba(19, 125, 82, 0.3);
}

.step-card h4 {
  margin-bottom: 8px;
  color: var(--text);
}

.step-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.benefits-section {
  padding: 80px 0;
  background: var(--bg);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.benefit-card {
  background: white;
  padding: 36px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  transition: var(--transition);
}

.benefit-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.benefit-card .benefit-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.benefit-card h4 {
  margin-bottom: 8px;
  color: var(--text);
}

.benefit-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ---- Distributor Pricing Table Section ---- */
.distributor-pricing-section {
  padding: 80px 0;
  background: var(--bg);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.pricing-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(19, 125, 82, 0.1);
  color: var(--primary);
  border: 1px solid rgba(19, 125, 82, 0.25);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 18px;
  border-radius: 50px;
  margin-bottom: 16px;
}

.pricing-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}

.pricing-metric-card {
  background: white;
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}

.pricing-metric-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(19, 125, 82, 0.3);
}

.pricing-metric-card .metric-icon {
  font-size: 2rem;
  background: var(--bg);
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pricing-metric-card .metric-info {
  display: flex;
  flex-direction: column;
}

.pricing-metric-card .metric-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.pricing-metric-card .metric-value {
  font-size: 1.05rem;
  color: var(--secondary);
  font-weight: 800;
  margin-top: 2px;
}

.distributor-table-wrapper {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-bottom: 36px;
}

.table-responsive-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.distributor-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: right;
  font-size: 0.95rem;
}

body[dir="ltr"] .distributor-table {
  text-align: left;
}

.distributor-table thead th {
  background: linear-gradient(135deg, #0d1b2a 0%, #1a3048 100%);
  color: #ffffff;
  padding: 16px 18px;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  letter-spacing: 0.3px;
  border: none;
}

.distributor-table tbody tr {
  transition: background-color 0.2s ease;
  border-bottom: 1px solid var(--border-light);
}

.distributor-table tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

.distributor-table tbody tr:hover {
  background-color: #f0fdf4;
}

.distributor-table tbody td {
  padding: 14px 18px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
  white-space: nowrap;
}

.distributor-table .td-num {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  width: 40px;
  text-align: center;
}

.distributor-table .td-product {
  font-weight: 700;
  color: var(--secondary);
}

.distributor-table .product-name-fr {
  display: block;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--secondary);
}

body[dir="rtl"] .distributor-table .product-name-fr {
  display: none;
}

.distributor-table .product-name-ar {
  display: block;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 2px;
}

body[dir="ltr"] .distributor-table .product-name-ar {
  display: none;
}

.price-tag-cost {
  font-weight: 700;
  color: #1e3a8a;
  background: #eff6ff;
  padding: 5px 10px;
  border-radius: 6px;
  display: inline-block;
  font-family: 'Inter', 'Cairo', sans-serif;
}

.price-tag-retail {
  font-weight: 700;
  color: var(--text);
  background: #f1f5f9;
  padding: 5px 10px;
  border-radius: 6px;
  display: inline-block;
  font-family: 'Inter', 'Cairo', sans-serif;
}

.badge-profit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #dcfce7;
  color: #15803d;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(22, 163, 74, 0.2);
  font-family: 'Inter', 'Cairo', sans-serif;
  font-size: 0.9rem;
}

.badge-bv {
  display: inline-block;
  background: #f3e8ff;
  color: #7e22ce;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  text-align: center;
  min-width: 50px;
  font-family: 'Inter', sans-serif;
}

.badge-pv {
  display: inline-block;
  background: #fef3c7;
  color: #b45309;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  text-align: center;
  min-width: 50px;
  font-family: 'Inter', sans-serif;
}

.pricing-explanation-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  border-right: 4px solid var(--primary);
  padding: 24px 28px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  box-shadow: var(--shadow-sm);
}

body[dir="ltr"] .pricing-explanation-card {
  border-right: 1px solid var(--border-light);
  border-left: 4px solid var(--primary);
}

.pricing-explanation-card .explanation-icon {
  font-size: 2rem;
  flex-shrink: 0;
  background: rgba(19, 125, 82, 0.1);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pricing-explanation-card h4 {
  color: var(--secondary);
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.pricing-explanation-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0;
}

.join-section {
  padding: 80px 0;
  background: white;
}

.join-form-container {
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg);
  padding: 40px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

/* ---- Footer ---- */
.footer {
  background: var(--secondary);
  color: rgba(255, 255, 255, 0.8);
  padding: 60px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  margin-top: 16px;
  font-size: 0.9rem;
  line-height: 1.7;
  opacity: 0.7;
}

.footer h4 {
  color: white;
  font-size: 1rem;
  margin-bottom: 20px;
  position: relative;
}

.footer h4::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--primary);
}

body[dir="ltr"] .footer h4::after {
  left: 0;
  right: auto;
}

body[dir="rtl"] .footer h4::after {
  right: 0;
  left: auto;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-size: 0.9rem;
  opacity: 0.7;
  transition: var(--transition);
}

.footer-links a:hover {
  opacity: 1;
  color: var(--primary-light);
  padding-inline-start: 4px;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-contact a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  opacity: 0.85;
  transition: var(--transition);
  color: rgba(255, 255, 255, 0.85);
}

.footer-contact a:hover {
  opacity: 1;
  color: #4ade80;
  transform: translateX(4px);
}

body[dir="rtl"] .footer-contact a:hover {
  transform: translateX(-4px);
}

.footer-contact a svg {
  color: #4ade80;
  flex-shrink: 0;
}

.phone-number {
  direction: ltr !important;
  unicode-bidi: isolate !important;
  display: inline-block;
  font-family: 'Inter', -apple-system, sans-serif;
  letter-spacing: 0.5px;
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.social-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.social-icon-btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.social-icon-btn:hover {
  transform: translateY(-4px);
  color: white;
}

.social-icon-btn:hover svg {
  transform: scale(1.15);
}

.social-icon-btn.facebook:hover {
  background: #1877F2;
  border-color: #1877F2;
  box-shadow: 0 6px 20px rgba(24, 119, 242, 0.4);
}

.social-icon-btn.instagram:hover {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
  border-color: #d6249f;
  box-shadow: 0 6px 20px rgba(214, 36, 159, 0.4);
}

.social-icon-btn.tiktok:hover {
  background: #000000;
  border-color: #fe2c55;
  box-shadow: 0 6px 20px rgba(254, 44, 85, 0.4);
}

.social-icon-btn.youtube:hover {
  background: #FF0000;
  border-color: #FF0000;
  box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.6;
}

/* ---- WhatsApp Floating Button ---- */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: var(--transition);
  animation: pulseWA 2s infinite;
}

body[dir="ltr"] .whatsapp-float {
  right: 24px;
  left: auto;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
  fill: white;
}

@keyframes pulseWA {
  0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.6), 0 0 0 10px rgba(37, 211, 102, 0.1); }
}

/* ---- Form Success/Error States ---- */
.form-message {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin-top: 16px;
  font-size: 0.9rem;
  font-weight: 500;
  display: none;
}

.form-message.success {
  display: block;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.form-message.error {
  display: block;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ---- Loading Spinner ---- */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- Animations ---- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ---- Responsive Media Queries & Mobile Optimization ---- */
@media (max-width: 1024px) {
  .container {
    padding: 0 20px;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .product-hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .product-gallery {
    position: static;
  }
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* Navigation */
  .navbar {
    padding: 0 16px;
  }
  .nav-content {
    height: 64px;
  }
  .nav-logo svg {
    height: 30px;
    max-width: 110px;
  }
  .nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    width: 100%;
    background: #ffffff;
    flex-direction: column;
    padding: 20px 24px 30px;
    gap: 14px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    border-bottom: 1px solid var(--border);
    z-index: 999;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links a {
    font-size: 1.05rem;
    padding: 10px 0;
    width: 100%;
    border-bottom: 1px solid var(--border-light);
  }
  .mobile-menu-btn {
    display: flex;
  }

  /* Hero Fullscreen on Tablet/Mobile */
  .hero-fullscreen {
    min-height: 85vh;
    min-height: 85svh;
    padding-top: 80px;
    padding-bottom: 60px;
  }
  .hero-bg-slide {
    transform: none !important;
  }
  .hero-slide-inner {
    padding-top: 20px;
    padding-bottom: 30px;
    text-align: center;
  }
  .hero-text-content {
    margin: 0 auto;
    text-align: center;
    max-width: 100%;
  }
  .hero-text-content .hero-badge {
    font-size: 0.8rem;
    padding: 6px 16px;
    margin-bottom: 16px;
    white-space: normal;
    text-align: center;
    line-height: 1.4;
  }
  .hero-text-content h1 {
    font-size: clamp(1.7rem, 6.5vw, 2.4rem);
    line-height: 1.3;
    margin-bottom: 14px;
  }
  .hero-text-content p {
    font-size: 0.98rem;
    line-height: 1.7;
    margin: 0 auto 24px;
    max-width: 100%;
  }
  .hero-buttons {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }
  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    font-size: 0.95rem;
  }
  .hero-nav-arrow {
    display: none !important; /* Hide overlay arrows on mobile to prevent clutter & overflow */
  }
  .hero-pagination-dots {
    bottom: 18px;
    gap: 8px;
  }
  .hero-dot {
    width: 10px;
    height: 10px;
  }
  .hero-dot.active {
    width: 28px;
  }

  /* Catalog & Products */
  .catalog {
    padding: 60px 0;
  }
  .catalog-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    margin-bottom: 32px;
  }
  .price-toggle-wrap {
    justify-content: center;
    width: 100%;
  }
  .products-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .product-card-image {
    height: 240px;
  }
  .product-card-body {
    padding: 20px 16px;
  }

  /* About & Values */
  .about {
    padding: 60px 0;
  }
  .about-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 24px;
  }
  .stat-card {
    padding: 14px 8px;
  }
  .stat-card .number {
    font-size: 1.5rem;
  }
  .stat-card .label {
    font-size: 0.75rem;
  }
  .values {
    padding: 60px 0;
  }
  .values-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Product Details Page */
  .product-hero {
    padding: 90px 0 40px;
  }
  .product-hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .product-gallery-thumbs img {
    width: 70px;
    height: 70px;
  }
  .product-info h1 {
    font-size: 1.5rem;
  }
  .product-info .product-price-large {
    font-size: 2rem;
    margin-bottom: 18px;
  }
  .product-order-form {
    padding: 20px 16px;
  }
  .product-order-form input,
  .product-order-form select,
  .product-order-form textarea {
    font-size: 16px; /* Prevent iOS zoom on tap */
  }

  /* Partners Page */
  .partners-hero {
    padding: 100px 0 50px;
  }
  .partners-hero h1 {
    font-size: 1.8rem;
  }
  .steps-section,
  .benefits-section,
  .join-section {
    padding: 50px 0;
  }
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .benefits-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .join-form-container {
    padding: 24px 16px;
  }
  .join-form-container input,
  .join-form-container select,
  .join-form-container textarea {
    font-size: 16px;
  }

  /* Footer */
  .footer {
    padding: 48px 0 24px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    text-align: center;
  }
  .footer h4::after {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%);
  }
  .footer-links {
    align-items: center;
  }
  .footer-contact {
    align-items: center;
  }
  .footer-social {
    justify-content: center;
  }
  .whatsapp-float {
    width: 52px;
    height: 52px;
    bottom: 18px;
    right: 18px;
  }
  .pricing-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .pricing-metric-card {
    padding: 14px;
    gap: 12px;
  }
  .pricing-metric-card .metric-icon {
    width: 40px;
    height: 40px;
    font-size: 1.4rem;
  }
  .pricing-metric-card .metric-value {
    font-size: 0.92rem;
  }
  .distributor-table thead th,
  .distributor-table tbody td {
    padding: 12px 14px;
    font-size: 0.85rem;
  }
  .pricing-explanation-card {
    flex-direction: column;
    padding: 20px;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .pricing-metrics-grid {
    grid-template-columns: 1fr;
  }
  .distributor-table thead th,
  .distributor-table tbody td {
    padding: 10px 12px;
    font-size: 0.8rem;
  }
  .container {
    padding: 0 16px;
  }
  .about-stats {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .nav-actions {
    gap: 6px;
  }
  .lang-toggle button {
    padding: 4px 10px;
    font-size: 0.75rem;
  }
  .hero-text-content h1 {
    font-size: 1.6rem;
  }
  .section-title {
    margin-bottom: 32px;
  }
  .section-title h2 {
    font-size: 1.5rem;
  }
}

/* ---- Utility Classes ---- */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.hidden { display: none !important; }
