#sdmn3-mobile-nav { display: none; }

@media (max-width: 767px) {
  body.sdmn3-enabled .sd-mobile-rayon-nav,
  body.sdmn3-enabled .sd-mobile-rayon-spacer,
  body.sdmn3-enabled #sdmn-mobile-taxonomy,
  body.sdmn3-enabled #sdmn2-mobile-nav,
  body.sdmn3-enabled [data-sdmn3-legacy-hidden="1"],
  body.sdmn3-enabled [data-sdmn3-theme-duplicate="1"],
  body.sdmn3-mode-subcategory [data-sdmn3-subcategory-heading="1"] {
    display: none !important;
  }

  body.sdmn3-mode-subcategory .breadcrumb-bar + .container {
    padding-top: 0 !important;
  }

  #sdmn3-mobile-nav {
    --sdmn3-bg: var(--sd-header-bg, #0a0a0d);
    --sdmn3-surface: var(--sd-surface, #15151b);
    --sdmn3-text: var(--sd-text, #f5f3ee);
    --sdmn3-muted: var(--sd-muted, #a8a8b3);
    --sdmn3-accent: var(--sd-primary-2, #c44569);
    --sdmn3-border: var(--sd-border, #2a2a35);
    --sdmn3-font: var(--sd-font-body, "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif);

    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 95;
    overflow: hidden;
    color: var(--sdmn3-text);
    background: var(--sdmn3-bg);
    border-top: 1px solid rgba(255,255,255,.035);
    border-bottom: 1px solid var(--sdmn3-border);
    font-family: var(--sdmn3-font);
    opacity: 0;
    visibility: hidden;
    transform: translateZ(0);
  }

  #sdmn3-mobile-nav[data-sdmn3-ready="1"] {
    opacity: 1;
    visibility: visible;
  }

  #sdmn3-mobile-nav,
  #sdmn3-mobile-nav *,
  #sdmn3-mobile-nav *::before,
  #sdmn3-mobile-nav *::after {
    box-sizing: border-box;
  }

  #sdmn3-mobile-nav a {
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent;
  }

  .sdmn3-global,
  .sdmn3-breadcrumb,
  .sdmn3-rail {
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }

  .sdmn3-global::-webkit-scrollbar,
  .sdmn3-breadcrumb::-webkit-scrollbar,
  .sdmn3-rail::-webkit-scrollbar {
    display: none;
  }

  /* Accueil, boutique et catégories principales : une seule ligne minimaliste. */
  .sdmn3-global {
    display: flex;
    align-items: stretch;
    width: 100%;
    height: 42px;
    min-height: 42px;
    padding: 0 12px;
    overflow-x: auto;
    overflow-y: hidden;
    background: var(--sdmn3-bg);
    scroll-snap-type: x proximity;
  }

  .sdmn3-global__link {
    position: relative;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    min-height: 42px;
    padding: 0 13px;
    color: var(--sdmn3-muted) !important;
    background: transparent !important;
    border: 0 !important;
    font-family: var(--sdmn3-font) !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    white-space: nowrap;
    scroll-snap-align: start;
  }

  .sdmn3-global__link.is-active {
    color: var(--sdmn3-text) !important;
    font-weight: 650 !important;
  }

  .sdmn3-global__link.is-active::after {
    content: "";
    position: absolute;
    right: 10px;
    bottom: 0;
    left: 10px;
    height: 2px;
    background: var(--sdmn3-accent);
  }

  /* Sous-catégories et produits : fil d’Ariane compact sous le header. */
  .sdmn3-breadcrumb {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    height: 42px;
    min-height: 42px;
    padding: 0 16px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    color: var(--sdmn3-muted);
    background: var(--sdmn3-bg);
    border-bottom: 1px solid rgba(255,255,255,.055);
  }

  .sdmn3-breadcrumb__link,
  .sdmn3-breadcrumb__current,
  .sdmn3-breadcrumb__sep,
  .sdmn3-breadcrumb__count {
    flex: 0 0 auto;
    max-width: min(58vw, 280px);
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--sdmn3-muted) !important;
    font-family: var(--sdmn3-font) !important;
    font-size: 13.5px !important;
    font-weight: 450 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
  }

  .sdmn3-breadcrumb__current {
    color: var(--sdmn3-text) !important;
    font-weight: 600 !important;
  }

  .sdmn3-breadcrumb__sep { opacity: .55; }
  .sdmn3-breadcrumb__count { opacity: .78; }

  /* Sous-catégories : rail illustré, quatre éléments visibles sur un téléphone standard. */
  .sdmn3-rail {
    display: flex;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    min-height: 128px;
    padding: 10px 12px 12px;
    overflow-x: auto;
    overflow-y: hidden;
    background: var(--sdmn3-bg);
    scroll-snap-type: x proximity;
  }

  .sdmn3-card {
    flex: 0 0 clamp(78px, 23vw, 108px);
    width: clamp(78px, 23vw, 108px);
    min-width: clamp(78px, 23vw, 108px);
    min-height: 106px;
    padding: 7px 4px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    color: var(--sdmn3-muted) !important;
    background: transparent !important;
    border: 2px solid transparent !important;
    border-radius: 13px !important;
    text-align: center;
    scroll-snap-align: start;
  }

  .sdmn3-card.is-active {
    color: var(--sdmn3-text) !important;
    border-color: var(--sdmn3-accent) !important;
    background: rgba(196,69,105,.12) !important;
  }

  .sdmn3-card__image {
    display: block;
    flex: 0 0 auto;
    width: clamp(58px, 17vw, 74px);
    height: clamp(58px, 17vw, 74px);
    margin: 0 auto 7px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 999px;
    background: #fff;
  }

  .sdmn3-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .sdmn3-card__label {
    display: -webkit-box;
    width: 100%;
    min-height: 32px;
    overflow: hidden;
    color: inherit !important;
    font-family: var(--sdmn3-font) !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    line-height: 1.22 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .sdmn3-card.is-active .sdmn3-card__label {
    font-weight: 650 !important;
  }

  #sdmn3-mobile-nav a:focus-visible {
    outline: 2px solid var(--sdmn3-accent) !important;
    outline-offset: -2px !important;
  }

  #sdmn3-mobile-nav a.is-loading { opacity: .68; }
}

@media (min-width: 768px) {
  #sdmn3-mobile-nav { display: none !important; }
}
