/* =============================================================================
   Madni Boutique — Global Styles
   ============================================================================= */

/* -----------------------------------------------------------------------------
   1. CSS RESET (modern baseline)
   ----------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

/* Lenis + native scroll-behavior:smooth fight — disable smoothing when Lenis runs */
html.lenis {
  scroll-behavior: auto !important;
}

html.lenis,
html.lenis body {
  height: auto;
}

body {
  min-height: 100dvh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

@media (hover: none), (pointer: coarse) {
  .custom-cursor,
  .cursor-follower {
    display: none !important;
  }

  body.use-custom-cursor {
    cursor: auto;
  }
}

:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* -----------------------------------------------------------------------------
   2. CUSTOM PROPERTIES
   ----------------------------------------------------------------------------- */
:root {
  --color-bg: #ffffff;
  --color-gold: #a88632;
  --color-gold-light: #c9a84c;
  --color-gold-dark: #8a6f28;
  --color-ivory: #1c1915;
  --color-ivory-muted: #5c574d;
  --color-text-on-dark: #f8f6f1;
  --color-text-muted-on-dark: rgba(248, 246, 241, 0.82);
  --color-surface: #ffffff;
  --color-surface-2: #ebe6dc;
  --color-border: rgba(138, 111, 40, 0.18);
  --color-navbar-scrolled: rgba(246, 243, 236, 0.92);
  --selection-text: #1c1915;

  /* Collections / glassy panels (shared with inline page styles). */
  --collections-hero-spot: #faf7f2;
  --collections-hero-edge: #ebe6dc;
  --collections-veil-top: rgba(255, 255, 255, 0.35);
  --collections-veil-bottom: rgba(246, 243, 236, 0.92);
  --collections-filter-sticky-mobile: rgba(246, 243, 236, 0.98);
  --elevated-panel: rgba(255, 255, 255, 0.94);
  --elevated-panel-strong: rgba(255, 255, 255, 0.92);
  --elevated-panel-soft: rgba(255, 255, 255, 0.88);
  --gallery-masonry-overlay: rgba(255, 255, 255, 0.78);

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Satoshi", "Inter", sans-serif;
  --font-urdu-style: "Noto Nastaliq Urdu", serif;

  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);

  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(3rem, 0.5rem + 7vw, 8rem);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-9: 36px;
  --space-10: 40px;
  --space-11: 44px;
  --space-12: 48px;
  --space-13: 52px;
  --space-14: 56px;
  --space-15: 60px;
  --space-16: 64px;
  --space-17: 68px;
  --space-18: 72px;
  --space-19: 76px;
  --space-20: 80px;
  --space-21: 84px;
  --space-22: 88px;
  --space-23: 92px;
  --space-24: 96px;
  --space-25: 100px;
  --space-26: 104px;
  --space-27: 108px;
  --space-28: 112px;
  --space-29: 116px;
  --space-30: 120px;
  --space-31: 124px;
  --space-32: 128px;

  /* Fixed header row height (notch safe-area added separately on `.navbar`). */
  --nav-bar-inner-h: 60px;
}

@media (min-width: 768px) {
  :root {
    --nav-bar-inner-h: 80px;
  }
}

html[data-theme="dark"] {
  --color-bg: #11100f;
  --color-ivory: #f3eee6;
  --color-ivory-muted: rgba(243, 238, 230, 0.72);
  --color-surface: #181614;
  --color-surface-2: #24211e;
  --color-border: rgba(201, 168, 76, 0.28);
  --color-navbar-scrolled: rgba(20, 18, 16, 0.94);
  --selection-text: #121110;

  --collections-hero-spot: #242220;
  --collections-hero-edge: #151412;
  --collections-veil-top: rgba(255, 255, 255, 0.06);
  --collections-veil-bottom: rgba(14, 13, 12, 0.94);
  --collections-filter-sticky-mobile: rgba(22, 20, 18, 0.98);
  --elevated-panel: rgba(38, 35, 32, 0.94);
  --elevated-panel-strong: rgba(42, 39, 36, 0.92);
  --elevated-panel-soft: rgba(42, 39, 36, 0.88);
  --gallery-masonry-overlay: rgba(28, 26, 24, 0.82);
}

