/* ============ FEME HAIR - Core Styles ============ */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;900&family=Playfair+Display:wght@400;600;700;900&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --gold-light: #d4a373;
  --gold: #c9a961;
  --gold-dark: #a88942;
  --gold-darker: #8b6914;
  --cream: #faf3e8;
  --cream-dark: #f5e6d3;
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-300: #d6d3d1;
  --stone-500: #78716c;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --emerald: #10b981;
  --rose: #ef4444;
  --amber: #f59e0b;
  --sky: #0ea5e9;
  --violet: #8b5cf6;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Tajawal', 'Inter', sans-serif;
  color: var(--stone-800);
  background: var(--stone-50);
  line-height: 1.6;
  min-height: 100vh;
}

[dir="ltr"] body { font-family: 'Inter', sans-serif; }

.display-font { font-family: 'Tajawal', sans-serif; font-weight: 900; }
[dir="ltr"] .display-font { font-family: 'Playfair Display', serif; }

/* ============ UTILITIES ============ */
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.gradient-text {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-darker) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.gradient-bg { background: linear-gradient(135deg, var(--cream) 0%, var(--cream-dark) 100%); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px;
  border-radius: 9999px; font-weight: 700; font-size: 15px; cursor: pointer;
  transition: all 0.3s; border: none; text-decoration: none; font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%); color: white;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-darker) 0%, #6b4e0a 100%);
  transform: translateY(-2px); box-shadow: 0 10px 30px rgba(184, 134, 11, 0.3);
}
.btn-outline {
  background: transparent; color: var(--gold-darker); border: 2px solid var(--stone-200);
}
.btn-outline:hover { border-color: var(--gold); background: var(--cream); }
.btn-ghost { background: transparent; color: var(--stone-700); }
.btn-ghost:hover { background: var(--stone-100); }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ============ HEADER ============ */
.header {
  position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,0.95);
  backdrop-filter: blur(16px); border-bottom: 1px solid var(--stone-200);
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; height: 80px; gap: 16px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-darker));
  display: flex; align-items: center; justify-content: center; color: white;
  box-shadow: 0 4px 12px rgba(184,134,11,0.3);
}
.logo-text { display: flex; flex-direction: column; }
.logo-name { font-size: 22px; font-weight: 900; color: var(--stone-900); font-family: 'Tajawal', sans-serif; }
[dir="ltr"] .logo-name { font-family: 'Playfair Display', serif; }
.logo-tag { font-size: 10px; color: var(--stone-500); letter-spacing: 2px; }
.nav { display: flex; align-items: center; gap: 32px; }
.nav a {
  color: var(--stone-700); text-decoration: none; font-weight: 500; font-size: 15px;
  transition: color 0.2s;
}
.nav a:hover, .nav a.active { color: var(--gold-darker); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: none; background: transparent;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--stone-700); position: relative; transition: background 0.2s;
}
.icon-btn:hover { background: var(--stone-100); }
.cart-count {
  position: absolute; top: -2px;
  background: var(--gold-darker); color: white; font-size: 11px; font-weight: 700;
  min-width: 20px; height: 20px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; padding: 0 5px;
}
[dir="rtl"] .cart-count { left: -2px; }
[dir="ltr"] .cart-count { right: -2px; }
.lang-btn { display: flex; align-items: center; gap: 4px; padding: 8px 14px; border-radius: 20px; }
.mobile-toggle { display: none; }

@media (max-width: 1024px) {
  .nav { display: none; }
  .mobile-toggle { display: flex; }
}

.mobile-menu { display: none; padding: 16px 0; border-top: 1px solid var(--stone-200); }
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block; padding: 12px 16px; border-radius: 12px; color: var(--stone-700);
  text-decoration: none; font-weight: 500;
}
.mobile-menu a:hover { background: var(--cream); color: var(--gold-darker); }

