/* ==========================================================================
   Kunuz Al Oud — Luxury Oud Fragrance
   Light theme · Brand teal (#0A8B7E) on cream (#E6DCB8)
   ========================================================================== */

:root {
  --teal: #0a8b7e;
  --teal-dark: #0c5e54;
  --teal-deep: #06302b;
  --teal-light: #3bb3a4;
  --cream: #e6dcb8;
  --cream-light: #f3edd9;
  --cream-dim: #d3c79c;
  --ink: #0a332d;        /* deep teal — primary text on cream */
}

/* ---- Typography ---------------------------------------------------------- */
html { scroll-behavior: smooth; }

body {
  font-family: 'Jost', system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.font-display {
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
  letter-spacing: 0.01em;
}

.tracking-luxe { letter-spacing: 0.32em; }
.tracking-wide-2 { letter-spacing: 0.18em; }

/* Brand wordmark — bold, high-contrast logotype next to the mark */
.brand-word {
  font-family: 'Jost', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1;
  white-space: nowrap;
}

/* Teal gradient text — for accent words on light backgrounds */
.text-teal-gradient {
  background: linear-gradient(95deg, var(--teal-dark) 0%, var(--teal) 50%, var(--teal-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* Cream/teal-light accent for dark sections */
.text-cream-accent { color: var(--teal-light); }

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: 'Jost', sans-serif;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
  padding: 0.95rem 2.1rem;
  border-radius: 2px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: 1px solid transparent;
}

/* Primary — teal fill (use on cream sections) */
.btn-teal {
  background: var(--teal);
  color: var(--cream-light);
  box-shadow: 0 10px 26px -12px rgba(10, 139, 126, 0.8);
}
.btn-teal:hover {
  background: var(--teal-dark);
  box-shadow: 0 14px 32px -10px rgba(10, 139, 126, 0.9);
  transform: translateY(-2px);
}

/* Cream fill — use on dark teal sections */
.btn-cream {
  background: var(--cream-light);
  color: var(--teal-deep);
  box-shadow: 0 10px 26px -12px rgba(0, 0, 0, 0.4);
}
.btn-cream:hover { background: #fff; transform: translateY(-2px); }

/* Outline (light bg) */
.btn-outline {
  background: transparent;
  border-color: var(--teal);
  color: var(--teal-dark);
}
.btn-outline:hover { background: var(--teal); color: var(--cream-light); }

/* Outline on dark sections */
.btn-outline-cream {
  background: transparent;
  border-color: rgba(243, 237, 217, 0.6);
  color: var(--cream-light);
}
.btn-outline-cream:hover { background: var(--cream-light); color: var(--teal-deep); }

/* Ghost */
.btn-ghost {
  background: rgba(10, 139, 126, 0.06);
  border-color: rgba(10, 139, 126, 0.3);
  color: var(--teal-dark);
}
.btn-ghost:hover { border-color: var(--teal); background: rgba(10, 139, 126, 0.12); }

/* ---- Decorative dividers ------------------------------------------------- */
.teal-rule {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--teal);
}
.teal-rule::before,
.teal-rule::after {
  content: '';
  width: 46px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal));
}
.teal-rule::after { background: linear-gradient(90deg, var(--teal), transparent); }

/* Light variant for dark backgrounds */
.teal-rule.on-dark { color: var(--teal-light); }
.teal-rule.on-dark::before { background: linear-gradient(90deg, transparent, var(--teal-light)); }
.teal-rule.on-dark::after { background: linear-gradient(90deg, var(--teal-light), transparent); }

/* ---- Surfaces ------------------------------------------------------------ */
.bg-teal { background: var(--teal); }
.bg-teal-deep { background: var(--teal-deep); }
.bg-teal-dark { background: var(--teal-dark); }
.bg-cream { background: var(--cream); }
.bg-cream-light { background: var(--cream-light); }

/* Light product card */
.card {
  background: var(--cream-light);
  border: 1px solid rgba(10, 139, 126, 0.18);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.card:hover {
  border-color: rgba(10, 139, 126, 0.55);
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -26px rgba(6, 48, 43, 0.5);
}

/* Subtle pattern overlays */
.pattern-teal {
  background-image:
    radial-gradient(rgba(10, 139, 126, 0.10) 1px, transparent 1px),
    radial-gradient(rgba(10, 139, 126, 0.06) 1px, transparent 1px);
  background-size: 28px 28px, 28px 28px;
  background-position: 0 0, 14px 14px;
}
.pattern-cream {
  background-image:
    radial-gradient(rgba(243, 237, 217, 0.10) 1px, transparent 1px),
    radial-gradient(rgba(243, 237, 217, 0.06) 1px, transparent 1px);
  background-size: 28px 28px, 28px 28px;
  background-position: 0 0, 14px 14px;
}

/* Product image placeholder tile (light) */
.product-art {
  position: relative;
  background:
    radial-gradient(120% 90% at 50% 12%, rgba(10, 139, 126, 0.16), transparent 60%),
    linear-gradient(160deg, #f6f1e0, #e6dcb8);
  overflow: hidden;
}
.product-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(10, 139, 126, 0.10) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}
.product-emoji {
  font-size: clamp(3rem, 9vw, 5.5rem);
  filter: drop-shadow(0 10px 22px rgba(6, 48, 43, 0.28));
}

/* ---- Header -------------------------------------------------------------- */
.site-header {
  background: rgba(6, 48, 43, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(243, 237, 217, 0.14);
}
.nav-link {
  position: relative;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream);          /* beige */
  transition: color 0.3s;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 1px;
  background: var(--cream);
  transition: width 0.35s ease;
}
.nav-link:hover { color: #fff; }
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.nav-link.active { color: #fff; }

.cart-count {
  position: absolute;
  top: -8px; right: -10px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  display: flex; align-items: center; justify-content: center;
  background: var(--teal);
  color: var(--cream-light);
  font-size: 0.62rem;
  font-weight: 700;
  border-radius: 999px;
}

/* ---- Mobile drawer ------------------------------------------------------- */
/* Rendered as a sibling of <header> so the header's backdrop-filter doesn't
   trap these fixed elements in a shorter containing block. */
.mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 48, 43, 0.6);
  backdrop-filter: blur(2px);
  z-index: 62;
}
.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: min(82vw, 20rem);
  z-index: 70;
  padding: 1.75rem 1.5rem;
  /* Solid, branded background keeps the menu text fully readable */
  background: linear-gradient(165deg, #0a4339 0%, var(--teal-deep) 58%, #052420 100%);
  border-right: 1px solid rgba(243, 237, 217, 0.16);
  box-shadow: 24px 0 60px -20px rgba(0, 0, 0, 0.7);
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
/* Subtle brand pattern wash behind the menu content */
.mobile-drawer::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(243, 237, 217, 0.06) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}
.mobile-drawer > * { position: relative; z-index: 1; }

.drawer-link {
  font-family: 'Jost', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.82rem;
  color: var(--cream);
  padding: 0.85rem 0.25rem;
  border-bottom: 1px solid rgba(243, 237, 217, 0.08);
  transition: color 0.25s, padding-left 0.25s;
}
.drawer-link:hover,
.drawer-link.active { color: #fff; padding-left: 0.6rem; }
.drawer-link.active { color: var(--teal-light); }

/* ---- Logo ---------------------------------------------------------------- */
.logo-img { width: 44px; height: 44px; object-fit: contain; display: block; }
/* cream disc behind logo so the teal mark stays visible on dark sections */
.logo-badge {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--cream-light);
  display: flex; align-items: center; justify-content: center;
  padding: 4px;
}
.logo-badge .logo-img { width: 38px; height: 38px; }

/* ---- Float WhatsApp ------------------------------------------------------ */
.wa-float {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25d366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px -6px rgba(37, 211, 102, 0.55);
  z-index: 60;
  transition: transform 0.3s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float::before {
  content: '';
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.4);
  animation: waPulse 2s infinite;
}
@keyframes waPulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  70% { transform: scale(1.25); opacity: 0; }
  100% { opacity: 0; }
}

/* ---- Reveal on scroll ---------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.in { opacity: 1; transform: none; }

/* ---- Toast --------------------------------------------------------------- */
.toast {
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--teal-deep);
  border: 1px solid var(--teal);
  color: var(--cream-light);
  padding: 0.85rem 1.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  z-index: 80;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 16px 40px -16px rgba(6, 48, 43, 0.5);
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---- Forms / range ------------------------------------------------------- */
.filter-input {
  background: #fff;
  border: 1px solid rgba(10, 139, 126, 0.28);
  color: var(--ink);
  border-radius: 2px;
}
.filter-input::placeholder { color: rgba(10, 51, 45, 0.45); }
.filter-input:focus { outline: none; border-color: var(--teal); }

input[type="range"] { accent-color: var(--teal); }
input[type="checkbox"] { accent-color: var(--teal); }

/* Thumbnails */
.thumb {
  border: 1px solid rgba(10, 139, 126, 0.22);
  transition: border-color 0.3s, transform 0.3s;
  cursor: pointer;
}
.thumb:hover { transform: translateY(-3px); }
.thumb.active { border-color: var(--teal); }

/* Scrollbar accent */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--teal-light); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--teal); }

