/* ================================================================
   HONEXAL — MAIN CSS DESIGN SYSTEM
   هونيكسال — نظام التصميم الرئيسي
   ================================================================ */

/* ── Google Fonts ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&family=Tajawal:wght@300;400;500;700;800&family=Poppins:wght@300;400;500;600;700;800&family=Montserrat:wght@400;500;600;700;800&display=swap');

/* ── CSS Custom Properties (Design Tokens) ───────────────────── */
:root {
  /* Colors */
  --color-primary:        #F5A623;
  --color-primary-dark:   #D4891A;
  --color-primary-light:  #FFD07B;
  --color-primary-xlight: #FFF3DC;

  --color-secondary:      #2C5F2E;
  --color-secondary-dark: #1A3B1C;
  --color-secondary-light:#4A8A4D;

  --color-accent:         #8B4513;
  --color-accent-light:   #C07040;

  --color-bg:             #FFFAF0;
  --color-bg-alt:         #F8F4E8;
  --color-surface:        #FFFFFF;

  --color-text:           #1A1A1A;
  --color-text-muted:     #6C757D;
  --color-text-light:     #9AA5B4;

  --color-success:        #28A745;
  --color-warning:        #FFC107;
  --color-danger:         #DC3545;
  --color-info:           #17A2B8;

  --color-border:         #E8DFC4;
  --color-border-light:   #F0EAD6;

  /* Typography */
  --font-arabic:  'Cairo', 'Tajawal', sans-serif;
  --font-latin:   'Poppins', 'Montserrat', sans-serif;
  --font-body:    var(--font-arabic);

  --text-xs:      0.75rem;
  --text-sm:      0.875rem;
  --text-base:    1rem;
  --text-lg:      1.125rem;
  --text-xl:      1.25rem;
  --text-2xl:     1.5rem;
  --text-3xl:     1.875rem;
  --text-4xl:     2.25rem;
  --text-5xl:     3rem;
  --text-6xl:     3.75rem;

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Borders */
  --radius-sm:  0.25rem;
  --radius:     0.5rem;
  --radius-md:  0.75rem;
  --radius-lg:  1rem;
  --radius-xl:  1.5rem;
  --radius-2xl: 2rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:       0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-md:    0 10px 25px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.06);
  --shadow-lg:    0 20px 40px rgba(0,0,0,0.12), 0 8px 16px rgba(0,0,0,0.08);
  --shadow-xl:    0 30px 60px rgba(0,0,0,0.15);
  --shadow-honey: 0 8px 32px rgba(245, 166, 35, 0.25);
  --shadow-green: 0 8px 32px rgba(44, 95, 46, 0.2);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition:      250ms ease;
  --transition-slow: 400ms ease;

  /* Z-indices */
  --z-dropdown: 1000;
  --z-sticky:   1020;
  --z-modal:    1050;
  --z-toast:    1090;
}

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

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

body {
  font-family: var(--font-arabic);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.75;
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* LTR override for English */
[lang="en"] body,
body.ltr {
  direction: ltr;
  text-align: left;
  font-family: var(--font-latin);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--color-primary-dark); }

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

ul { list-style: none; }

