/* ═══════════════════════════════════════════════════════════
   Xénah · Premium UI Polish Layer
   Applied on top of style.css — safe overrides only
   Fonts : Almarai (AR) · DM Sans (EN)
   ═══════════════════════════════════════════════════════════ */

/* ─── 1. FONT UPGRADE ─────────────────────────────────────── */
/* Arabic: Almarai — clean, rounded, premium beauty feel       */
/* English: DM Sans — modern geometric, pairs well with Almarai */

body:not(.is-ltr) {
  font-family: "Almarai", "Tajawal", sans-serif !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-ltr {
  font-family: "DM Sans", "Inter", system-ui, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ─── 2. TYPOGRAPHY — Section Headings ───────────────────── */

/* Kicker (e.g. "Customer Favorites") */
.xenah-section-kicker {
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  color: var(--gold) !important;
}

/* Main section H2 */
.xenah-section-head h2,
body[data-page="home"] .xenah-section-head h2 {
  font-size: clamp(1.75rem, 3vw, 2.6rem) !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  letter-spacing: -0.01em !important;
  color: var(--text) !important;
  margin: 6px 0 12px !important;
}

/* Section subtitle */
.xenah-section-head p:last-child {
  font-size: 1rem !important;
  line-height: 1.85 !important;
  color: var(--muted) !important;
  font-weight: 400 !important;
}

/* Product name */
.xenah-product-name {
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  letter-spacing: -0.005em !important;
}

.xenah-product-brand {
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  opacity: 0.65 !important;
}

/* ─── 3. PRODUCT CARD — Elevated hover ───────────────────── */

.xenah-product-card {
  border-radius: 20px !important;
  transition:
    transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.28s ease,
    border-color 0.28s ease !important;
  will-change: transform, box-shadow;
}

@media (hover: hover) and (pointer: fine) {
  .xenah-product-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 20px 48px rgba(126, 136, 104, 0.14) !important;
    border-color: rgba(126, 136, 104, 0.25) !important;
  }

  .xenah-product-card:hover .xenah-product-image {
    transform: scale(1.035) !important;
  }
}

.xenah-product-image {
  transition: transform 0.38s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  will-change: transform;
}

/* ─── 4. CATEGORY SLIDE — Smoother depth effect ─────────── */
/* NOTE: Only applies on devices with real hover (no mobile tap) */

@media (hover: hover) and (pointer: fine) {
  .xenah-category-slide {
    transition:
      transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
      box-shadow 0.3s ease !important;
  }

  .xenah-category-slide:hover {
    transform: translateY(-7px) scale(1.01) !important;
    box-shadow: 0 22px 52px rgba(126, 136, 104, 0.18) !important;
  }
}

/* Category slide label */
body[data-page="home"] .xenah-category-slide span {
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
}

/* ─── 5. NAV LINKS ───────────────────────────────────────── */

.xenah-nav-link {
  font-size: 0.88rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.01em !important;
}

/* ─── 6. BUTTONS — Smoother, premium feel ───────────────── */

.xenah-btn,
.xenah-btn-primary,
.xenah-add-to-cart,
.xenah-about-primary {
  transition:
    transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.2s ease,
    background 0.2s ease,
    opacity 0.2s ease !important;
}

@media (hover: hover) and (pointer: fine) {
  .xenah-btn:hover,
  .xenah-btn-primary:hover,
  .xenah-add-to-cart:hover,
  .xenah-about-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 24px rgba(126, 136, 104, 0.22) !important;
  }
}

/* ─── 7. BRAND LOGO CARD — Gentle lift ──────────────────── */

@media (hover: hover) and (pointer: fine) {
  .xenah-brand-logo-card {
    transition:
      transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
      box-shadow 0.28s ease !important;
  }

  .xenah-brand-logo-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 14px 36px rgba(126, 136, 104, 0.1) !important;
  }

  .xenah-brand-logo-card:hover .xenah-brand-logo {
    filter: saturate(1) brightness(1.04) !important;
    transform: scale(1.04) !important;
  }
}

.xenah-brand-logo {
  transition: filter 0.28s ease, transform 0.28s ease !important;
}

/* ─── 8. BRAND MONTH CARD ────────────────────────────────── */

@media (hover: hover) and (pointer: fine) {
  .xenah-brand-month-card:hover {
    transform: translateY(-7px) !important;
    box-shadow: 0 22px 52px rgba(126, 136, 104, 0.14) !important;
    border-color: rgba(126, 136, 104, 0.22) !important;
  }
}

.xenah-brand-month-card {
  transition:
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease !important;
}

