/* =====================================================
   PRESTIGE PERFUMS — Mobile Responsive Fixes & Sliders
   Ajouter APRÈS le fichier style principal
   ===================================================== */

/* ============================
   VARIABLES MOBILE
   ============================ */
:root {
  --header-h-desktop: 150px;
  --header-h-tablet:  108px;
  --header-h-mobile:  56px; /* header ultra-compact mobile */
}

/* ============================
   RESET SCROLL HORIZONTAL
   ============================ */
html, body {
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* ============================
   HORIZONTAL SCROLL SLIDER
   (catégories, produits, marques…)
   ============================ */
.h-slider-wrap {
  position: relative;
  overflow: hidden;
}

.h-slider {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 4px;
}
.h-slider::-webkit-scrollbar { display: none; }

.h-slider > * {
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* Boutons flèches des sliders (visibles uniquement desktop) */
.h-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--white);
  border: 1.5px solid var(--border);
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
}
.h-slider-btn:hover {
  background: var(--garnet);
  color: white;
  border-color: var(--garnet);
}
.h-slider-btn.prev { left: -16px; }
.h-slider-btn.next { right: -16px; }

/* Sur mobile : masquer les boutons, le swipe suffit */
@media (max-width: 768px) {
  .h-slider-btn { display: none; }
}

/* ============================
   CATEGORY SLIDER MOBILE
   ============================ */
.category-h-slider .h-slider > * {
  width: 140px;
}
@media (min-width: 769px) {
  .category-h-slider .h-slider > * {
    width: 220px;
  }
}

/* ============================
   PRODUCT SLIDER MOBILE
   ============================ */
.product-h-slider .h-slider > * {
  width: 200px;
}
@media (min-width: 769px) {
  .product-h-slider .h-slider > * {
    width: 260px;
  }
}
@media (min-width: 1080px) {
  .product-h-slider .h-slider > * {
    width: 290px;
  }
}

/* ============================
   BRAND SLIDER MOBILE
   ============================ */
.brand-h-slider .h-slider > * {
  width: 110px;
}

/* ============================
   INDICATOR DE SCROLL (petits dots)
   ============================ */
.h-slider-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}
.h-slider-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: background .25s, width .25s;
  border: none;
  cursor: pointer;
  padding: 0;
}
.h-slider-dot.active {
  background: var(--garnet);
  width: 18px;
  border-radius: 3px;
}
@media (min-width: 769px) {
  .h-slider-dots { display: none; }
}

/* ============================
   HEADER MOBILE — REFONTE COMPLÈTE
   ============================ */

/* ─── Topbar : caché sur petits écrans ─── */
@media (max-width: 640px) {
  .header-topbar { display: none; }
}

/* ─── Header body mobile ─── */
@media (max-width: 768px) {
  :root { --header-h: var(--header-h-tablet); }

  .header-body {
    height: 56px;
    padding: 0 14px;
    gap: 10px;
  }

  /* Logo plus petit */
  .site-logo img { height: 34px; }
  .logo-name { font-size: 1.1rem; }
  .logo-sub  { display: none; }

  /* Recherche cachée dans le body, visible dans la barre mobile */
  .header-search { display: none !important; }

  /* Icônes header */
  .hicon { padding: 6px 8px; min-width: 40px; }
  .hicon-label { display: none; }
  .header-icons { gap: 0; }
  .mobile-lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-inline-end: 6px;
    padding: 6px 6px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--white);
    font-size: 11px;
    line-height: 1;
    white-space: nowrap;
  }
  .mobile-lang-switch a {
    color: var(--gray);
    font-weight: 600;
  }
  .mobile-lang-switch a.lang-active {
    color: var(--garnet);
  }
  .mobile-lang-switch span {
    color: var(--border-dark);
  }

  /* Barre de navigation masquée */
  .header-nav-bar { display: none; }

  /* Home products on mobile: no horizontal slider, show max 4 cards */
  .home-products-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    overflow: visible !important;
    padding-bottom: 0 !important;
    scroll-snap-type: none !important;
  }
  .home-products-grid > * {
    min-width: 0 !important;
    max-width: none !important;
    flex-shrink: 1 !important;
    scroll-snap-align: none !important;
  }
  .home-products-grid > *:nth-child(n+5) {
    display: none !important;
  }
  .home-products-grid + .h-slider-dots {
    display: none !important;
  }
}

@media (max-width: 480px) {
  :root { --header-h: 56px; }
  .header-body {
    height: 56px;
    padding: 0 12px;
    gap: 8px;
  }
  .site-logo img { height: 30px; }
}

