/* =============================================================================
   Fonts
   ============================================================================= */
@font-face{font-family:'Handicrafts';src:url('assets/fonts/TheYearofHandicrafts-Regular.otf') format('opentype');font-weight:400;font-display:swap;}
@font-face{font-family:'Handicrafts';src:url('assets/fonts/TheYearofHandicrafts-SemiBold.otf') format('opentype');font-weight:600;font-display:swap;}
@font-face{font-family:'Handicrafts';src:url('assets/fonts/TheYearofHandicrafts-Bold.otf') format('opentype');font-weight:700;font-display:swap;}
@font-face{font-family:'Naskh';src:url('assets/fonts/itfOmniaNaskh-Regular.otf') format('opentype');font-weight:400;font-display:swap;}
@font-face{font-family:'Naskh';src:url('assets/fonts/itfOmniaNaskh-Medium.otf') format('opentype');font-weight:500;font-display:swap;}
@font-face{font-family:'Naskh';src:url('assets/fonts/itfOmniaNaskh-Bold.otf') format('opentype');font-weight:700;font-display:swap;}

/* =============================================================================
   Base
   ============================================================================= */
html { scroll-behavior: smooth; }

:root { --font-disp: 'IBM Plex Sans', system-ui, sans-serif; }
[dir='rtl'] { --font-disp: 'Handicrafts', 'Naskh', serif; }

body {
  background: #f9f4f0;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  color: #33281d;
}
[dir='rtl'] body { font-family: 'Naskh', 'IBM Plex Sans', sans-serif; }

/* Display font for headings (Handicrafts in AR, IBM Plex in EN) */
.font-disp { font-family: var(--font-disp); }

::selection { background: #d5b89a; color: #33281d; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #a5815b;
  outline-offset: 3px;
  border-radius: 4px;
}

/* RTL line-height tuning for tight display sizes */
[dir='rtl'] .leading-none { line-height: 1.4; }
[dir='rtl'] .leading-tight { line-height: 1.6; }
[dir='rtl'] .leading-snug { line-height: 1.7; }

/* =============================================================================
   Logo
   ============================================================================= */
.logo-img { width: auto; object-fit: contain; }

/* =============================================================================
   Navigation
   ============================================================================= */
.nav-link { position: relative; }
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: #a5815b;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }
[dir='rtl'] .nav-link::after { transform-origin: right; }

/* =============================================================================
   Buttons
   ============================================================================= */
.btn-shine { position: relative; overflow: hidden; }
.btn-shine::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transition: left 0.6s ease;
}
.btn-shine:hover::before { left: 100%; }
/* sweep the shine when the surrounding card (.group) is hovered */
.group:hover .btn-shine::before { left: 100%; }

/* =============================================================================
   Interaction
   ============================================================================= */
.lift { transition: box-shadow 0.4s ease; }
.lift:hover { box-shadow: 0 18px 40px -18px rgba(80, 55, 30, 0.32); }

/* =============================================================================
   Scroll Reveal
   ============================================================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* =============================================================================
   RTL flip utility (for directional arrow icons)
   ============================================================================= */
[dir='rtl'] .rtl-flip { transform: scaleX(-1); }

/* =============================================================================
   Motion kill-switch — driven by config.js (window.ALBA_CONFIG.animations).
   When animations are off, <html data-anim="off"> disables every animation,
   transition and scroll-reveal across the whole site.
   ============================================================================= */
[data-anim='off'] *,
[data-anim='off'] *::before,
[data-anim='off'] *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
[data-anim='off'] .reveal {
  opacity: 1 !important;
  transform: none !important;
}
/* Buttons keep their hover animation even when motion is off */
[data-anim='off'] .alba-btn {
  transition: background-color 0.3s ease, border-color 0.3s ease,
    color 0.3s ease, box-shadow 0.3s ease !important;
}
[data-anim='off'] .alba-btn.btn-shine::before {
  transition: left 0.6s ease !important;
}
/* keep the product-card image zoom on hover even when motion is off */
/* [data-anim='off'] .card-zoom {
  transition: transform 100ms ease !important;
} */
/* No underline under nav items when motion is off (hover + active) */
[data-anim='off'] .nav-link::after {
  display: none !important;
}
/* keep the RTL arrow flip working even with motion off (it's orientation, not motion) */
[data-anim='off'][dir='rtl'] .rtl-flip,
[data-anim='off'] [dir='rtl'] .rtl-flip {
  transform: scaleX(-1) !important;
}