/* ─── 9. HEADER — Glass effect refinement ───────────────── */

.xenah-main-header {
  backdrop-filter: blur(20px) saturate(1.6) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.6) !important;
  background: rgba(255, 255, 255, 0.92) !important;
  border-bottom: 1px solid rgba(239, 231, 217, 0.7) !important;
}

/* ─── 10. PRICE ──────────────────────────────────────────── */

.xenah-product-price,
.xenah-price-current {
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
}

.xenah-price-original {
  opacity: 0.45 !important;
  font-weight: 400 !important;
}

/* ─── 11. SOCIAL LINKS ───────────────────────────────────── */

.xenah-about-social-link {
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.22s ease !important;
}

@media (hover: hover) and (pointer: fine) {
  .xenah-about-social-link:hover {
    transform: scale(1.15) !important;
    opacity: 0.85 !important;
  }
}

/* ─── 12. FOOTER LINKS ───────────────────────────────────── */

.xenah-footer a {
  transition: color 0.2s ease, opacity 0.2s ease !important;
}

@media (hover: hover) and (pointer: fine) {
  .xenah-footer a:hover {
    opacity: 0.75 !important;
  }
}

/* ─── 13. SCROLLBAR — Branded thin scrollbar ─────────────── */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--sage-light);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: var(--sage); }

/* ─── 14. SHOP PAGE TOOLBAR & CONTROLS REFRESH (Minimalist & Premium) ─ */

/* Remove the bulky box container and make it a clean, seamless divider line */
body[data-page="shop"] .xenah-desktop-shop-toolbar {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  border-bottom: 1px solid rgba(126, 136, 104, 0.12) !important;
  border-radius: 0 !important;
  padding: 20px 0 !important;
  box-shadow: none !important;
  margin-bottom: 28px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  gap: 16px !important;
  min-height: auto !important;
}

body[data-page="shop"] .xenah-mobile-shop-toolbar {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  border-bottom: 1px solid rgba(126, 136, 104, 0.12) !important;
  border-radius: 0 !important;
  padding: 16px 0 !important;
  box-shadow: none !important;
  margin-bottom: 20px !important;
}

/* Minimalist Outlined Filter Toggle Button */
body[data-page="shop"] .xenah-desktop-filter-toggle {
  background: transparent !important;
  color: var(--text) !important;
  border: 1px solid rgba(126, 136, 104, 0.25) !important;
  border-radius: 99px !important;
  font-weight: 600 !important;
  font-size: 0.88rem !important;
  padding: 0 24px !important;
  min-height: 40px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

body[data-page="shop"] .xenah-desktop-filter-toggle::before {
  content: "";
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-inline-end: 8px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polygon points='22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3'></polygon></svg>") no-repeat center / contain;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polygon points='22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3'></polygon></svg>") no-repeat center / contain;
}