/* ============ TOP BAR ============ */
.top-bar {
  background: linear-gradient(90deg, #6b4e0a, var(--gold-darker), #6b4e0a);
  color: var(--cream); padding: 10px 20px; text-align: center; font-size: 14px;
  font-weight: 500; position: relative; overflow: hidden;
}

/* ============ HERO ============ */
.hero {
  position: relative; overflow: hidden; padding: 80px 0 100px;
  background: linear-gradient(135deg, var(--cream) 0%, var(--cream-dark) 100%);
}
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px;
  background: rgba(184,134,11,0.1); color: var(--gold-darker);
  border-radius: 9999px; font-size: 13px; font-weight: 600; margin-bottom: 24px;
}
.hero-title { font-size: clamp(36px, 5vw, 72px); font-weight: 900; line-height: 1.1; margin-bottom: 24px; }
.hero-desc { font-size: 18px; color: var(--stone-500); margin-bottom: 32px; max-width: 500px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-badges { margin-top: 40px; display: flex; gap: 24px; flex-wrap: wrap; font-size: 14px; color: var(--stone-500); }
.hero-badges > div { display: flex; align-items: center; gap: 8px; }
.hero-visual {
  aspect-ratio: 1; border-radius: 32px;
  background: linear-gradient(135deg, #fde68a, #fecaca, #fde68a);
  display: flex; align-items: center; justify-content: center;
  font-size: 180px; box-shadow: 0 30px 60px rgba(0,0,0,0.15);
  animation: float 4s ease-in-out infinite;
  position: relative;
}
.hero-floating { position: absolute; background: white; padding: 16px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }

@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { font-size: 120px; }
}

/* ============ SECTION ============ */
.section { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-title { font-size: clamp(28px, 4vw, 48px); font-weight: 900; margin-bottom: 12px; }
.section-subtitle { font-size: 18px; color: var(--stone-500); }

/* ============ GRID ============ */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* ============ PRODUCT CARD ============ */
.product-card {
  background: white; border-radius: 24px; overflow: hidden; position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.product-card:hover { transform: translateY(-8px); box-shadow: 0 30px 60px rgba(0,0,0,0.12); }
.product-image {
  aspect-ratio: 1;
  background: linear-gradient(135deg, #fff7ed, #fef2f2);
  display: flex; align-items: center; justify-content: center;
  font-size: 120px; transition: transform 0.5s;
}
.product-card:hover .product-image { transform: scale(1.1); }
.product-body { padding: 24px; }
.product-name { font-size: 17px; font-weight: 700; margin-bottom: 8px; line-height: 1.4; min-height: 48px; }
.product-desc { font-size: 14px; color: var(--stone-500); margin-bottom: 16px; min-height: 40px; }
.product-price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 16px; }
.product-price-current { font-size: 24px; font-weight: 700; }
.product-price-original { font-size: 14px; color: var(--stone-300); text-decoration: line-through; }
.product-badge {
  position: absolute; top: 16px; z-index: 2;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold-darker));
  color: white; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 9999px;
}
[dir="rtl"] .product-badge { right: 16px; }
[dir="ltr"] .product-badge { left: 16px; }
.product-discount {
  position: absolute; top: 16px; z-index: 2;
  background: var(--rose); color: white; font-size: 12px; font-weight: 700;
  padding: 4px 12px; border-radius: 9999px;
}
[dir="rtl"] .product-discount { left: 16px; }
[dir="ltr"] .product-discount { right: 16px; }

/* ============ FEATURES ============ */
.feature-card {
  padding: 32px; border-radius: 24px;
  background: linear-gradient(135deg, var(--stone-50), var(--cream) 100%);
  border: 1px solid var(--stone-100); transition: all 0.3s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.08); }
.feature-icon { font-size: 48px; margin-bottom: 16px; }
.feature-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.feature-desc { color: var(--stone-500); font-size: 14px; }

