/* =========================================================
   FIGHOUSE FH9 — Product Card (Miniature) Skin
   - Dark Fantasy Premium look
   - Fixes Bootstrap grid conflicts on product listings
   ========================================================= */

/* ---------------------------------------------------------
   1) CRITICAL FIX: Grid vs Bootstrap (.row + .col-*)
   --------------------------------------------------------- */
/*
  In Hummingbird/PS, listings often are:
  <div class="products row">
    <div class="col-md-3 col-sm-6"> ... product-miniature ... </div>
  </div>

  If we force .products to display:grid, we MUST neutralize the col-* wrappers,
  otherwise items get squeezed (grid column *and* bootstrap column widths).
*/

.products.row,
#products.row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

/* Neutralize Bootstrap columns ONLY inside product listing grids */
.products.row > [class*="col-"],
#products.row > [class*="col-"] {
  width: auto !important;
  max-width: none !important;
  flex: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* If parent theme uses extra wrappers, keep them stretchable */
.products.row > [class*="col-"] > *,

/* ===== Remove white info panels in product cards ===== */
.product-miniature .product-description,
.product-miniature .product-actions,
.product-miniature .highlighted-informations,
.product-miniature .product-price-and-shipping {
  background: var(--fh-panel) !important;
  color: var(--fh-text) !important;
}

/* Some themes wrap the content in inner white blocks */
.product-miniature .product-description * {
  background: transparent !important;
}

/* Title and price readable on dark */
.product-miniature .product-title a {
  color: var(--fh-text) !important;
}
.product-miniature .product-title a:hover {
  color: var(--fh-gold-2) !important;
}
.product-miniature .price {
  color: rgba(255,255,255,0.92) !important;
  
  
}

/* ===== Badge Nouveau in Dark Fantasy style ===== */
.product-miniature .product-flags .product-flag.new {
  background: rgba(184, 155, 85, 0.18) !important;
  border-color: rgba(210, 180, 106, 0.55) !important;
  color: var(--fh-gold-2) !important;
}

.product-miniature .product-flags .product-flag {
  background: rgba(15, 15, 18, 0.70) !important;
  border-color: rgba(184, 155, 85, 0.25) !important;
  color: var(--fh-text) !important;
}

/* ===== CTA button: deep red / aged gold border ===== */
.product-miniature .add-to-cart,
.product-miniature .btn.add-to-cart,
.product-miniature [data-button-action="add-to-cart"] {
  background: var(--fh-red) !important;
  border: 1px solid rgba(184, 155, 85, 0.30) !important;
  color: rgba(255, 255, 255, 0.92) !important;
}

.product-miniature .add-to-cart:hover,
.product-miniature .btn.add-to-cart:hover,
.product-miniature [data-button-action="add-to-cart"]:hover {
  background: var(--fh-red-2) !important;
  border-color: rgba(210, 180, 106, 0.45) !important;
}

/* ===== CTA button: deep red / aged gold border ===== */
.product-miniature .add-to-cart,
.product-miniature .btn.add-to-cart,
.product-miniature [data-button-action="add-to-cart"] {
  background: var(--fh-red) !important;
  border: 1px solid rgba(184, 155, 85, 0.30) !important;
  color: rgba(255, 255, 255, 0.92) !important;
}

.product-miniature .add-to-cart:hover,
.product-miniature .btn.add-to-cart:hover,
.product-miniature [data-button-action="add-to-cart"]:hover {
  background: var(--fh-red-2) !important;
  border-color: rgba(210, 180, 106, 0.45) !important;
}

/* =========================================================
   FH9 - FIX WHITE PANELS + FIX CTA/INPUTS
   (Add at the END of product-card.css)
   ========================================================= */

/* 1) Force dark panel for the whole info area */
.product-miniature .product-description,
.product-miniature .product-actions,
.product-miniature .highlighted-informations,
.product-miniature .product-price-and-shipping {
  background: var(--fh-panel) !important;
  color: var(--fh-text) !important;
}

/* 2) Remove white backgrounds ONLY on typical wrappers (not inputs/buttons) */
.product-miniature .product-description > div,
.product-miniature .product-description > section,
.product-miniature .product-description .product-title,
.product-miniature .product-description .product-price-and-shipping {
  background: transparent !important;
}

