/* =====================================================
   RESET
===================================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 32px;
  --space-lg: 48px;
  --space-xl: 80px;

  --ink:       #1d1d1f;
  --ink2:      #6e6e73;
  --ink3:      #aeaeb2;
  --surface:   rgba(255,255,255,0.85);
  --border:    rgba(0,0,0,0.08);
  --hover-bg:  rgba(0,0,0,0.05);
  --accent:    #0071e3;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

body.menu-open { overflow: hidden; }

/* =====================================================
   ANNOUNCEMENT BAR
===================================================== */
.announcement-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 3100;
  overflow: hidden;
  background: #000;
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 0.5px solid rgba(255,255,255,0.08);
  color: #fff;
  font-size: 12.5px;
}

.announcement-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,0.08), transparent 80%);
  opacity: 0.4;
  animation: shine 6s linear infinite;
  pointer-events: none;
}

@keyframes shine {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Ticker */
.announcement-ticker {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  height: 100%;
}

.ticker-track {
  display: flex;
  gap: 20px;
  white-space: nowrap;
  animation: ticker-scroll 28s linear infinite;
  will-change: transform;
}

.ticker-track:hover { animation-play-state: paused; }

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-right: 80px;
  letter-spacing: 0.04em;
  opacity: 0.9;
  transition: opacity .3s ease;
}

.ticker-item:hover { opacity: 1; }
.ticker-item .icon { font-size: 13px; opacity: 0.85; }
.ticker-item strong { color: #f5c542; font-weight: 600; }

.ticker-sep {
  padding-right: 80px;
  color: rgba(255,255,255,0.25);
}

html[dir="rtl"] .ticker-track { direction: rtl; }

/* Boutons barre */
.bar-lang-btn,
.bar-track-btn {
  flex-shrink: 0;
  background: #000;
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  cursor: pointer;
  transition: all .25s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.bar-lang-btn {
  margin-left: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  padding: 5px 14px;
  white-space: nowrap;
}

.bar-track-btn {
  margin-left: 8px;
  font-size: 14px;
  line-height: 1;
  padding: 5px 10px;
}

.bar-lang-btn:hover,
.bar-track-btn:hover {
  background: #fff;
  color: #111;
  border-color: #fff;
  box-shadow: 0 4px 14px rgba(255,255,255,0.25);
  transform: translateY(-1px);
}

/* =====================================================
   HEADER
===================================================== */
.header {
  position: fixed;
  top: 20px;
  left: 0;
  width: 100%;
  height: 52px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 3000;
  background: transparent;
  transition: background .35s ease, border-color .35s ease, backdrop-filter .35s ease;
}

.header.scrolled,
body.menu-open .header,
.header.mega-active {
  background: rgba(255,255,255,0.97);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--border);
}

/* =====================================================
   LOGO
===================================================== */
.logo { z-index: 500; }

.logo img {
  height: 150px;
  width: auto;
  display: block;
}

@media (max-width: 768px) {
  .logo img { height: 80px; }
}

/* =====================================================
   NAVBAR DESKTOP
===================================================== */
.navbar-desktop {
  display: flex;
  align-items: center;
  gap: 2px;
  position: static;
}

.nav-item { position: static; }

.navbar-desktop a {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.1px;
  color: #fff;
  padding: 6px 14px;
  display: block;
  transition: background .2s ease, color .2s ease;
}

.navbar-desktop a::after { display: none; }

.navbar-desktop a:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.header.scrolled .navbar-desktop a,
body.menu-open .header .navbar-desktop a,
.header.mega-active .navbar-desktop a {
  color: var(--ink);
}

.header.scrolled .navbar-desktop a:hover,
.header.mega-active .navbar-desktop a:hover {
  background: var(--hover-bg);
  color: var(--ink);
}

/* =====================================================
   ICONS
===================================================== */
.icons {
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 10001;
}

.icon-btn,
.icons a {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background .2s ease;
  color: var(--ink);
  text-decoration: none;
  position: relative;
}

.icon-btn:hover,
.icons a:hover {
  background: rgba(255,255,255,0.15);
}

.header.scrolled .icon-btn:hover,
.header.scrolled .icons a:hover,
.header.mega-active .icon-btn:hover,
.header.mega-active .icons a:hover,
body.menu-open .header .icon-btn:hover,
body.menu-open .header .icons a:hover {
  background: rgba(0,0,0,0.06);
}

/* Font Awesome */
.fa-solid,
.fa-regular,
.fas {
  font-size: 15px;
  color: #fff;
}

.fa-solid { font-family: "Font Awesome 6 Free" !important; font-weight: 900 !important; }
.fa-regular { font-family: "Font Awesome 6 Free" !important; font-weight: 400 !important; }

.header.scrolled .fa-solid,
.header.scrolled .fa-regular,
.header.scrolled .fas,
.header.mega-active .fa-solid,
.header.mega-active .fa-regular,
.header.mega-active .fas,
body.menu-open .header .fa-solid,
body.menu-open .header .fa-regular,
body.menu-open .header .fas {
  color: var(--ink);
}

/* User icon contour */
#userLink .fas.fa-user {
  color: transparent !important;
  -webkit-text-stroke: 1.5px #fff !important;
}

