/* Naturalmente · Aceite de Oliva de España — product cards, home sections and catalogue.
   Product card + home sections are owned by the core theme; catalogue/product-page
   rules live below the «CATALOGUE» marker. */

@layer components {
	/* ---------- Product grid & card ---------- */
	.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: clamp(14px, 2vw, 28px); list-style: none; padding: 0; }
	@media (max-width: 560px) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }

	.card { position: relative; display: flex; flex-direction: column; background: var(--paper); border-radius: var(--radius-l); overflow: hidden; border: 1px solid transparent; transition: border-color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease); height: 100%; }
	.card:hover { border-color: var(--line); box-shadow: var(--shadow-2); transform: translateY(-2px); }
	.card-media { position: relative; display: block; aspect-ratio: 1 / 1; background: radial-gradient(120% 90% at 50% 100%, var(--stone-2), var(--white) 70%); overflow: hidden; }
	.card-img { width: 100%; height: 100%; object-fit: contain; padding: 10%; mix-blend-mode: multiply; transition: transform .6s var(--ease); }
	.card:hover .card-img { transform: scale(1.04); }
	.card-img--empty { display: grid; place-items: center; color: var(--line-strong); }
	.card-seals { position: absolute; top: 12px; left: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
	.card-flag { position: absolute; top: 12px; right: 12px; background: var(--ink); color: var(--white); font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: .35em .7em; border-radius: var(--radius-pill); }
	.card-flag--sale { background: var(--gold); color: var(--ink); }
	.card.is-out .card-img { opacity: .55; }
	.card-body { display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.1rem 1.1rem; flex: 1; }
	.card-brand { font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); }
	.card-title { font-family: var(--font-serif); font-size: 1.15rem; line-height: 1.22; }
	.card-title a { text-decoration: none; }
	.card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
	.card-foot { margin-top: auto; padding-top: .7rem; display: flex; align-items: flex-end; justify-content: space-between; gap: .6rem; }
	.card-price { font-weight: 600; font-size: 1.08rem; }
	.card-price del { color: var(--graphite); font-weight: 400; font-size: .85em; margin-right: .3em; }
	.card-price ins { text-decoration: none; }
	.price-from { font-weight: 400; font-size: .8rem; color: var(--graphite); }
	.unit-price { display: block; font-size: .78rem; color: var(--graphite); margin-top: 2px; }
	.unit-price strong { color: var(--gold-ink); font-weight: 600; }
	.unit-price-prefix { text-transform: none; }
	.card-add { position: relative; z-index: 2; flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--white); transition: background-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease); }
	.card-add:hover { background: var(--gold); color: var(--ink); transform: rotate(-8deg); }
	.card-add.is-loading { opacity: .5; }
	@media (max-width: 560px) {
		.card-body { padding: .8rem .8rem .9rem; }
		.card-title { font-size: 1rem; }
		.card-seals { top: 8px; left: 8px; }
		.card-seals .seal { font-size: .62rem; padding: .28em .55em; }
		.card-seals .seal:nth-child(2) { display: none; }
		.card-add { width: 40px; height: 40px; }
	}

	/* ---------- Home: hero ---------- */
	.hero { padding-block: clamp(28px, 4vw, 56px) var(--space-8); }
	.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 80px); align-items: center; }
	.hero-copy h1 { font-size: var(--step-5); line-height: 1; margin-top: var(--space-4); }
	.hero-copy h1 em { display: block; }
	.hero-lead { margin-top: var(--space-5); font-size: var(--step-1); color: var(--graphite); max-width: 46ch; }
	.hero-ctas { margin-top: var(--space-6); display: flex; flex-wrap: wrap; gap: var(--space-3); }
	.hero-facts { margin-top: var(--space-7); display: flex; flex-wrap: wrap; gap: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--line); }
	.hero-facts dt { font-family: var(--font-serif); font-size: var(--step-3); line-height: 1; }
	.hero-facts dd { font-size: .82rem; color: var(--graphite); margin-top: .3rem; max-width: 16ch; }
	.hero-media { position: relative; }
	.hero-frame { position: relative; border-radius: 220px 220px var(--radius-l) var(--radius-l); overflow: hidden; aspect-ratio: 4 / 5; background: var(--stone-2); }
	.hero-frame img { width: 100%; height: 100%; object-fit: cover; }
	.hero-badge {
		position: absolute; left: -28px; bottom: 36px; width: 132px; height: 132px; border-radius: 50%; background: var(--ink); color: var(--white);
		display: grid; place-items: center; text-align: center; padding: 18px; box-shadow: var(--shadow-2);
	}
	.hero-badge .icon { color: var(--gold); margin: 0 auto 4px; }
	.hero-badge span { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; line-height: 1.3; }
	.hero-badge strong { display: block; font-family: var(--font-serif); font-weight: 400; font-size: 1.1rem; letter-spacing: 0; text-transform: none; }
	@media (max-width: 900px) {
		.hero-grid { grid-template-columns: 1fr; }
		.hero-media { order: -1; max-width: 520px; width: 100%; margin-inline: auto; }
		.hero-frame { aspect-ratio: 5 / 4; border-radius: 160px 160px var(--radius-l) var(--radius-l); }
		.hero-badge { left: 12px; bottom: -24px; width: 108px; height: 108px; padding: 14px; }
		.hero-copy { padding-top: var(--space-5); }
	}

	/* ---------- Home: varieties ---------- */
	.variety-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; }
	.variety { background: var(--paper); padding: var(--space-6) var(--space-5); text-decoration: none; display: flex; flex-direction: column; gap: var(--space-3); min-height: 220px; transition: background-color .3s var(--ease); }
	.variety:hover { background: var(--white); color: var(--ink); }
	.variety-num { font-size: .75rem; letter-spacing: .14em; color: var(--gold-ink); font-weight: 600; }
	.variety h3 { font-size: var(--step-2); }
	.variety p { font-size: .9rem; color: var(--graphite); }
	.variety .link-arrow { margin-top: auto; align-self: flex-start; font-size: .85rem; }
	@media (max-width: 900px) { .variety-grid { grid-template-columns: repeat(2, 1fr); } .variety { min-height: 0; padding: var(--space-5) var(--space-4); } }

	/* ---------- Home: featured header row ---------- */
	.row-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--space-5); margin-bottom: var(--space-7); }
	.row-head .section-head { margin-bottom: 0; }

	/* ---------- Home: why organic ---------- */
	.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); counter-reset: pillar; }
	.pillar { border-top: 1px solid #3a3835; padding-top: var(--space-5); }
	.pillar .icon { color: var(--gold); }
	.pillar h3 { margin-top: var(--space-4); font-size: var(--step-2); }
	.pillar p { margin-top: var(--space-3); color: #c9c4ba; }
	@media (max-width: 820px) { .pillars { grid-template-columns: 1fr; } }

	/* ---------- Home: story split ---------- */
	.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 96px); align-items: center; }
	.split-media { border-radius: var(--radius-l); overflow: hidden; aspect-ratio: 1 / 1; background: var(--stone-2); }
	.split-media img { width: 100%; height: 100%; object-fit: cover; }
	.check-list { display: grid; gap: .8rem; margin-top: var(--space-5); }
	.check-list li { display: flex; gap: .7rem; align-items: flex-start; }
	.check-list .icon { color: var(--leaf); flex: none; margin-top: 3px; }
	@media (max-width: 820px) { .split { grid-template-columns: 1fr; } .split-media { aspect-ratio: 4 / 3; } }

	/* ---------- Home: producers ---------- */
	.producers { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
	.producers a { display: inline-flex; gap: .45em; align-items: baseline; padding: .7em 1.2em; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); text-decoration: none; font-family: var(--font-serif); font-size: 1.1rem; background: var(--paper); transition: all .25s var(--ease); }
	.producers a:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
	.producers small { font-family: var(--font-sans); color: var(--graphite); font-size: .75rem; }
	.producers a:hover small { color: var(--gold); }

	/* ---------- Home: magazine ---------- */
	.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
	.post-card a { text-decoration: none; }
	.post-card-media { aspect-ratio: 4 / 3; border-radius: var(--radius-l); overflow: hidden; background: var(--stone-2); }
	.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
	.post-card:hover img { transform: scale(1.04); }
	.post-card time { display: block; margin-top: var(--space-4); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); }
	.post-card h3 { margin-top: .4rem; font-size: var(--step-1); line-height: 1.25; }
	@media (max-width: 820px) { .posts { grid-template-columns: 1fr; } }

	/* ---------- Home: closing CTA ---------- */
	.closing { text-align: center; }
	.closing h2 { max-width: 20ch; margin-inline: auto; }
	.closing .hero-ctas { justify-content: center; }
}