/* 3) Title / links */
.product-miniature .product-title a {
  color: var(--fh-text) !important;
  text-decoration: none;
}
.product-miniature .product-title a:hover {
  color: var(--fh-gold-2) !important;
}

/* 4) Price */
.product-miniature .price {
  color: rgba(255,255,255,0.92) !important;
  font-weight: 700;
}
.product-miniature .regular-price {
  color: var(--fh-text-3) !important;
}

/* 5) Fix quantity input / +/- controls (keep readable on dark) */
.product-miniature input,
.product-miniature .input-group-text,
.product-miniature .form-control,
.product-miniature .form-select {
  background: var(--fh-bg-2) !important;
  color: var(--fh-text) !important;
  border-color: var(--fh-border) !important;
}

/* 6) Add-to-cart button (avoid "empty" look) */
.product-miniature .add-to-cart,
.product-miniature .btn.add-to-cart,
.product-miniature button.add-to-cart,
.product-miniature [data-button-action="add-to-cart"] {
  background: var(--fh-red) !important;
  border: 1px solid rgba(184, 155, 85, 0.30) !important;
  color: rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 10px 18px rgba(143, 29, 34, 0.18);
}

.product-miniature .add-to-cart:hover,
.product-miniature .btn.add-to-cart:hover,
.product-miniature button.add-to-cart:hover,
.product-miniature [data-button-action="add-to-cart"]:hover {
  background: var(--fh-red-2) !important;
  border-color: rgba(210, 180, 106, 0.45) !important;
}

/* Ensure icon/text inside button is visible */
.product-miniature .add-to-cart *,
.product-miniature .btn.add-to-cart *,
.product-miniature [data-button-action="add-to-cart"] * {
  color: inherit !important;
  fill: currentColor !important;
}

/* 7) Badge "Nouveau" in brand style (replace blue) */
.product-miniature .product-flags .product-flag,
.product-miniature .product-flags .product-flag.new {
  background: rgba(15, 15, 18, 0.70) !important;
  border: 1px solid rgba(184, 155, 85, 0.25) !important;
  color: var(--fh-text) !important;
}

.product-miniature .product-flags .product-flag.new {
  background: rgba(184, 155, 85, 0.18) !important;
  border-color: rgba(210, 180, 106, 0.55) !important;
  color: var(--fh-gold-2) !important;
}

/* =========================================================
   FH9 - HARD OVERRIDE for white panels and CTA on product cards
   ========================================================= */

/* A) Kill any white backgrounds inside product cards (except media + form controls) */
.product-miniature,
.product-miniature * {
  background-color: transparent !important;
}

/* Re-apply correct dark surfaces on the main structural blocks */
.product-miniature {
  background-color: var(--fh-panel) !important;
  border: 1px solid var(--fh-border) !important;
  border-radius: var(--fh-radius) !important;
  overflow: hidden !important;
}

.product-miniature .thumbnail-container {
  background-color: var(--fh-bg-2) !important;
}

/* Most common content wrappers in PS themes */
.product-miniature .product-description,
.product-miniature .highlighted-informations,
.product-miniature .product-actions,
.product-miniature .card-body,
.product-miniature .product-miniature__content {
  background-color: var(--fh-panel) !important;
  color: var(--fh-text) !important;
  padding: 14px !important;
}

/* Title/price readable */
.product-miniature .product-title a,
.product-miniature a {
  color: var(--fh-text) !important;
  text-decoration: none !important;
}
.product-miniature .product-title a:hover {
  color: var(--fh-gold-2) !important;
}
.product-miniature .price {
  color: rgba(255,255,255,0.92) !important;
  font-weight: 700 !important;
}
.product-miniature .regular-price {
  color: var(--fh-text-3) !important;
}

/* B) Restore form controls background (since we nuked all backgrounds) */
.product-miniature input,
.product-miniature select,
.product-miniature textarea,
.product-miniature .form-control,
.product-miniature .form-select,
.product-miniature .input-group-text,
.product-miniature .btn {
  background-color: var(--fh-bg-2) !important;
  color: var(--fh-text) !important;
  border-color: var(--fh-border) !important;
}