.header.scrolled #userLink .fas.fa-user,
.header.mega-active #userLink .fas.fa-user,
body.menu-open .header #userLink .fas.fa-user {
  color: transparent !important;
  -webkit-text-stroke: 1.5px var(--ink) !important;
}

/* Bag SVG */
.icon-shopping-bag { stroke: #fff !important; }

.header.scrolled .icon-shopping-bag,
.header.mega-active .icon-shopping-bag,
body.menu-open .header .icon-shopping-bag {
  stroke: #111 !important;
}

/* =====================================================
   CART BADGE
===================================================== */
.cart-count {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  min-width: 15px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 0 3px;
  border: 1.5px solid #f5f5f7;
  z-index: 10;
  transition: transform .2s ease;
}

.cart-count.bump { transform: scale(1.3); }

@media (max-width: 480px) {
  .cart-count {
    top: 1px;
    right: 1px;
    min-width: 14px;
    height: 14px;
    font-size: 8px;
  }
}

/* =====================================================
   HAMBURGER
===================================================== */
.menu-toggle {
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10000;
  cursor: pointer;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
  transition: background .2s ease;
}

.menu-toggle:hover { background: rgba(255,255,255,0.12); }

.header.scrolled .menu-toggle:hover,
body.menu-open .menu-toggle:hover {
  background: rgba(0,0,0,0.06);
}

.burger-line {
  display: block;
  height: 1.5px;
  background: #fff;
  border-radius: 2px;
  transition: transform .38s cubic-bezier(.4,0,.2,1),
              width     .3s  cubic-bezier(.4,0,.2,1),
              opacity   .25s ease;
  transform-origin: center;
}

.burger-line:nth-child(1) { width: 20px; }
.burger-line:nth-child(2) { width: 14px; }

.header.scrolled .burger-line,
body.menu-open .burger-line {
  background: var(--ink);
}

.menu-toggle.active .burger-line:nth-child(1) {
  width: 18px;
  transform: translateY(3.75px) rotate(45deg);
}

.menu-toggle.active .burger-line:nth-child(2) {
  width: 18px;
  transform: translateY(-3.75px) rotate(-45deg);
}

@media (max-width: 1024px) {
  .menu-toggle { display: flex; }
}

/* =====================================================
   MEGA MENU
===================================================== */
.mega-menu {
  position: fixed;
  left: 0;
  width: 100%;
  background: #fff;
  padding: 48px 0 44px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s;
  border-bottom: 0.5px solid var(--border);
  z-index: 1500;
}

.mega-menu.is-open {
  opacity: 1;
  visibility: visible;
}

.mega-container {
  width: 100%;
  max-width: 1200px;
  margin: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 56px;
  padding: 0 60px;
}

.mega-link {
  text-align: center;
  width: 160px;
  flex-shrink: 0;
  transition: transform .3s cubic-bezier(.25,.46,.45,.94);
}

.mega-link img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  margin-bottom: 14px;
  background: #fff;
  padding: 10px;
  transition: box-shadow .3s ease, transform .35s ease;
}

.mega-link span {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.1px;
  color: var(--ink);
  display: block;
}

