/* ==========================================================================
   NEWBRAND HANDCRAFTED TILES — ARCHITECTURAL STYLESHEET
   Design Language: "Quiet Luxury", High-Whitespace Gallery & Material Tactility
   Typography: Helvetica Now Modernist Architecture Stack + Readex Pro (Arabic)
   ========================================================================== */

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

:root {
  /* Quiet Luxury Palette — Warm Alabaster, Gallery White & Architectural Charcoal */
  --c-bg: #FFFFFF;
  --c-bg-subtle: #FFFFFF;
  --c-bg-stone: #FFFFFF;
  --c-bg-elevated: #ECEAE4;
  --c-surface: #FFFFFF;

  --c-charcoal: #121210;
  --c-text-primary: #121210;
  --c-text-secondary: #52504B;
  --c-text-muted: #8A867E;
  --c-text-inverse: #FFFFFF;

  --c-gold: #1D1D1F;
  --c-gold-muted: #86868B;
  --c-cotto: #9C4B33;
  --c-emerald: #1B3D2F;

  --border-subtle: #D2D2D7;
  --border-light: #F5F5F7;
  --border-dark: #1D1D1F;

  /* Typography Stack — Helvetica Now Modernist */
  --font-sans: "helvetica-w01-light", "helvetica-w01-roman", "din-next-w01-light", Helvetica, Arial, sans-serif;
  --font-display: "helvetica-w01-light", "helvetica-w01-roman", "din-next-w01-light", Helvetica, Arial, sans-serif;
  --font-serif: var(--font-display);

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---------------- 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.65;
  font-size: 14px;
  background-color: var(--c-bg);
  color: var(--c-text-primary);
}

/* Subtle architectural grain */
.tactile-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

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

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

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

.heading-display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--c-text-primary);
}

.heading-sub {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: -0.01em;
  font-weight: 600;
  color: var(--c-text-muted);
}

/* ---------------- Custom Scrollbar ---------------- */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: var(--c-bg-subtle);
}
::-webkit-scrollbar-thumb {
  background: #D8D4CA;
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--c-gold);
}

/* ---------------- Header & Navigation ---------------- */
.site-nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.4s var(--ease-out-expo);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border-subtle);
}

.site-nav.transparent-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

.site-nav.transparent-nav:not(.scrolled) {
  background: transparent;
  border-bottom-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.site-nav.scrolled {
  background: rgba(255, 255, 255, 0.98);
  padding-top: 10px;
  padding-bottom: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.site-nav.menu-open,
.site-nav.transparent-nav.menu-open {
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav-link {
  position: relative;
  font-size: 14px;
  letter-spacing: -0.01em;
  font-weight: 400;
  color: var(--c-text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
  padding: 8px 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--c-text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--c-gold);
  transition: width 0.3s var(--ease-out-expo);
}

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

/* ---------------- Interactive Zellige Sheen (Light Effect) ---------------- */
.tile-tilt-container {
  perspective: 1000px;
  transform-style: preserve-3d;
}

.tile-interactive-card {
  position: relative;
  background: var(--c-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  overflow: hidden;
  transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s ease, border-color 0.3s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
  .tile-interactive-card:hover {
    border-color: #D5D0C5;
    box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.06);
  }
}

.tile-specular-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.35s ease;
  mix-blend-mode: soft-light;
  background: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.35) 30%,
    transparent 70%
  );
  z-index: 10;
}

@media (hover: hover) and (pointer: fine) {
  .tile-interactive-card:hover .tile-specular-sheen {
    opacity: 1;
  }
}

/* ---------------- Architectural Buttons ---------------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--c-charcoal);
  color: var(--c-text-inverse);
  font-size: 15px;
  letter-spacing: -0.01em;
  font-weight: 500;
  border: 1px solid var(--c-charcoal);
  border-radius: 9999px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
}

.btn-primary:hover {
  background: var(--c-gold);
  border-color: var(--c-gold);
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(140, 115, 75, 0.2);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: transparent;
  color: var(--c-text-primary);
  font-size: 15px;
  letter-spacing: -0.01em;
  font-weight: 500;
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
}

.btn-outline:hover {
  background: var(--c-charcoal);
  border-color: var(--c-charcoal);
  color: #FFFFFF;
  transform: translateY(-1px);
}

/* ---------------- Filter Pills ---------------- */
.filter-pill {
  padding: 10px 20px;
  font-size: 14px;
  letter-spacing: -0.01em;
  font-weight: 500;
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  background: var(--c-bg-subtle);
  color: var(--c-text-secondary);
  cursor: pointer;
  transition: all 0.25s ease;
}

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

/* ---------------- Sample Kit Drawer (Slide-over) ---------------- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 18, 16, 0.45);
  backdrop-filter: blur(6px);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s 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-subtle);
  z-index: 2001;
  transform: translateX(100%);
  transition: transform 0.45s var(--ease-out-expo);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.06);
}

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

.drawer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--c-gold);
  color: white;
  border-radius: 9999px;
  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: #FFFFFF;
    padding: 20px 24px 28px;
    border-bottom: 1px solid var(--border-subtle);
    gap: 4px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }
  .site-nav .nav-menu.mobile-open .nav-link {
    display: block;
    width: 100%;
    padding: 12px 0;
    font-size: 16px;
    border-bottom: 1px solid #F5F5F7;
  }
  .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 var(--border-subtle);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    max-height: 85vh;
    max-height: 85dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.35s var(--ease-out-expo);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.12);
    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 #E5E5EA;
  background: #FFFFFF;
  color: #1D1D1F;
  transition: all 0.3s var(--ease-out-expo);
}

.nav-contact-btn:hover {
  border-color: #1D1D1F;
}

.site-nav.transparent-nav:not(.scrolled) .nav-contact-btn {
  border: 1px solid rgba(29, 29, 31, 0.3);
  background: transparent;
  color: #1D1D1F;
}

.site-nav.transparent-nav:not(.scrolled) .nav-contact-btn:hover {
  background: rgba(29, 29, 31, 0.05);
  border-color: #1D1D1F;
}

/* Mobile Menu Toggle */
.mobile-toggle-btn {
  color: rgba(29, 29, 31, 0.8);
}
.mobile-toggle-btn:hover {
  color: #1D1D1F;
}

/* ---------------- Language Switcher ---------------- */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid #E5E5EA;
  background: rgba(245, 245, 247, 0.85);
  padding: 2px;
  gap: 2px;
}

.site-nav.transparent-nav:not(.scrolled) .lang-switcher {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(29, 29, 31, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lang-btn {
  color: #6E6E73;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
}

.lang-btn:hover {
  color: #1D1D1F;
}

.lang-btn.active {
  background: #1D1D1F;
  color: #FFFFFF;
}

/* ---------------- RTL (Dubai Arabic ar-AE) Overrides ---------------- */
html[dir="rtl"] {
  --font-sans: "Readex Pro", "helvetica-w01-light", "Geeza Pro", "SF Arabic", Arial, sans-serif;
  --font-display: "Readex Pro", "helvetica-w01-light", "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;
}