/* C) Add-to-cart button: force visible */
.product-miniature .add-to-cart,
.product-miniature .btn.add-to-cart,
.product-miniature button.add-to-cart,
.product-miniature [data-button-action="add-to-cart"],
.product-miniature form button {
  background-color: var(--fh-red) !important;
  border: 1px solid rgba(184,155,85,0.30) !important;
  color: rgba(255,255,255,0.92) !important;
}

.product-miniature .add-to-cart:hover,
.product-miniature .btn.add-to-cart:hover,
.product-miniature button.add-to-cart:hover,
.product-miniature [data-button-action="add-to-cart"]:hover,
.product-miniature form button:hover {
  background-color: var(--fh-red-2) !important;
  border-color: rgba(210,180,106,0.45) !important;
}

/* Ensure icons inside button inherit color */
.product-miniature button svg,
.product-miniature button i,
.product-miniature button span {
  color: inherit !important;
  fill: currentColor !important;
}

/* D) Badge Nouveau */
.product-miniature .product-flags .product-flag.new {
  background-color: rgba(184,155,85,0.18) !important;
  border: 1px solid rgba(210,180,106,0.55) !important;
  color: var(--fh-gold-2) !important;
}

/* Badge Nouveau : gold premium */
.product-miniature .product-flags .product-flag.new {
  background: rgba(184,155,85,0.22) !important;
  border: 1px solid rgba(210,180,106,0.65) !important;
  color: var(--fh-gold-2) !important;
  font-weight: 600 !important;
}
/* CTA : deep red */
.product-miniature .add-to-cart,
.product-miniature .btn.add-to-cart,
.product-miniature [data-button-action="add-to-cart"],
.product-miniature form button {
  background: var(--fh-red) !important;
  border: 1px solid rgba(184,155,85,0.35) !important;
  color: rgba(255,255,255,0.92) !important;
  box-shadow: 0 10px 18px rgba(143,29,34,0.18) !important;
}

.product-miniature .add-to-cart:hover,
.product-miniature .btn.add-to-cart:hover,
.product-miniature [data-button-action="add-to-cart"]:hover,
.product-miniature form button:hover {
  background: var(--fh-red-2) !important;
  border-color: rgba(210,180,106,0.55) !important;
}
/* No image placeholder: make it premium */
.product-miniature img[alt*="Aucune image"],
.product-miniature .no-picture,
.product-miniature .product-thumbnail .img-fluid[src*="no-picture"] {
  background: radial-gradient(700px 450px at 50% 30%, rgba(184,155,85,0.10), transparent 60%),
              var(--fh-bg-2) !important;
}

/* =========================================================
   FH9 - FIX quantity input value not visible
   ========================================================= */

/* Target common quantity field selectors in PS/Hummingbird */
.product-miniature input[type="number"],
.product-miniature input.js-cart-line-product-quantity,
.product-miniature .qty input,
.product-miniature .bootstrap-touchspin input,
.product-miniature .input-group input {
  background-color: var(--fh-bg-2) !important;
  color: rgba(255,255,255,0.92) !important;

  /* Chrome/Safari sometimes use text-fill-color */
  -webkit-text-fill-color: rgba(255,255,255,0.92) !important;

  opacity: 1 !important;
  caret-color: rgba(255,255,255,0.92) !important;

  border: 1px solid var(--fh-border) !important;
}

/* If theme applies weird transparency on focus/hover */
.product-miniature input[type="number"]:focus,
.product-miniature .bootstrap-touchspin input:focus {
  border-color: rgba(210, 180, 106, 0.55) !important;
  box-shadow: 0 0 0 0.2rem rgba(210, 180, 106, 0.16) !important;
}

/* +/- buttons should stay visible and consistent */
.product-miniature .bootstrap-touchspin .btn,
.product-miniature .input-group .btn,
.product-miniature .bootstrap-touchspin .input-group-btn-vertical .btn {
  background-color: rgba(255,255,255,0.04) !important;
  color: rgba(255,255,255,0.92) !important;
  border-color: var(--fh-border) !important;
}

/* Remove default spinners if they cause layout issues (optional) */
.product-miniature input[type="number"]::-webkit-outer-spin-button,
.product-miniature input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.product-miniature input[type="number"] {
  -moz-appearance: textfield;
}

/* =========================================================
   FH9 - FORCE quantity input to be visible in product cards
   ========================================================= */

