/* ============================================
   Mega Menu – PrestaShop 8
   ============================================ */

:root {
  --mm-bg: #cc0000;
  --mm-text: #ffffff;
  --mm-highlight: #ffffff;
  --mm-dropdown-bg: #ffffff;
  --mm-dropdown-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

/* ---- Nav bar ---- */
.mm-nav {
  background: var(--mm-bg);
  width: 100%;
  position: relative;
  z-index: 1000;
  overflow: visible;
}

.mm-nav .container {
  padding: 0;
}

.mm-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  margin-top: 10px;
  align-items: center;
}

/* ---- Top-level items ---- */
.mm-item {
  position: static;
  display: flex;
  align-items: stretch;
}

/* Séparation verticale via border-right sur le lien */
.mm-item + .mm-item .mm-link {
  border-left: 1px solid rgba(255,255,255,0.5);
}

/* ---- Links ---- */
.mm-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 14px 18px;
  color: #ffffff !important;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.2s;
  box-sizing: border-box;
}

.mm-link:hover,
.mm-link:visited,
.mm-item.mm-open .mm-link {
  color: #ffffff !important;
  background: rgba(0,0,0,0.15);
  text-decoration: none;
}

.mm-arrow {
  font-size: 0.6rem;
  opacity: 0.7;
  transition: transform 0.2s;
}

.mm-item.mm-open .mm-arrow {
  transform: rotate(180deg);
}

/* ---- Dropdown ---- */
.mm-dropdown {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--mm-dropdown-bg);
  box-shadow: var(--mm-dropdown-shadow);
  border-top: none;
  z-index: 999;
}

/* Positionner le dropdown par rapport à la nav, pas au li */
.mm-nav {
  position: relative;
}

.mm-item.mm-open .mm-dropdown {
  display: block;
  animation: mmFadeIn 0.2s ease;
}

@keyframes mmFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mm-dropdown-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 16px;
}

/* ---- Grid with images ---- */
.mm-grid-images {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 16px;
}

.mm-grid-images .mm-grid-item {
  flex: 0 0 calc(20% - 13px);
  min-width: 0;
  max-width: calc(20% - 13px);
}

.mm-grid-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  gap: 8px;
  transition: transform 0.2s;
}

.mm-grid-link:hover {
  transform: translateY(-3px);
  text-decoration: none;
}

.mm-grid-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 6px;
  background: #ffffff;
  box-sizing: border-box;
  transition: box-shadow 0.2s;
}

.mm-grid-link:hover .mm-grid-img {
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.mm-grid-img-placeholder {
  display: block;
  background: #ffffff;
}

.mm-grid-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: #333;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.mm-grid-link:hover .mm-grid-name {
  color: var(--mm-bg);
}

/* ---- Grid text only ---- */
.mm-grid-text {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  columns: 4;
}

.mm-text-item {
  break-inside: avoid;
}

.mm-text-link {
  display: block;
  padding: 6px 16px 6px 0;
  font-size: 0.88rem;
  color: #444;
  text-decoration: none;
  transition: color 0.15s, padding-left 0.15s;
}

.mm-text-link:hover {
  color: var(--mm-bg);
  padding-left: 6px;
  text-decoration: none;
}

/* ---- Footer see all ---- */
.mm-dropdown-footer {
  border-top: 1px solid #eee;
  padding-top: 12px;
  text-align: right;
}

.mm-see-all {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--mm-bg);
  text-decoration: none;
}

.mm-see-all:hover {
  text-decoration: underline;
}

/* ---- Responsive ---- */
@media (max-width: 992px) {
  .mm-nav { display: none; }
}

/* ---- Brands grid ---- */
/* ===== GRID MARQUES PROPRE ===== */
.mm-grid-brands {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;

  gap: 20px 30px;

  padding: 0;            /* 🔥 enlève espace */
  
}

/* bloc logo */
/* ===== MARQUES CLEAN ===== */

/* GRID */
/* ===== MARQUES AUTO SIZE ===== */

/* ===== MARQUES OPTIMISÉ ===== */

/* GRID */
.mm-grid-brands {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;

  gap: 0px 0px;
  padding: 10px 0;
}

/* ITEM */
.mm-brand-item {
  height: 70px;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;

  width: auto;          /* 🔥 laisse respirer */
  padding: 0 15px;      /* 🔥 espace gauche/droite */
}

/* LINK */
.mm-brand-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* IMAGE */
.mm-brand-img {
  max-width: 180px;
  height: auto;

  display: block;
  margin: auto;

  object-fit: contain;

  /* 🔥 centre parfaitement le logo dans la zone coupée */
  transform: translateY(0);

  filter: grayscale(100%) opacity(0.6);
  transition: filter 0.25s ease;
}

/* HOVER */
.mm-brand-link:hover .mm-brand-img {
  filter: grayscale(0%) opacity(1);
}

.mm-brand-link:hover {
  background: none;
}

/* TEXTE */
.mm-brand-name-text {
  display: none;
}

/* TITRE */
.mm-section-title {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: #999;
  text-transform: uppercase;

  padding: 10px 0 5px;
  margin-top: 0;

  border-top: 1px solid #eee;

  display: flex;
  align-items: center;
  gap: 12px;
}

.mm-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #eee;
}

/* CONTAINER */
.mm-dropdown-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px 40px;
}

/* reset global */
.mm-dropdown img {
  max-height: none !important;
}