/* =====================================================================
 * Page boutique « éditoriale » (template-parts/shop-editorial.php)
 * Grille 4 / 3 / 2 colonnes (Baymard : 3 à 4 sur ordinateur, 2 sur
 * mobile), barre collante, panneau de filtres latéral (plein écran sur
 * mobile), progression de chargement.
 * ===================================================================== */
.uku-shop {
	--shop-ink: var(--uku-color-primary, #111);
	--shop-bg: var(--uku-color-bg, #fff);
	--shop-line: color-mix(in srgb, var(--shop-ink) 10%, transparent);
	--shop-muted: color-mix(in srgb, var(--shop-ink) 55%, transparent);
	--shop-pad: clamp(16px, 3vw, 40px);
	max-width: 1440px;
	margin: 0 auto;
	padding: 0 var(--shop-pad) clamp(48px, 7vw, 96px);
	color: var(--shop-ink);
}

/* ---- En-tête ---- */
.uku-shop__head { padding: clamp(32px, 6vw, 72px) 0 clamp(18px, 3vw, 28px); text-align: center; }
.uku-shop__eyebrow { margin: 0 0 10px; font-size: 10.5px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--shop-muted); }
.uku-shop__title { margin: 0; font-family: var(--uku-font-heading); font-weight: 500; font-size: clamp(36px, 5.4vw, 72px); line-height: 1; }
.uku-shop__count { margin: 12px 0 0; font-size: 13px; color: var(--shop-muted); }

/* ---- Pastilles de collections ---- */
.uku-shop__chips { display: flex; justify-content: center; gap: 8px; overflow-x: auto; padding: 4px 0 20px; scrollbar-width: none; }
.uku-shop__chips::-webkit-scrollbar { display: none; }
.uku-shop__chip { flex: none; padding: 9px 16px; border: 1px solid var(--shop-line); border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--shop-ink); text-decoration: none; white-space: nowrap; transition: background .2s, color .2s, border-color .2s; }
.uku-shop__chip:hover { border-color: var(--shop-ink); }
.uku-shop__chip.is-active { background: var(--shop-ink); border-color: var(--shop-ink); color: var(--shop-bg); }
@media (max-width: 767px) {
	.uku-shop__chips { justify-content: flex-start; margin: 0 calc(-1 * var(--shop-pad)); padding-left: var(--shop-pad); padding-right: var(--shop-pad); }
}

