/* ==========================================================================
   MUDBOARD — BRAND MASTER BRIEF V4 STYLESHEET
   Design Language: Editorial, Not Exclusive — Burgundy (#572328) + Warm Cream (#F4EDDA)
   Catalogue & Product Content: Pure White (#FFFFFF) with Crisp #E5E5E5 Borders
   Typography: Helvetica Now Display / Text + Readex Pro (Arabic)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Readex+Pro:wght@300;400;500;600;700&display=swap');

:root {
  --brand-burgundy: #572328;
  --brand-burgundy-hover: #42191D;
  --brand-cream: #F4EDDA;
  --brand-cream-border: #D9CEB6;
  --product-bg: #FFFFFF;
  --border: #E5E5E5;
  --button-bg: #572328;
  --button-text: #FFFFFF;
  --font-display: "Helvetica Now Display", Helvetica, Arial, sans-serif;
  --font-body: "Helvetica Now Text", var(--font-display);
  --radius: 2px;
  --space-unit: 8px;

  /* Semantic & legacy aliases */
  --c-bg: var(--brand-cream);
  --c-bg-subtle: var(--product-bg);
  --c-bg-stone: var(--brand-cream);
  --c-bg-elevated: var(--brand-cream);
  --c-surface: var(--product-bg);
  --c-charcoal: var(--brand-burgundy);
  --c-text-primary: var(--brand-burgundy);
  --c-text-body: #3A1A1D;
  --c-text-secondary: #595959;
  --c-text-muted: #664346;
  --c-text-inverse: #FFFFFF;
  --c-gold: var(--brand-burgundy);
  --c-gold-muted: #664346;
  --border-subtle: var(--border);
  --border-light: var(--border);
  --border-dark: var(--brand-burgundy);
  --font-sans: var(--font-body);
  --font-serif: var(--font-display);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* Mandatory pure white for catalogue & product content (V4 override) */
.catalogue-content,
.product-content {
  background: #FFFFFF;
}

/* ---------------- Base & Reset ---------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--c-bg);
  color: var(--c-text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
  line-height: 1.6;
  font-size: 16px;
  font-family: var(--font-body);
  background-color: var(--c-bg);
  color: var(--c-text-primary);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--brand-burgundy);
  outline-offset: 2px;
}

[data-surface="burgundy"] a:focus-visible,
[data-surface="burgundy"] button:focus-visible {
  outline-color: var(--brand-cream);
}

/* Decorative grain disabled per V4 */
.tactile-grain {
  display: none;
}

/* ---------------- Typography Helpers ---------------- */
.font-display {
  font-family: var(--font-display);
}

.font-sans {
  font-family: var(--font-sans);
}

.font-serif {
  font-family: var(--font-display);
}

.hero-display {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.heading-display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--brand-burgundy);
}

.heading-sub {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--brand-burgundy);
}

/* ---------------- Custom Scrollbar ---------------- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--product-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--brand-cream-border);
  border-radius: var(--radius);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--brand-burgundy);
}

/* ---------------- Header & Navigation ---------------- */
.site-nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  background: var(--brand-cream);
  border-bottom: 1px solid var(--brand-cream-border);
}

.site-nav.menu-open {
  background: var(--brand-cream);
  border-bottom: 1px solid var(--brand-cream-border);
}

.nav-link {
  position: relative;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--brand-burgundy);
  text-decoration: none;
  transition: opacity 0.2s ease;
  padding: 8px 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--brand-burgundy);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--brand-burgundy);
  transition: width 0.25s var(--ease-out-expo);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* ---------------- Product Cards ---------------- */
.tile-tilt-container {
  perspective: none;
}

.tile-interactive-card {
  position: relative;
  background: var(--product-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .tile-interactive-card:hover {
    border-color: var(--brand-burgundy);
  }
}

.tile-specular-sheen {
  display: none;
}

/* ---------------- Brand Buttons ---------------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 12px 24px;
  background: var(--button-bg);
  color: var(--button-text);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid var(--button-bg);
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-primary:hover {
  background: var(--brand-burgundy-hover);
  border-color: var(--brand-burgundy-hover);
  color: #FFFFFF;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 12px 24px;
  background: #FFFFFF;
  color: var(--brand-burgundy);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid var(--brand-burgundy);
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-outline:hover {
  background: var(--brand-burgundy);
  border-color: var(--brand-burgundy);
  color: #FFFFFF;
}

.btn-hero-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 12px 28px;
  background: transparent;
  color: #FFFFFF;
  border: 1px solid var(--brand-cream);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-hero-outline:hover {
  background: var(--brand-cream);
  color: var(--brand-burgundy);
}

/* ---------------- Filter Pills ---------------- */
.filter-pill {
  padding: 10px 20px;
  font-size: 13px;
  letter-spacing: 0.02em;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--product-bg);
  color: var(--brand-burgundy);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-pill:hover, .filter-pill.active {
  background: var(--brand-burgundy);
  color: #FFFFFF;
  border-color: var(--brand-burgundy);
  font-weight: 500;
}

/* ---------------- Sample Kit Drawer (Slide-over) ---------------- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(87, 35, 40, 0.35);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out-expo);
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.sample-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 440px;
  background: #FFFFFF;
  border-left: 1px solid var(--border);
  z-index: 2001;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease-out-expo);
  display: flex;
  flex-direction: column;
}

.sample-drawer.open {
  transform: translateX(0);
}

.drawer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-burgundy);
  color: #FFFFFF;
  border-radius: var(--radius);
  font-size: 0.65rem;
  width: 18px;
  height: 18px;
  font-weight: 600;
}

/* ---------------- Interactive Hotspots on Lookbook ---------------- */
.lookbook-hotspot {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(18, 18, 16, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease;
  backdrop-filter: blur(4px);
}

.lookbook-hotspot::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c-charcoal);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}