@media (min-width: 769px) {
  .mobile-lang-switch { display: none; }
}

/* ─── Barre de recherche mobile (sous le header) ─── */
.mobile-search-bar {
  display: none;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 10px 14px;
  position: sticky;
  top: 56px;
  z-index: 190;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.mobile-search-bar .header-search {
  display: block !important;
  max-width: 100% !important;
  flex: 1;
}
.mobile-search-bar .search-input {
  font-size: 14px;
  padding: 10px 14px 10px 40px;
}
@media (max-width: 768px) {
  .mobile-search-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    color: var(--dark);
    flex-shrink: 0;
  }
  .mobile-search-toggle:hover {
    background: var(--beige);
    color: var(--garnet);
  }
  .mobile-search-bar.open {
    display: flex;
    align-items: center;
    gap: 10px;
  }
}

@media (min-width: 769px) {
  .mobile-search-toggle { display: none; }
}

/* Ajustement du padding-top des pages avec barre de recherche mobile */
@media (max-width: 768px) {
  .hero-slider { margin-top: calc(var(--header-h) + 52px); }
  .page-wrap   { padding-top: calc(var(--header-h) + 52px); }
}
@media (max-width: 480px) {
  .hero-slider { margin-top: calc(56px + 52px); }
  .page-wrap   { padding-top: calc(56px + 52px); }
}

/* ============================
   MOBILE NAV — AMÉLIORÉ
   ============================ */
.mobile-nav {
  width: 100%;
  max-width: 300px;
}
.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--garnet);
  color: white;
}
.mobile-nav-logo {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
}
.mobile-nav-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  color: white;
  font-size: 20px;
  cursor: pointer;
}

/* Catégorie slider horizontal dans le nav mobile */
.mobile-nav-cats {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px;
  background: var(--beige);
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}
.mobile-nav-cats::-webkit-scrollbar { display: none; }
.mobile-nav-cat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--dark);
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  width: 64px;
}
.mobile-nav-cat-img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  background: var(--beige);
}
.mobile-nav-cat:hover .mobile-nav-cat-img {
  border-color: var(--garnet);
}

/* Sections du menu */
.mobile-nav-section-title {
  padding: 10px 20px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gray);
}
.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  color: var(--dark);
  transition: .15s;
}
.mobile-nav-link svg {
  color: var(--garnet);
  flex-shrink: 0;
}
.mobile-nav-link:hover { color: var(--garnet); background: var(--beige); }
.mobile-nav-link--sale { color: var(--garnet); font-weight: 700; }

/* ============================
   HERO SLIDER MOBILE
   ============================ */
@media (max-width: 768px) {
  .hero-slider { height: 55vh; min-height: 320px; }
  .hero-content { padding: 0 20px; max-width: 100%; }
  .hero-title { font-size: clamp(1.4rem, 6vw, 2.2rem); }
  .hero-sub { font-size: 13px; margin-bottom: 20px; }
  .hero-arrow { width: 36px; height: 36px; }
  .arrow-prev { left: 12px; }
  .arrow-next { right: 12px; }
}
@media (max-width: 480px) {
  .hero-slider { height: 50vh; min-height: 280px; }
  .hero-title { font-size: 1.4rem; }
  .hero-tag { font-size: 10px; margin-bottom: 10px; }
  .hero-sub { display: none; }
  .hero-content { padding: 0 16px; }
  .hero-arrow { display: none; }
}

/* ============================
   FEATURES BAR MOBILE — SLIDER
   ============================ */
@media (max-width: 768px) {
  .features-bar { overflow: hidden; }
  .features-grid {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    grid-template-columns: none;
  }
  .features-grid::-webkit-scrollbar { display: none; }
  .feature-item {
    min-width: 220px;
    scroll-snap-align: start;
    border-right: 1px solid rgba(255,255,255,.15);
    flex-shrink: 0;
    padding: 1rem 1.25rem;
  }
  .feature-item:last-child { border-right: none; }
  .feature-icon { width: 40px; height: 40px; font-size: 1rem; }
  .feature-text strong { font-size: .8rem; }
  .feature-text span { font-size: .72rem; }
}

/* ============================
   CATEGORY SECTION MOBILE
   ============================ */
@media (max-width: 768px) {
  /* Quand les catégories sont en grille, passer en slider horizontal */
  .categories-section .grid-3,
  .categories-section .grid-4,
  .categories-section .grid-2 {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }
  .categories-section .grid-3::-webkit-scrollbar,
  .categories-section .grid-4::-webkit-scrollbar,
  .categories-section .grid-2::-webkit-scrollbar { display: none; }

  .categories-section .grid-3 > *,
  .categories-section .grid-4 > *,
  .categories-section .grid-2 > * {
    min-width: 145px;
    max-width: 145px;
    scroll-snap-align: start;
    flex-shrink: 0;
  }
  .category-card { aspect-ratio: 4/3; }
}