/* 1) Ensure the quantity wrapper is a flex row */
.product-miniature .bootstrap-touchspin,
.product-miniature .input-group.bootstrap-touchspin,
.product-miniature .product-quantity,
.product-miniature .qty,
.product-miniature .product-add-to-cart .qty {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

/* 2) Force the input to exist visually (width/height/display) */
.product-miniature .bootstrap-touchspin input,
.product-miniature .bootstrap-touchspin input.form-control,
.product-miniature input.js-cart-line-product-quantity,
.product-miniature input[type="number"] {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;

  width: 54px !important;
  min-width: 54px !important;
  max-width: 54px !important;

  height: 40px !important;
  line-height: 40px !important;

  padding: 0 !important;
  text-align: center !important;

  background-color: var(--fh-bg-2) !important;
  border: 1px solid var(--fh-border) !important;

  color: rgba(255,255,255,0.92) !important;
  -webkit-text-fill-color: rgba(255,255,255,0.92) !important;
  caret-color: rgba(255,255,255,0.92) !important;
}

/* 3) Fix cases where the theme sets width:0 or font-size:0 */
.product-miniature .bootstrap-touchspin input.form-control {
  font-size: 14px !important;
}

/* 4) +/- buttons consistent size */
.product-miniature .bootstrap-touchspin .btn,
.product-miniature .bootstrap-touchspin .input-group-text,
.product-miniature .input-group .btn {
  height: 40px !important;
  min-width: 40px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  background-color: rgba(255,255,255,0.04) !important;
  border: 1px solid var(--fh-border) !important;
  color: rgba(255,255,255,0.92) !important;
}

/* 5) If something explicitly hides the input, override it */
.product-miniature .bootstrap-touchspin input[hidden],
.product-miniature .bootstrap-touchspin input[type="number"][hidden] {
  display: inline-block !important;
}

/* =========================================================
   FH9 - Fix quantity input (type="text") not visible in cards
   Targets: #quantity_wanted_* inside product miniatures
   ========================================================= */

/* 1) Make the quantity input visible and sized */
.product-miniature input[id^="quantity_wanted_"] {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;

  width: 54px !important;
  min-width: 54px !important;
  max-width: 54px !important;

  height: 40px !important;
  line-height: 40px !important;

  padding: 0 !important;
  text-align: center !important;

  background-color: var(--fh-bg-2) !important;
  border: 1px solid var(--fh-border) !important;
  border-radius: 8px !important;

  color: rgba(255,255,255,0.92) !important;
  -webkit-text-fill-color: rgba(255,255,255,0.92) !important;
  caret-color: rgba(255,255,255,0.92) !important;

  font-size: 14px !important;
}

/* 2) If the input is inside an input-group, prevent flex shrinking to 0 */
.product-miniature .input-group input[id^="quantity_wanted_"],
.product-miniature .bootstrap-touchspin input[id^="quantity_wanted_"] {
  flex: 0 0 auto !important;
}

/* 3) Ensure +/- buttons remain aligned and same height */
.product-miniature .input-group .btn,
.product-miniature .bootstrap-touchspin .btn,
.product-miniature .qty .btn {
  height: 40px !important;
  min-width: 40px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* 4) If any rule makes the text transparent, override it */
.product-miniature input[id^="quantity_wanted_"]::placeholder {
  color: rgba(255,255,255,0.45) !important;
}

/* Tighten quantity control */
.product-miniature input[id^="quantity_wanted_"] {
  width: 44px !important;
  min-width: 44px !important;
  height: 36px !important;
  line-height: 36px !important;
  font-size: 13px !important;
}

.product-miniature .input-group .btn,
.product-miniature .bootstrap-touchspin .btn {
  height: 36px !important;
  min-width: 36px !important;
}

/* Slight CTA emphasis */
.product-miniature .add-to-cart {
  box-shadow: 0 12px 22px rgba(143,29,34,0.28) !important;
}
.product-miniature .add-to-cart:hover {
  box-shadow: 0 14px 26px rgba(143,29,34,0.38) !important;
}

/* =========================================================
   FH9 - CINEMATIC PRODUCT CARD (Option A) — Ratio 4:5
   Add this block at the END of product-card.css
   ========================================================= */

/* 1) Image ratio 4:5 + crop propre */
.product-miniature .thumbnail-container {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 14px;
  margin: 14px 14px 0 14px;
  border: 1px solid rgba(184,155,85,0.22);
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
}

/* Certaines structures ont un <a> wrapper : on force la hauteur */
.product-miniature .thumbnail-container > a,
.product-miniature .thumbnail-container .product-thumbnail {
  display: block;
  width: 100%;
  height: 100%;
}

/* L'image remplit le ratio */
.product-miniature .thumbnail-container img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  transform: scale(1.03);
  transition: transform 240ms ease, filter 240ms ease;
  filter: saturate(1.03) contrast(1.03);
}

