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

body.ely-cart-page { background: #fffaf0; }
.ely-cart-page .ely-footer { margin-block-start: 0; }

.ely-cp {
	display: block;
	overflow-x: clip;
	padding-block: clamp(22px, 3.5vw, 40px) 0;
	background:
		radial-gradient(48rem 30rem at 85% -4%, rgba(255, 201, 74, .32), transparent 70%),
		radial-gradient(36rem 26rem at 0% 30%, rgba(248, 227, 200, .7), transparent 70%),
		#fffaf0;
	color: var(--ely-ink);
	font-family: var(--ely-body);
	font-size: 1.0625rem;
	line-height: 1.55;
}
.ely-cp *, .ely-cp *::before, .ely-cp *::after { box-sizing: border-box; }
.ely-cp :is(h1, h2, h3) { color: var(--ely-ink); }

/* Notices WooCommerce */
.ely-cp__notices:empty { display: none; }
.ely-cp__notices :is(.woocommerce-message, .woocommerce-error, .woocommerce-info) {
	margin: 0 0 18px;
	padding: 14px 18px;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 0 0 1px rgba(42, 22, 7, .08);
	list-style: none;
	font-size: .98rem;
}
.ely-cp__notices .woocommerce-error { box-shadow: inset 4px 0 0 #c0392b, 0 0 0 1px rgba(192, 57, 43, .2); }
.ely-cp__notices .woocommerce-message { box-shadow: inset 4px 0 0 var(--ely-honey), 0 0 0 1px rgba(42, 22, 7, .08); }
.ely-cp__notices .button { display: none; }

/* -------------------------------------------------------------------------
   Étapes
   ---------------------------------------------------------------------- */
.ely-steps {
	display: flex;
	align-items: center;
	gap: 0;
	max-width: 560px;
	margin: 0 0 clamp(22px, 3vw, 34px);
	padding: 0;
	list-style: none;
	counter-reset: none;
}
.ely-steps__item {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1 1 auto;
	color: #9a7b58;
	font-size: .92rem;
	font-weight: 600;
	white-space: nowrap;
}
.ely-steps__item:not(:last-child)::after {
	content: "";
	flex: 1 1 auto;
	min-width: 18px;
	height: 2px;
	margin-inline: 4px 10px;
	border-radius: 2px;
	background: rgba(42, 22, 7, .14);
}
.ely-steps__num {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: #fff;
	box-shadow: inset 0 0 0 1.5px rgba(42, 22, 7, .18);
	font-size: .88rem;
}
.ely-steps__item.is-current { color: var(--ely-ink); }
.ely-steps__item.is-current .ely-steps__num { background: var(--ely-honey); box-shadow: 0 3px 0 var(--ely-honey-deep); color: var(--ely-darker); }

/* -------------------------------------------------------------------------
   Titre
   ---------------------------------------------------------------------- */
.ely-cp__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: clamp(18px, 2.5vw, 28px); }
.ely-cp__title { margin: 0; font-family: var(--ely-display); font-weight: 400; font-size: clamp(2.3rem, 5vw, 3.6rem); line-height: 1; letter-spacing: -.01em; }
.ely-cp__count { margin: 0; padding: 4px 12px; border-radius: 999px; background: rgba(242, 168, 29, .22); color: #7a4a06; font-size: .92rem; font-weight: 600; }

/* -------------------------------------------------------------------------
   Grille principale
   ---------------------------------------------------------------------- */
.ely-cp__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
	gap: clamp(24px, 3.5vw, 48px);
	align-items: start;
	padding-bottom: clamp(56px, 7vw, 96px);
}

/* Articles ---------------------------------------------------------------- */
.ely-cl-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.ely-cl {
	--hn: var(--ely-honey);
	display: grid;
	grid-template-columns: 112px minmax(0, 1fr) auto auto;
	grid-template-areas: "media info qty total";
	align-items: center;
	gap: 8px 22px;
	padding: 14px 22px 14px 14px;
	border-radius: 22px;
	background: #fff;
	box-shadow: 0 0 0 1px rgba(42, 22, 7, .06), 0 16px 34px -26px rgba(90, 50, 0, .5);
	transition: opacity .3s, transform .35s var(--ely-ease);
}
.ely-cl.is-busy { opacity: .55; pointer-events: none; }
.ely-cl.is-leaving { opacity: 0; transform: translateX(28px); }

.ely-cl__media {
	grid-area: media;
	display: grid;
	place-items: center;
	width: 112px;
	aspect-ratio: 1;
	border-radius: 16px;
	background: var(--ely-cream);
	overflow: hidden;
}
.ely-cl--honey .ely-cl__media { background: radial-gradient(circle at 50% 62%, color-mix(in srgb, var(--hn) 62%, #fff) 0 44%, #fff6dc 45%); }
.ely-cl__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ely-cl__media { position: relative; }
.ely-cl__jar { position: absolute; inset: 0; display: block; width: 100%; height: 74%; margin: auto; object-fit: contain; filter: drop-shadow(0 10px 8px rgba(90, 50, 0, .28)); }

.ely-cl__info { grid-area: info; min-width: 0; }
.ely-cl__name { margin: 0; font: 600 1.08rem/1.3 var(--ely-body); }
.ely-cl__name a { color: var(--ely-ink); text-decoration: none; }
.ely-cl__name a:hover { text-decoration: underline; text-decoration-color: var(--ely-honey-deep); text-underline-offset: 3px; }
.ely-cl__sub { margin: 2px 0 0; color: #8a6a48; font-size: .88rem; line-height: 1.35; }
.ely-cl__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 8px 0 0; font-size: .92rem; color: #7a5a3a; }
.ely-cl__format { padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--hn) 24%, #fff); color: #6b3e06; font-weight: 600; font-size: .85rem; }
.ely-cl__backorder { margin: 6px 0 0; color: #a0620a; font-size: .85rem; font-weight: 600; }

.ely-cl__qty { grid-area: qty; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ely-qty--lg .ely-qty__btn { width: 40px; height: 42px; }
.ely-qty__input {
	width: 44px;
	height: 42px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--ely-ink);
	font: 700 1rem/1 var(--ely-body);
	text-align: center;
	-moz-appearance: textfield;
	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-visible { outline: 3px solid var(--ely-honey); outline-offset: -3px; border-radius: 8px; }
.ely-cp.is-js .ely-qty__input { width: 34px; }

.ely-cl__remove {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 2px 6px;
	color: #9a7b58;
	font-size: .82rem;
	text-decoration: none;
	border-radius: 6px;
}
.ely-cl__remove .ely-icon { width: 15px; height: 15px; }
.ely-cl__remove:hover { color: #b03a1e; }

.ely-cl__total { grid-area: total; min-width: 84px; margin: 0; font-family: var(--ely-display); font-size: 1.3rem; line-height: 1; text-align: right; color: #7a4206; }

/* Pied de liste */
.ely-cp__lines-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.ely-cp__back { display: inline-flex; align-items: center; gap: 8px; color: var(--ely-ink); font-weight: 600; text-decoration: none; }
.ely-cp__back svg { width: 20px; height: 20px; transition: transform .25s var(--ely-ease); }
.ely-cp__back:hover svg { transform: translateX(-4px); }
.ely-cp .ely-btn--line { color: var(--ely-ink); box-shadow: inset 0 0 0 2px rgba(42, 22, 7, .2); }
.ely-cp .ely-btn--line:hover { color: var(--ely-ink); box-shadow: inset 0 0 0 2px var(--ely-ink); }
.ely-cp.is-js .ely-cp__update { display: none; }

/* -------------------------------------------------------------------------
   Récapitulatif
   ---------------------------------------------------------------------- */
.ely-sum { position: sticky; top: calc(var(--ely-header-h) + var(--ely-ab, 0px) + 20px); }
.ely-sum__card {
	position: relative;
	padding: 26px 26px 22px;
	border-radius: 26px;
	background: #fff;
	box-shadow: 0 0 0 1px rgba(42, 22, 7, .06), 0 30px 60px -36px rgba(90, 50, 0, .55);
	overflow: hidden;
}
.ely-sum__card::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 6px;
	background: linear-gradient(90deg, var(--ely-honey-light), var(--ely-honey), var(--ely-honey-deep));
}
.ely-sum__title { margin: 0 0 16px; font-family: var(--ely-display); font-weight: 400; font-size: 1.7rem; line-height: 1.1; }

/* Jauge livraison offerte */
.ely-free { margin: 0 0 18px; padding: 14px 16px; border-radius: 16px; background: #fff6df; }
.ely-free__text { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 10px; font-size: .94rem; line-height: 1.4; }
.ely-free__text strong { color: #7a4206; }
.ely-free__icon { flex: 0 0 auto; width: 22px; height: 22px; color: var(--ely-honey-deep); }
.ely-free__bar { height: 10px; border-radius: 999px; background: rgba(201, 122, 10, .16); overflow: hidden; }
.ely-free__bar span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, var(--ely-honey-light), var(--ely-honey) 60%, var(--ely-honey-deep));
	transition: width .6s var(--ely-ease);
}
.ely-free.is-done { background: #eef7e9; }
.ely-free.is-done .ely-free__icon, .ely-free.is-done .ely-free__text strong { color: #2f7a3a; }
.ely-free.is-done .ely-free__bar span { background: linear-gradient(90deg, #7cc47f, #2f9a4a); }

/* Lignes */
.ely-sum__rows { margin: 0; }
.ely-sum__row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 9px 0; font-size: .98rem; }
.ely-sum__row dt { margin: 0; color: #5b3d1f; }
.ely-sum__row dd { margin: 0; font-weight: 600; text-align: right; }
.ely-sum__row--muted dd { color: #8a6a48; font-weight: 500; font-size: .92rem; }
.ely-sum__row--coupon dd { color: #2f7a3a; }
.ely-sum__code { padding: 2px 8px; border-radius: 6px; background: #eef7e9; color: #2f7a3a; font-size: .85rem; font-weight: 700; letter-spacing: .04em; }
.ely-sum__remove-coupon { margin-left: 4px; color: #9a7b58; font-size: .82rem; }
.ely-sum__row--total { margin-top: 8px; padding-top: 16px; border-top: 1.5px dashed rgba(42, 22, 7, .16); }
.ely-sum__row--total dt { color: var(--ely-ink); font-weight: 700; font-size: 1.05rem; }
.ely-sum__row--total dt small { display: block; color: #8a6a48; font-weight: 500; font-size: .8rem; }
.ely-sum__row--total dd { font-family: var(--ely-display); font-weight: 400; font-size: 2rem; line-height: 1; color: #7a4206; }

/* Code promo */
.ely-coupon { margin: 14px 0 0; }
.ely-coupon__toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #6b4a26;
	font-size: .92rem;
	font-weight: 600;
	cursor: pointer;
	list-style: none;
}
.ely-coupon__toggle::-webkit-details-marker { display: none; }
.ely-coupon__toggle::after {
	content: "";
	width: 8px;
	height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	transition: transform .25s var(--ely-ease);
}
.ely-coupon[open] .ely-coupon__toggle::after { transform: translateY(2px) rotate(-135deg); }
.ely-coupon__form { display: flex; gap: 8px; margin-top: 10px; }
.ely-coupon__input {
	flex: 1 1 auto;
	min-width: 0;
	height: 46px;
	padding: 0 14px;
	border: 0;
	border-radius: 12px;
	background: #fffaf0;
	box-shadow: inset 0 0 0 1.5px rgba(42, 22, 7, .16);
	color: var(--ely-ink);
	font: 600 .98rem/1 var(--ely-body);
	text-transform: uppercase;
}
.ely-coupon__input::placeholder { text-transform: none; font-weight: 400; color: #a08466; }
.ely-coupon__input:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--ely-honey-deep); }
.ely-coupon__btn { min-height: 46px; padding: 10px 18px; font-size: .95rem; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* Commander */
.ely-sum__checkout { width: 100%; margin-top: 20px; min-height: 58px; font-size: 1.1rem; }
.ely-sum__checkout svg { width: 22px; height: 22px; transition: transform .25s var(--ely-ease); }
.ely-sum__checkout:hover svg { transform: translateX(4px); }

.ely-sum__secure { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 16px 0 10px; color: #2f7a3a; font-size: .86rem; font-weight: 600; }
.ely-sum__secure svg { width: 16px; height: 16px; }
.ely-sum__pay { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.ely-sum__logo { width: 41px; height: 26px; border-radius: 5px; object-fit: contain; }
.ely-sum__logo--visa, .ely-sum__logo--mastercard, .ely-sum__logo--cb { box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.ely-sum__logo--cb { object-fit: cover; }
.ely-sum__logo--applepay, .ely-sum__logo--googlepay { padding: 2px 3px; background: #fff; box-shadow: inset 0 0 0 1px rgba(42, 22, 7, .14); }

/* Avantages */
.ely-sum__perks { display: grid; gap: 10px; margin: 18px 0 0; padding: 0 6px; list-style: none; font-size: .9rem; color: #5b3d1f; }
.ely-sum__perks li { display: flex; align-items: center; gap: 12px; }
.ely-sum__perks strong { color: var(--ely-ink); }
.ely-perk { flex: 0 0 auto; width: 34px; height: 34px; padding: 7px; border-radius: 50%; background: rgba(242, 168, 29, .2); color: #a0620a; }

/* -------------------------------------------------------------------------
   Panier vide
   ---------------------------------------------------------------------- */
.ely-cp__empty {
	display: grid;
	justify-items: center;
	max-width: 620px;
	margin: 0 auto clamp(48px, 6vw, 80px);
	padding: clamp(36px, 6vw, 64px) clamp(20px, 4vw, 48px);
	border-radius: 30px;
	background: #fff;
	box-shadow: 0 0 0 1px rgba(42, 22, 7, .06), 0 30px 60px -40px rgba(90, 50, 0, .5);
	text-align: center;
}
.ely-cp__empty-bee { width: 86px; height: auto; margin-bottom: 10px; animation: ely-cp-float 4s ease-in-out infinite; }
@keyframes ely-cp-float { 50% { transform: translateY(-8px) rotate(-4deg); } }
.ely-cp__empty-title { margin: 0; font-family: var(--ely-display); font-weight: 400; font-size: clamp(1.7rem, 3.5vw, 2.3rem); line-height: 1.1; }
.ely-cp__empty-text { margin: 10px 0 24px; color: #6b4a26; }
.ely-cp__empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* -------------------------------------------------------------------------
   Suggestions
   ---------------------------------------------------------------------- */
.ely-cs { padding-block: clamp(48px, 6vw, 80px); background: linear-gradient(#fff3d6, #ffeec4); }
.ely-cs__title { margin: 0 0 22px; font-family: var(--ely-display); font-weight: 400; font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.05; }
.ely-cs__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 2vw, 22px); margin: 0; padding: 0; list-style: none; }
.ely-sc {
	--hn: var(--ely-honey);
	position: relative;
	display: flex;
	flex-direction: column;
	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-sc:hover { transform: translateY(-4px); }
.ely-sc__media { display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--ely-cream); }
.ely-sc--honey .ely-sc__media { background: radial-gradient(circle at 50% 62%, color-mix(in srgb, var(--hn) 60%, #fff) 0 38%, #fff6dc 39%); }
.ely-sc__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ely-sc__media { position: relative; }
.ely-sc__jar { position: absolute; inset: 0; display: block; width: 100%; height: 76%; margin: auto; object-fit: contain; filter: drop-shadow(0 12px 10px rgba(90, 50, 0, .25)); }
.ely-sc__body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 14px 16px 16px; }
.ely-sc__name { margin: 0; font: 600 1rem/1.3 var(--ely-body); }
.ely-sc__name a { color: var(--ely-ink); text-decoration: none; }
.ely-sc__name a::after { content: ""; position: absolute; inset: 0; }
.ely-sc__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; }
.ely-sc__price { font-family: var(--ely-display); font-size: 1.15rem; line-height: 1.1; color: #8a4f06; }
.ely-sc__price .ely-from { display: block; font-family: var(--ely-body); font-size: .72rem; color: #8a6a48; }
.ely-sc__add {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	padding: 8px 14px;
	border-radius: 11px;
	background: var(--ely-honey);
	box-shadow: 0 3px 0 var(--ely-honey-deep);
	color: var(--ely-darker);
	font-weight: 600;
	font-size: .9rem;
	text-decoration: none;
	white-space: nowrap;
	transition: transform .25s var(--ely-spring), box-shadow .25s;
}
.ely-sc__add:hover { color: var(--ely-darker); transform: translateY(-2px); box-shadow: 0 5px 0 var(--ely-honey-deep); }
.ely-sc__add.loading { opacity: .6; pointer-events: none; }
.ely-sc__add.added::after { content: " ✓"; }
.ely-cs .added_to_cart { display: none; }

/* -------------------------------------------------------------------------
   Barre mobile
   ---------------------------------------------------------------------- */
.ely-cart-bar { display: none; }

/* -------------------------------------------------------------------------
   Responsive
   ---------------------------------------------------------------------- */
@media (max-width: 1080px) {
	.ely-cl { grid-template-columns: 96px minmax(0, 1fr) auto; grid-template-areas: "media info total" "media qty qty"; }
	.ely-cl__media { width: 96px; }
	.ely-cl__qty { flex-direction: row; justify-content: space-between; align-items: center; }
}
@media (max-width: 900px) {
	.ely-cp__grid { grid-template-columns: minmax(0, 1fr); }
	.ely-sum { position: static; }
	.ely-cs__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ely-cart-page .ely-footer { padding-bottom: 84px; }
	.ely-cart-bar {
		position: fixed;
		inset: auto 0 0;
		z-index: 60;
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 14px;
		padding: 12px var(--ely-gutter) calc(12px + env(safe-area-inset-bottom));
		background: rgba(255, 250, 240, .96);
		box-shadow: 0 -10px 30px -12px rgba(90, 50, 0, .35);
		backdrop-filter: blur(10px);
	}
	.ely-cart-bar { transition: transform .35s var(--ely-ease); }
	.ely-cart-bar.is-hidden { transform: translateY(110%); }
	.ely-cart-bar__info { display: flex; flex-direction: column; line-height: 1.1; }
	.ely-cart-bar__label { color: #8a6a48; font-size: .8rem; }
	.ely-cart-bar__total { font-family: var(--ely-display); font-weight: 400; font-size: 1.5rem; color: #7a4206; }
	.ely-cart-bar__btn { min-height: 48px; padding: 12px 26px; }
}
@media (max-width: 560px) {
	.ely-steps__label { font-size: .8rem; }
	.ely-steps__item:not(.is-current) .ely-steps__label { display: none; }
	.ely-cl { grid-template-columns: 80px minmax(0, 1fr) auto; gap: 6px 14px; padding: 12px; border-radius: 18px; }
	.ely-cl__media { width: 80px; border-radius: 12px; }
	.ely-cl__name { font-size: 1rem; }
	.ely-cl__total { min-width: 0; font-size: 1.15rem; align-self: start; padding-top: 4px; }
	.ely-sum__card { padding: 22px 18px 18px; border-radius: 22px; }
	.ely-cp__lines-foot { justify-content: center; }
}
@media (max-width: 420px) {
	.ely-cs__grid { gap: 10px; }
	.ely-sc__row { flex-direction: column; align-items: stretch; }
	.ely-sc__add { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.ely-cp *, .ely-cp *::before, .ely-cp *::after { animation: none !important; transition: none !important; }
}
