/* =========================================================================
   Elyomiel — Fiche produit
   S'appuie sur les variables et composants du socle.
   ====================================================================== */

body.ely-product-page { background: #fffaf0; }
.ely-pp {
	--hn: var(--ely-honey);
	display: block;
	overflow-x: clip;
	padding-top: clamp(18px, 3vw, 32px);
	background:
		radial-gradient(46rem 30rem at 22% 0%, color-mix(in srgb, var(--hn) 22%, transparent), transparent 70%),
		#fffaf0;
	color: var(--ely-ink);
	font-family: var(--ely-body);
	font-size: 1.0625rem;
	line-height: 1.6;
}
.ely-pp *, .ely-pp *::before, .ely-pp *::after { box-sizing: border-box; }
.ely-product-page .ely-footer { margin-block-start: 0; }

.ely-pp .ely-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .9rem; color: #8a6a48; }
.ely-pp .ely-crumbs a { color: #6b4a26; text-decoration: none; }
.ely-pp .ely-crumbs a:hover { color: var(--ely-ink); text-decoration: underline; text-underline-offset: 3px; }

.ely-pp__notices:empty { display: none; }
.ely-pp__notices .woocommerce-message, .ely-pp__notices .woocommerce-error, .ely-pp__notices .woocommerce-info {
	margin: 0 0 16px;
	padding: 14px 18px;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 0 0 1px rgba(42, 22, 7, .08);
	list-style: none;
}

/* =========================================================================
   Haut de fiche : photos + infos
   ====================================================================== */
.ely-pp__top {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
	gap: clamp(28px, 5vw, 72px);
	align-items: start;
	padding-block: clamp(18px, 2.5vw, 30px) clamp(56px, 7vw, 96px);
}

/* Photos */
.ely-pm { position: sticky; top: calc(var(--ely-header-h) + var(--ely-ab, 0px) + 20px); }
.ely-pm__stage {
	position: relative;
	display: grid;
	place-items: center;
	aspect-ratio: 1;
	border-radius: 28px;
	background: #fff;
	box-shadow: 0 0 0 1px rgba(42, 22, 7, .06), 0 30px 60px -36px rgba(90, 50, 0, .45);
	overflow: hidden;
}
.ely-pm--honey .ely-pm__stage {
	background: radial-gradient(circle at 50% 58%, color-mix(in srgb, var(--hn) 62%, #fff) 0 40%, #fff6dc 40.5%);
}
.ely-pm__slide { display: grid; place-items: center; width: 100%; height: 100%; margin: 0; animation: ely-pm-in .45s var(--ely-ease); }
.ely-pm__slide[hidden] { display: none; }
@keyframes ely-pm-in { from { opacity: 0; transform: scale(.97); } }
.ely-pm__photo, .ely-pm__slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ely-pm__slide--cutout img, .ely-pm__cutout {
	width: 56%;
	height: 66%;
	object-fit: contain;
	filter: drop-shadow(0 26px 22px rgba(90, 50, 0, .32));
	animation: ely-pm-float 6s ease-in-out infinite;
}
@keyframes ely-pm-float { 50% { transform: translateY(-8px); } }
.ely-pm__badge {
	position: absolute;
	top: 18px;
	left: 18px;
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--ely-ink);
	color: var(--ely-milk);
	font-size: .85rem;
	font-weight: 700;
}
.ely-pm__thumbs { display: flex; gap: 10px; margin-top: 14px; }
.ely-pm__thumb {
	width: 76px;
	height: 76px;
	padding: 0;
	border: 0;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 0 0 1px rgba(42, 22, 7, .1);
	overflow: hidden;
	cursor: pointer;
	transition: box-shadow .2s, transform .2s;
}
.ely-pm__thumb:hover { transform: translateY(-2px); }
.ely-pm__thumb[aria-pressed="true"] { box-shadow: 0 0 0 2.5px var(--ely-honey-deep); }
.ely-pm__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ely-pm__thumb--cutout { background: color-mix(in srgb, var(--hn) 30%, #fff); }
.ely-pm__thumb--cutout img { object-fit: contain; padding: 6px; }

/* Infos */
.ely-pi { padding-top: 6px; }
.ely-pi__sub { margin: 0 0 6px; font-size: .95rem; font-weight: 600; color: #8a6a48; }
.ely-pi__title {
	margin: 0;
	color: var(--ely-ink);
	font-family: var(--ely-display);
	font-weight: 400;
	font-size: clamp(2.4rem, 4.6vw, 3.8rem);
	line-height: .98;
	letter-spacing: -.02em;
}
.ely-pi__note { margin: 16px 0 0; max-width: 32em; font-size: 1.15rem; color: #4a3220; }
.ely-pi__pair { margin: 12px 0 0; color: #6b4a26; }
.ely-pi__pair strong { color: var(--ely-ink); }

/* Jauge de goût (miels) */
.ely-taste { max-width: 360px; margin-top: 22px; }
.ely-taste__bar {
	position: relative;
	height: 10px;
	border-radius: 999px;
	background: linear-gradient(90deg, #F4E4A1, #ECC664, #DA9C33, #C58328, #94551B, #5E3010);
}
.ely-taste__mark {
	position: absolute;
	top: 50%;
	left: var(--pos);
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--hn);
	box-shadow: 0 0 0 4px #fff, 0 4px 10px rgba(90, 50, 0, .35);
	transform: translate(-50%, -50%);
	animation: ely-mark-in .9s var(--ely-spring) .2s both;
}
@keyframes ely-mark-in { from { left: 0; } }
.ely-taste__legend { display: flex; justify-content: space-between; margin-top: 8px; font-size: .82rem; font-weight: 600; color: #8a6a48; }

/* Achat */
.ely-buy {
	margin-top: 28px;
	padding: clamp(18px, 2.4vw, 26px);
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 0 0 1px rgba(42, 22, 7, .07), 0 24px 50px -34px rgba(90, 50, 0, .45);
}
.ely-buy__price { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ely-buy__amount { font-family: var(--ely-display); font-size: 2.2rem; line-height: 1; color: #8a4f06; }
.ely-buy__amount del { font-size: 1.2rem; opacity: .5; }
.ely-buy__amount ins { text-decoration: none; }
.ely-buy__stock { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 600; color: #3f7a3a; }
.ely-buy__stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

.ely-formats { margin: 20px 0 0; padding: 0; border: 0; }
.ely-formats__legend { margin-bottom: 10px; padding: 0; font-size: .9rem; font-weight: 700; color: var(--ely-ink); }
.ely-formats__list { display: flex; flex-wrap: wrap; gap: 10px; }
.ely-format { position: relative; cursor: pointer; }
.ely-format input { position: absolute; opacity: 0; pointer-events: none; }
.ely-format__box {
	display: flex;
	flex-direction: column;
	min-width: 116px;
	padding: 12px 16px;
	border-radius: 14px;
	background: #fffaf0;
	box-shadow: inset 0 0 0 1.5px rgba(42, 22, 7, .14);
	transition: box-shadow .2s, background-color .2s, transform .2s var(--ely-spring);
}
.ely-format:hover .ely-format__box { box-shadow: inset 0 0 0 1.5px rgba(42, 22, 7, .35); }
.ely-format input:checked + .ely-format__box { background: color-mix(in srgb, var(--hn) 22%, #fff); box-shadow: inset 0 0 0 2.5px var(--ely-honey-deep); }
.ely-format input:focus-visible + .ely-format__box { outline: 3px solid var(--ely-honey); outline-offset: 3px; }
.ely-format__label { font-weight: 700; font-size: 1.02rem; }
.ely-format__price { font-size: .9rem; color: #6b4a26; }
.ely-format.is-out { cursor: not-allowed; }
.ely-format.is-out .ely-format__box { opacity: .5; background: repeating-linear-gradient(-45deg, #fffaf0 0 6px, #f6eedd 6px 12px); }

.ely-buy__row { display: flex; gap: 12px; margin-top: 22px; }
.ely-qty--lg { flex-shrink: 0; border-radius: 14px; }
.ely-qty--lg .ely-qty__btn { width: 46px; height: 54px; border-radius: 14px; }
.ely-qty__input {
	width: 40px;
	height: 54px;
	border: 0;
	background: transparent;
	color: var(--ely-ink);
	font: 700 1.05rem var(--ely-body);
	text-align: center;
	-moz-appearance: textfield;
}
.ely-qty__input::-webkit-outer-spin-button, .ely-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ely-qty__input:focus { outline: none; }
.ely-buy__submit { flex: 1; min-height: 54px; font-size: 1.05rem; white-space: nowrap; }
.ely-buy__submit .ely-icon { width: 22px; height: 22px; }
.ely-buy__submit.is-loading { opacity: .7; pointer-events: none; }
.ely-buy__submit.is-added { background: #3f7a3a; color: #fff; box-shadow: 0 4px 0 #2b5a28; }
.ely-buy__out { margin: 18px 0 0; color: #6b4a26; }
.ely-buy__out a { color: var(--ely-ink); font-weight: 600; }
.ely-buy__error { margin: 12px 0 0; color: #b03a2e; font-size: .92rem; font-weight: 600; }

.ely-trust { margin-top: 22px; }
.ely-trust__list {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin: 0;
	padding: 0 4px;
	list-style: none;
}
.ely-trust__item { display: flex; flex: 0 1 auto; align-items: center; gap: 9px; min-width: 0; }
.ely-trust__item + .ely-trust__item { padding-left: 12px; border-left: 1px solid rgba(42, 22, 7, .1); }
.ely-trust__txt { display: flex; flex-direction: column; font-size: .76rem; line-height: 1.3; color: #8a6a48; }
.ely-trust__txt strong { font-size: .86rem; color: var(--ely-ink); }
@media (min-width: 1360px) { .ely-trust__txt strong { white-space: nowrap; } }
.ely-trust__ico { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; }
.ely-trust__ico .ely-icon { width: 19px; height: 19px; stroke-width: 1.8; }

/* France : petit drapeau et « France » en bleu, blanc, rouge */
.ely-flag { flex-shrink: 0; width: 28px; height: 19px; border-radius: 4px; box-shadow: 0 0 0 1px rgba(42, 22, 7, .12), 0 3px 8px -3px rgba(0, 0, 0, .25); }
.ely-fr {
	background: linear-gradient(90deg, #0055A4 0 33.3%, #9aa4b1 33.3% 66.6%, #EF4135 66.6%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* Paiement sécurisé en vert */
.ely-trust__item--safe .ely-trust__ico { background: #e3f3e8; color: #1f8a4c; }
.ely-trust__item--safe strong { color: #1f7a45; }
.ely-trust__item--ship .ely-trust__ico { background: color-mix(in srgb, var(--hn) 22%, #fff); color: var(--ely-honey-deep); }

.ely-pay { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 16px; padding: 0 4px; }
.ely-pay__label { margin-right: 4px; font-size: .82rem; font-weight: 600; color: #8a6a48; }
.ely-pay__card {
	display: inline-grid;
	place-items: center;
	box-sizing: border-box;
	width: 41px;
	height: 26px;
	border-radius: 5px;
	object-fit: contain;
}
/* Logos monochromes (Apple Pay, Google Pay) : sur une petite carte blanche */
.ely-pay__card--applepay, .ely-pay__card--googlepay { padding: 2px 3px; background: #fff; box-shadow: inset 0 0 0 1px rgba(42, 22, 7, .14); }
.ely-pay__card--visa, .ely-pay__card--mastercard { box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.ely-pay__card--cb { object-fit: cover; box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
@media (max-width: 560px) {
	.ely-trust__list { align-items: flex-start; padding: 0; }
	.ely-trust__item { flex: 1; flex-direction: column; gap: 8px; text-align: center; }
	.ely-trust__item + .ely-trust__item { padding-left: 8px; }
	.ely-trust__txt { white-space: normal; font-size: .74rem; }
	.ely-trust__txt strong { font-size: .82rem; }
	.ely-flag { margin-block: 8px; }
	.ely-pay { justify-content: center; }
}

@media (max-width: 900px) {
	.ely-pp__top { grid-template-columns: 1fr; gap: 24px; }
	.ely-pm { position: static; }
	.ely-pm__stage { border-radius: 22px; }
	.ely-pm__thumb { width: 64px; height: 64px; }
}
@media (max-width: 420px) {
	.ely-buy__row { flex-direction: column; }
	.ely-qty--lg { align-self: flex-start; }
}

/* =========================================================================
   Conseil · Conservation · À essayer
   ====================================================================== */
.ely-guide { padding-block: 0 clamp(56px, 7vw, 96px); }
.ely-guide__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(12px, 2vw, 22px);
	margin: 0 auto;
	list-style: none;
}
.ely-guide__grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ely-guide__grid--1 { grid-template-columns: minmax(0, 640px); }
.ely-gcard {
	position: relative;
	padding: clamp(20px, 2.4vw, 28px);
	border-radius: 22px;
	background: #fff;
	box-shadow: 0 0 0 1px rgba(42, 22, 7, .06), 0 20px 40px -30px rgba(90, 50, 0, .45);
	overflow: hidden;
}
/* Petit alvéole de couleur en fond de carte */
.ely-gcard::after {
	content: "";
	position: absolute;
	right: -26px;
	top: -26px;
	width: 110px;
	height: 120px;
	clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
	background: color-mix(in srgb, var(--hn) 16%, transparent);
}
.ely-gcard__ico {
	position: relative;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border-radius: 16px;
	background: color-mix(in srgb, var(--hn) 24%, #fff);
	color: var(--ely-ink);
}
.ely-gcard--conservation .ely-gcard__ico { background: #eef0e6; }
.ely-gcard--essayer .ely-gcard__ico { background: #fbe3cf; }
.ely-gcard__ico .ely-icon { width: 26px; height: 26px; stroke-width: 1.6; }
.ely-gcard__title { position: relative; z-index: 1; margin: 16px 0 6px; color: var(--ely-ink); font-family: var(--ely-display); font-weight: 400; font-size: 1.45rem; line-height: 1.1; }
.ely-gcard__text { position: relative; z-index: 1; margin: 0; color: #4a3220; font-size: 1rem; line-height: 1.6; }
@media (max-width: 860px) {
	.ely-guide__grid, .ely-guide__grid--2 { grid-template-columns: 1fr; }
	.ely-gcard { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: start; }
	.ely-gcard__ico { grid-row: span 2; }
	.ely-gcard__title { margin-top: 2px; }
}

/* =========================================================================
   Description
   ====================================================================== */
.ely-pdesc { padding-block: clamp(56px, 7vw, 96px); background: var(--ely-cream); }
.ely-pdesc__inner { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(24px, 5vw, 72px); }
.ely-pdesc__title {
	margin: 0;
	color: var(--ely-ink);
	font-family: var(--ely-display);
	font-weight: 400;
	font-size: clamp(2rem, 3.6vw, 3rem);
	line-height: 1;
	letter-spacing: -.015em;
}
.ely-pdesc__text { max-width: 38em; color: #4a3220; font-size: 1.08rem; line-height: 1.7; }
.ely-pdesc__text p { margin: 0 0 1em; }
.ely-pdesc__text p:last-child { margin-bottom: 0; }
.ely-pdesc__text strong { color: var(--ely-ink); }
@media (max-width: 860px) { .ely-pdesc__inner { grid-template-columns: 1fr; gap: 16px; } }

/* =========================================================================
   Produits de la même famille
   ====================================================================== */
.ely-related { padding-block: clamp(56px, 7vw, 96px); background: #fffaf0; }
.ely-related__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 20px; margin-bottom: 22px; }
.ely-related__title { margin: 0; color: var(--ely-ink); font-family: var(--ely-display); font-weight: 400; font-size: clamp(1.8rem, 3vw, 2.5rem); line-height: 1; }
.ely-related__all { color: var(--ely-ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--ely-honey-deep); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.ely-related__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 2vw, 24px); margin: 0; padding: 0; list-style: none; }
.ely-rc { position: relative; border-radius: 20px; background: #fff; box-shadow: 0 0 0 1px rgba(42, 22, 7, .06), 0 14px 30px -22px rgba(90, 50, 0, .45); overflow: hidden; transition: transform .35s var(--ely-spring); }
.ely-rc:hover { transform: translateY(-4px); }
.ely-rc__media { display: grid; place-items: center; aspect-ratio: 1; background: var(--ely-cream); }
.ely-rc--honey .ely-rc__media { background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--hn) 60%, #fff) 0 44%, #fff6dc 45%); }
.ely-rc__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ely-rc__jar { display: block; width: 58%; height: 68%; object-fit: contain; filter: drop-shadow(0 12px 10px rgba(90, 50, 0, .25)); }
.ely-rc.is-out .ely-rc__img, .ely-rc.is-out .ely-rc__jar { opacity: .55; }
.ely-rc__body { padding: 14px 16px 16px; }
.ely-rc__name { margin: 0; color: var(--ely-ink); font: 600 1rem/1.3 var(--ely-body); }
.ely-rc__name a { color: var(--ely-ink); text-decoration: none; }
.ely-rc__name a::after { content: ""; position: absolute; inset: 0; }
.ely-rc__price { display: block; margin-top: 6px; font-family: var(--ely-display); font-size: 1.2rem; line-height: 1.1; color: #8a4f06; }
@media (max-width: 900px) { .ely-related__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* =========================================================================
   Barre d'achat mobile
   ====================================================================== */
.ely-sticky-buy { display: none; }
@media (max-width: 900px) {
	.ely-sticky-buy {
		position: fixed;
		left: 12px;
		right: 12px;
		bottom: calc(12px + env(safe-area-inset-bottom));
		z-index: 70;
		display: flex;
		align-items: center;
		gap: 12px;
		padding: 10px 10px 10px 18px;
		border-radius: 18px;
		background: var(--ely-ink);
		color: var(--ely-milk);
		box-shadow: 0 18px 40px rgba(15, 7, 0, .4);
		transform: translateY(140%);
		transition: transform .35s var(--ely-ease);
	}
	.ely-sticky-buy.is-visible { transform: none; }
	.ely-sticky-buy__info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
	.ely-sticky-buy__name { overflow: hidden; font-weight: 600; font-size: .9rem; white-space: nowrap; text-overflow: ellipsis; }
	.ely-sticky-buy__price { font-family: var(--ely-display); font-size: 1.15rem; line-height: 1.1; color: var(--ely-honey); }
	.ely-sticky-buy__price .ely-from { display: none; }
	.ely-sticky-buy__btn { min-height: 46px; padding: 10px 20px; }
}

@media (prefers-reduced-motion: reduce) {
	.ely-pm__cutout, .ely-pm__slide--cutout img { animation: none; }
}