.mega-link small {
  font-size: 11px;
  color: var(--ink2);
  display: block;
  margin-top: 3px;
}

.mega-link:hover { transform: translateY(-5px); }

.mega-link:hover img {
  box-shadow: 0 12px 32px rgba(0,0,0,0.10);
  transform: scale(1.03);
}

.mega-see-all,
.mega-link.see-all {
  flex: 0 0 160px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--ink2);
  font-size: 13px;
  font-weight: 500;
  padding: 12px 10px;
  text-align: center;
  transition: background .2s ease, color .2s ease;
}

.mega-link.see-all:hover {
  background: var(--hover-bg);
  color: var(--ink);
}

@media (max-width: 1024px) {
  .mega-menu { display: none; }
}

/* =====================================================
   MENU MOBILE
===================================================== */
.navbar-mobile {
  position: fixed;
  top: 0;
  left: -100%;
  width: 52%;
  max-width: 340px;
  height: 100dvh;
  background: rgba(255,255,255,0.99);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  display: flex;
  flex-direction: column;
  transition: left .38s cubic-bezier(.4,0,.2,1);
  z-index: 9999;
  border-right: 0.5px solid var(--border);
  overflow: hidden;
  box-shadow: 6px 0 48px rgba(0,0,0,0.10);
}

.navbar-mobile.active { left: 0; }

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 20px 16px;
  flex-shrink: 0;
  border-bottom: 0.5px solid var(--border);
}

/* Tabs */
.mobile-tabs {
  display: flex;
  flex-shrink: 0;
  border-bottom: 0.5px solid var(--border);
}

.tab-btn {
  flex: 1;
  padding: 12px 0;
  background: none;
  border: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 1.5px solid transparent;
  color: var(--ink3);
  transition: color .2s ease, border-color .2s ease;
  font-family: inherit;
}

.tab-btn.active {
  border-bottom-color: var(--ink);
  color: var(--ink);
}

/* Contenu scrollable */
.tab-content {
  display: none;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex: 1;
  padding: 0;
}

.tab-content::-webkit-scrollbar { display: none; }
.tab-content.active { display: flex; }

/* Lien simple */
.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  border-bottom: 0.5px solid rgba(0,0,0,0.05);
  transition: background .15s ease;
}

.menu-item:hover { background: var(--hover-bg); }

.menu-item img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f5f5f7;
}

.menu-item.sale-link,
.menu-item.sale-link span { color: #d83b2b; }

/* Item avec sous-menu */
.menu-item-with-sub {
  border-bottom: 0.5px solid rgba(0,0,0,0.05);
}

.menu-item-with-sub > .menu-item {
  border-bottom: none;
  position: relative;
}

.menu-item-with-sub > .menu-item::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1px solid var(--ink3);
  border-bottom: 1px solid var(--ink3);
  transform: rotate(-45deg);
  flex-shrink: 0;
  margin-left: auto;
  transition: transform .3s cubic-bezier(.4,0,.2,1), border-color .2s;
}

.menu-item-with-sub.open > .menu-item::after {
  transform: rotate(45deg) translateX(-2px);
  border-color: var(--ink);
}

/* Sous-menu */
.menu-item-with-sub .submenu {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height .38s cubic-bezier(.4,0,.2,1);
  background: #fafafa;
  border-top: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
}

.menu-item-with-sub.open .submenu { max-height: 400px; }

/* Grille 2 colonnes */
.submenu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(0,0,0,0.05);
}

.submenu-grid li {
  background: #fafafa;
  transition: background .15s ease;
}

.submenu-grid li:hover { background: #f0f0f2; }

.submenu-grid li a {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 10px 12px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink);
  text-align: center;
  gap: 8px;
  letter-spacing: -0.1px;
}

.submenu-grid li a img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 6px;
}

/* Voir tout — pleine largeur */
.submenu-see-all {
  grid-column: 1 / -1;
  background: #fafafa !important;
  border-top: 0.5px solid rgba(0,0,0,0.05) !important;
}

.submenu-see-all a {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center;
  padding: 12px !important;
  font-size: 12px !important;
  font-weight: 600;
  color: var(--accent) !important;
  gap: 4px;
}