/* -----------------------------------------------------------------------------
   3. BASE STYLES
   ----------------------------------------------------------------------------- */

html,
body {
  background-color: var(--color-bg);
  color: var(--color-ivory);
  font-family: var(--font-body);
  font-size: var(--text-base);
}

body {
  overflow-x: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
  animation: bodyFallback 0s linear 1.5s forwards;
}

@keyframes bodyFallback {
  to {
    opacity: 1;
  }
}

body.loaded {
  opacity: 1;
}

body.page-exit {
  opacity: 0 !important;
}

body.menu-open {
  overflow: hidden;
  touch-action: none;
}

/* Lightbox / modals — do not reuse .menu-open (same class as mobile nav scroll lock). */
body.madni-scroll-lock {
  overflow: hidden;
  touch-action: none;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f6f3ec;
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: #c9a84c;
  background: var(--color-gold);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #e8c96e;
  background: var(--color-gold-light);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-gold) var(--color-bg);
}

::selection {
  background-color: var(--color-gold-light);
  color: var(--selection-text);
}

/* -----------------------------------------------------------------------------
   4. SHARED NAVBAR
   ----------------------------------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  /* Above .grain so header + mobile menu stay crisp (grain was 9000 vs old 1000). */
  z-index: 9100;
  width: 100%;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  min-height: calc(var(--nav-bar-inner-h) + env(safe-area-inset-top, 0px));
  display: flex;
  align-items: center;
  transition: var(--transition-smooth);
  background: transparent;
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: var(--color-navbar-scrolled);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--color-border);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: 100%;
  max-width: 100%;
  overflow: visible;
  white-space: nowrap;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex-shrink: 0;
}

.theme-toggle {
  appearance: none;
  -webkit-appearance: none;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: transparent;
  color: var(--color-ivory);
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}

.theme-toggle:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.theme-toggle svg {
  display: block;
}

.theme-toggle__icon--sun {
  display: none;
}

html[data-theme="dark"] .theme-toggle__icon--sun {
  display: block;
}

html[data-theme="dark"] .theme-toggle__icon--moon {
  display: none;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-gold);
  white-space: nowrap;
}

@media (max-width: 1023px) {
  .navbar .nav-logo {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (min-width: 768px) {
  .nav-logo {
    font-size: var(--text-base);
  }
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: var(--space-10);
}

@media (min-width: 1024px) {
  .nav-desktop {
    display: flex;
  }
}

.nav-link {
  position: relative;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-ivory);
  padding-block: var(--space-2);
  transition: color var(--transition-smooth);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--color-gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover {
  color: var(--color-gold);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-toggle {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  z-index: 1002;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: inherit;
}

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

.hamburger {
  width: 28px;
  height: 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-gold);
  border-radius: 1px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.25s ease, top 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;
}

.hamburger span:nth-child(1) {
  position: relative;
  top: 0;
}

.hamburger span:nth-child(3) {
  position: relative;
  top: 0;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Outside <header> in markup: navbar backdrop-filter would otherwise trap fixed overlay (clips to header / hero bleeds through). */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 9050;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(var(--space-5), 4vw, var(--space-10));
  box-sizing: border-box;
  min-height: 100dvh;
  padding: calc(var(--nav-bar-inner-h) + env(safe-area-inset-top, 0px) + var(--space-6)) var(--space-6)
    max(var(--space-10), env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  isolation: isolate;
  background: var(--color-bg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.45s step-end;
}

@media (min-width: 768px) {
  .nav-overlay {
    padding-top: calc(var(--nav-bar-inner-h) + env(safe-area-inset-top, 0px) + var(--space-6));
  }
}

.nav-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s step-start;
}

.nav-overlay .nav-link:not(.madni-currency-open--overlay) {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 5vw, 2.75rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-ivory);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
}

.nav-overlay .nav-link:not(.madni-currency-open--overlay)::after {
  display: none;
}

.nav-overlay .nav-link:not(.madni-currency-open--overlay):hover {
  color: var(--color-gold);
}

/* -----------------------------------------------------------------------------
   5. SHARED FOOTER
   ----------------------------------------------------------------------------- */
.footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-gold);
  padding: var(--space-16) 0 var(--space-12);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
  }
}

.footer-logo {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-4);
}

