/* ============================================================
   misterhome.css — Stand Direct Homepage v2
   Fond blanc, titres style natif SD (Oswald + filets jaunes)
   Produits : cartes avec étoiles, description, prix
   ============================================================ */

:root {
  --mh-yellow:  #ffaa00;
  --mh-black:   #222222;
  --mh-text:    #555555;
  --mh-light:   #f5f5f5;
  --mh-border:  #e5e5e5;
  --mh-radius:  3px;
  --mh-trans:   .2s ease;
}

/* ============================================================
   RÉASSURANCE — bande noire, inchangée
   ============================================================ */
.mh-reassurance {
  background: #fff;
  padding: 0;
  margin: 0;
  border-bottom: 1px solid var(--mh-border);
}
.mh-reassurance__inner {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}
.mh-reassurance__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  color: var(--mh-black);
  flex: 1 1 200px;
  border-right: 1px solid var(--mh-border);
}
.mh-reassurance__item:last-child { border-right: 0; }
.mh-reassurance__icon {
  width: 38px; height: 38px;
  background: var(--mh-yellow);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mh-reassurance__icon svg {
  fill: #ffffff; width: 18px; height: 18px; }
.mh-reassurance__title { font-weight: 700; font-size: .9rem; line-height: 1.2; color: var(--mh-black); }
.mh-reassurance__sub   { font-size: .76rem; color: #888; margin-top: 2px; }

/* ============================================================
   SECTIONS — structure commune
   ============================================================ */
.mh-section {
  padding: 40px 0 36px;
  background: #fff;
}
/* Sections fond blanc : dans le flux normal du thème */
.mh-section.mh-section-products {
  background: #fff;
}

/* Section fond gris (Nouveautés) : contenu dans le flux, fond en pleine largeur via ::before */
.mh-section.mh-section--alt {
  background: transparent;
  position: relative;
  padding: 40px 0 36px;
}
.mh-section.mh-section--alt::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  background: var(--mh-light);
  z-index: 0;
}
.mh-section.mh-section--alt > * {
  position: relative;
  z-index: 1;
}

/* Déstockage : même technique fond pleine largeur */
.mh-section.mh-section-desto {
  background: transparent;
  position: relative;
  padding: 40px 0 36px;
}
.mh-section.mh-section-desto::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  background: var(--mh-light);
  z-index: 0;
}
.mh-section.mh-section-desto > * {
  position: relative;
  z-index: 1;
}

.mh-section--alt .mh-products-scroll,
.mh-section-products .mh-products-scroll {
  max-width: none;
}

/* En-tête de section — titre via classe thème native products-section-title h1 */
.mh-section .products-section-title {
  margin-bottom: 20px;
}

/* ============================================================
   CATÉGORIES EN VEDETTE
   ============================================================ */
.mh-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.mh-cat-card {
  flex: 1 1 calc(20% - 10px); /* 5 par ligne */
  min-width: 150px;
  position: relative;
  border-radius: var(--mh-radius);
  overflow: hidden;
  background: #fafafa;
  display: block;
  text-decoration: none;
  border: 1px solid var(--mh-border);
  transition: box-shadow var(--mh-trans), transform var(--mh-trans);
}
.mh-cat-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  transform: translateY(-2px);
  text-decoration: none;
}
.mh-cat-card__img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
  min-height: 120px;
  background: #f0f0f0;
}
.mh-cat-card__img--empty {
  width: 100%;
  aspect-ratio: 4/3;
  background: #eee;
  display: block;
  min-height: 120px;  /* hauteur plancher si aspect-ratio non supporté */
}
.mh-cat-card:hover .mh-cat-card__img { transform: scale(1.04); }
.mh-cat-card__body {
  padding: 9px 11px 10px;
  background: #fff;
  border-top: 2px solid var(--mh-yellow);
}
.mh-cat-card__name {
  font-family: Oswald, Arial, sans-serif;
  font-size: .95rem;
  font-weight: 400;
  color: var(--mh-black);
  margin: 0 0 2px;
  line-height: 1.2;
}
.mh-cat-card__count {
  font-size: .75rem;
  color: #aaa;
}

@media (max-width: 991px) {
  .mh-cat-card { flex: 1 1 calc(33.333% - 8px); }
}
@media (max-width: 575px) {
  .mh-cat-card { flex: 1 1 calc(50% - 6px); }
}

/* ============================================================
   PRODUITS — scroll horizontal tactile
   Style référence : carte blanche, ombre, image contain, centré
   ============================================================ */
.mh-products-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #cccccc #f0f0f0;
  padding-bottom: 12px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.mh-products-scroll:active {
  cursor: grabbing;
}
.mh-products-scroll::-webkit-scrollbar      { height: 4px; }
.mh-products-scroll::-webkit-scrollbar-track{ background: #f0f0f0; }
.mh-products-scroll::-webkit-scrollbar-thumb{ background: #cccccc; border-radius: 2px; }

/* Sur fond gris (section alt) : thumb gris foncé sur track gris moyen */
.mh-section--alt .mh-products-scroll {
  scrollbar-color: #888 #d0d0d0;
}
.mh-section--alt .mh-products-scroll::-webkit-scrollbar-track { background: #d0d0d0; }
.mh-section--alt .mh-products-scroll::-webkit-scrollbar-thumb { background: #888; }

.mh-products-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  min-width: max-content;
  padding: 10px 15px 4px;
}

/* Carte produit — enveloppe avec ombre */
.mh-product-wrap {
  flex: 0 0 auto;
  width: 200px;
  padding: 0 8px;
  position: relative;
  display: flex;
  flex-direction: column;
}

@media (min-width: 1440px) { .mh-product-wrap { width: 220px; } }
@media (max-width: 1200px) { .mh-product-wrap { width: 180px; } }
@media (max-width: 767px)  { .mh-product-wrap { width: 165px; } }
@media (max-width: 480px)  { .mh-product-wrap { width: 150px; } }

/* Carte intérieure — balise <a> cliquable */
.mh-product__card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0,0,0,.10);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--mh-trans), transform var(--mh-trans);
}
.mh-product__card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.16);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}