/* ============ CART DRAWER ============ */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px); z-index: 50; opacity: 0; transition: opacity 0.3s;
}
.drawer-backdrop.open { opacity: 1; }
.drawer {
  position: fixed; top: 0; height: 100vh; width: 100%; max-width: 420px;
  background: white; z-index: 51; display: flex; flex-direction: column;
  box-shadow: 0 0 60px rgba(0,0,0,0.2); transition: transform 0.3s;
}
[dir="rtl"] .drawer { left: 0; transform: translateX(-100%); }
[dir="rtl"] .drawer.open { transform: translateX(0); }
[dir="ltr"] .drawer { right: 0; transform: translateX(100%); }
[dir="ltr"] .drawer.open { transform: translateX(0); }
.drawer-header {
  padding: 24px; border-bottom: 1px solid var(--stone-200);
  display: flex; align-items: center; justify-content: space-between;
}
.drawer-body { flex: 1; overflow-y: auto; padding: 24px; }
.drawer-footer { padding: 24px; border-top: 1px solid var(--stone-200); background: var(--stone-50); }
.cart-item { display: flex; gap: 16px; padding: 16px; border-radius: 16px; background: var(--stone-50); margin-bottom: 12px; }
.cart-item-image {
  width: 72px; height: 72px; border-radius: 12px;
  background: linear-gradient(135deg, #fff7ed, #fef2f2);
  display: flex; align-items: center; justify-content: center; font-size: 32px; flex-shrink: 0;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.cart-item-controls { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.qty-controls { display: flex; align-items: center; gap: 8px; }
.qty-btn {
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--stone-300);
  background: white; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.qty-btn:hover { background: var(--stone-100); }

/* ============ POPUP MODAL ============ */
.popup-modal { position: fixed; inset: 0; z-index: 100; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.popup-modal.show { opacity: 1; pointer-events: auto; }
.popup-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); }
.popup-content {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9);
  max-width: 480px; width: calc(100% - 40px); background: white; border-radius: 32px;
  padding: 40px; text-align: center; transition: transform 0.4s;
  box-shadow: 0 40px 80px rgba(0,0,0,0.3);
}
.popup-modal.show .popup-content { transform: translate(-50%, -50%) scale(1); }
.popup-close {
  position: absolute; top: 16px; border: none; background: var(--stone-100);
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 20px;
  display: flex; align-items: center; justify-content: center; color: var(--stone-700);
}
[dir="rtl"] .popup-close { left: 16px; }
[dir="ltr"] .popup-close { right: 16px; }
.popup-emoji { font-size: 80px; margin-bottom: 20px; }
.popup-image { width: 100%; max-height: 200px; object-fit: cover; border-radius: 20px; margin-bottom: 20px; }
.popup-title { font-size: 28px; font-weight: 900; margin-bottom: 12px; }
.popup-desc { color: var(--stone-500); margin-bottom: 24px; font-size: 16px; line-height: 1.6; }
.popup-coupon {
  display: inline-block; padding: 16px 32px; background: var(--cream);
  border: 2px dashed var(--gold); border-radius: 16px; font-size: 24px;
  font-weight: 900; color: var(--gold-darker); letter-spacing: 2px;
  cursor: pointer; margin-bottom: 24px;
}
.popup-btn {
  display: inline-block; padding: 14px 32px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: white; border-radius: 9999px; text-decoration: none; font-weight: 700;
}

/* ============ TOAST ============ */
.toast {
  position: fixed; bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(100px); opacity: 0;
  background: var(--stone-900); color: white; padding: 14px 24px; border-radius: 12px;
  display: flex; align-items: center; gap: 10px; z-index: 200;
  transition: all 0.3s; font-weight: 500; box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast-success { background: var(--emerald); }
.toast-error { background: var(--rose); }

/* ============ FORMS ============ */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 14px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--stone-200);
  font-family: inherit; font-size: 15px; transition: border-color 0.2s;
  background: white; outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,169,97,0.15);
}

/* ============ FOOTER ============ */
.footer { background: var(--stone-900); color: var(--stone-300); padding: 64px 0 24px; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 48px; margin-bottom: 48px; }
.footer h4 { color: white; font-weight: 700; margin-bottom: 16px; font-size: 16px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 8px; }
.footer a { color: var(--stone-300); text-decoration: none; font-size: 14px; transition: color 0.2s; }
.footer a:hover { color: var(--gold-light); }
.footer-bottom { padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1); text-align: center; font-size: 13px; }

@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ============ ANIMATIONS ============ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp 0.6s ease-out forwards; }

/* ============ TRACKING TIMELINE ============ */
.tracking-timeline { position: relative; padding: 20px 0; }
.timeline-step {
  display: flex; gap: 20px; padding-bottom: 28px; position: relative;
}
.timeline-step:not(:last-child)::after {
  content: ''; position: absolute; top: 40px; width: 2px;
  background: var(--stone-200); height: calc(100% - 40px);
}
[dir="rtl"] .timeline-step:not(:last-child)::after { right: 19px; }
[dir="ltr"] .timeline-step:not(:last-child)::after { left: 19px; }
.timeline-step.completed:not(:last-child)::after { background: var(--emerald); }
.timeline-icon {
  width: 40px; height: 40px; border-radius: 50%; background: var(--stone-200);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  position: relative; z-index: 1;
}
.timeline-step.completed .timeline-icon { background: var(--emerald); color: white; }
.timeline-step.current .timeline-icon { background: var(--gold); color: white; box-shadow: 0 0 0 6px rgba(201,169,97,0.2); }
.timeline-title { font-weight: 700; margin-bottom: 4px; }
.timeline-date { font-size: 13px; color: var(--stone-500); }