body[data-page="shop"] .xenah-desktop-filter-toggle:hover {
  background: rgba(126, 136, 104, 0.06) !important;
  border-color: var(--sage-dark) !important;
  color: var(--sage-dark) !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Elegant, clean product count text (no bulky badge) */
body[data-page="shop"] .xenah-desktop-shop-count {
  font-size: 0.92rem !important;
  font-weight: 500 !important;
  color: var(--muted) !important;
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  letter-spacing: 0.02em !important;
}

/* Sort Dropdown Slot & Minimal Outlined Select */
body[data-page="shop"] .xenah-desktop-shop-sort-slot {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  color: var(--muted) !important;
  font-weight: 500 !important;
  font-size: 0.88rem !important;
}

body[data-page="shop"] .xenah-desktop-shop-sort {
  appearance: none !important;
  -webkit-appearance: none !important;
  min-height: 40px !important;
  border: 1px solid rgba(126, 136, 104, 0.25) !important;
  border-radius: 99px !important;
  background-color: transparent !important;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%235f684e' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>") !important;
  background-size: 13px !important;
  background-repeat: no-repeat !important;
  color: var(--text) !important;
  font-family: inherit !important;
  font-weight: 600 !important;
  font-size: 0.88rem !important;
  cursor: pointer !important;
  min-width: 170px !important;
  outline: none !important;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

/* RTL Specific select alignment */
html[dir="rtl"] body[data-page="shop"] .xenah-desktop-shop-sort,
body[data-page="shop"].is-rtl .xenah-desktop-shop-sort {
  background-position: left 16px center !important;
  padding-inline-start: 36px !important;
  padding-inline-end: 18px !important;
}

/* LTR Specific select alignment */
html[dir="ltr"] body[data-page="shop"] .xenah-desktop-shop-sort,
body[data-page="shop"].is-ltr .xenah-desktop-shop-sort {
  background-position: right 16px center !important;
  padding-inline-end: 36px !important;
  padding-inline-start: 18px !important;
}

body[data-page="shop"] .xenah-desktop-shop-sort:hover {
  background-color: rgba(126, 136, 104, 0.06) !important;
  border-color: var(--sage-dark) !important;
}

body[data-page="shop"] .xenah-desktop-shop-sort:focus {
  border-color: var(--sage-dark) !important;
  box-shadow: 0 0 0 3px rgba(95, 104, 78, 0.05) !important;
}

/* Active Filter Chips Styling */
body[data-page="shop"] .xenah-shop-active-chip {
  border: 1px solid rgba(126, 136, 104, 0.14) !important;
  background: var(--white) !important;
  color: var(--text) !important;
  font-size: 0.82rem !important;
  padding: 4px 12px !important;
  border-radius: 99px !important;
  box-shadow: 0 2px 6px rgba(95, 104, 78, 0.02) !important;
  font-weight: 500 !important;
}

body[data-page="shop"] .xenah-shop-active-chip:hover {
  border-color: var(--sage-dark) !important;
  background: rgba(126, 136, 104, 0.04) !important;
}

body[data-page="shop"] .xenah-shop-chip-remove {
  background: rgba(126, 136, 104, 0.08) !important;
  color: var(--sage-dark) !important;
  border-radius: 50% !important;
  width: 18px !important;
  height: 18px !important;
  font-size: 0.75rem !important;
  transition: background 0.2s ease, color 0.2s ease !important;
}

body[data-page="shop"] .xenah-shop-chip-remove:hover {
  background: var(--sage-dark) !important;
  color: var(--white) !important;
}

/* ─── 15. HEADER REFRESH & COMPACTNESS (World-Class Polish) ───── */

/* Reduce main header height & make it look tight and integrated */
@media (min-width: 992px) {
  /* Tighten navigation container padding & dimensions */
  body .xenah-header-grid {
    padding: 6px 4% !important; /* Shorter padding for vertical tightness */
    min-height: auto !important;
    gap: 20px !important;
  }

  /* Make logo much more elegant and compact (luxury brand style) */
  body .xenah-logo-wrap img {
    max-height: 42px !important; /* Compact high-end height */
  }

  /* Tighten navigation link typography and margins */
  body .xenah-nav {
    gap: 24px !important; /* Tighter gap between links */
  }

  body .xenah-nav-link {
    font-size: 0.86rem !important;
    font-weight: 700 !important;
    opacity: 0.75 !important;
    transition: opacity 0.2s ease, color 0.2s ease !important;
  }

  body .xenah-nav-link:hover {
    opacity: 1 !important;
    color: var(--sage-dark) !important;
  }

  /* Hide redundant search toggle icon on desktop (since search bar is always visible) */
  body .xenah-action-icons .xenah-search-toggle {
    display: none !important;
  }

  /* Tighten desktop search row margins */
  body .xenah-desktop-search-row {
    margin: 2px auto 8px auto !important; /* Low gap stack */
    max-width: 500px !important; /* Compact search width */
  }

  /* Modernize the search input field background and border */
  body .xenah-desktop-search-row form {
    height: 36px !important;
    min-height: 36px !important;
    background: #f3f5f2 !important; /* Soft, warm sage-gray background */
    border: 1px solid rgba(126, 136, 104, 0.08) !important;
    border-radius: 99px !important;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
  }

  body .xenah-desktop-search-row form:focus-within {
    border-color: rgba(95, 104, 78, 0.4) !important;
    background: #ffffff !important;
    box-shadow: 0 4px 12px rgba(95, 104, 78, 0.04) !important;
    max-width: 520px !important;
  }

  /* Give header a subtle, premium elevation shadow and glass effect */
  body .xenah-main-header {
    backdrop-filter: blur(12px) saturate(1.7) !important;
    -webkit-backdrop-filter: blur(12px) saturate(1.7) !important;
    background: rgba(255, 255, 255, 0.94) !important;
    border-bottom: 1px solid rgba(126, 136, 104, 0.1) !important;
    box-shadow: 0 4px 20px rgba(95, 104, 78, 0.04) !important;
  }
}

/* Tighten Topbar spacing and elements */
body .xenah-topbar-inner {
  min-height: 32px !important; /* Tighter topbar height */
  padding-inline: 4% !important;
}

body .xenah-topbar-message,
body .xenah-topbar-links a {
  font-size: 0.8rem !important;
  font-weight: 700 !important;
}