/* Brands tab */
#brands { padding: 8px 0 32px; }

#brands a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
  padding: 13px 20px;
  border-bottom: 0.5px solid rgba(0,0,0,0.05);
  transition: background .15s ease;
}

#brands a::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1px solid var(--ink3);
  border-bottom: 1px solid var(--ink3);
  transform: rotate(-45deg);
  flex-shrink: 0;
}

#brands a:hover { background: var(--hover-bg); }

/* =====================================================
   OVERLAY MENU
===================================================== */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  z-index: 2500;
}

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

/* =====================================================
   LAYOUT MOBILE
===================================================== */
@media (max-width: 1024px) {
  .navbar-desktop { display: none; }

  .header {
    justify-content: center;
    padding: 0 16px;
    z-index: 1000;
  }

  .logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .icons {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10001;
  }
}

/* =====================================================
   BARRE CATÉGORIES MOBILE
===================================================== */
.mobile-categories-bar { display: none; }

@media (max-width: 1024px) {
  .mobile-categories-bar {
    display: flex;
    justify-content: space-around;
    position: fixed;
    top: 72px;
    left: 0;
    width: 100%;
    background: transparent;
    z-index: 900;
    border-bottom: 0.5px solid transparent;
    transition: background .35s ease, border-color .35s ease;
  }

  .mobile-categories-bar.scrolled {
    background: rgba(255,255,255,0.92);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom-color: var(--border);
  }

  .mobile-category {
    position: static;
    padding: 13px 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink2);
    cursor: pointer;
    transition: color .2s ease;
  }

  .mobile-category.active,
  .mobile-category:hover { color: var(--ink); }

  .mobile-dropdown {
    position: fixed;
    left: 0;
    width: 100%;
    background: #fff;
    padding: 22px 20px;
    display: flex;
    justify-content: flex-start;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .25s ease, transform .3s ease, visibility .25s;
    border-bottom: 0.5px solid var(--border);
    z-index: 10000;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .mobile-dropdown::-webkit-scrollbar { display: none; }

  .mobile-category.active .mobile-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .mobile-dropdown a {
    flex: 0 0 auto;
    width: 100px;
    text-align: center;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--ink);
  }

  .mobile-dropdown img {
    width: 100%;
    height: 86px;
    object-fit: contain;
    margin-bottom: 8px;
    background: transparent;
    padding: 6px;
    transition: box-shadow .25s ease;
  }

  .mobile-dropdown a:hover img {
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  }
}

/* =====================================================
   SEARCH OVERLAY — AdemNutrition
   Black #0a0a0a · White #ffffff · Editorial / Zara + Apple
   Zero border-radius · No gradients · Pure monochrome
===================================================== */

/* =====================================================
   OVERLAY SHELL
===================================================== */
/* =====================================================
   SEARCH OVERLAY — AdemNutrition
   Pro · No zoom · Pixel-perfect all screens
===================================================== */

/* =====================================================
   SHELL
===================================================== */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: #fff;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  overflow: hidden;
  /* Prevent any zoom / font-size scaling on mobile */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.search-overlay.active {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

/* =====================================================
   MOBILE CATS STRIP
===================================================== */
.search-mobile-cats {
  display: none;
  align-items: center;
  overflow-x: auto;
  white-space: nowrap;
  border-bottom: 1px solid #e8e8e8;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
  /* No gap — padding handled per tag */
  padding: 0;
}

.search-mobile-cats::-webkit-scrollbar { display: none; }

.smc-tag {
  display: inline-flex;
  align-items: center;
  height: 44px;                   /* touch target */
  padding: 0 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #aaa;
  cursor: pointer;
  background: #fff;
  border: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}

.smc-tag.active,
.smc-tag:hover {
  color: #0a0a0a;
  border-bottom-color: #0a0a0a;
}

/* =====================================================
   TOP BAR
===================================================== */
.search-top-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 32px;
  height: 68px;
  border-bottom: 1px solid #e8e8e8;
  background: #fff;
  flex-shrink: 0;
}

.search-back-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border: 1px solid #e8e8e8;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #888;
  transition: border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}

