/* Pierres et Minéraux — thème enfant de Hummingbird 2.1 / PrestaShop 9.2 */
:root {
  --pnm-green: #315a46;
  --pnm-green-deep: #244435;
  --pnm-green-soft: #eef3ed;
  --pnm-sand: #f4f0e7;
  --pnm-ink: #28332e;
  --pnm-muted: #68736c;
  --pnm-line: #e6e2d9;
  --pnm-sale: #9b3f4b;
}

body {
  color: var(--pnm-ink);
  background: #fff;
}

/* ps_customtext revient sous le header, dans le contenu de la page d'accueil. */
.page-index #custom-text {
  width: 100%;
  max-width: 1320px;
  margin: 26px auto 32px;
  padding: 34px clamp(22px, 5vw, 60px);
  color: var(--pnm-ink);
  background: var(--pnm-sand);
  border: 1px solid var(--pnm-line);
  text-align: left;
}
.page-index #custom-text p { margin: 0 0 14px; }
.page-index #custom-text p:first-of-type { color: var(--pnm-green); font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.page-index #custom-text h1 { margin: 0 0 14px; color: #202521; font-size: clamp(1.8rem, 3vw, 2.55rem); line-height: 1.12; font-weight: 500; }
.page-index #custom-text a { display: inline-block; margin-top: 3px; padding: 12px 18px; color: #fff; background: var(--pnm-green-deep); font-size: .9rem; text-decoration: none; }
.page-index #custom-text a:hover, .page-index #custom-text a:focus { background: var(--pnm-green); color: #fff; }

/* Bannière cliquable de ps_banner sur le hook displayBanner. */
.header-banner { overflow: hidden; background: var(--pnm-sand); }
.header-banner .banner { margin: 0; text-align: center; }
.header-banner .banner img { display: block; width: 100%; height: auto; max-height: 118px; object-fit: cover; object-position: center; }
.header-banner .banner a { display: block; }