/* ============================
   PRODUCT CARDS GRID MOBILE
   ============================ */
@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .product-card-body { padding: 10px 12px 12px; }
  .product-name { font-size: .9rem; }
  .price-current { font-size: 1rem; }
}

@media (max-width: 380px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .product-card-body { padding: 8px 10px 10px; }
}

/* Produits en slider horizontal quand classe .products-slider */
.products-slider {
  display: flex !important;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 14px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 6px;
}
.products-slider::-webkit-scrollbar { display: none; }
.products-slider > .product-card {
  min-width: 195px;
  max-width: 195px;
  scroll-snap-align: start;
  flex-shrink: 0;
}
@media (min-width: 769px) {
  .products-slider > .product-card {
    min-width: 260px;
    max-width: 260px;
  }
}

/* ============================
   PRODUCT DETAIL MOBILE
   ============================ */
@media (max-width: 768px) {
  .detail-gallery { margin-bottom: 20px; }
  /* Miniatures fiche produit : bandeau sous l'image (voir .product-detail-grid dans style.css) */
  .product-detail-grid .thumb-wrap { width: 50px; height: 50px; }
  .add-to-cart-section { flex-wrap: wrap; }
  .add-to-cart-section .btn-primary { flex: 1; min-width: 0; }
  /* Produit: laisser les déclinaisons passer à la ligne sur mobile */
  .product-detail-grid .declinations-grid {
    overflow-x: visible;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 0;
  }
  .product-detail-grid .declination-btn {
    min-width: 0;
    flex: 1 1 calc(50% - 4px);
    max-width: 100%;
    padding: 8px 10px;
    font-size: 12px;
  }
  .detail-price-main { font-size: 1.6rem; }
}

@media (max-width: 420px) {
  .product-detail-grid .declination-btn {
    flex-basis: 100%;
  }
}

/* ============================
   CART SIDEBAR MOBILE
   ============================ */
@media (max-width: 768px) {
  .cart-sidebar {
    width: 100%;
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    top: auto;
    bottom: 0;
    height: 85vh;
    transform: translateY(100%);
  }
  .cart-sidebar.open { transform: translateY(0); }
  body[dir="rtl"] .cart-sidebar {
    left: 0;
    right: 0;
    transform: translateY(100%);
  }
  body[dir="rtl"] .cart-sidebar.open { transform: translateY(0); }
}

/* ============================
   CHECKOUT & PROFILE MOBILE
   ============================ */
@media (max-width: 768px) {
  .checkout-layout { grid-template-columns: 1fr; gap: 16px; }
  .profile-layout  { grid-template-columns: 1fr; gap: 16px; }
  .profile-sidebar { padding: 16px; }
  .checkout-section { padding: 18px; }
  .auth-card { padding: 24px 20px; }
  .auth-title { font-size: 1.5rem; }

  /* Checkout: résumé en pleine largeur écran sur téléphone */
  .checkout-summary-col {
    width: 100%;
    max-width: 100%;
  }
  .checkout-main-col,
  .checkout-main-col .checkout-main-card,
  .checkout-summary-col .checkout-summary-card {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
  }
  .checkout-main-col .checkout-main-card,
  .checkout-summary-col .checkout-summary-card {
    border-radius: 10px !important;
  }
}

/* ============================
   FOOTER MOBILE
   ============================ */
@media (max-width: 768px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .site-footer { padding: 40px 0 24px; margin-top: 40px; }
}
@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; gap: 20px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-bottom-links { justify-content: center; }
}

/* ============================
   SECTION PADDING MOBILE
   ============================ */
@media (max-width: 768px) {
  .section { padding: 40px 0; }
  .container { padding: 0 16px; }
  .section-title { font-size: 1.5rem; }
  .section-subtitle { font-size: 11px; }
}
@media (max-width: 480px) {
  .section { padding: 32px 0; }
  .container { padding: 0 14px; }
  .section-title { font-size: 1.35rem; }
}

/* ============================
   GRIDS MOBILE — override général
   ============================ */
@media (max-width: 640px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}

/* ============================
   BREADCRUMB MOBILE
   ============================ */
@media (max-width: 480px) {
  .breadcrumb { font-size: 12px; padding: 12px 0; gap: 6px; }
  .breadcrumb .sep { font-size: 10px; }
}