.footer-copy,
.footer-col p {
  color: var(--color-ivory);
  font-size: var(--text-sm);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
}

.footer-links a {
  display: block;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .footer-links a {
    white-space: normal;
  }
}

.footer-social {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.footer-social a {
  color: var(--color-gold);
  font-size: var(--text-lg);
  transition: color var(--transition-smooth), transform var(--transition-smooth);
}

.footer-social a:hover {
  color: var(--color-gold-light);
  transform: translateY(-2px);
}

.whatsapp-float {
  position: fixed;
  right: var(--space-5);
  bottom: var(--space-5);
  z-index: 9500;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-gold);
  color: var(--color-ivory);
  box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.55),
    0 12px 40px rgba(201, 168, 76, 0.35);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.whatsapp-float svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.whatsapp-float:hover {
  transform: scale(1.05);
  box-shadow: 0 0 0 8px rgba(201, 168, 76, 0.12),
    0 16px 48px rgba(201, 168, 76, 0.45);
}

@media (max-width: 767px) {
  .whatsapp-float {
    animation: whatsapp-pulse 2.2s ease-in-out infinite;
  }
}

@keyframes whatsapp-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.45),
      0 10px 32px rgba(201, 168, 76, 0.35);
  }
  50% {
    box-shadow: 0 0 0 14px rgba(201, 168, 76, 0),
      0 14px 44px rgba(201, 168, 76, 0.5);
  }
}

/* -----------------------------------------------------------------------------
   6. SHARED BUTTONS
   ----------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  line-height: 1;
  border-radius: 0;
  padding: 16px 40px;
  transition: var(--transition-smooth);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--color-gold);
  color: var(--color-ivory);
  border-color: var(--color-gold);
}

.btn-primary:hover {
  transform: scale(1.02);
  box-shadow: 0 0 32px rgba(201, 168, 76, 0.45),
    0 0 0 1px rgba(201, 168, 76, 0.2);
}

.btn-outline {
  background: transparent;
  color: var(--color-gold);
  border-color: var(--color-gold);
}

.btn-outline:hover {
  background: var(--color-gold);
  color: var(--color-ivory);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--color-ivory);
  padding-inline: var(--space-4);
}

.btn-ghost:hover {
  color: var(--color-gold);
}

/* -----------------------------------------------------------------------------
   7. UTILITIES
   ----------------------------------------------------------------------------- */
.container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(24px, 4vw, 80px);
}

.container-narrow {
  max-width: 800px;
  margin-inline: auto;
  padding-inline: 24px;
}

.section-padding {
  padding: 80px 0;
}

@media (min-width: 768px) {
  .section-padding {
    padding: 120px 0;
  }
}

.gold-text {
  color: var(--color-gold);
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* -----------------------------------------------------------------------------
   8. GSAP REVEAL INITIAL STATES
   ----------------------------------------------------------------------------- */
.reveal-up {
  opacity: 0;
  transform: translateY(60px);
}

@media (max-width: 767px) {
  .reveal-up {
    transform: translateY(28px);
  }
}

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
}

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
}

.reveal-fade {
  opacity: 0;
}

.split-text {
  overflow: hidden;
}

/* -----------------------------------------------------------------------------
   9. LOADING SCREEN
   ----------------------------------------------------------------------------- */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
}

.loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
  width: min(90vw, 420px);
  text-align: center;
}

.loading-logo {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 12vw, 7rem);
  font-weight: 500;
  letter-spacing: 0.35em;
  color: var(--color-gold);
  text-transform: uppercase;
}

.loading-bar-wrap {
  width: 100%;
  height: 2px;
  background: rgba(201, 168, 76, 0.2);
  overflow: hidden;
}

.loading-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(
    90deg,
    var(--color-gold-dark),
    var(--color-gold),
    var(--color-gold-light)
  );
  transform-origin: left center;
}

.loading-tagline {
  font-size: var(--text-xs);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-ivory-muted);
}

/* -----------------------------------------------------------------------------
   10. CUSTOM CURSOR (desktop)
   ----------------------------------------------------------------------------- */
