/* Cartes cadeaux : champs sur la fiche, formulaire « Vous avez une carte cadeau ? », codes, solde. */
.hmb-carte-champs { display: grid; gap: 10px; width: 100%; margin: 4px 0 14px; padding: 14px 16px 16px; border: 1px solid var(--hm-border, #eadfd3); border-radius: var(--hm-radius, 16px); background: var(--hm-surface-2, #f6efe6); }
.hmb-carte-champs__titre { display: flex; align-items: center; gap: 8px; margin: 0 0 2px; font-weight: 700; color: var(--hm-brown, #3f2f25); }
.hmb-carte-champs label { display: grid; gap: 4px; font-size: 0.85rem; color: var(--hm-brown-soft, #6b5a4b); }
/* 16 px minimum : sous ce seuil, Safari iOS zoome tout seul à la mise au point du champ. */
.hmb-carte-champs input, .hmb-carte-champs textarea { width: 100%; font-size: max(16px, 1rem); background: var(--hm-surface, #fff); }
.hmb-carte-champs textarea { min-height: 70px; resize: vertical; }

.hmb-carte-form { margin: 14px 0; }
.hmb-carte-form__label { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; font-weight: 700; font-size: 0.92rem; color: var(--hm-brown, #3f2f25); }
.hmb-carte-form__row { display: flex; gap: 8px; }
.hmb-carte-form__row input { flex: 1 1 140px; min-width: 0; text-transform: uppercase; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.hmb-carte-form__row .hm-btn { flex: 0 0 auto; white-space: nowrap; }
.hmb-carte-form__msg { margin: 6px 0 0; font-size: 0.85rem; min-height: 1em; color: var(--hm-muted, #8a7a6b); }
.hmb-carte-form__msg.is-error { color: var(--hm-rasp, #c94f5c); }
.hmb-carte-form__msg.is-ok { color: var(--hm-sage, #6a8a6a); }
.hmb-carte-form__list { list-style: none; margin: 8px 0 0; padding: 0; font-size: 0.88rem; color: var(--hm-brown, #3f2f25); }
.hmb-carte-form__list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 0; border-top: 1px dashed var(--hm-border, #eadfd3); }
.hmb-carte-form__remove, .hmb-carte-retirer { border: 0; background: transparent; padding: 0; color: var(--hm-caramel-dark, #a96f44); font-weight: 700; font-size: 0.82rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.hmb-carte-form--lateral { padding: 0 0 6px; }
.hmb-carte-form--commande { margin: 0 0 18px; padding: 14px 16px; border: 1px solid var(--hm-border, #eadfd3); border-radius: var(--hm-radius, 16px); background: var(--hm-surface, #fff); }

.hmb-carte-codes { margin: 6px 0 0; font-size: 0.9rem; }
.hmb-carte-codes__code { display: inline-block; padding: 3px 10px; border: 1.5px dashed var(--hm-caramel, #c98a5b); border-radius: 8px; background: var(--hm-surface, #fff); font-weight: 800; letter-spacing: 0.1em; color: var(--hm-brown, #3f2f25); font-variant-numeric: tabular-nums; }
.hmb-carte-codes small { color: var(--hm-muted, #8a7a6b); }

.hmb-carte-merci { margin: 0 0 28px; padding: 20px 22px; border-radius: var(--hm-radius, 16px); background: var(--hm-peach, #fbe3d0); }
.hmb-carte-merci h2 { margin: 0 0 10px; font-size: 1.3rem; }
.hmb-carte-merci ul { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.hmb-carte-merci li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.hmb-carte-merci p { margin: 0; font-size: 0.9rem; color: var(--hm-brown-soft, #6b5a4b); }

.hmb-solde { max-width: 480px; }
.hmb-solde__form label { display: block; margin-bottom: 6px; font-weight: 700; }
.hmb-solde__result { margin-top: 16px; padding: 16px 18px; border-radius: var(--hm-radius, 16px); background: var(--hm-surface-2, #f6efe6); }
.hmb-solde__result.is-error { color: var(--hm-rasp, #c94f5c); background: var(--hm-rasp-bg, #fbe9eb); }
.hmb-solde__montant { margin: 0 0 4px; font-size: 1.25rem; }
.hmb-solde__montant small { font-size: 0.8rem; color: var(--hm-muted, #8a7a6b); }
.hmb-solde__result p { margin: 0; }

.hmb-facture-lien { margin: 14px 0 0; }
.hmb-carte-ligne th { font-weight: 600; }
.hmb-carte-ligne td { white-space: nowrap; }

/* ---------------------------------------------------------------
 * Fiche d'une carte cadeau : cadrage du visuel et relief au survol
 * ------------------------------------------------------------
 * L'illustration est un carré de 900 px dont la carte n'occupe que le milieu : affichée telle
 * quelle dans la colonne de gauche, elle donnait 630 px de fond pêche pour une carte de 250.
 * On resserre la colonne et on recadre en 4/3, ce qui reprend le vide au-dessus et en dessous
 * sans toucher au fichier — la carte est centrée dans l'image, elle ne risque rien.
 * ------------------------------------------------------------ */
.hmb-carte-produit .hm-product__gallery { max-width: 520px; margin-inline: auto; perspective: 1100px; }
.hmb-carte-produit .woocommerce-product-gallery__image img {
	aspect-ratio: 4 / 3; object-fit: cover;
	transform-style: preserve-3d;
	transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.4s;
	will-change: transform;
}
/* Le relief suit la souris (cartes-cadeaux.js pose --hmb-rx et --hmb-ry). Au repos, tout revient
   à plat : la transition ci-dessus fait le retour, sans script. */
.hmb-carte-produit .woocommerce-product-gallery.is-tilted .woocommerce-product-gallery__image img {
	transform: rotateX(var(--hmb-rx, 0deg)) rotateY(var(--hmb-ry, 0deg)) scale(1.03);
	box-shadow: 0 30px 60px -24px rgba(63, 47, 37, 0.45);
	transition: transform 0.1s linear, box-shadow 0.4s;
}
/* Reflet qui glisse avec le pointeur : c'est lui qui fait « objet », plus que l'inclinaison. */
.hmb-carte-produit .woocommerce-product-gallery__image { position: relative; overflow: hidden; border-radius: var(--hm-radius, 18px); }
.hmb-carte-produit .woocommerce-product-gallery__image::after {
	content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
	background: radial-gradient(circle at var(--hmb-mx, 50%) var(--hmb-my, 50%), rgba(255, 255, 255, 0.55), transparent 55%);
	transition: opacity 0.35s;
}
.hmb-carte-produit .woocommerce-product-gallery.is-tilted .woocommerce-product-gallery__image::after { opacity: 1; }

.hmb-carte-mention { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; font-size: 0.85rem; line-height: 1.45; color: var(--hm-muted, #76665a); }
.hmb-carte-mention .hm-icon { margin-top: 2px; color: var(--hm-caramel-dark, #8b5a34); flex: none; }

@media (prefers-reduced-motion: reduce) {
	.hmb-carte-produit .woocommerce-product-gallery.is-tilted .woocommerce-product-gallery__image img { transform: none; }
}