.product-miniature:hover .thumbnail-container img {
  transform: scale(1.06);
  filter: saturate(1.08) contrast(1.06);
}

/* 2) Vignette/overlay “affiche” (renforce la lecture premium) */
.product-miniature .thumbnail-container::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(700px 420px at 50% 20%, rgba(255,255,255,0.07), transparent 55%),
    radial-gradient(700px 500px at 50% 80%, rgba(0,0,0,0.35), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,0.00) 45%, rgba(0,0,0,0.55) 100%);
  opacity: 1;
}

/* 3) Bloc infos “chevauchant” l’image (effet carte premium) */
.product-miniature .product-description {
  margin: -18px 14px 0 14px !important;
  padding: 16px 16px 14px 16px !important;

  border-radius: 14px !important;
  border: 1px solid rgba(184,155,85,0.18) !important;

  background:
    linear-gradient(180deg, rgba(23,24,36,0.92) 0%, rgba(17,18,26,0.92) 100%) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.40);
}

/* 4) Hiérarchie titre/prix (plus éditorial) */
.product-miniature .product-title a {
  font-size: 16px !important;
  line-height: 1.2 !important;
  letter-spacing: 0.3px !important;
  color: rgba(255,255,255,0.90) !important;
}

.product-miniature:hover .product-title a {
  color: var(--fh-gold-2) !important;
}

/* Prix “or” plus statutaire */
.product-miniature .price {
  color: var(--fh-gold-2) !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  letter-spacing: 0.2px !important;
}