/* ---- Language toggle ----------------------------------------------------- */
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
  border-radius: 2px;
  border: 1px solid var(--teal);
  color: var(--teal-dark);
  background: transparent;
  transition: all 0.3s;
  cursor: pointer;
  white-space: nowrap;
}
.lang-btn:hover { background: var(--teal); color: var(--cream-light); }
.lang-btn.on-dark { border-color: rgba(243, 237, 217, 0.5); color: var(--cream-light); }
.lang-btn.on-dark:hover { background: var(--cream-light); color: var(--teal-deep); }

/* ---- Full text alignment (justified body copy) --------------------------- */
.text-justify { text-align: justify; text-justify: inter-word; }
/* On phones, justifying narrow columns opens ugly word gaps — align to start */
@media (max-width: 639px) {
  .text-justify { text-align: start; }
}

/* ---- Arabic typography --------------------------------------------------- */
body.lang-ar { font-family: 'Tajawal', 'Jost', system-ui, sans-serif; }
body.lang-ar .font-display,
body.lang-ar .brand-word { font-family: 'Amiri', 'Cormorant Garamond', serif; }
body.lang-ar .brand-word { font-weight: 700; letter-spacing: 0; }
/* Latin runs (phone, email, url, prices keep AED) stay LTR */
body.lang-ar [dir='ltr'] { unicode-bidi: isolate; }