.search-back-btn:hover {
  border-color: #0a0a0a;
  color: #0a0a0a;
}

.search-back-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.search-field-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1.5px solid #e8e8e8;
  padding: 0 4px;
  height: 44px;
  transition: border-color 0.18s;
}

.search-field-wrap:focus-within {
  border-bottom-color: #0a0a0a;
}

.sf-icon {
  width: 16px;
  height: 16px;
  color: #aaa;
  flex-shrink: 0;
}

.search-field-wrap input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  color: #0a0a0a;
  letter-spacing: 0.01em;
  /* Prevent iOS zoom on focus (font-size must be ≥ 16px on iOS,
     we keep 15px here but override via viewport meta touch-action) */
}

.search-field-wrap input::placeholder {
  color: #bbb;
  font-weight: 300;
}

/* =====================================================
   BODY
===================================================== */
.search-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* =====================================================
   SIDEBAR — desktop only
===================================================== */
.search-sidebar {
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid #e8e8e8;
  padding: 28px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
  background: #fff;
  scrollbar-width: none;
}

.search-sidebar::-webkit-scrollbar { display: none; }

.ss-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ss-title {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #aaa;
  margin: 0;
}

/* Recent tags */
.recent-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.recent-tags .tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 5px 11px;
  border: 1px solid #e8e8e8;
  background: #fff;
  color: #666;
  cursor: pointer;
  text-transform: uppercase;
  transition: border-color 0.15s, color 0.15s;
}

.recent-tags .tag:hover {
  border-color: #0a0a0a;
  color: #0a0a0a;
}

/* Sidebar categories */
.ss-cats {
  display: flex;
  flex-direction: column;
}

.ss-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid #f2f2f2;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #666;
  text-decoration: none;
  transition: color 0.15s;
}

.ss-cat:first-child { border-top: 1px solid #f2f2f2; }
.ss-cat:hover { color: #0a0a0a; }

.ss-cat svg {
  width: 9px;
  height: 9px;
  color: #ccc;
  flex-shrink: 0;
}

.ss-cat:hover svg { color: #0a0a0a; }

/* =====================================================
   MAIN AREA
===================================================== */
.search-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 28px 32px;
  background: #fff;
  scrollbar-width: thin;
  scrollbar-color: #e0e0e0 transparent;
}

.search-main::-webkit-scrollbar { width: 4px; }
.search-main::-webkit-scrollbar-track { background: transparent; }
.search-main::-webkit-scrollbar-thumb { background: #e0e0e0; }

/* Section header */
.sm-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid #0a0a0a;
}

.sm-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #0a0a0a;
}

.sm-count {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: #aaa;
}

/* =====================================================
   PRODUCTS GRID — search overlay only
===================================================== */
.search-overlay .products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #e8e8e8;
}

/* Skeleton */
.search-overlay .pgrid-skeleton {
  aspect-ratio: 3 / 4;
  background: #f5f5f5;
  animation: skshimmer 1.6s ease-in-out infinite;
}

@keyframes skshimmer {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

/* Card */
.search-overlay .product-card {
  display: block;
  text-decoration: none;
  background: #fff;
  overflow: hidden;
  transition: background 0.15s;
}

.search-overlay .product-card:hover { background: #fafafa; }

.search-overlay .product-card-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 10px;
}

.search-overlay .product-card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.38s ease;
}

.search-overlay .product-card:hover .product-card-img {
  transform: scale(1.04);
}

.search-overlay .product-card-info {
  padding: 8px 10px 12px;
  border-top: 1px solid #f2f2f2;
}

.search-overlay .product-card-name {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #0a0a0a;
  line-height: 1.4;
  margin-bottom: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-overlay .product-card-brand {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 4px;
}

.search-overlay .product-card-price {
  font-size: 11px;
  font-weight: 700;
  color: #0a0a0a;
  letter-spacing: 0.03em;
}

.search-overlay .product-card-badge {
  display: inline-block;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 5px;
  background: #0a0a0a;
  color: #fff;
  margin-left: 5px;
  vertical-align: middle;
}

/* =====================================================
   RESULTS LIST
===================================================== */
.results-list {
  display: flex;
  flex-direction: column;
}

.result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #f2f2f2;
  text-decoration: none;
  transition: background 0.1s, padding 0.1s;
}