/* ===================== CATALOGUE (shop, product page) ===================== */

@layer components {
	/* ---------- Shared bits: buttons, quantity stepper, stock, chips, trust list ---------- */
	.btn--large { min-height: 56px; font-size: 1rem; }
	.btn--grow { flex: 1 1 auto; min-height: 56px; font-size: 1rem; }
	.btn.is-loading, .button.is-loading { opacity: .6; pointer-events: none; }

	.quantity { display: inline-flex; align-items: center; flex: none; height: 56px; padding-inline: 4px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--white); transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
	.quantity:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px var(--gold-soft); }
	.quantity input.qty, .quantity input[type="number"] { width: 3rem; min-height: 0; height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
	.quantity input.qty:focus { border: 0; box-shadow: none; outline: none; }
	.quantity input::-webkit-outer-spin-button, .quantity input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
	.qty-btn { display: none; }
	.js .qty-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--ink); transition: background-color .2s var(--ease); }
	.js .qty-btn:hover { background: var(--stone-2); }
	.quantity input[type="hidden"] ~ .qty-btn, .quantity:has(input[type="hidden"]) { display: none; }

	.stock { margin-bottom: var(--space-3); font-size: .88rem; font-weight: 500; color: var(--ok); }
	.stock.out-of-stock { color: var(--danger); }
	.single_variation:empty { display: none; }
	.single_variation { margin-bottom: var(--space-4); font-size: .9rem; color: var(--graphite); }
	.single_variation p { margin: 0; }

	.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; }
	.chip { display: inline-flex; align-items: center; gap: .55em; min-height: 44px; padding: .45em 1em; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--white); font-size: .88rem; font-weight: 500; text-decoration: none; color: var(--ink); transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease); }
	.chip:hover { border-color: var(--ink); background: var(--ink); color: var(--white); }
	.chip .icon { flex: none; }
	.chip--clear { background: transparent; border-color: transparent; text-decoration: underline; text-underline-offset: .25em; color: var(--graphite); }
	.chip--clear:hover { background: transparent; color: var(--ink); border-color: transparent; }

	.trust-list { display: grid; gap: .85rem; margin-top: var(--space-6); padding: var(--space-5) 0 0; border-top: 1px solid var(--line); list-style: none; font-size: .92rem; }
	.trust-list li { display: flex; gap: .75rem; align-items: flex-start; }
	.trust-list .icon { flex: none; margin-top: 2px; color: var(--gold-ink); }
	.trust-list a { color: inherit; font-weight: 600; }

	/* ---------- Shop: hero ---------- */
	.shop-hero { padding-block: var(--space-4) var(--space-6); background: linear-gradient(180deg, var(--paper), var(--stone)); }
	.shop-hero .crumbs { padding-top: 0; }
	.shop-title { margin-top: var(--space-3); font-size: var(--step-4); max-width: 22ch; }
	.shop-intro { margin-top: var(--space-4); max-width: 62ch; font-size: var(--step-0); }
	.shop-intro p + p { margin-top: .8em; }
	.shop-body { padding-top: var(--space-6); }

	/* ---------- Shop: filter bar (inline on desktop, drawer on small screens) ---------- */
	.shop-filters { margin-bottom: var(--space-5); }
	.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-4) var(--space-5); padding-bottom: var(--space-5); border-bottom: 1px solid var(--line); }
	.filter-field label { display: block; margin-bottom: .4rem; font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--graphite); }
	.filter-sort { flex: 0 0 min(240px, 100%); margin-left: auto; }
	.filter-open { display: none; gap: .6rem; }
	.filter-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--ink); color: var(--white); font-size: .72rem; font-weight: 700; }

	/* The .drawer from app.js, shown inline unless the page is narrow and JavaScript is on. */
	.filter-drawer.drawer { position: static; inset: auto; z-index: auto; visibility: visible; flex: 1 1 560px; min-width: 0; }
	.filter-drawer .drawer-backdrop, .filter-drawer .drawer-head { display: none; }
	.filter-drawer .drawer-panel { position: static; width: auto; transform: none; background: transparent; box-shadow: none; display: block; }
	.filter-drawer .drawer-body { padding: 0; overflow: visible; }
	.filter-drawer .filter-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--space-4); }
	.filter-drawer .drawer-foot { display: none; padding: 0; border: 0; background: transparent; margin-top: var(--space-4); grid-auto-flow: column; justify-content: start; }
	.no-js .filter-drawer .drawer-foot { display: grid; }

	.shop-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-5); margin-bottom: var(--space-5); }
	.result-count { font-size: .9rem; color: var(--graphite); }

	@media (max-width: 900px) {
		.filter-bar { flex-wrap: nowrap; align-items: flex-end; gap: var(--space-3); }
		.js .filter-open { display: inline-flex; flex: none; }
		.no-js .filter-drawer.drawer { flex-basis: 100%; }
		.filter-sort { flex: 1 1 auto; margin-left: 0; min-width: 0; }
		.js .filter-drawer.drawer { position: fixed; inset: 0; z-index: 100; visibility: hidden; flex: none; }
		.js .filter-drawer.drawer.is-open { visibility: visible; }
		.js .filter-drawer .drawer-backdrop { display: block; }
		.js .filter-drawer .drawer-head { display: flex; }
		.js .filter-drawer .drawer-panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(400px, 92vw); transform: translateX(-100%); background: var(--paper); box-shadow: var(--shadow-2); display: flex; flex-direction: column; }
		.js .filter-drawer.drawer.is-open .drawer-panel { transform: none; }
		.js .filter-drawer .drawer-body { padding: var(--space-5); overflow-y: auto; flex: 1; }
		.js .filter-drawer .filter-fields { grid-template-columns: 1fr; gap: var(--space-5); }
		.js .filter-drawer .drawer-foot { display: grid; grid-auto-flow: row; padding: var(--space-5); border-top: 1px solid var(--line); background: var(--white); margin-top: 0; }
	}

	/* ---------- Shop: grid and empty state ---------- */
	.product-grid-item { list-style: none; min-width: 0; }
	.shop-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	@media (max-width: 1100px) { .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
	@media (max-width: 760px) { .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
	.empty-state { display: grid; justify-items: center; gap: var(--space-4); padding: var(--space-8) var(--space-4); text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius-l); background: var(--paper); }
	.empty-state .icon { color: var(--gold-ink); }
	.empty-state p { max-width: 46ch; color: var(--graphite); }
	.empty-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; }

	/* ---------- Product page ---------- */
	.pdp { padding-bottom: var(--space-6); }
	.pdp .crumbs { padding-top: var(--space-4); }
	.pdp-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(28px, 5vw, 80px); align-items: start; padding-bottom: var(--space-8); }
	.pdp-gallery { position: sticky; top: calc(var(--header-h) + 16px); min-width: 0; }
	.pdp-stage { position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius-l); overflow: hidden; background: radial-gradient(120% 90% at 50% 100%, var(--stone-2), var(--white) 72%); }
	.pdp-img { width: 100%; height: 100%; object-fit: contain; padding: 6%; mix-blend-mode: multiply; }
	.pdp-img--empty { display: grid; place-items: center; color: var(--line-strong); mix-blend-mode: normal; }
	.pdp-stage .card-flag { top: 16px; right: 16px; }
	.pdp-thumbs { display: flex; gap: .6rem; margin-top: .9rem; padding: 4px 4px 8px; overflow-x: auto; list-style: none; scrollbar-width: thin; }
	.pdp-thumb { display: block; flex: none; width: 76px; height: 76px; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--white); transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
	.pdp-thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
	.pdp-thumb:hover { border-color: var(--ink); }
	.pdp-thumb[aria-current="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }

	.pdp-summary { min-width: 0; }
	.pdp-brand a { text-decoration: none; }
	.pdp-title { margin-top: .6rem; font-size: var(--step-3); line-height: 1.1; }
	.pdp-seals { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: var(--space-4); padding: 0; list-style: none; }
	.pdp-price { margin-top: var(--space-5); }
	.pdp-price-main { font-family: var(--font-serif); font-size: var(--step-4); line-height: 1; color: var(--ink); }
	.pdp-price-main del { margin-right: .35em; font-size: .55em; color: var(--graphite); }
	.pdp-price-main ins { text-decoration: none; }
	.pdp-price-main .price-from { font-family: var(--font-sans); font-size: .9rem; }
	.pdp-unit { min-height: 1.4em; margin-top: .5rem; }
	.pdp-unit .unit-price { margin-top: 0; font-size: .95rem; }
	.pdp-tax { margin-top: .4rem; font-size: .82rem; color: var(--graphite); }
	.pdp-short { margin-top: var(--space-5); color: var(--ink-2); max-width: 56ch; }
	.pdp-short p + p { margin-top: .7em; }
	.pdp-buy { margin-top: var(--space-5); }
	.buy-row { display: flex; align-items: stretch; gap: .8rem; }

	/* Variation picker: pa_cajas radio pills */
	.variations { margin-bottom: var(--space-4); }
	.vpicker { min-width: 0; margin: 0 0 var(--space-5); padding: 0; border: 0; }
	.vpicker-legend { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; width: 100%; margin-bottom: .8rem; padding: 0; font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
	.vpicker-hint { font-size: .85rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--graphite); }
	.vpicker-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; padding-top: 10px; }
	.vpill { position: relative; }
	.vpill-input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; min-height: 0; margin: 0; opacity: 0; cursor: pointer; }
	.vpill-input:disabled { cursor: not-allowed; }
	.vpill-body { position: relative; display: flex; flex-direction: column; gap: .2rem; height: 100%; min-height: 96px; padding: 1rem 2.6rem .9rem 1rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--white); transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease); }
	.vpill-body::after { content: ""; position: absolute; top: 14px; right: 14px; width: 18px; height: 18px; border: 1.5px solid var(--line-strong); border-radius: 50%; transition: all .2s var(--ease); }
	.vpill:hover .vpill-body { border-color: var(--ink); }
	.vpill-input:checked + .vpill-body { border-color: var(--ink); background: var(--paper); box-shadow: 0 0 0 1px var(--ink); }
	.vpill-input:checked + .vpill-body::after { border-color: var(--ink); background: var(--ink); box-shadow: inset 0 0 0 3.5px var(--paper); }
	.vpill-input:focus-visible + .vpill-body { outline: 2px solid var(--gold-ink); outline-offset: 3px; }
	.vpill.is-out .vpill-body { opacity: .55; background: var(--stone-2); }
	.vpill.is-out:hover .vpill-body { border-color: var(--line-strong); }
	.vpill-label { font-weight: 600; font-size: .95rem; line-height: 1.25; }
	.vpill-price { margin-top: auto; padding-top: .4rem; font-family: var(--font-serif); font-size: 1.35rem; line-height: 1.1; }
	.vpill-price del { font-size: .7em; color: var(--graphite); margin-right: .25em; }
	.vpill-price ins { text-decoration: none; }
	.vpill-unit { font-size: .78rem; font-weight: 600; color: var(--gold-ink); }
	.vpill-badge { position: absolute; top: -11px; left: 12px; z-index: 2; padding: .25em .7em; border-radius: var(--radius-pill); background: var(--gold); color: var(--ink); font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1.3; }
	.vfield { margin-bottom: var(--space-4); }
	.vfield label { display: block; margin-bottom: .4rem; font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }

	.pdp-extras:empty { display: none; }

	/* Sticky add-to-cart bar (mobile) */
	.sticky-atc { display: none; }
	.sticky-atc[hidden] { display: none; }
	@media (max-width: 900px) {
		.pdp-grid { grid-template-columns: 1fr; gap: var(--space-5); padding-bottom: var(--space-6); }
		.pdp-gallery { position: static; }
		.pdp { padding-bottom: 88px; }
		.sticky-atc { display: block; position: fixed; inset: auto 0 0 0; z-index: 60; padding: .7rem 0 calc(.7rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 95%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transform: translateY(105%); visibility: hidden; transition: transform .35s var(--ease), visibility .35s; }
		.sticky-atc[hidden] { display: none; }
		.sticky-atc.is-visible { transform: none; visibility: visible; }
		.sticky-atc-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
		.sticky-atc-info { min-width: 0; }
		.sticky-atc-name { max-width: 52vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; color: var(--graphite); }
		.sticky-atc-price { font-size: 1.1rem; font-weight: 600; line-height: 1.2; }
		.sticky-atc-price del { font-size: .8em; color: var(--graphite); margin-right: .25em; }
		.sticky-atc-price ins { text-decoration: none; }
		.sticky-atc .btn { flex: none; }
	}
	@media (max-width: 480px) {
		.buy-row { flex-wrap: wrap; }
		.buy-row .quantity { flex: 1 1 100%; justify-content: space-between; }
		.buy-row .quantity input.qty { flex: 1; }
		.vpicker-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	}

	/* ---------- Product page: accordions and facts ---------- */
	.pdp-details { background: var(--paper); border-block: 1px solid var(--line); }
	.accordion { max-width: 900px; margin-inline: auto; border-top: 1px solid var(--line-strong); }
	.acc { border-bottom: 1px solid var(--line-strong); }
	.acc summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 64px; padding: .9rem 0; list-style: none; cursor: pointer; font-family: var(--font-serif); font-size: var(--step-2); line-height: 1.2; }
	.acc summary::-webkit-details-marker { display: none; }
	.acc summary .icon { flex: none; color: var(--gold-ink); transition: transform .3s var(--ease); }
	.acc[open] summary .icon { transform: rotate(45deg); }
	.acc summary:hover .acc-title { color: var(--gold-ink); }
	.acc-body { max-width: 70ch; padding: 0 0 var(--space-6); }
	.prose > * + * { margin-top: 1em; }
	.prose h2, .prose h3, .prose h4 { margin-top: 1.6em; font-size: var(--step-1); }
	.prose ul, .prose ol { padding-left: 1.3em; }
	.prose ul { list-style: disc; }
	.prose li + li { margin-top: .35em; }
	.prose img { border-radius: var(--radius); }
	.prose a { color: var(--gold-ink); }
	.facts { margin: 0; }
	.facts-row { display: grid; grid-template-columns: minmax(130px, 220px) 1fr; gap: var(--space-4); padding: .85rem 0; border-bottom: 1px solid var(--line); }
	.facts-row:last-child { border-bottom: 0; }
	.facts dt { font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--graphite); padding-top: .15em; }
	.facts dd { margin: 0; }
	.facts a { color: var(--gold-ink); }
	@media (max-width: 560px) { .facts-row { grid-template-columns: 1fr; gap: .15rem; } }

	.pdp-related .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	@media (max-width: 1000px) { .pdp-related .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
}