.custom-cursor,
.cursor-follower {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  body.use-custom-cursor * {
    cursor: none !important;
  }

  .custom-cursor,
  .cursor-follower {
    display: block;
  }

  .custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border-radius: 50%;
    background: var(--color-gold);
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.1s ease, opacity 0.2s ease, background 0.2s ease;
    will-change: transform;
  }

  .cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border-radius: 50%;
    border: 1px solid var(--color-gold);
    background: transparent;
    pointer-events: none;
    z-index: 9997;
    opacity: 0.6;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
      opacity 0.25s ease, border-color 0.2s ease;
    will-change: transform;
  }

  .custom-cursor.is-hover {
    transform: scale(1.85);
    background: var(--color-gold-light);
  }

  .cursor-follower.is-hover {
    transform: scale(1.45);
    opacity: 0.85;
  }
}

/* -----------------------------------------------------------------------------
   11. GRAIN OVERLAY
   ----------------------------------------------------------------------------- */
.grain {
  position: fixed;
  inset: 0;
  /* Below .navbar (9100); keep film grain over page content only. */
  z-index: 600;
  pointer-events: none;
  overflow: hidden;
}

.grain::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: #1a1814;
  opacity: 0.045;
  pointer-events: none;
  filter: url(#grain-noise);
  mix-blend-mode: multiply;
}

html[data-theme="dark"] .grain::before {
  background: #f5f2ea;
  opacity: 0.055;
  mix-blend-mode: overlay;
}

/* -----------------------------------------------------------------------------
   12. RESPONSIVE — mobile first (768 / 1024)
   ----------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .hide-mobile {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .show-mobile-only {
    display: none !important;
  }
}

/* -----------------------------------------------------------------------------
   Region & currency modal (injected by js/main.js)
   ----------------------------------------------------------------------------- */
html.madni-currency-modal-active {
  overflow: hidden;
}

.nav-currency-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 8px 12px;
  margin-right: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-gold);
  background: transparent;
  border: 1px solid rgba(201, 168, 76, 0.45);
  border-radius: 0;
  cursor: pointer;
  transition: background var(--transition-smooth), color var(--transition-smooth),
    border-color var(--transition-smooth);
}

.nav-currency-btn:hover {
  background: rgba(201, 168, 76, 0.12);
  border-color: var(--color-gold);
}

@media (max-width: 767px) {
  .navbar .nav-currency-btn:not(.madni-currency-open--overlay) {
    display: none;
  }
}

/* Currency in mobile menu: keep compact UI control (do not use mega menu link typography). */
#nav-overlay .madni-currency-open--overlay {
  flex-shrink: 0;
  margin-top: var(--space-6);
  width: 100%;
  max-width: 280px;
  justify-content: center;
  letter-spacing: 0.18em;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  line-height: 1;
  min-height: 44px;
}

.madni-currency-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100700;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  pointer-events: none;
}

.madni-currency-modal.is-open {
  display: flex;
  pointer-events: auto;
}

.madni-currency-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 25, 21, 0.72);
  cursor: pointer;
}

.madni-currency-modal__panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  max-height: min(88vh, 640px);
  overflow: auto;
  padding: var(--space-8) var(--space-7);
  background: var(--color-surface);
  border: 1px solid var(--color-gold);
  box-shadow: 0 28px 90px rgba(28, 25, 21, 0.18);
}

.madni-currency-modal__x {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border);
  background: var(--elevated-panel-strong);
  color: var(--color-gold);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}

.madni-currency-modal__x:hover {
  background: var(--color-gold);
  color: var(--color-ivory);
}

.madni-currency-modal__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-ivory);
  margin: 0 48px var(--space-4) 0;
  line-height: 1.2;
}

.madni-currency-modal__lead {
  font-size: var(--text-sm);
  color: var(--color-ivory-muted);
  line-height: 1.55;
  margin: 0 0 var(--space-6);
}

.madni-currency-modal__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.madni-currency-modal__list li {
  margin: 0;
}

.madni-currency-option {
  width: 100%;
  text-align: left;
  padding: var(--space-4) var(--space-5);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  letter-spacing: 0.06em;
  color: var(--color-ivory);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.madni-currency-option:hover {
  border-color: var(--color-gold);
  background: rgba(201, 168, 76, 0.08);
}

.madni-currency-modal__fineprint {
  margin: var(--space-6) 0 0;
  font-size: var(--text-xs);
  color: var(--color-ivory-muted);
  line-height: 1.45;
}