.result-item:first-child { border-top: 1px solid #f2f2f2; }
.result-item:last-child  { border-bottom: none; }

.result-item:hover {
  background: #fafafa;
  padding-left: 6px;
  padding-right: 6px;
  margin: 0 -6px;
}

.result-thumb {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border: 1px solid #efefef;
  overflow: hidden;
  flex-shrink: 0;
  background: #fafafa;
}

.result-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 4px;
}

.result-info {
  flex: 1;
  min-width: 0;
}

.result-name {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0a0a0a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-sub {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #aaa;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-price {
  font-size: 12px;
  font-weight: 700;
  color: #0a0a0a;
  flex-shrink: 0;
  white-space: nowrap;
  letter-spacing: 0.03em;
}

/* View all CTA */
.search-view-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 20px;
  padding: 13px 0;
  border: 1.5px solid #0a0a0a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #0a0a0a;
  text-decoration: none;
  background: #fff;
  transition: background 0.15s, color 0.15s;
}

.search-view-all:hover {
  background: #0a0a0a;
  color: #fff;
}

/* =====================================================
   EMPTY STATE
===================================================== */
.search-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 20px;
  gap: 8px;
}

.search-empty-state svg {
  width: 32px;
  height: 32px;
  color: #ddd;
  margin-bottom: 6px;
}

.search-empty-state p {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #0a0a0a;
  margin: 0;
}

.search-empty-state span {
  font-size: 11px;
  font-weight: 400;
  color: #aaa;
  letter-spacing: 0.04em;
}

/* =====================================================
   FOOTER — desktop only
===================================================== */
.search-footer {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 32px;
  height: 42px;
  border-top: 1px solid #e8e8e8;
  background: #fff;
  flex-shrink: 0;
}

.sf-hint {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: #aaa;
  display: flex;
  align-items: center;
  gap: 5px;
}

.sf-hint kbd {
  padding: 2px 6px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-bottom-width: 2px;
  font-size: 9px;
  font-family: inherit;
  color: #666;
  letter-spacing: 0.03em;
}

.sf-brand {
  margin-left: auto;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ccc;
}

/* =====================================================
   RESPONSIVE — TABLETTE ≤ 1024px
===================================================== */
@media (max-width: 1024px) {

  .search-top-bar {
    padding: 0 20px;
    height: 60px;
    gap: 10px;
  }

  .search-main {
    padding: 20px 20px;
  }

  .search-overlay .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }

}

/* =====================================================
   RESPONSIVE — MOBILE ≤ 768px
===================================================== */
@media (max-width: 768px) {

  /* Show cats strip, hide sidebar + footer */
  .search-mobile-cats { display: flex; }
  .search-sidebar      { display: none; }
  .search-footer       { display: none; }

  .search-top-bar {
    padding: 0 14px;
    height: 56px;
    gap: 8px;
  }

  /* ⚠️ font-size ≥ 16px on iOS prevents auto-zoom on input focus */
  .search-field-wrap input {
    font-size: 16px;
  }

  .search-field-wrap {
    height: 40px;
  }

  .search-main {
    padding: 16px 14px;
  }

  .sm-header {
    margin-bottom: 14px;
    padding-bottom: 10px;
  }

  /* 3 cols sur mobile portrait */
  .search-overlay .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
  }

  .search-overlay .product-card-img-wrap { padding: 6px; }
  .search-overlay .product-card-info     { padding: 6px 8px 10px; }
  .search-overlay .product-card-name     { font-size: 9px; -webkit-line-clamp: 2; }
  .search-overlay .product-card-brand    { display: none; }
  .search-overlay .product-card-price    { font-size: 10px; }

  .result-thumb  { width: 44px; height: 44px; min-width: 44px; }
  .result-name   { font-size: 11px; }
  .result-price  { font-size: 11px; }

  .search-view-all { font-size: 9px; padding: 11px 0; }
}