/* 5) Zone actions : alignement + respiration */
.product-miniature .product-price-and-shipping {
  margin-top: 12px !important;
  padding-top: 10px !important;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.product-miniature .product-actions,
.product-miniature .highlighted-informations {
  background: transparent !important;
}

/* 6) Quantité + CTA : plus “premium” (sans casser ton fonctionnement) */
.product-miniature .bootstrap-touchspin,
.product-miniature .input-group.bootstrap-touchspin,
.product-miniature .qty {
  gap: 10px !important;
}

/* Input quantité (garde ta logique quantity_wanted_XXXX) */
.product-miniature input[id^="quantity_wanted_"] {
  width: 46px !important;
  min-width: 46px !important;
  max-width: 46px !important;
  height: 36px !important;
  line-height: 36px !important;
  border-radius: 10px !important;
  background-color: rgba(15,15,18,0.65) !important;
  border-color: rgba(184,155,85,0.18) !important;
}

/* +/- */
.product-miniature .input-group .btn,
.product-miniature .bootstrap-touchspin .btn,
.product-miniature .qty .btn {
  height: 36px !important;
  min-width: 36px !important;
  border-radius: 10px !important;
  background-color: rgba(15,15,18,0.55) !important;
  border-color: rgba(184,155,85,0.18) !important;
}

/* CTA “Commander/Ajouter” en style Dark Fantasy */
.product-miniature .add-to-cart,
.product-miniature .btn.add-to-cart,
.product-miniature [data-button-action="add-to-cart"],
.product-miniature form button {
  border-radius: 12px !important;
  padding: 10px 14px !important;

  background-color: var(--fh-red) !important;
  background-image: none !important;
  border: 1px solid rgba(210,180,106,0.55) !important;
  color: rgba(255,255,255,0.95) !important;

  box-shadow:
    0 14px 26px rgba(143,29,34,0.25),
    0 0 0 1px rgba(210,180,106,0.12) inset !important;
}

.product-miniature .add-to-cart:hover,
.product-miniature .btn.add-to-cart:hover,
.product-miniature [data-button-action="add-to-cart"]:hover,
.product-miniature form button:hover {
  background-color: var(--fh-red-2) !important;
  border-color: rgba(210,180,106,0.80) !important;
  box-shadow:
    0 16px 30px rgba(143,29,34,0.35),
    0 0 0 1px rgba(210,180,106,0.18) inset !important;
}

/* 7) Badge “Nouveau” un peu plus premium (moins “étiquette”) */
.product-miniature .product-flags {
  top: 18px !important;
  left: 18px !important;
}

.product-miniature .product-flags .product-flag.new {
  padding: 7px 11px !important;
  border-radius: 999px !important;
  background: rgba(184,155,85,0.20) !important;
  border-color: rgba(210,180,106,0.70) !important;
  color: var(--fh-gold-2) !important;
}

/* 8) Wishlist heart plus discret (si présent) */
.product-miniature .wishlist-button,
.product-miniature .addToWishlist,
.product-miniature .js-wishlist-button,
.product-miniature .wishlist {
  opacity: 0.55 !important;
  transition: opacity 160ms ease;
}
.product-miniature .wishlist-button:hover,
.product-miniature .addToWishlist:hover,
.product-miniature .js-wishlist-button:hover,
.product-miniature .wishlist:hover {
  opacity: 1 !important;
}

/* 9) Mobile : garder la carte compacte */
@media (max-width: 576px) {
  .product-miniature .thumbnail-container {
    margin: 12px 12px 0 12px;
    border-radius: 14px;
  }
  .product-miniature .product-description {
    margin: -16px 12px 0 12px !important;
    padding: 14px !important;
  }
}

/* =========================================================
   FH HOME SELECTION — Compatibility layer
   Scope: module fh_home_selection (.fh-home-selection)
   Goals:
   - Keep FH9 product card look inside the module block
   - Prevent "blank" lower cards when image is missing
   - Ensure overlay pseudo-elements work (position:relative)
   ========================================================= */

/* Grid: match site listings, but keep it scoped to this module */
.fh-home-selection .products.row,
.fh-home-selection #products.row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

/* Neutralize bootstrap cols only inside this module block */
.fh-home-selection .products.row > [class*="col-"],
.fh-home-selection #products.row > [class*="col-"] {
  width: auto !important;
  max-width: none !important;
  flex: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Product card should stretch to fill its grid cell */
.fh-home-selection .product-miniature {
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Critical: pseudo-elements rely on a positioned container */
.fh-home-selection .product-miniature .thumbnail-container {
  position: relative !important;
}

/* If the module renders a simpler structure, ensure the media area exists */
.fh-home-selection .product-miniature .thumbnail-container,
.fh-home-selection .product-miniature .product-thumbnail {
  width: 100% !important;
  display: block !important;
}

/* Fallback when there is no image: keep a premium placeholder instead of a "white void" */
.fh-home-selection .product-miniature .thumbnail-container {
  background:
    radial-gradient(700px 450px at 50% 30%, rgba(184,155,85,0.10), transparent 60%),
    var(--fh-bg-2) !important;
}

/* If image exists: behave like FH9 4:5 crop */
.fh-home-selection .product-miniature .thumbnail-container img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
}

/* If image is missing/empty, force a consistent ratio so the card layout doesn't collapse */
.fh-home-selection .product-miniature .thumbnail-container:has(img),
.fh-home-selection .product-miniature .thumbnail-container {
  aspect-ratio: 4 / 5;
}

/* If browser doesn't support :has(), the aspect-ratio above still applies; keep content readable */
.fh-home-selection .product-miniature .thumbnail-container img[src=""],
.fh-home-selection .product-miniature .thumbnail-container img:not([src]) {
  display: none !important;
}

/* Optional: subtle "no image" glyph (non-intrusive) */
.fh-home-selection .product-miniature .thumbnail-container::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.10;
  background:
    radial-gradient(180px 180px at 50% 55%, rgba(255,255,255,0.18), transparent 60%);
}

/* Ensure description area doesn't expand to huge white blocks (module card consistency) */
.fh-home-selection .product-miniature .product-description,
.fh-home-selection .product-miniature .product-price-and-shipping {
  margin-top: auto;
}

/* Mobile: 2 columns */
@media (max-width: 768px) {
  .fh-home-selection .products.row,
  .fh-home-selection #products.row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}