/* En-tête : logo, recherche et accès panier héritent du balisage Hummingbird. */
.header-bottom { background: #fff; }
.header-bottom__container { padding-top: 12px; padding-bottom: 12px; }
.header-bottom__h1 img, .header-bottom__logo img { max-height: 58px; width: auto; }
.header-top { background: #faf9f6; border-bottom: 1px solid var(--pnm-line); }
.header-nav-full-width { background: #fff; border-bottom: 1px solid var(--pnm-line); }
.header-nav-full-width .container { max-width: 1280px; }

/* La recherche est greffée dans displayNav2 : elle précède Connexion et Panier. */
.header-top__right { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
#search_widget { flex: 0 1 250px; min-width: 150px; margin: 0; }
#search_widget form { display: flex; align-items: center; }
#search_widget input[type="text"] { width: 100%; }

/* Diaporama utilisé comme visuel principal. Une seule diapositive est conseillée. */
#carousel { margin: 0 auto 22px; overflow: hidden; background: var(--pnm-sand); }
#carousel .carousel-inner, #carousel .carousel-item { max-height: 490px; }
#carousel .carousel-item img { display: block; width: 100%; height: min(43vw, 490px); min-height: 260px; object-fit: cover; object-position: center; }
#carousel .carousel-caption { right: auto; bottom: 11%; left: max(6%, calc((100% - 1180px) / 2)); width: min(42%, 540px); padding: 24px 27px; color: #fff; text-align: left; background: rgb(30 48 39 / 72%); }
#carousel .carousel-caption h2, #carousel .carousel-caption h3 { margin: 0 0 9px; color: #fff; font-size: clamp(1.35rem, 3vw, 2.65rem); line-height: 1.12; }
#carousel .carousel-caption p { margin: 0; font-size: 1rem; }
#carousel .carousel-indicators { margin-bottom: 10px; }

/* Barres et modules reprennent une palette minérale claire. */
.page-index .featured-products, .page-index .products-section-title { color: var(--pnm-ink); }
.page-index .products-section-title { font-size: 1.45rem; font-weight: 500; }
.page-index .featured-products { margin-top: 30px; }
.page-index .product-miniature { border: 1px solid var(--pnm-line); background: #fff; }
.page-index .product-miniature__title { color: var(--pnm-ink); }
.page-index .product-miniature__price { color: var(--pnm-green); }
.page-index .btn-primary { background: var(--pnm-green); border-color: var(--pnm-green); }
.page-index .btn-primary:hover, .page-index .btn-primary:focus { background: var(--pnm-green-deep); border-color: var(--pnm-green-deep); }

/* Les quatre accès sont fournis par le module pnm_homeblocks. */
.pnm-home-blocks { max-width: 1320px; margin: 0 auto; padding: 0 16px 14px; }
.pnm-home-categories { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 20px 0 34px; }
.pnm-home-categories__item { min-height: 104px; display: flex; align-items: center; gap: 14px; padding: 17px; color: var(--pnm-ink); background: #fff; border: 1px solid var(--pnm-line); text-decoration: none; transition: border-color .18s ease, transform .18s ease, background .18s ease; }
.pnm-home-categories__item:hover, .pnm-home-categories__item:focus { color: var(--pnm-ink); background: var(--pnm-green-soft); border-color: #b9caba; transform: translateY(-2px); text-decoration: none; }
.pnm-home-categories__icon { width: 43px; height: 43px; flex: 0 0 43px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: radial-gradient(circle at 30% 25%, #b7d1bd, #527a63 58%, #315a46); font-size: 1.1rem; }
.pnm-home-categories__item:nth-child(2) .pnm-home-categories__icon { background: radial-gradient(circle at 30% 25%, #f0d8dd, #b27f8e 58%, #785563); }
.pnm-home-categories__item:nth-child(3) .pnm-home-categories__icon { background: radial-gradient(circle at 30% 25%, #f4e4bd, #b8904a 58%, #725931); }
.pnm-home-categories__item:nth-child(4) .pnm-home-categories__icon { background: radial-gradient(circle at 30% 25%, #d7e9ed, #6894a0 58%, #3c5e69); }
.pnm-home-categories__title { display: block; font-size: .96rem; font-weight: 600; line-height: 1.25; }
.pnm-home-categories__subtitle { display: block; margin-top: 5px; color: var(--pnm-muted); font-size: .78rem; line-height: 1.35; }
.pnm-home-categories__arrow { margin-left: auto; color: var(--pnm-green); font-size: 1.1rem; }

/* Six collections par catégorie, avec la miniature produit native du parent. */
.pnm-featured-collection { margin: 0 0 38px; padding-top: 4px; }
.pnm-featured-collection__header { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.pnm-featured-collection__title { margin: 0; color: var(--pnm-ink); font-size: clamp(1.25rem, 2vw, 1.7rem); font-weight: 500; }
.pnm-featured-collection__link { color: var(--pnm-green); font-size: .85rem; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.pnm-featured-collection .products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pnm-featured-collection .products > .pnm-featured-collection__product { min-width: 0; }
.pnm-featured-collection .product-miniature { height: 100%; }
.pnm-featured-collection__empty { color: var(--pnm-muted); }

.footer-container { border-top: 1px solid var(--pnm-line); }

@media (max-width: 991.98px) {
  #carousel .carousel-caption { left: 4%; width: min(54%, 500px); padding: 18px; }
  .pnm-home-categories { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pnm-featured-collection .products { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
}

@media (max-width: 575.98px) {
  .page-index #custom-text { margin: 14px 12px 22px; padding: 22px 18px; width: auto; }
  .page-index #custom-text h1 { font-size: 1.65rem; }
  .header-banner .banner img { max-height: 84px; }
  .header-bottom__container { padding-top: 8px; padding-bottom: 8px; }
  #carousel { margin-bottom: 14px; }
  #carousel .carousel-inner, #carousel .carousel-item { max-height: none; }
  #carousel .carousel-item img { height: 66vw; min-height: 210px; max-height: 330px; }
  #carousel .carousel-caption { bottom: 12%; left: 5%; width: 80%; padding: 13px 15px; }
  #carousel .carousel-caption p { font-size: .83rem; }
  .pnm-home-blocks { padding-right: 12px; padding-left: 12px; }
  .pnm-home-categories { gap: 7px; margin: 12px 0 25px; }
  .pnm-home-categories__item { min-height: 78px; gap: 9px; padding: 10px; }
  .pnm-home-categories__icon { width: 32px; height: 32px; flex-basis: 32px; font-size: .9rem; }
  .pnm-home-categories__title { font-size: .82rem; }
  .pnm-home-categories__subtitle { font-size: .68rem; }
  .pnm-home-categories__arrow { display: none; }
  .pnm-featured-collection { margin-bottom: 27px; }
  .pnm-featured-collection__header { align-items: start; }
  .pnm-featured-collection__link { font-size: .75rem; }
  .pnm-featured-collection .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

/* Hummingbird masque sa barre supérieure sur mobile : on la garde visible pour
   que la recherche reste accessible après son déplacement dans displayNav2. */
@media (max-width: 767.98px) {
  .header-top.d-none.d-md-block { display: block !important; }
  .header-top__left { display: none; }
  .header-top__right { width: 100%; max-width: 100%; flex: 0 0 100%; gap: 9px; }
  #search_widget { flex: 1 1 auto; min-width: 0; max-width: 220px; }
  #search_widget input[type="text"] { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .pnm-home-categories__item { transition: none; }
}