@layer components {
	/* Category navigation (shop and eco sub-categories). */
	.cat-nav { margin-top: var(--space-5); }
	.cat-nav ul { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; }
	.cat-nav a { display: inline-flex; align-items: baseline; gap: .45em; min-height: 44px; align-items: center; padding: .5em 1.05em; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--paper); text-decoration: none; font-size: .9rem; font-weight: 500; transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease); }
	.cat-nav a span { font-size: .75rem; color: var(--graphite); }
	.cat-nav a:hover { border-color: var(--ink); color: var(--ink); }
	.cat-nav a[aria-current="page"] { background: var(--ink); color: var(--white); border-color: var(--ink); }
	.cat-nav a[aria-current="page"] span { color: var(--gold); }
	@media (max-width: 560px) {
		.cat-nav ul { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
		.cat-nav li { flex: none; }
	}
}

@layer components {
	/* Producer panel on the product page. */
	.producer-panel {
		display: grid; grid-template-columns: 240px 1fr; gap: clamp(20px, 4vw, 56px); align-items: center;
		padding: clamp(20px, 4vw, 44px); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-l);
		position: relative; overflow: hidden; isolation: isolate;
	}
	.producer-panel::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(var(--gold), var(--gold-soft)); }
	.producer-panel-logo {
		aspect-ratio: 16 / 9; display: grid; place-items: center; background: var(--white); border-radius: var(--radius);
		border: 1px solid var(--line); padding: 14px 18px; color: var(--gold-ink); box-shadow: var(--shadow-1);
	}
	.producer-panel-logo img { width: 100%; max-width: 250px; height: auto; object-fit: contain; mix-blend-mode: multiply; }
	.producer-panel-name { font-size: var(--step-3); margin-top: var(--space-2); }
	.producer-panel-text { margin-top: var(--space-3); color: var(--graphite); max-width: 62ch; line-height: 1.65; }
	.producer-panel .btn { margin-top: var(--space-5); white-space: normal; text-align: left; }
	@media (max-width: 640px) {
		.producer-panel { grid-template-columns: 1fr; }
		.producer-panel-logo { width: min(220px, 70%); }
	}
	/* The brand plugin's own logo block is replaced by the panel above. */
	.pdp-extras .pwb-single-product-brands, .pdp-extras .pwb-brands-in-loop { display: none; }
}

@layer components {
	.brand-hero-logo { width: 220px; aspect-ratio: 10 / 3; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); padding: 10px 14px; margin-bottom: var(--space-4); box-shadow: var(--shadow-1); }
	.brand-hero-logo img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
	.brand-story-text { margin-top: var(--space-5); color: var(--ink-2); line-height: 1.75; }
	.brand-story-text > * + * { margin-top: var(--space-4); }
	.brand-story-text h2, .brand-story-text h3 { font-size: var(--step-1); margin-top: var(--space-6); }
}