/* ---- RTL adjustments ----------------------------------------------------- */
[dir='rtl'] .nav-link::after { left: auto; right: 0; }
[dir='rtl'] .cart-count { right: auto; left: -10px; }
[dir='rtl'] .toast { left: auto; right: 50%; transform: translateX(50%) translateY(120%); }
[dir='rtl'] .toast.show { transform: translateX(50%) translateY(0); }
[dir='rtl'] .wa-float { right: auto; left: 24px; }
[dir='rtl'] .mobile-drawer {
  left: auto; right: 0;
  border-right: 0;
  border-left: 1px solid rgba(243, 237, 217, 0.16);
  box-shadow: -24px 0 60px -20px rgba(0, 0, 0, 0.7);
}
[dir='rtl'] .drawer-link:hover,
[dir='rtl'] .drawer-link.active { padding-left: 0.25rem; padding-right: 0.6rem; }
[dir='rtl'] .teal-rule::before { background: linear-gradient(90deg, var(--teal), transparent); }
[dir='rtl'] .teal-rule::after { background: linear-gradient(90deg, transparent, var(--teal)); }
[dir='rtl'] .teal-rule.on-dark::before { background: linear-gradient(90deg, var(--teal-light), transparent); }
[dir='rtl'] .teal-rule.on-dark::after { background: linear-gradient(90deg, transparent, var(--teal-light)); }
/* keep product price + AED label visually LTR even in RTL */
[dir='rtl'] .text-teal-gradient { unicode-bidi: plaintext; }
