/* Evermore product page + shop components (functional UI). */

/* Gallery: per-colour image scroller (3:4 slides, arrows, counter, thumbnail strip) */
.emc-gallery { --emc-photo-bg: #F4F3F0; }
.emc-gallery__set { display: grid; gap: 12px; }
.emc-gallery__set[hidden] { display: none; }
.emc-gallery__stage { position: relative; }
.emc-gallery__track { list-style: none; margin: 0; padding: 0; display: flex; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; background: var(--emc-photo-bg); }
.emc-gallery__track::-webkit-scrollbar { display: none; }
.emc-gallery__track:focus-visible { outline: 2px solid var(--emc-gold-text, #85602F); outline-offset: 3px; }
.emc-gallery__slide { flex: 0 0 100%; margin: 0; aspect-ratio: 3 / 4; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; }
.emc-gallery__slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; user-select: none; }
.emc-gallery__placeholder { display: block; width: 100%; height: 100%; background: linear-gradient(160deg, var(--emc-sunken, #E8E4DC) 0 62%, color-mix(in srgb, var(--emc-dot) 18%, var(--emc-sunken, #E8E4DC)) 100%); }
.emc-gallery .emc-gallery__nav { position: absolute; top: 50%; translate: 0 -50%; width: 48px; height: 48px; min-height: 0; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(247,245,241,.92); color: var(--emc-ink, #1C2420); box-shadow: 0 1px 2px rgba(28,36,32,.12); cursor: pointer; transition: background-color .2s ease, opacity .2s ease; }
.emc-gallery .emc-gallery__nav:hover { background: #fff; color: var(--emc-forest, #1E3329); }
.emc-gallery .emc-gallery__nav:focus-visible { outline: 2px solid var(--emc-gold-text, #85602F); outline-offset: 2px; }
.emc-gallery .emc-gallery__nav[hidden] { display: none; }
.emc-gallery .emc-gallery__nav:disabled { opacity: 0; pointer-events: none; }
.emc-gallery__nav svg { width: 22px; height: 22px; }
.emc-gallery__nav--prev { left: 16px; }
.emc-gallery__nav--next { right: 16px; }
.emc-gallery__count { position: absolute; right: 16px; bottom: 16px; margin: 0; padding: 6px 12px; border-radius: 999px; background: rgba(247,245,241,.92); font: 600 12px/1 var(--emc-font-display, "Outfit"), sans-serif; letter-spacing: .14em; color: var(--emc-ink, #1C2420); }
.emc-gallery__thumbs { position: relative; display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.emc-gallery__thumbs::-webkit-scrollbar { display: none; }
.emc-gallery .emc-gallery__thumb { flex: 0 0 auto; width: 96px; aspect-ratio: 3 / 4; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 0; background: var(--emc-photo-bg); box-shadow: inset 0 0 0 1px rgba(28,36,32,.08); cursor: pointer; overflow: hidden; opacity: .62; transition: opacity .2s ease, box-shadow .2s ease; }
.emc-gallery .emc-gallery__thumb:hover { opacity: 1; background: var(--emc-photo-bg); }
.emc-gallery .emc-gallery__thumb[aria-current="true"] { opacity: 1; box-shadow: inset 0 0 0 2px var(--emc-forest, #1E3329); }
.emc-gallery .emc-gallery__thumb:focus-visible { outline: 2px solid var(--emc-gold-text, #85602F); outline-offset: 2px; }
.emc-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (min-width: 1024px) {
	/* Desktop: vertical thumbnail rail beside the photo, so the whole image and all thumbs sit above the fold. */
	.emc-gallery__set:has(.emc-gallery__thumbs) { grid-template-columns: 88px minmax(0, 1fr); align-items: start; gap: 16px; }
	.emc-gallery__set:has(.emc-gallery__thumbs) .emc-gallery__thumbs { order: -1; flex-direction: column; align-self: stretch; contain: size; overflow-x: hidden; overflow-y: auto; }
	.emc-gallery__set:has(.emc-gallery__thumbs) .emc-gallery .emc-gallery__thumb, .emc-gallery__set .emc-gallery__thumbs .emc-gallery__thumb { width: 100%; }
}
@media (max-width: 1023px) { .emc-gallery .emc-gallery__thumb { width: 72px; } .emc-gallery .emc-gallery__nav { width: 44px; height: 44px; } }
@media (max-width: 767px) { .emc-gallery .emc-gallery__nav { display: none; } .emc-gallery .emc-gallery__thumb { width: 60px; } .emc-gallery__count { right: 12px; bottom: 12px; } }

/* Purchase form */
.emc-buy { display: grid; gap: 28px; font-family: var(--emc-font-display, "Outfit"), sans-serif; }
.emc-buy fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.emc-buy__legend { padding: 0; margin: 0 0 14px; font-weight: 600; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--emc-ink, #1C2420); }
.emc-buy__legend span[data-emc-colour-name] { color: var(--emc-text-2, #69645B); }
.emc-buy__setno[hidden] { display: none; }
.emc-buy__options { display: flex; flex-wrap: wrap; gap: 10px; }
.emc-opt { position: relative; cursor: pointer; }
.emc-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.emc-opt--swatch { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; }
.emc-opt__dot { width: 34px; height: 34px; border-radius: 50%; background: var(--emc-dot); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.emc-opt--swatch .emc-opt__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.emc-opt--swatch:has(input:checked) { box-shadow: 0 0 0 1.5px var(--emc-forest, #1E3329); }
.emc-opt--size { min-width: 56px; height: 48px; padding: 0 14px; display: grid; place-items: center; border: 1px solid var(--emc-border, rgba(28,36,32,.2)); background: var(--emc-paper, #F7F5F1); font-weight: 600; font-size: 14px; letter-spacing: .08em; transition: border-color .2s, background-color .2s, color .2s; }
.emc-opt--size:hover { border-color: var(--emc-forest, #1E3329); }
.emc-opt--size:has(input:checked) { background: var(--emc-forest, #1E3329); border-color: var(--emc-forest, #1E3329); color: #fff; }
.emc-opt--size.is-soldout { color: var(--emc-muted, #8C867B); background: transparent; text-decoration: line-through; cursor: not-allowed; }
.emc-opt:has(input:focus-visible) { outline: 2px solid var(--emc-gold-text, #85602F); outline-offset: 3px; }
.emc-bundle--form .emc-tier { position: relative; }
.emc-bundle--form .emc-tier input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.emc-bundle--form .emc-tier:has(input:focus-visible) { outline: 2px solid var(--emc-gold-text, #85602F); outline-offset: -4px; }
.emc-bundle--form .emc-tier { padding: 22px 8px 18px; }
.emc-bundle--form .emc-tier__price { font-size: clamp(28px, 2.6vw, 38px); }
.emc-buy__extra { padding: 20px 20px 22px; border: 1px solid var(--emc-hairline, rgba(28,36,32,.1)); background: var(--emc-paper, #F7F5F1); border-radius: 6px; display: grid; gap: 12px; }
.emc-buy__extra[hidden] { display: none; }
.emc-buy__legend--set { float: left; width: 100%; margin-bottom: 4px; color: var(--emc-forest, #1E3329); }
.emc-buy__sublabel { margin: 0; font-weight: 600; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--emc-text-2, #69645B); }
.emc-buy .emc-buy__cta { appearance: none; width: 100%; min-height: 58px; border: 0; border-radius: 0; background: var(--emc-forest, #1E3329); color: #fff; font: 600 14px/1 var(--emc-font-display, "Outfit"), sans-serif; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; transition: background-color .25s ease; padding: 0 24px; }
.emc-buy .emc-buy__cta:hover, .emc-buy .emc-buy__cta:focus { background: var(--emc-forest-hover, #2A4437); color: #fff; }
.emc-buy .emc-buy__cta[aria-disabled="true"] { background: var(--emc-sunken, #E8E4DC); color: var(--emc-ink, #1C2420); box-shadow: inset 0 0 0 1px var(--emc-border, rgba(28,36,32,.2)); }
.emc-buy__note { margin: -12px 0 0; text-align: center; font-weight: 600; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--emc-gold-text, #85602F); }
.emc-buy.is-nudged .emc-buy__cta { animation: emc-nudge .35s ease; }
@keyframes emc-nudge { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@media (max-width: 1023px) { .emc-buy .emc-buy__cta { min-height: 48px; } }

/* Shop colour chips */
.emc-chips ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.emc-chips .emc-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid var(--emc-border, rgba(28,36,32,.2)); border-radius: 999px; font: 600 12px/1 var(--emc-font-display, "Outfit"), sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--emc-ink, #1C2420); text-decoration: none; background: transparent; transition: border-color .2s, background-color .2s; }
.emc-chips .emc-chip:hover { border-color: var(--emc-forest, #1E3329); color: var(--emc-ink, #1C2420); }
.emc-chips .emc-chip[aria-current="page"] { background: var(--emc-forest, #1E3329); border-color: var(--emc-forest, #1E3329); color: #fff; }
.emc-chips + .emc-cards { margin-top: 40px; }
@media (max-width: 767px) { .emc-chips ul { flex-wrap: nowrap; overflow-x: auto; margin-right: -20px; padding-right: 20px; scrollbar-width: none; } .emc-chips .emc-chip { white-space: nowrap; } }

@media (prefers-reduced-motion: reduce) { .emc-buy.is-nudged .emc-buy__cta { animation: none; } .emc-gallery__track { scroll-behavior: auto; } }
