/* ==========================================================================
   NOFOTEH STUDIO — LUXURY EDITORIAL DESIGN SYSTEM (EDITION V13)
   High-Contrast Monochrome, Strict Grid Geometry, Apple-Style Search Overlay
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=Space+Grotesk:wght@600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --bg-color: #FFFFFF;
  --bg-subtle: #F9F9F9;
  --text-primary: #000000;
  --text-secondary: #333333;
  --text-muted: #666666;
  --border-color: #000000;
  --border-light: #E5E5E5;

  --font-main: 'Cairo', 'IBM Plex Sans Arabic', -apple-system, sans-serif;
  --font-display: 'Cairo', 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', 'Cairo', monospace;

  --border-width: 1px;
  --transition-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset: Absolute 0px border-radius */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0 !important;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-color);
  color: var(--text-primary);
  direction: rtl;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-primary);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.mega-title {
  font-size: clamp(2.5rem, 8vw, 7.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ==========================================================================
   1. NAVBAR
   ========================================================================== */
.swiss-navbar {
  border-bottom: var(--border-width) solid var(--border-color);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 68px;
}

.brand-logo {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #000000;
  text-decoration: none;
}

.nav-link {
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 700;
  color: #000000;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  transition: var(--transition-fast);
}

.nav-link:hover {
  opacity: 0.5;
}

/* ==========================================================================
   2. APPLE-STYLE GLOBAL SEARCH OVERLAY & DROPDOWN PANEL
   ========================================================================== */
.search-overlay-mask {
  position: fixed;
  inset: 0;
  top: 68px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-overlay-mask.active {
  opacity: 1;
  pointer-events: auto;
}

.search-dropdown-panel {
  position: fixed;
  top: 68px;
  right: 0;
  left: 0;
  width: 100%;
  background: #FFFFFF;
  border-bottom: 2px solid #000000;
  z-index: 95;
  transform: translateY(-100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  direction: rtl;
  text-align: right;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}

.search-dropdown-panel.active {
  transform: translateY(0);
}

.search-giant-input {
  width: 100%;
  border: none !important;
  outline: none !important;
  background: transparent;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.8vw, 2.9rem);
  font-weight: 800;
  color: #000000;
  letter-spacing: -0.02em;
  padding: 1.25rem 0;
  line-height: 1.2;
}

.search-giant-input::placeholder {
  color: #A3A3A3;
  font-weight: 600;
}

.apple-quick-link-btn {
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 700;
  color: #222222;
  padding: 0.45rem 0.9rem;
  border: 1px solid #E5E5E5;
  background: #F9F9F9;
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
}

.apple-quick-link-btn:hover,
.apple-quick-link-btn.active {
  background: #000000;
  color: #FFFFFF !important;
  border-color: #000000;
}

/* ==========================================================================
   3. HERO SECTION — FULL SCREEN CROSSFADE SLIDER
   ========================================================================== */
.nofoteh-hero {
  position: relative;
  width: 100%;
  height: calc(100vh - 68px);
  min-height: 620px;
  overflow: hidden;
  border-bottom: var(--border-width) solid var(--border-color);
  background: #000000;
}

.slider-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.slide-item {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-item.active {
  opacity: 1;
  pointer-events: auto;
}

.slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(105%) brightness(90%);
}

/* Center Floating Editorial Box */
.nofoteh-center-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  background: #FFFFFF;
  border: 1px solid #000000;
  padding: 3.5rem 4rem;
  max-width: 720px;
  width: 90%;
  box-shadow: -12px 12px 0px #000000;
  text-align: right;
  direction: rtl;
}

@media (max-width: 640px) {
  .nofoteh-center-box {
    padding: 2.25rem 1.75rem;
  }
}

.nofoteh-hero-text {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.2vw, 3.4rem);
  font-weight: 900;
  line-height: 1.2;
  color: #000000;
  margin: 1.25rem 0;
}

.highlight-bracket {
  display: inline-block;
  color: #000000;
  border-bottom: 3px solid #000000;
}

.nofoteh-hero-sub {
  font-family: var(--font-main);
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 580px;
}

/* Bottom Right: Collection Exhibit Name in RTL */
.hero-corner-right-tag {
  position: absolute;
  bottom: 2rem;
  right: 2.5rem;
  z-index: 20;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #000000;
  padding: 0.5rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Bottom Left: Pagination Dots */
.hero-corner-left-dots {
  position: absolute;
  bottom: 2rem;
  left: 2.5rem;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #000000;
  padding: 0.55rem 1.1rem;
}

.pagination-dot {
  width: 10px;
  height: 10px;
  border: 1px solid #000000;
  background: transparent;
  cursor: pointer;
  transition: var(--transition-fast);
}

.pagination-dot.active {
  background: #000000;
}

.pagination-dot:hover {
  background: #555555;
}

/* ==========================================================================
   4. PRODUCTS GRID & REPOSITORY (STRICT BORDER GEOMETRY)
   ========================================================================== */
.products-grid-wrapper {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  border-top: var(--border-width) solid var(--border-color);
  border-right: var(--border-width) solid var(--border-color);
}

@media (min-width: 640px) {
  .products-grid-wrapper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .products-grid-wrapper {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.swiss-product-card {
  border-left: var(--border-width) solid var(--border-color);
  border-bottom: var(--border-width) solid var(--border-color);
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition-fast);
}

.swiss-product-card:hover {
  background: var(--bg-subtle);
}

.swiss-product-img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-bottom: var(--border-width) solid var(--border-color);
  display: block;
  transition: transform 0.4s ease;
}

.swiss-product-card:hover .swiss-product-img {
  transform: scale(1.02);
}

.swiss-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.product-title-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  color: #000000;
}

.product-price-num {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: #000000;
}

/* Invert Buttons on Hover */
.btn-swiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.75rem 1.4rem;
  border: var(--border-width) solid var(--border-color);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-fast);
  outline: none;
}