.lookbook-hotspot:hover {
  transform: scale(1.15);
}

.hotspot-tooltip {
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: #FFFFFF;
  color: var(--c-text-primary);
  border: 1px solid var(--border-subtle);
  padding: 10px 16px;
  white-space: nowrap;
  font-size: 0.72rem;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s var(--ease-out-expo);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.lookbook-hotspot:hover .hotspot-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------------- Scroll-to-top & Compare Bar Clearance ---------------- */
body.has-compare-bar #newbrand-scroll-top {
  bottom: 5.5rem;
}

/* ---------------- Responsive Tweaks ---------------- */
@media (max-width: 767px) {
  .site-nav .nav-menu {
    display: none;
  }
  .site-nav .nav-menu.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--brand-cream);
    padding: 16px 20px 24px;
    border-bottom: 1px solid var(--brand-cream-border);
    gap: 2px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }
  .site-nav .nav-menu.mobile-open .nav-link {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 10px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--brand-cream-border);
  }
  .site-nav .nav-menu.mobile-open .nav-link:last-child {
    border-bottom: none;
  }
  .site-nav .nav-menu.mobile-open .nav-link::after {
    display: none;
  }

  .collections-filter-sheet {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 2001;
    background: #FFFFFF;
    border-top: 1px solid #E5E5E5;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    max-height: 85vh;
    max-height: 85dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.35s var(--ease-out-expo);
    pointer-events: none;
  }
  .collections-filter-sheet.open {
    transform: translateY(0);
    pointer-events: auto;
  }
  .collections-filter-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .collections-filter-footer {
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
}

/* ---------------- Nav Contact Button ---------------- */
.nav-contact-btn {
  border: 1px solid var(--brand-burgundy);
  border-radius: var(--radius);
  background: transparent;
  color: var(--brand-burgundy);
  min-height: 40px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-contact-btn:hover {
  background: var(--brand-burgundy);
  color: #FFFFFF;
  border-color: var(--brand-burgundy);
}

/* Mobile Menu Toggle */
.mobile-toggle-btn {
  color: var(--brand-burgundy);
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
}
.mobile-toggle-btn:hover {
  background: rgba(87, 35, 40, 0.08);
}
@media (min-width: 768px) {
  .mobile-toggle-btn {
    display: none;
  }
}

/* ---------------- Language Switcher ---------------- */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius);
  border: 1px solid rgba(87, 35, 40, 0.35);
  background: var(--brand-cream);
  padding: 2px;
  gap: 2px;
}

.lang-btn {
  color: var(--brand-burgundy);
  font-weight: 500;
  line-height: 1.2;
  min-height: 32px;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
}

.lang-btn:hover {
  background: rgba(87, 35, 40, 0.08);
}

.lang-btn.active {
  background: var(--brand-burgundy);
  color: #FFFFFF;
}

/* ---------------- RTL (Dubai Arabic ar-AE) Overrides ---------------- */
html[dir="rtl"] {
  --font-sans: "Readex Pro", "Helvetica Now Text", "Helvetica Now Display", "Geeza Pro", "SF Arabic", Arial, sans-serif;
  --font-display: "Readex Pro", "Helvetica Now Display", "Geeza Pro", "SF Arabic", Arial, sans-serif;
  --font-serif: var(--font-display);
}

html[dir="rtl"] body {
  line-height: 1.75;
}

html[dir="rtl"] * {
  letter-spacing: 0 !important;
}

html[dir="rtl"] .heading-display {
  line-height: 1.22;
}

html[dir="rtl"] .nav-link::after {
  left: auto;
  right: 0;
}

html[dir="rtl"] .sample-drawer {
  right: auto;
  left: 0;
  border-left: none;
  border-right: 1px solid var(--border-subtle);
  transform: translateX(-100%);
  box-shadow: 10px 0 40px rgba(0, 0, 0, 0.06);
}

html[dir="rtl"] .sample-drawer.open {
  transform: translateX(0);
}

html[dir="rtl"] .rtl-flip-arrow {
  display: inline-block;
  transform: scaleX(-1);
}

html[dir="rtl"] .designer-note-box {
  border-left-width: 0;
  border-right-width: 2px;
  padding-left: 0;
  padding-right: 1rem;
}

html[dir="rtl"] .nb-search-input {
  padding-left: 2rem;
  padding-right: 2.5rem;
}

html[dir="rtl"] .nb-search-icon {
  left: auto;
  right: 0.75rem;
}

html[dir="rtl"] .nb-search-clear {
  right: auto;
  left: 0.75rem;
}

html[dir="rtl"] .nb-modal-close {
  right: auto;
  left: 1rem;
}

html[dir="rtl"] #compare-table-container table,
html[dir="rtl"] #compare-table-container th[scope="row"] {
  text-align: right;
}

html[dir="rtl"] #compare-table-container th[scope="row"],
html[dir="rtl"] #compare-table-container thead th:first-child,
html[dir="rtl"] #compare-table-container tbody tr:last-child td:first-child {
  border-right-width: 0;
  border-left-width: 1px;
}

@media (min-width: 768px) {
  html[dir="rtl"] .footer-contact-col {
    text-align: left;
  }
}

html[dir="rtl"] #newbrand-scroll-top {
  right: auto;
  left: 1.5rem;
}