/* ============================
   PAGINATION MOBILE
   ============================ */
@media (max-width: 480px) {
  .pagination { gap: 4px; }
  .page-btn { width: 34px; height: 34px; font-size: 13px; }
}

/* ============================
   TOAST MOBILE
   ============================ */
@media (max-width: 640px) {
  .toast-container {
    bottom: 80px;
    right: 12px;
    left: 12px;
  }
  .toast { min-width: unset; width: 100%; font-size: 13px; padding: 10px 14px; }
}

/* ============================
   FLOATING CART MOBILE
   ============================ */
@media (max-width: 640px) {
  .floating-cart-btn {
    bottom: 16px;
    right: 16px;
    width: 54px;
    height: 54px;
  }
}

/* ============================
   CATALOGUE FILTRES MOBILE
   ============================ */
.filter-mobile-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 10px 16px;
  z-index: 200;
  gap: 10px;
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
}
@media (max-width: 768px) {
  .filter-mobile-bar { display: flex; }
  /* Laisser de la place en bas pour la barre de filtres */
  .catalogue-page { padding-bottom: 72px; }
}

/* Drawer filtres mobile */
.filter-drawer {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(0,0,0,.18);
  z-index: 500;
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(0.4,0,0.2,1);
}
.filter-drawer.open {
  display: block;
  transform: translateY(0);
}
.filter-drawer-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 12px auto 0;
}
.filter-drawer-header {
  padding: 16px 20px;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.filter-drawer-body { padding: 20px; }

/* ============================
   INPUT / FORM MOBILE
   ============================ */
@media (max-width: 640px) {
  .form-control { font-size: 16px; } /* évite zoom auto iOS */
  #qty-input { font-size: 16px; }
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="tel"],
  select,
  textarea {
    font-size: 16px !important; /* évite zoom auto iOS */
  }
}

/* ============================
   ORDER DETAIL MOBILE
   ============================ */
@media (max-width: 640px) {
  .order-card { padding: 16px; }
  .order-items-table { font-size: 13px; }
}

/* ============================
   COMPTE / PROFIL MOBILE
   ============================ */
@media (max-width: 768px) {
  .profile-nav {
    display: flex;
    overflow-x: auto;
    gap: 4px;
    padding: 8px 0;
    scrollbar-width: none;
  }
  .profile-nav::-webkit-scrollbar { display: none; }
  .profile-nav a {
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: 20px;
    padding: 8px 14px;
    background: var(--beige);
    border: 1px solid var(--border);
    margin-bottom: 0;
    font-size: 13px;
  }
  .profile-nav a.active {
    background: var(--garnet);
    color: white;
    border-color: var(--garnet);
  }

  /* Account profile.php layout mobile */
  .account-page-layout {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .account-sidebar-card,
  .account-content-card {
    border-radius: 10px !important;
    width: 100%;
    max-width: 100%;
  }
  .account-content-card {
    padding: 16px !important;
  }
  .account-nav-link {
    padding: 12px 14px !important;
    font-size: 13px !important;
  }
  .account-order-summary {
    padding: 12px 14px !important;
  }
  .account-order-body {
    padding: 12px 14px !important;
  }
  .account-order-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .account-notif-item {
    padding: 12px !important;
    gap: 10px !important;
  }
  .account-content-card .grid-2 {
    grid-template-columns: 1fr !important;
  }
}

/* ============================
   TABLE COMMANDES MOBILE
   ============================ */
@media (max-width: 640px) {
  .orders-table-wrap { overflow-x: auto; }
  .orders-table { min-width: 520px; }
}

/* ============================
   SWIPE INDICATOR (flèche animated)
   ============================ */
.swipe-hint {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--gray);
  margin-bottom: 8px;
}
.swipe-hint svg { animation: swipeAnim 1.5s ease-in-out infinite; }
@keyframes swipeAnim {
  0%,100% { transform: translateX(0); }
  50%      { transform: translateX(6px); }
}
@media (max-width: 768px) {
  .swipe-hint { display: flex; }
}

/* ============================
   SECTION "VIEW ALL" HEADER
   ============================ */
.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}
.section-head-row .section-title { margin-bottom: 0; }

@media (max-width: 480px) {
  .section-head-row { margin-bottom: 14px; }
  .section-head-row .btn { font-size: 11px; padding: 6px 12px; }
}

/* Menu mobile ouvert : masquer le panier flottant */
@media (max-width: 768px) {
  #floating-cart.hidden-when-mobile-nav,
  .floating-cart-btn.hidden-when-mobile-nav {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: scale(0.6) translateY(60px) !important;
  }
}