/* =====================================================
   RESPONSIVE — PETIT MOBILE ≤ 390px
===================================================== */
@media (max-width: 390px) {

  .search-top-bar { padding: 0 10px; height: 52px; gap: 6px; }

  .search-main { padding: 12px 10px; }

  /* 2 cols sur très petit écran */
  .search-overlay .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .search-overlay .product-card-name  { font-size: 9px; }
  .search-overlay .product-card-price { font-size: 10px; }

  .smc-tag { padding: 0 12px; font-size: 10px; }

}

/* =====================================================
   MISC
===================================================== */
.zoom-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  cursor: grab;
  overflow: hidden;
}

.zoom-overlay img {
  max-width: none;
  max-height: none;
  transform-origin: center center;
  transition: transform 0.2s ease;
  cursor: grab;
}

@keyframes slideFade {
  from { opacity: 0; transform: translateX(10px); }
  to   { opacity: 1; transform: translateX(0); }
}

.submenu-trigger { cursor: pointer; user-select: none; }
/* =====================================================
   SOUS-CATÉGORIES MENU MOBILE — liste simple (non-grid)
===================================================== */

/* Liste submenu par défaut (sans .submenu-grid) */
.menu-item-with-sub .submenu li {
  background: #fafafa;
  transition: background .15s ease;
}

.menu-item-with-sub .submenu li:hover {
  background: #f0f0f2;
}

.menu-item-with-sub .submenu li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 12px 32px; /* indent pour hiérarchie visuelle */
  font-size: 12.5px;
  font-weight: 400;
  color: var(--ink);
  border-bottom: 0.5px solid rgba(0,0,0,0.05);
  transition: color .15s ease, padding .15s ease;
  letter-spacing: -0.1px;
}

.menu-item-with-sub .submenu li a:hover {
  color: var(--accent);
  padding-left: 38px; /* slide-in effect au hover */
}

/* Flèche décorative sur chaque item */
.menu-item-with-sub .submenu li a::after {
  content: "";
  width: 5px;
  height: 5px;
  border-right: 1px solid var(--ink3);
  border-bottom: 1px solid var(--ink3);
  transform: rotate(-45deg);
  flex-shrink: 0;
  opacity: 0;
  transition: opacity .2s ease;
}

.menu-item-with-sub .submenu li a:hover::after {
  opacity: 1;
  border-color: var(--accent);
}

/* "Voir tout" en tête de liste */
.menu-item-with-sub .submenu .submenu-see-all {
  background: #fff !important;
  border-bottom: 0.5px solid rgba(0,0,0,0.08) !important;
}

.menu-item-with-sub .submenu .submenu-see-all a {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent) !important;
  padding-left: 20px;
  letter-spacing: 0.02em;
  text-transform: none;
}

.menu-item-with-sub .submenu .submenu-see-all a:hover {
  padding-left: 26px;
  color: var(--accent) !important;
}

.menu-item-with-sub .submenu .submenu-see-all a::after {
  opacity: 1 !important;
  border-color: var(--accent) !important;
}
/* =====================================================
   ANNOUNCEMENT BAR — FIX ARABE / PETIT ÉCRAN
===================================================== */

/* 1. Correction direction RTL pour le ticker */
html[dir="rtl"] .ticker-track {
  animation-name: ticker-scroll-rtl;
  direction: rtl;
}

@keyframes ticker-scroll-rtl {
  0%   { transform: translateX(0); }
  100% { transform: translateX(50%); } /* sens inversé en RTL */
}

@media (max-width: 768px) {
  

  /* 4. Texte ticker plus petit sur mobile */
  .ticker-item {
    font-size: 11px;
    padding-right: 40px; /* réduit l'espacement */
  }

  .ticker-sep {
    padding-right: 40px;
  }

  /* 5. Vitesse adaptée (déjà dans ton JS, mais fallback CSS) */
  .ticker-track {
    animation-duration: 20s;
  }
}

@media (max-width: 390px) {
  .announcement-bar {
    padding: 0 5px;
  }

  .ticker-item {
    font-size: 10px;
    padding-right: 24px;
  }

  .ticker-sep {
    padding-right: 24px;
  }

  .bar-lang-btn {
    padding: 3px 7px;
    font-size: 9px;
  }

  .bar-track-btn {
    font-size: 11px;
  }
}