.btn-swiss:hover {
  background: var(--text-primary);
  color: #FFFFFF !important;
}

.btn-swiss-black {
  background: var(--text-primary);
  color: #FFFFFF !important;
  border: var(--border-width) solid var(--border-color);
}

.btn-swiss-black:hover {
  background: transparent;
  color: var(--text-primary) !important;
}

.btn-whatsapp {
  background: #000000 !important;
  color: #FFFFFF !important;
  border: 1px solid #000000;
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  width: 100%;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-whatsapp:hover {
  background: #FFFFFF !important;
  color: #000000 !important;
}

.btn-instagram {
  background: transparent !important;
  color: #000000 !important;
  border: 1px solid #000000;
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.85rem;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-instagram:hover {
  background: #000000 !important;
  color: #FFFFFF !important;
}

/* Skeletons */
@keyframes swissShimmer {
  0% { opacity: 0.3; }
  50% { opacity: 0.8; }
  100% { opacity: 0.3; }
}

.skeleton-box {
  background: #EEEEEE;
  animation: swissShimmer 1.4s infinite ease-in-out;
}

.skeleton-card {
  border-left: var(--border-width) solid var(--border-color);
  border-bottom: var(--border-width) solid var(--border-color);
  padding: 0;
  background: #FFFFFF;
}

/* Visual Color Swatches */
.color-swatch-circle {
  width: 24px;
  height: 24px;
  border: 1px solid #000000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: transparent;
  transition: var(--transition-fast);
}

.color-swatch-circle.active {
  box-shadow: inset 0 0 0 2px #000000;
  outline: 2px solid #000000;
  outline-offset: 2px;
}

/* ==========================================================================
   5. MODALS & FORMS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1.5rem;
}

.modal-content-swiss {
  background: #FFFFFF;
  border: 2px solid #000000;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: -10px 10px 0px #000000;
  direction: rtl;
  text-align: right;
}

.modal-header-swiss {
  border-bottom: 2px solid #000000;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #000000;
  color: #FFFFFF;
}

.modal-header-swiss h3 {
  color: #FFFFFF;
  font-size: 1.2rem;
  font-family: var(--font-display);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: #FFFFFF;
  font-size: 1.5rem;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
}

.modal-body-swiss {
  padding: 2rem;
}

.form-input-swiss {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid #000000;
  background: #FFFFFF;
  font-family: var(--font-main);
  font-size: 0.9rem;
  color: #000000;
  outline: none;
  transition: var(--transition-fast);
}

.form-input-swiss:focus {
  background: var(--bg-subtle);
  outline: 2px solid #000000;
}

/* ==========================================================================
   6. FOOTER (GIANT TYPOGRAPHY & CLEAN 3-COLUMN DIRECTORY)
   ========================================================================== */
.giant-footer-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 16vw, 15rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.85;
  text-transform: uppercase;
  color: #000000;
  user-select: none;
  margin-bottom: 2rem;
  direction: ltr;
  text-align: right;
}

.footer-nav-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 2.5rem;
  border-top: var(--border-width) solid var(--border-color);
  padding: 3rem 0;
  direction: rtl;
  text-align: right;
}

@media (min-width: 768px) {
  .footer-nav-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast-swiss {
  background: #000000;
  color: #FFFFFF;
  padding: 0.85rem 1.4rem;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid #000000;
  box-shadow: -4px 4px 0px #000000;
}


/* ==========================================================================
   SWISS SPECS MODAL & MULTI-IMAGE SLIDER (EDITION V15)
   ========================================================================== */

.modal-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: #000000;
  color: #FFFFFF;
  border: 1px solid #000000;
  font-size: 22px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  transition: all 0.15s ease;
  border-radius: 0px !important;
}