/* ---- Barre collante ---- */
.uku-shop__bar {
	position: sticky;
	top: var(--uku-shop-bar-top, 0px);
	z-index: 40;
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 calc(-1 * var(--shop-pad)) clamp(16px, 2vw, 24px);
	padding: 10px var(--shop-pad);
	background: color-mix(in srgb, var(--shop-bg) 94%, transparent);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-top: 1px solid var(--shop-line);
	border-bottom: 1px solid var(--shop-line);
	transition: box-shadow .25s;
}
.uku-shop__bar.is-stuck { box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.uku-shop__filter-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: 1px solid var(--shop-ink); border-radius: 999px; background: var(--shop-ink); color: var(--shop-bg); font: inherit; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.uku-shop__filter-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.uku-shop__badge { display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--shop-bg); color: var(--shop-ink); font-size: 10px; font-weight: 700; }
.uku-shop__active { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.uku-shop__active-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: color-mix(in srgb, var(--shop-ink) 7%, transparent); font-size: 12px; color: var(--shop-ink); text-decoration: none; }
.uku-shop__active-chip span[aria-hidden] { font-size: 15px; line-height: 1; opacity: .6; }
.uku-shop__clear { font-size: 12px; color: var(--shop-muted); text-decoration: underline; text-underline-offset: 3px; }
.uku-shop__bar-end { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.uku-shop__sort select { height: 40px; padding: 0 34px 0 14px; border: 1px solid var(--shop-line); border-radius: 999px; background: var(--shop-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23111' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 14px center / 10px; -webkit-appearance: none; appearance: none; font: inherit; font-size: 12.5px; color: var(--shop-ink); cursor: pointer; }
.uku-shop__density { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--shop-line); border-radius: 999px; }
.uku-shop__density button { display: grid; place-items: center; width: 34px; height: 32px; border: 0; border-radius: 999px; background: none; color: var(--shop-muted); cursor: pointer; }
.uku-shop__density button.is-active { background: color-mix(in srgb, var(--shop-ink) 8%, transparent); color: var(--shop-ink); }
.uku-shop__density svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
@media (max-width: 767px) {
	.uku-shop__bar { gap: 8px; }
	.uku-shop__active { display: none; }
	.uku-shop__filter-btn { height: 38px; padding: 0 14px; }
	.uku-shop__sort select { height: 38px; max-width: 150px; font-size: 12px; }
}
/* Filtres actifs sous la barre sur mobile (la barre reste compacte). */
@media (max-width: 767px) {
	.uku-shop__bar + .uku-shop__grid { margin-top: 0; }
}

/* ---- Grille : 4 / 3 / 2 colonnes, densité réglable ---- */
.uku-shop__grid .uku-grid { display: grid; gap: clamp(12px, 1.6vw, 24px) clamp(10px, 1.4vw, 20px); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.uku-shop__grid[data-density="sparse"] .uku-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) {
	.uku-shop__grid .uku-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.uku-shop__grid[data-density="sparse"] .uku-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
	.uku-shop__grid .uku-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.uku-shop__grid[data-density="sparse"] .uku-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.uku-shop__grid .uku-grid + .uku-grid { margin-top: clamp(12px, 1.6vw, 24px); }

/* ---- Bannière éditoriale intercalée ---- */
.uku-shop__editorial { position: relative; display: block; margin: clamp(28px, 4vw, 56px) 0; aspect-ratio: 21 / 9; border-radius: 18px; overflow: hidden; color: #fff; text-decoration: none; background: color-mix(in srgb, var(--shop-ink) 8%, transparent); }
.uku-shop__editorial img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.uku-shop__editorial:hover img { transform: scale(1.03); }
.uku-shop__editorial::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.45), rgba(0,0,0,0) 55%); }
.uku-shop__editorial-text { position: absolute; left: clamp(20px, 4vw, 48px); bottom: clamp(20px, 4vw, 44px); z-index: 1; display: flex; flex-direction: column; gap: 10px; }
.uku-shop__editorial-title { font-family: var(--uku-font-heading); font-size: clamp(30px, 4.4vw, 60px); font-weight: 500; line-height: 1; }
.uku-shop__editorial-link { align-self: flex-start; padding-bottom: 4px; border-bottom: 1px solid currentColor; font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; }
@media (max-width: 767px) { .uku-shop__editorial { aspect-ratio: 4 / 5; } }

/* ---- Aucun résultat ---- */
.uku-shop__empty { padding: clamp(48px, 8vw, 120px) 0; text-align: center; }
.uku-shop__empty-title { margin: 0 0 20px; font-family: var(--uku-font-heading); font-size: clamp(24px, 3vw, 34px); }
.uku-shop__clear-btn { display: inline-block; padding: 14px 28px; border-radius: 999px; background: var(--shop-ink); color: var(--shop-bg); font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; }

/* ---- Progression + « Voir plus » ---- */
.uku-shop__more { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: clamp(36px, 5vw, 64px); }
.uku-shop__progress-text { margin: 0; font-size: 12.5px; color: var(--shop-muted); }
.uku-shop__progress { width: min(240px, 60vw); height: 2px; border-radius: 2px; background: var(--shop-line); overflow: hidden; }
.uku-shop__progress span { display: block; height: 100%; background: var(--shop-ink); transition: width .5s cubic-bezier(.2,.7,.2,1); }
.uku-shop__more-btn { margin-top: 6px; padding: 15px 40px; border: 1px solid var(--shop-ink); border-radius: 999px; color: var(--shop-ink); font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; transition: background .2s, color .2s; }
.uku-shop__more-btn:hover { background: var(--shop-ink); color: var(--shop-bg); }
.uku-shop__more-btn.is-loading { opacity: .5; pointer-events: none; }

/* ---- Panneau de filtres ---- */
.uku-shop__overlay { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.35); opacity: 0; transition: opacity .3s; }
.uku-shop__overlay.is-visible { opacity: 1; }
.uku-shop__filters { position: fixed; top: 0; right: 0; bottom: 0; z-index: 201; width: min(420px, 100%); background: var(--shop-bg); transform: translateX(100%); transition: transform .4s cubic-bezier(.2,.8,.2,1); box-shadow: -20px 0 50px rgba(0,0,0,.1); }
.uku-shop__filters.is-open { transform: none; }
.uku-shop__filters form { display: flex; flex-direction: column; height: 100%; }
.uku-shop__filters-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid var(--shop-line); }
.uku-shop__filters-title { margin: 0; font-family: var(--uku-font-heading); font-size: 24px; font-weight: 500; }
.uku-shop__filters-close { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--shop-ink) 6%, transparent); color: var(--shop-ink); cursor: pointer; }
.uku-shop__filters-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.uku-shop__filters-body { flex: 1; overflow-y: auto; padding: 8px 24px 24px; overscroll-behavior: contain; }
.uku-shop__group { margin: 0; padding: 20px 0; border: 0; border-bottom: 1px solid var(--shop-line); }
.uku-shop__group legend { padding: 0; margin-bottom: 14px; font-size: 10.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--shop-muted); }
.uku-shop__options { display: flex; flex-wrap: wrap; gap: 8px; }
.uku-shop__option { position: relative; display: inline-flex; cursor: pointer; border: 0; padding: 0; background: none; font: inherit; }
.uku-shop__option input { position: absolute; opacity: 0; pointer-events: none; }
.uku-shop__option span { display: inline-block; padding: 9px 14px; border: 1px solid var(--shop-line); border-radius: 999px; font-size: 13px; color: var(--shop-ink); transition: background .2s, color .2s, border-color .2s; }
.uku-shop__option input:checked + span,
.uku-shop__option.is-active span { background: var(--shop-ink); border-color: var(--shop-ink); color: var(--shop-bg); }
.uku-shop__option input:focus-visible + span { outline: 2px solid var(--shop-ink); outline-offset: 2px; }
.uku-shop__price { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.uku-shop__price label { display: flex; flex-direction: column; gap: 6px; font-size: 11px; color: var(--shop-muted); }
.uku-shop__price input { height: 44px; padding: 0 14px; border: 1px solid var(--shop-line); border-radius: 12px; background: var(--shop-bg); font: inherit; font-size: 15px; color: var(--shop-ink); }
.uku-shop__filters-foot { display: flex; align-items: center; gap: 16px; padding: 16px 24px calc(16px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--shop-line); }
.uku-shop__reset { font-size: 13px; color: var(--shop-ink); text-decoration: underline; text-underline-offset: 3px; }
.uku-shop__apply { flex: 1; height: 50px; border: 0; border-radius: 999px; background: var(--shop-ink); color: var(--shop-bg); font: inherit; font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; transition: opacity .2s; }
.uku-shop__apply.is-loading { opacity: .6; }
.uku-shop__apply:disabled { opacity: .4; cursor: not-allowed; }
@media (max-width: 767px) {
	.uku-shop__filters { top: auto; width: 100%; max-height: 92dvh; border-radius: 22px 22px 0 0; transform: translateY(100%); }
	.uku-shop__filters.is-open { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.uku-shop__filters, .uku-shop__overlay, .uku-shop__progress span { transition: none; }
}
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Barre : le style global des <select> du site ne s'applique pas ici. */
.uku-shop__bar .uku-shop__sort select { font-size: 12.5px !important; line-height: 1 !important; min-height: 0 !important; width: auto !important; }
@media (max-width: 767px) {
	.uku-shop__bar .uku-shop__sort select { height: 38px !important; max-width: 138px; padding: 0 30px 0 12px !important; font-size: 12px !important; background-position: right 12px center !important; }
	.uku-shop__bar-end { gap: 6px; }
	.uku-shop__density button { width: 30px; height: 30px; }
}

/* Panneau de filtres : hauteur contrainte, seul le contenu défile — le
   pied (Effacer / Voir les N pièces) reste toujours visible en bas. */
.uku-shop__filters { display: flex; flex-direction: column; }
.uku-shop__filters form { flex: 1 1 auto; min-height: 0; height: auto !important; }
.uku-shop__filters-body { min-height: 0; }
.uku-shop__filters-head, .uku-shop__filters-foot { flex: none; }
@media (max-width: 767px) {
	.uku-shop__filters { height: 88vh; height: 88dvh; max-height: none; }
}
/* Légendes de groupe : collées à leurs options (rendu natif des <legend>
   placé sur la bordure du fieldset, d'où un grand vide). */
.uku-shop__group legend { float: left; width: 100%; }
.uku-shop__group legend + * { clear: both; }

/* Mobile : filtres actifs visibles sur une 2e ligne de la barre (pastilles
   défilantes) ; barre resserrée pour que tout tienne. */
@media (max-width: 767px) {
	.uku-shop__bar { flex-wrap: wrap; row-gap: 8px; }
	.uku-shop__active { display: flex !important; order: 3; flex: 0 0 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
	.uku-shop__active::-webkit-scrollbar { display: none; }
	.uku-shop__active-chip, .uku-shop__clear { flex: none; white-space: nowrap; }
	.uku-shop__filter-btn { padding: 0 12px; gap: 6px; letter-spacing: .06em; }
	.uku-shop__bar .uku-shop__sort select { max-width: 124px; }
	.uku-shop__density { padding: 2px; }
	.uku-shop__density button { width: 28px; height: 28px; }
}

/* =====================================================================
 * Raffinement « épuré » (inspiré COS, Arket, Sézane) : collections en
 * onglets soulignés, barre en texte sur un seul filet, sélecteur de vue
 * minimal. Les boutons sont remis à zéro : le style global des <button>
 * du site (padding 8px 16px) écrasait les icônes du sélecteur de vue.
 * ===================================================================== */
.uku-shop button { min-height: 0; box-shadow: none; text-transform: none; letter-spacing: normal; }

/* En-tête plus aéré, compteur porté par la barre. */
.uku-shop__head { padding-bottom: clamp(20px, 3vw, 36px); }
.uku-shop__head .uku-shop__count { display: none; }

/* Collections : onglets texte, trait sous l'onglet actif. */
.uku-shop__chips { gap: clamp(18px, 2.4vw, 34px); padding: 0 0 2px; }
.uku-shop__chip { padding: 10px 0; border: 0; border-radius: 0; background: none !important; color: var(--shop-muted) !important; font-size: 13px; letter-spacing: .02em; position: relative; }
.uku-shop__chip::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 1px; background: currentColor; transform: scaleX(0); transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.uku-shop__chip:hover { color: var(--shop-ink) !important; }
.uku-shop__chip:hover::after, .uku-shop__chip.is-active::after { transform: scaleX(1); }
.uku-shop__chip.is-active { color: var(--shop-ink) !important; }

/* Barre : un seul filet, fond translucide, éléments en texte. */
.uku-shop__bar { min-height: 56px; padding-top: 8px; padding-bottom: 8px; border-top: 0; gap: 20px; }
.uku-shop__bar.is-stuck { box-shadow: none; border-bottom-color: color-mix(in srgb, var(--shop-ink) 14%, transparent); }
.uku-shop__filter-btn { height: 36px; padding: 0 !important; border: 0; background: none; color: var(--shop-ink); font-size: 13px; letter-spacing: .02em; text-transform: none; }
.uku-shop__filter-btn span:first-of-type { position: relative; }
.uku-shop__filter-btn:hover span:first-of-type { text-decoration: underline; text-underline-offset: 4px; }
.uku-shop__badge { background: var(--shop-ink); color: var(--shop-bg); }
.uku-shop__bar-count { font-size: 12.5px; color: var(--shop-muted); white-space: nowrap; }
.uku-shop__active-chip { padding: 6px 11px; font-size: 12px; }
.uku-shop__bar-end { gap: clamp(14px, 2vw, 28px); }

/* Tri : « Trier  Nouveautés ⌄ » en texte, sans cadre. */
.uku-shop__sort { display: flex; align-items: center; gap: 6px; }
.uku-shop__sort-label { font-size: 12.5px; color: var(--shop-muted); }
.uku-shop__bar .uku-shop__sort select { height: 36px !important; padding: 0 18px 0 0 !important; border: 0 !important; border-radius: 0 !important; background-color: transparent !important; background-position: right 0 center !important; font-size: 13px !important; color: var(--shop-ink); }

/* Sélecteur de vue : deux icônes nues, l'active pleine. */
.uku-shop__density { align-items: center; gap: 4px; padding: 0 !important; border: 0; border-radius: 0; }
.uku-shop__density-label { margin-right: 4px; font-size: 12.5px; color: var(--shop-muted); }
.uku-shop .uku-shop__density button { display: grid; place-items: center; width: 30px !important; height: 30px !important; padding: 0 !important; border: 0; border-radius: 6px; background: none !important; color: var(--shop-ink); opacity: .32; transition: opacity .2s, background-color .2s; }
.uku-shop .uku-shop__density button:hover { opacity: .7; }
.uku-shop .uku-shop__density button.is-active { opacity: 1; }
.uku-shop .uku-shop__density button:focus-visible { outline: 1.5px solid var(--shop-ink); outline-offset: 1px; }
.uku-shop__density svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }

@media (max-width: 767px) {
	.uku-shop__bar { gap: 12px; min-height: 52px; }
	.uku-shop__bar-count, .uku-shop__density-label, .uku-shop__sort-label { display: none; }
	.uku-shop__bar .uku-shop__sort select { max-width: 132px; font-size: 12.5px !important; }
	.uku-shop .uku-shop__density button { width: 28px !important; height: 28px !important; }
	.uku-shop__density svg { width: 16px; height: 16px; }
}

/* Grille : plus d'air entre les rangées, texte sous image discret. */
.uku-shop__grid .uku-grid { row-gap: clamp(28px, 3.4vw, 48px); }

/* Panneau : options en lignes sobres plutôt qu'en pastilles lourdes. */
.uku-shop__filters-title { font-size: 22px; }
.uku-shop__option span { padding: 8px 14px; font-size: 12.5px; }
.uku-shop__option:hover span { border-color: var(--shop-ink); }
@media (max-width: 767px) {
	.uku-shop__chips { gap: 22px; padding: 0 var(--shop-pad) 2px; }
	.uku-shop__bar .uku-shop__sort select { width: auto !important; max-width: 140px; }
}