/* Bouton « retour en haut » désactivé (mobile) */
@media (max-width: 768px) {
  #scroll-top-btn {
    display: none !important;
    pointer-events: none !important;
  }
}

/* ============================
   FIX DROPDOWN SUR MOBILE
   ============================ */
@media (max-width: 768px) {
  .account-dropdown { display: none !important; }
  .nav-sub-menu { display: none !important; }
}

/* ============================
   FIX LIGHTBOX MOBILE
   ============================ */
@media (max-width: 640px) {
  #img-lightbox img {
    max-width: 96vw;
    max-height: 75vh;
  }
  .lb-close { top: 12px; right: 12px; font-size: 26px; }
}

/* ============================
   SAFE AREA (iPhone notch)
   ============================ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .floating-cart-btn {
    bottom: calc(16px + env(safe-area-inset-bottom));
  }
  .filter-mobile-bar {
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }
  .cart-sidebar {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ============================
   LANG SWITCH MOBILE (dans topbar)
   ============================ */
@media (max-width: 768px) {
  /* Visible dans le menu mobile à la place */
  .header-topbar-right .lang-switch { font-size: 11px; gap: 4px; }
}

/* ============================
   BOUTON "Retour en haut" MOBILE
   ============================ */
#scroll-top-btn {
  display: none;
  position: fixed;
  bottom: 80px;
  right: 16px;
  width: 42px;
  height: 42px;
  background: var(--garnet);
  color: white;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  z-index: 800;
  box-shadow: var(--shadow);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
#scroll-top-btn.visible { display: flex; }
#scroll-top-btn:hover { background: var(--garnet-dark); }

/* ============================
   PRODUCT CARD HOVER — DÉSACTIVÉ SUR TOUCH
   ============================ */
@media (hover: none) {
  .product-actions-hover {
    transform: translateY(0) !important;
    background: linear-gradient(0deg, rgba(45,31,34,.75) 0%, transparent 100%);
    padding: 8px;
  }
  .product-card:hover .product-card-img img { transform: none; }
  .product-card:hover { transform: none; box-shadow: var(--shadow); }
  .category-card:hover { transform: none; }
  .category-card:hover .category-card-bg { transform: none; }
}

/* ============================
   MEDIA (images) MOBILE FIX
   ============================ */
img { max-width: 100%; height: auto; }
.product-card-img img { object-fit: cover; }

/* ============================
   TEXT OVERFLOW FIX
   ============================ */
.cart-item-name,
.product-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .cart-item-name { font-size: 12px; }
  .cart-item img { width: 54px; height: 54px; }
}

/* ============================
   SEARCH RESULTS MOBILE
   ============================ */
@media (max-width: 768px) {
  .search-results {
    position: fixed;
    top: calc(56px + 52px);
    left: 0;
    right: 0;
    border-radius: 0;
    max-height: 60vh;
    border-left: none;
    border-right: none;
    z-index: 999;
  }
}

/* ── Catalogue layout ── */
.catalogue-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}
.catalogue-sidebar {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  position: sticky;
  top: 100px;
}
.mobile-filter-btn { display: none; }

/* Fond assombri + fermeture au clic (catalogue mobile) */
.catalogue-filter-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 998;
  background: rgba(15, 15, 15, 0.45);
  -webkit-tap-highlight-color: transparent;
}
.catalogue-filter-backdrop.is-visible {
  display: block;
}
.catalogue-sidebar-close {
  display: none;
}

@media (max-width: 768px) {
  .catalogue-layout {
    grid-template-columns: 1fr !important;
  }
  .catalogue-sidebar {
    position: fixed !important;
    top: 0;
    inset-inline-start: -100%;
    width: 85%;
    max-width: 320px;
    height: 100dvh;
    overflow-y: auto;
    z-index: 999;
    border-radius: 0;
    transition: inset-inline-start 0.3s ease;
    padding-top: calc(52px + env(safe-area-inset-top, 0px));
    box-sizing: border-box;
  }
  .catalogue-sidebar.open {
    inset-inline-start: 0;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
  }
  body[dir="rtl"] .catalogue-sidebar.open {
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.2);
  }
  .catalogue-sidebar-close {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    inset-inline-end: 0;
    min-height: calc(48px + env(safe-area-inset-top, 0px));
    padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
    margin: 0;
    background: var(--white);
    border: none;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
    z-index: 4;
    font-family: inherit;
  }
  body[dir="rtl"] .catalogue-sidebar-close {
    justify-content: flex-end;
  }
  .mobile-filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 10px 16px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: fit-content;
  }
}