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

body.ely-shop-page {
	margin: 0;
	background: #fffaf0;
	color: var(--ely-ink);
	font-family: var(--ely-body);
	font-size: 1.0625rem;
	line-height: 1.6;
}
.ely-shop { display: block; overflow-x: clip; color: var(--ely-ink); font-family: var(--ely-body); font-size: 1.0625rem; line-height: 1.6; }
.ely-shop *, .ely-shop *::before, .ely-shop *::after { box-sizing: border-box; }
.ely-shop-page .ely-footer { margin-block-start: 0; }

/* =========================================================================
   En-tête de page
   ====================================================================== */
.ely-shop-hero {
	position: relative;
	padding: clamp(96px, 9vw, 124px) 0 clamp(30px, 4vw, 48px);
	background:
		radial-gradient(36rem 20rem at 85% 80%, rgba(242, 168, 29, .3), transparent 70%),
		linear-gradient(180deg, #fff6dc 0%, var(--ely-cream) 100%);
	overflow: hidden;
}
.ely-shop-hero__inner { position: relative; z-index: 2; }

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

.ely-shop-hero__title {
	margin: 12px 0 0;
	color: var(--ely-ink);
	font-family: var(--ely-display);
	font-weight: 400;
	font-size: clamp(2.8rem, 6.4vw, 5.2rem);
	line-height: .95;
	letter-spacing: -.025em;
}
.ely-shop-hero__lead { max-width: 38em; margin: 18px 0 0; font-size: clamp(1.02rem, 1.25vw, 1.15rem); color: #6b4a26; }

.ely-shop-hero__bee {
	position: absolute;
	right: max(var(--ely-gutter), calc((100vw - var(--ely-max)) / 2 + 40px));
	bottom: 34%;
	width: 86px;
	height: 65px;
	filter: drop-shadow(0 10px 8px rgba(90, 50, 0, .25));
	animation: ely-shop-bee 7s ease-in-out infinite;
}
@keyframes ely-shop-bee {
	0%, 100% { transform: translate(0, 0) rotate(-4deg); }
	30% { transform: translate(-40px, -18px) rotate(5deg); }
	60% { transform: translate(-12px, 14px) rotate(-6deg); }
}
@media (max-width: 760px) { .ely-shop-hero__bee { display: none; } }

/* =========================================================================
   Barre d'outils (collante sous l'en-tête)
   ====================================================================== */
.ely-toolbar {
	position: sticky;
	top: calc(var(--ely-header-h) + var(--ely-ab, 0px));
	z-index: 40;
	background: rgba(255, 250, 240, .92);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid rgba(42, 22, 7, .08);
	transition: box-shadow .25s;
}
.ely-toolbar.is-stuck { box-shadow: 0 10px 24px -14px rgba(90, 50, 0, .35); }
.ely-toolbar__inner { padding-block: 12px; }

.ely-rayons {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	scrollbar-width: none;
	margin-inline: calc(-1 * var(--ely-gutter));
	padding-inline: var(--ely-gutter);
	mask-image: linear-gradient(90deg, transparent 0, #000 var(--ely-gutter), #000 calc(100% - var(--ely-gutter)), transparent 100%);
}
.ely-rayons::-webkit-scrollbar { display: none; }
.ely-rayon {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 42px;
	padding: 8px 14px;
	border-radius: 12px;
	background: rgba(42, 22, 7, .06);
	color: var(--ely-ink);
	font-size: .93rem;
	font-weight: 600;
	line-height: 1.1;
	text-decoration: none;
	white-space: nowrap;
	flex-shrink: 0;
	transition: background-color .2s, color .2s;
}
.ely-rayon:hover { background: rgba(242, 168, 29, .25); color: var(--ely-ink); }
.ely-rayon.is-active { background: var(--ely-ink); color: var(--ely-milk); }
.ely-rayon__n {
	min-width: 22px;
	padding: 2px 6px;
	border-radius: 999px;
	background: rgba(42, 22, 7, .08);
	font-size: .75rem;
	text-align: center;
}
.ely-rayon.is-active .ely-rayon__n { background: var(--ely-honey); color: var(--ely-ink); }

.ely-catalog__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: clamp(20px, 3vw, 32px); }
.ely-tools { display: flex; align-items: center; gap: 10px; }
.ely-search, .ely-sort {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 44px;
	border-radius: 12px;
	background: #fff;
	box-shadow: inset 0 0 0 1.5px rgba(42, 22, 7, .14);
	transition: box-shadow .2s;
}
.ely-search:focus-within, .ely-sort:focus-within { box-shadow: inset 0 0 0 2px var(--ely-honey-deep); }
.ely-search .ely-icon { position: absolute; left: 12px; width: 18px; height: 18px; color: #8a6a48; pointer-events: none; }
.ely-search input {
	width: 220px;
	height: 44px;
	padding: 0 14px 0 38px;
	border: 0;
	border-radius: 12px;
	background: transparent;
	color: var(--ely-ink);
	font: 500 .95rem var(--ely-body);
	outline: none;
}
.ely-search input::placeholder { color: #a08466; }
.ely-sort select {
	height: 44px;
	padding: 0 38px 0 14px;
	border: 0;
	border-radius: 12px;
	background: transparent;
	color: var(--ely-ink);
	font: 600 .93rem var(--ely-body);
	appearance: none;
	cursor: pointer;
	outline: none;
}
.ely-sort .ely-icon { position: absolute; right: 12px; width: 18px; height: 18px; pointer-events: none; }

@media (max-width: 640px) {
	.ely-catalog__bar { flex-direction: column-reverse; align-items: stretch; }
	.ely-tools { width: 100%; }
	.ely-search { flex: 1; }
	.ely-search input { width: 100%; }
	.ely-rayon { min-height: 40px; }
}

/* =========================================================================
   Grille de produits
   ====================================================================== */
.ely-catalog { padding-block: 22px clamp(64px, 8vw, 110px); }
.ely-catalog__count { margin: 0; font-size: .92rem; font-weight: 600; color: #8a6a48; }

/* Rayons séparés */
.ely-group + .ely-group { margin-top: clamp(40px, 5vw, 64px); }
.ely-group[hidden] { display: none; }
.ely-group__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 14px;
	margin-bottom: 18px;
	padding-bottom: 12px;
	border-bottom: 2px solid rgba(42, 22, 7, .08);
}
.ely-group__title { margin: 0; color: var(--ely-ink); font-family: var(--ely-display); font-weight: 400; font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.05; }
.ely-group__n { font-size: .88rem; font-weight: 600; color: #8a6a48; white-space: nowrap; }
/* Un seul rayon affiché : le titre du rayon est déjà en haut de page */
.ely-shop.is-single .ely-group__head { display: none; }

.ely-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(14px, 2vw, 26px);
	margin: 0;
	padding: 0;
	list-style: none;
}
.ely-card {
	display: flex;
	flex-direction: column;
	border-radius: 22px;
	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), box-shadow .3s;
	animation: ely-card-in .5s var(--ely-ease) both;
}
.ely-card[hidden] { display: none; }
@keyframes ely-card-in { from { opacity: 0; transform: translateY(14px); } }
.ely-card:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px rgba(42, 22, 7, .08), 0 24px 40px -24px rgba(90, 50, 0, .5); }

.ely-card__media {
	position: relative;
	display: grid;
	place-items: center;
	aspect-ratio: 1;
	overflow: hidden;
	background: var(--ely-cream);
}
.ely-card__img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ely-ease); }
.ely-card:hover .ely-card__img { transform: scale(1.04); }