.modal-slider-arrow:hover {
  background: #FFFFFF;
  color: #000000;
}

.modal-arrow-prev {
  right: 12px;
}

.modal-arrow-next {
  left: 12px;
}

.modal-slider-counter {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.85);
  color: #FFFFFF;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 0px !important;
  letter-spacing: 1px;
  z-index: 15;
}

.modal-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border: 1px solid #E5E5E5;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 0px !important;
  transition: all 0.15s ease;
}

.modal-thumb:hover {
  border-color: #000000;
}

.modal-thumb.active {
  border: 2px solid #000000;
}


/* ==========================================================================
   MOBILE RESPONSIVENESS & TOUCH OPTIMIZATIONS (EDITION V22)
   ========================================================================== */

/* 1. Mobile Product Grid (2 columns on mobile, 1 column on narrow screens) */
@media (max-width: 640px) {
  .products-grid-wrapper, #productsGrid, #giftsGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0px !important;
  }
  .swiss-product-img {
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    object-fit: cover !important;
  }
  .swiss-product-info {
    padding: 10px 8px !important;
  }
  .swiss-product-title {
    font-size: 13px !important;
    line-height: 1.35 !important;
    height: 2.7em !important;
    overflow: hidden !important;
  }
  .swiss-product-price {
    font-size: 14px !important;
    margin: 4px 0 !important;
  }
}

@media (max-width: 360px) {
  .products-grid-wrapper, #productsGrid, #giftsGrid {
    grid-template-columns: 1fr !important;
  }
}

/* 2. Modals Mobile Stacking & Internal Scrolling */
.modal-overlay, .gallery-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-content-swiss, .gallery-modal-content, .modal-card {
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #FFFFFF;
  border: 2px solid #000000;
  box-shadow: 8px 8px 0px #000000;
  width: 100%;
}

@media (max-width: 768px) {
  .modal-overlay, .gallery-modal-overlay {
    padding: 8px !important;
    align-items: flex-start !important;
  }
  .modal-content-swiss, .gallery-modal-content, .modal-card {
    max-height: 94vh !important;
    margin: 8px auto !important;
    box-shadow: 4px 4px 0px #000000 !important;
  }
  .modal-body-swiss, .gallery-modal-body {
    grid-template-columns: 1fr !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 18px !important;
    padding: 16px !important;
  }
  .modal-header-swiss, .gallery-modal-header {
    padding: 12px 16px !important;
  }
  .instagram-reel-frame {
    height: 400px !important;
  }
}

/* 3. Scaled Swiss Typography on Mobile */
@media (max-width: 768px) {
  .giant-footer-title {
    font-size: clamp(2.5rem, 16vw, 4.5rem) !important;
    letter-spacing: -1px !important;
    line-height: 1 !important;
    margin-bottom: 1.5rem !important;
  }
  .nofoteh-hero-text {
    font-size: clamp(1.6rem, 6.5vw, 2.4rem) !important;
    line-height: 1.25 !important;
    margin: 0.75rem 0 !important;
  }
  .brand-logo {
    font-size: 20px !important;
  }
  .nofoteh-center-box {
    padding: 24px 16px !important;
  }
  .swiss-navbar {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* 4. Horizontal Scrollable Quick Nav Strip for Mobile */
.mobile-nav-strip {
  display: none;
}

@media (max-width: 768px) {
  .mobile-nav-strip {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #FFFFFF;
    border-bottom: 1px solid #000000;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .mobile-nav-strip::-webkit-scrollbar {
    display: none;
  }
  .mobile-nav-link {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid #000000;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    color: #000000;
    background: #FFFFFF;
    transition: all 0.15s ease;
  }
  .mobile-nav-link.active, .mobile-nav-link:hover {
    background: #000000;
    color: #FFFFFF;
  }
  .mobile-nav-link.highlight {
    background: #F5F5F5;
  }
}

/* 5. Instagram Reels Embed & Media Tabs */
.modal-media-tabs {
  display: flex;
  border: 2px solid #000000;
  margin-bottom: 10px;
  background: #FFFFFF;
}

.modal-tab-btn {
  flex: 1;
  padding: 8px 12px;
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  font-weight: 800;
  background: #FFFFFF;
  color: #000000;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.modal-tab-btn.active {
  background: #000000;
  color: #FFFFFF;
}

.modal-reel-box {
  border: 2px solid #000000;
  background: #000000;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.instagram-reel-frame {
  width: 100%;
  height: 480px;
  border: none;
  background: #FFFFFF;
}

.product-reel-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #000000;
  color: #FFFFFF;
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  z-index: 10;
  border: 1px solid #FFFFFF;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