/* ── Typography ───────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

.text-gradient {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title {
  font-size: var(--text-3xl);
  font-weight: 800;
  position: relative;
  margin-bottom: var(--space-4);
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
  border-radius: var(--radius-full);
  margin-top: var(--space-3);
}

.text-center .section-title::after {
  margin-left: auto;
  margin-right: auto;
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 600px;
  line-height: 1.8;
}

/* ── Layout ───────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section {
  padding: var(--space-20) 0;
}

.section-sm {
  padding: var(--space-12) 0;
}

.section-lg {
  padding: var(--space-24) 0;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-arabic);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  opacity: 0;
  transition: opacity var(--transition);
}
.btn:hover::before { opacity: 1; }

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: white;
  box-shadow: var(--shadow-honey);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(245, 166, 35, 0.4);
  color: white;
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-dark));
  color: white;
  box-shadow: var(--shadow-green);
}
.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(44, 95, 46, 0.35);
  color: white;
}

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

.btn-outline-white {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.7);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.15);
  border-color: white;
  color: white;
}

.btn-ghost {
  background: transparent;
  color: var(--color-text);
}
.btn-ghost:hover { background: var(--color-bg-alt); }

.btn-sm {
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-sm);
}
.btn-lg {
  padding: var(--space-4) var(--space-10);
  font-size: var(--text-lg);
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-full);
}

/* ── Cards ────────────────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.product-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
  position: relative;
}
.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.product-card__image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--color-bg-alt);
}

.product-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.product-card:hover .product-card__image {
  transform: scale(1.08);
}

.product-card__badge {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  background: var(--color-danger);
  color: white;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
}

.product-card__actions {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  opacity: 0;
  transform: translateX(-10px);
  transition: all var(--transition);
}
.product-card:hover .product-card__actions {
  opacity: 1;
  transform: translateX(0);
}

.product-card__action-btn {
  width: 38px;
  height: 38px;
  background: white;
  border: none;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  color: var(--color-text-muted);
  transition: all var(--transition);
  font-size: var(--text-sm);
}
.product-card__action-btn:hover {
  background: var(--color-primary);
  color: white;
}

.product-card__body {
  padding: var(--space-4);
}

.product-card__category {
  font-size: var(--text-xs);
  color: var(--color-primary);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-1);
}

.product-card__name {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card__rating {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.stars {
  color: var(--color-warning);
  font-size: var(--text-sm);
}

.product-card__price {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.price-current {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-primary-dark);
}

.price-original {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: line-through;
}

.product-card__add-btn {
  width: 100%;
}

/* ── Forms ────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.form-control {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-arabic);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.15);
}

.form-control::placeholder { color: var(--color-text-light); }

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%236C757D' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 16px center;
}

/* ── Badges ───────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
}

.badge-primary { background: var(--color-primary-xlight); color: var(--color-primary-dark); }
.badge-success { background: #D4EDDA; color: #155724; }
.badge-danger  { background: #F8D7DA; color: #721C24; }
.badge-warning { background: #FFF3CD; color: #856404; }

/* ── Section Headers ──────────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-header .section-subtitle {
  margin: 0 auto;
}

/* ── Dividers ─────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
  border: none;
  margin: var(--space-8) 0;
}

/* ── Utility ──────────────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.text-primary   { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-accent    { color: var(--color-accent); }
.text-muted     { color: var(--color-text-muted); }
.text-white     { color: white; }

.bg-primary     { background-color: var(--color-primary); }
.bg-secondary   { background-color: var(--color-secondary); }
.bg-alt         { background-color: var(--color-bg-alt); }
.bg-surface     { background-color: var(--color-surface); }
.bg-honey-gradient { background: linear-gradient(135deg, var(--color-primary-xlight), var(--color-bg)); }

.fw-300 { font-weight: 300; }
.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

/* ── Scroll animations ────────────────────────────────────────── */
[data-aos] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-aos].aos-animate {
  opacity: 1;
  transform: translateY(0);
}

/* ── Toast Notifications ──────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: var(--space-6);
  left: var(--space-6);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.toast {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-6);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  animation: slideInUp 0.4s ease;
  border-right: 4px solid var(--color-primary);
  min-width: 300px;
  max-width: 400px;
}

.toast.success { border-right-color: var(--color-success); }
.toast.error   { border-right-color: var(--color-danger); }
.toast.info    { border-right-color: var(--color-info); }

@keyframes slideInUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ── Loading Spinner ──────────────────────────────────────────── */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ── Scroll to Top ────────────────────────────────────────────── */
#scroll-to-top {
  position: fixed;
  bottom: var(--space-8);
  right: var(--space-8);
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: var(--shadow-honey);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition);
  z-index: var(--z-sticky);
}

#scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#scroll-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(245, 166, 35, 0.4);
}

/* ── WhatsApp Button ──────────────────────────────────────────── */
.whatsapp-float {
  position: fixed;
  bottom: var(--space-20);
  right: var(--space-8);
  width: 56px;
  height: 56px;
  background: #25D366;
  color: white;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
  transition: all var(--transition);
  z-index: var(--z-sticky);
}
.whatsapp-float:hover {
  transform: scale(1.1) translateY(-3px);
  box-shadow: 0 12px 40px rgba(37, 211, 102, 0.5);
  color: white;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .container { max-width: 1024px; }
}

@media (max-width: 992px) {
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  .section { padding: var(--space-16) 0; }
}

@media (max-width: 768px) {
  h1 { font-size: var(--text-2xl); }
  h2 { font-size: var(--text-xl); }
  .section { padding: var(--space-12) 0; }
  .container { padding: 0 var(--space-4); }
  .btn-lg {
    padding: var(--space-3) var(--space-8);
    font-size: var(--text-base);
  }
}

@media (max-width: 576px) {
  .section { padding: var(--space-10) 0; }
}