/* Miels de la gamme : pot détouré sur un disque de sa couleur */
.ely-card--honey .ely-card__media {
	background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--hn) 60%, #fff) 0 44%, #fff6dc 45%);
}
.ely-card__jar {
	display: block;
	width: 60%;
	height: 68%;
	object-fit: contain;
	filter: drop-shadow(0 14px 12px rgba(90, 50, 0, .28));
	transition: transform .5s var(--ely-spring);
}
.ely-card:hover .ely-card__jar { transform: translateY(-6px) rotate(-2deg); }

.ely-card__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 5px 10px;
	border-radius: 999px;
	background: var(--ely-ink);
	color: var(--ely-milk);
	font-size: .78rem;
	font-weight: 700;
}
.ely-card__badge--sale { background: #c0392b; }
.ely-card.is-out .ely-card__img, .ely-card.is-out .ely-card__jar { opacity: .55; filter: grayscale(.4); }

.ely-card__body { display: flex; flex: 1; flex-direction: column; padding: 16px 18px 18px; }
.ely-card__name { margin: 0; color: var(--ely-ink); font: 600 1.04rem/1.3 var(--ely-body); }
.ely-card__name a { color: var(--ely-ink); text-decoration: none; }
.ely-card__name a::after { content: ""; position: absolute; inset: 0; } /* toute la zone texte est cliquable */
.ely-card__body { position: relative; }
.ely-card__name a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ely-card__note {
	display: -webkit-box;
	margin: 6px 0 0;
	overflow: hidden;
	color: #7a5a3a;
	font-size: .9rem;
	line-height: 1.45;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.ely-card__buy {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: auto;
	padding-top: 14px;
}
.ely-card__price { font-family: var(--ely-display); font-size: 1.3rem; line-height: 1.1; color: #8a4f06; }
.ely-card__price del { opacity: .5; font-size: .95rem; }
.ely-card__price ins { text-decoration: none; }

.ely-card__add {
	display: inline-flex;
	align-items: center;
	min-height: 42px;
	padding: 9px 16px;
	border-radius: 12px;
	background: var(--ely-honey);
	color: var(--ely-ink);
	font: 600 .92rem/1.1 var(--ely-body);
	text-decoration: none;
	box-shadow: 0 3px 0 var(--ely-honey-deep);
	transition: transform .25s var(--ely-spring), background-color .2s;
}
.ely-card__add:hover { background: var(--ely-honey-light); color: var(--ely-ink); transform: translateY(-2px); }
.ely-card__add.loading { opacity: .6; pointer-events: none; }
.ely-card__add.added::after { content: " ✓"; margin-left: 4px; }
.ely-card__add.is-out { background: rgba(42, 22, 7, .08); color: #8a6a48; box-shadow: none; cursor: default; }

@media (max-width: 1100px) { .ely-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
	.ely-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.ely-card { border-radius: 16px; }
	.ely-card__body { padding: 12px 12px 14px; }
	.ely-card__name { font-size: .95rem; }
	.ely-card__note { display: none; }
	.ely-card__buy { flex-direction: column; align-items: stretch; gap: 8px; padding-top: 10px; }
	.ely-card__price { font-size: 1.15rem; }
	.ely-card__add { justify-content: center; }
}

/* État vide */
.ely-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 60px 20px; text-align: center; }
.ely-empty[hidden] { display: none; }
.ely-empty__bee { width: 96px; height: 72px; margin-bottom: 10px; }
.ely-empty__title { margin: 0; font-family: var(--ely-display); font-size: 1.6rem; color: var(--ely-ink); }
.ely-empty__text { margin: 0 0 18px; color: #7a5a3a; }

@media (prefers-reduced-motion: reduce) {
	.ely-card { animation: none; }
}