/* Badge nouveau/promo */
.mh-badge {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 2;
  padding: 2px 7px;
  font-family: Oswald, Arial, sans-serif;
  font-size: .7rem;
  font-weight: 400;
  letter-spacing: .04em;
  border-radius: 2px;
  text-transform: uppercase;
  line-height: 1.4;
}
.mh-badge--new  { background: var(--mh-yellow); color: var(--mh-black); }
.mh-badge--sale { background: #e00; color: #fff; }

/* Zone image — fond blanc, sans bordure basse */
.mh-product__img-wrap {
  display: block;
  overflow: hidden;
  background: #ffffff;
  position: relative;
}
.mh-product__img-wrap img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  display: block;
  padding: 10px;
}
.mh-product__img-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: #f5f5f5;
}

/* Corps texte — centré comme la référence */
.mh-product__body {
  padding: 10px 10px 14px;
  background: #fff;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}

/* Étoiles — centrées */
.mh-stars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  margin-bottom: 1px;
}
.mh-star {
  width: 14px; height: 14px;
  flex-shrink: 0;
}
.mh-star--full  { fill: var(--mh-yellow); }
.mh-star--half  { fill: var(--mh-yellow); }
.mh-star--empty { fill: #ddd; }
.mh-stars__count {
  font-size: .72rem;
  color: #aaa;
  margin-left: 3px;
}

/* Nom — même poids que le thème natif, centré, 2 lignes max */
.mh-product__name {
  font-size: .85rem;
  font-weight: 600;
  color: var(--mh-black);
  margin: 2px 0 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
}
.mh-product__name a {
  color: inherit;
  text-decoration: none;
}
.mh-product__name a:hover { color: var(--mh-yellow); }

/* Description — gris clair, petite, 2 lignes */
.mh-product__desc {
  font-size: .75rem;
  color: #999;
  margin: 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
}

/* Prix — jaune/orange, grand, Oswald, centré */
.mh-product__price {
  margin-top: auto;
  padding-top: 6px;
  width: 100%;
}
.mh-product__current-price {
  display: block;
  font-family: Oswald, Arial, sans-serif;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--mh-yellow);
  line-height: 1;
}
.mh-product__old-price {
  display: block;
  font-size: .75rem;
  color: #bbb;
  text-decoration: line-through;
  margin-bottom: 2px;
}

/* ============================================================
   DÉSTOCKAGE — grille responsive d'images cliquables
   Fond gris clair
   ============================================================ */
.mh-desto-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 991px) {
  .mh-desto-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .mh-desto-grid { grid-template-columns: 1fr; }
}

.mh-desto-item {
  display: block;
  text-decoration: none;
  border-radius: var(--mh-radius);
  overflow: hidden;
  border: 1px solid var(--mh-border);
  transition: box-shadow var(--mh-trans), transform var(--mh-trans);
  background: #eee;
}
.mh-desto-item:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.14);
  transform: translateY(-3px);
  text-decoration: none;
}
.mh-desto-item__inner {
  position: relative;
  overflow: hidden;
}
.mh-desto-item__img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.mh-desto-item:hover .mh-desto-item__img {
  transform: scale(1.04);
}
.mh-desto-item__overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 24px 14px 12px;
  background: linear-gradient(to top, rgba(0,0,0,.65), transparent);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  transition: background var(--mh-trans);
}
.mh-desto-item:hover .mh-desto-item__overlay {
  background: linear-gradient(to top, rgba(255,170,0,.85), transparent);
}
.mh-desto-item__label {
  font-family: Oswald, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: #fff;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.mh-desto-item__arrow {
  color: #fff;
  flex-shrink: 0;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--mh-trans), transform var(--mh-trans);
}
.mh-desto-item:hover .mh-desto-item__arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ============================================================
   BANDEAU PROMO
   ============================================================ */
.mh-promo {
  background: var(--mh-black);
  padding: 32px 0;
  position: relative;
  overflow: hidden;
}
.mh-promo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent, transparent 20px,
    rgba(255,255,255,.025) 20px, rgba(255,255,255,.025) 40px
  );
  pointer-events: none;
}
.mh-promo__inner {
  position: relative;
  text-align: center;
}
.mh-promo__label {
  font-family: Oswald, Arial, sans-serif;
  font-size: 1.7rem;
  font-weight: 400;
  color: var(--mh-yellow);
  margin: 0 0 8px;
  text-transform: uppercase;
}
.mh-promo__sub {
  color: rgba(255,255,255,.7);
  font-size: .95rem;
  margin: 0 0 18px;
}
.mh-promo__cta {
  display: inline-block;
  padding: 10px 32px;
  background: var(--mh-yellow);
  color: var(--mh-black);
  border-radius: var(--mh-radius);
  font-family: Oswald, Arial, sans-serif;
  font-size: 1.05rem;
  text-decoration: none;
  transition: background var(--mh-trans);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.mh-promo__cta:hover {
  background: #fff;
  color: var(--mh-black);
  text-decoration: none;
}
