/* ==========================================================================
   Product page (items-detail.php)
   Gallery 55% / details 45%, standardised item details, Rent | Try-on booking panel,
   message-the-vendor window, pair with, as seen on, vendor reviews.
   Uses the tokens in assets/css/ekdin.css. No white or black text, brown/maroon hovers.
   ========================================================================== */

.ekp { padding-bottom: clamp(24px, 4vw, 48px); }
.ekp > .ek-container { padding-top: clamp(18px, 2.6vw, 36px); }
.ekp-ico { display: block; flex: none; }

/* ---------- notices ---------- */
.ekp-flash { margin: 0 auto 18px; max-width: 760px; }
.ekp-flash .ek-alert { margin-bottom: 8px; }
.ekp-preview {
    display: flex; gap: 12px; align-items: flex-start; margin: 0 0 22px; padding: 14px 18px;
    background: #f6ead2; color: #6a470f; border: 1px solid rgba(122, 82, 18, .25); border-radius: 14px;
}
.ekp-preview__icon { margin-top: 1px; color: #7a5212; }
.ekp-preview__title { margin: 0 0 2px; font-weight: 700; font-size: 14.5px; }
.ekp-preview__text { margin: 0; font-size: 13.5px; line-height: 1.5; }
.ekp-preview__text a { color: #6a470f; font-weight: 700; }

/* ---------- layout ---------- */
.ekp-layout {
    display: grid; grid-template-columns: minmax(0, 55fr) minmax(0, 45fr);
    gap: clamp(32px, 4.6vw, 68px); align-items: start;
}
/* whichever column is shorter stays in view while the other scrolls */
.ekp-gallery, .ekp-info { position: sticky; top: calc(var(--ek-header-h) + 22px); min-width: 0; }

/* ---------- gallery ---------- */
.ekp-gallery--thumbs { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 14px; align-items: start; }
.ekp-stage {
    position: relative; aspect-ratio: 4 / 5; width: 100%;
    max-height: calc(100vh - var(--ek-header-h) - 44px); max-height: calc(100svh - var(--ek-header-h) - 44px);
    border-radius: var(--ek-radius); overflow: hidden; background: var(--ek-sand);
    box-shadow: 0 1px 0 rgba(51, 34, 25, .04);
}
.ekp-stage:focus-visible { outline: 2px solid var(--ek-nude); outline-offset: 4px; }
.ekp-track {
    display: flex; height: 100%; overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
    -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y;
}
.ekp-track::-webkit-scrollbar { display: none; }
.ekp-track.is-dragging { scroll-snap-type: none; cursor: grabbing; }
.ekp-slide { position: relative; flex: 0 0 100%; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.ekp-slide img { display: block; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.ekp-slide video { display: block; width: 100%; height: 100%; object-fit: contain; background: var(--ek-brown); }
.ekp-stage__empty {
    position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px;
    color: var(--ek-ink-soft); font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
}
.ekp-stage__empty img { width: 140px; height: auto; opacity: .35; object-fit: contain; }
.ekp-stage__empty p { margin: 0; }

.ekp-arrow {
    position: absolute; top: 50%; z-index: 2; width: 46px; height: 46px; margin-top: -23px; padding: 0;
    display: grid; place-items: center; border: 0; border-radius: 50%;
    background: rgba(251, 248, 242, .94); color: var(--ek-maroon);
    box-shadow: 0 6px 18px rgba(51, 34, 25, .16); cursor: pointer;
    transition: background-color .25s var(--ek-ease), color .25s var(--ek-ease), transform .25s var(--ek-ease);
}
.ekp-arrow--prev { left: 14px; }
.ekp-arrow--next { right: 14px; }
.ekp-arrow:hover, .ekp-arrow:focus-visible { background: var(--ek-maroon); color: var(--ek-on-dark); }
.ekp-arrow--prev:hover { transform: translateX(-2px); }
.ekp-arrow--next:hover { transform: translateX(2px); }
.ekp-arrow:active { transform: scale(.94); }
.ekp-count {
    position: absolute; left: 14px; top: 14px; z-index: 2; margin: 0; padding: 5px 11px; border-radius: 999px;
    background: rgba(51, 34, 25, .58); color: var(--ek-on-dark); font-size: 11.5px; font-weight: 700; letter-spacing: .12em;
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); pointer-events: none;
}

.ekp-thumbs {
    order: -1; display: flex; flex-direction: column; gap: 10px;
    height: 100%; contain: size; overflow-y: auto; scrollbar-width: none; padding: 2px;
}
.ekp-thumbs::-webkit-scrollbar { display: none; }
.ekp-thumb {
    position: relative; flex: none; width: 100%; aspect-ratio: 4 / 5; padding: 0; overflow: hidden;
    border: 0; border-radius: 10px; background: var(--ek-sand); cursor: pointer; opacity: .62;
    transition: opacity .25s var(--ek-ease), box-shadow .25s var(--ek-ease);
}
.ekp-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ekp-thumb:hover { opacity: .9; }
.ekp-thumb[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--ek-maroon); }
.ekp-thumb:focus-visible { outline: 2px solid var(--ek-nude); outline-offset: 2px; opacity: 1; }
.ekp-thumb__play {
    position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 2px;
    color: var(--ek-maroon); font-size: 9.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}

/* ---------- heading block ---------- */
.ekp-head__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.ekp-vendor {
    margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px;
    font-size: 11.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--ek-maroon);
}
.ekp-vendor__rating {
    display: inline-flex; align-items: center; gap: 5px; min-height: 44px;
    color: var(--ek-ink); font-size: 12.5px; letter-spacing: .02em; text-transform: none; text-decoration: none;
}
.ekp-vendor__rating svg { color: var(--ek-maroon); }
.ekp-vendor__rating span { color: var(--ek-ink-soft); font-weight: 400; }
.ekp-vendor__rating:hover { color: var(--ek-maroon); }

.ekp-heart {
    position: relative; flex: none; width: 46px; height: 46px; padding: 0; display: grid; place-items: center;
    border: 1px solid var(--ek-line); border-radius: 50%; background: var(--ek-paper); color: var(--ek-maroon); cursor: pointer;
    transition: border-color .25s, background-color .25s, transform .3s var(--ek-ease);
}
.ekp-heart svg path { fill: transparent; transition: fill .25s var(--ek-ease); }
.ekp-heart:hover, .ekp-heart:focus-visible { border-color: var(--ek-maroon); background: var(--ek-sand); }
.ekp-heart[aria-pressed="true"] svg path { fill: currentColor; }
.ekp-heart.is-pop svg { animation: ekp-pop .5s var(--ek-ease); }
.ekp-heart.is-busy { cursor: progress; }
@keyframes ekp-pop { 0% { transform: scale(1); } 35% { transform: scale(1.3); } 65% { transform: scale(.92); } 100% { transform: scale(1); } }

.ekp-title {
    margin: 8px 0 6px; font-family: var(--ek-font-ui); font-size: clamp(28px, 2.7vw, 38px); font-weight: 500;
    line-height: 1.1; letter-spacing: -.015em; color: var(--ek-brown); overflow-wrap: anywhere;
}
.ekp-subtitle { margin: 0; font-size: 16px; line-height: 1.5; color: var(--ek-ink-soft); }
.ekp-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin: 18px 0 14px; }
.ekp-price__from { font-size: 17px; color: var(--ek-ink); }
.ekp-price__from strong { margin-left: 2px; font-size: 24px; font-weight: 700; color: var(--ek-maroon); letter-spacing: -.01em; }
.ekp-price__rrp { font-size: 16px; color: var(--ek-ink-soft); opacity: .85; }
.ekp-terms { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 14px; line-height: 1.45; color: var(--ek-ink); }
.ekp-terms li { display: flex; gap: 10px; align-items: flex-start; }
.ekp-terms .ekp-ico { color: var(--ek-maroon); margin-top: 0; }

/* ---------- item details / story ---------- */
.ekp-block { margin-top: 26px; padding: 22px 0 0; border-top: 1px solid var(--ek-line); }
.ekp-label {
    margin: 0 0 14px; font-size: 11.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--ek-maroon);
}
.ekp-label--sub { margin-top: 20px; }
.ekp-details__list { margin: 0; display: grid; gap: 13px; }
.ekp-detail { display: grid; grid-template-columns: minmax(138px, 38%) minmax(0, 1fr); gap: 14px; align-items: start; font-size: 14.5px; line-height: 1.45; }
.ekp-detail dt { display: flex; align-items: center; gap: 10px; font-weight: 400; color: var(--ek-ink-soft); }
.ekp-detail dt .ekp-ico { color: var(--ek-maroon); }
.ekp-detail dd { margin: 0; color: var(--ek-ink); font-weight: 700; overflow-wrap: anywhere; }
.ekp-detail--long dd { font-weight: 400; }
.ekp-detail dd a { color: var(--ek-ink); text-decoration: underline; text-decoration-color: rgba(79, 48, 23, .3); text-underline-offset: 3px; }
.ekp-detail dd a:hover { color: var(--ek-maroon); text-decoration-color: currentColor; }
.ekp-detail__sub { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 400; color: var(--ek-ink-soft); }
.ekp-story__text p { margin: 0 0 12px; font-size: 15px; line-height: 1.7; color: var(--ek-ink); }
.ekp-story__text p:last-child { margin-bottom: 0; }
.ekp-occasions { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ekp-occasions .ek-chip { min-height: 40px; }
.ekp-chip--static, .ekp-chip--static:hover { background: transparent; color: var(--ek-maroon); cursor: default; border-color: rgba(112, 28, 28, .4); }

/* ---------- booking panel ---------- */
.ekp-book {
    margin-top: 26px; padding: 18px; background: var(--ek-paper); border: 1px solid var(--ek-line);
    border-radius: var(--ek-radius); box-shadow: var(--ek-shadow-sm);
    scroll-margin-top: calc(var(--ek-header-h) + 16px);
}
.ekp-seg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px; padding: 4px; background: var(--ek-sand); border-radius: 999px; }
.ekp-seg__tab {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 6px 10px;
    border: 0; border-radius: 999px; background: transparent; color: var(--ek-ink); cursor: pointer;
    font-size: 12px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; line-height: 1.2;
    transition: background-color .25s var(--ek-ease), color .25s var(--ek-ease), box-shadow .25s var(--ek-ease);
}
.ekp-seg__tab:hover { color: var(--ek-maroon); background: rgba(251, 248, 242, .75); }
.ekp-seg__tab:focus-visible { outline: 2px solid var(--ek-nude); outline-offset: 2px; }
.ekp-seg__tab[aria-selected="true"] { background: var(--ek-maroon); color: var(--ek-on-dark); box-shadow: 0 4px 12px rgba(112, 28, 28, .22); }
.ekp-seg__tab[data-ekp-tab="tryon"][aria-selected="true"] { background: var(--ek-brown); box-shadow: 0 4px 12px rgba(51, 34, 25, .22); }
.ekp-seg__tab[aria-selected="true"]:hover { color: var(--ek-on-dark); }

.ekp-panel { padding: 18px 4px 4px; }
.ekp-panel[hidden] { display: none; }
.ekp-panel.is-entering { animation: ek-fade .35s var(--ek-ease); }
.ekp-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 30px; }
.ekp-panel__title { margin: 0; font-family: var(--ek-font-ui); font-size: 17px; font-weight: 700; color: var(--ek-brown); letter-spacing: -.005em; }
.ekp-clear {
    min-height: 44px; margin: -8px -4px -8px 0; padding: 0 6px; border: 0; background: none; cursor: pointer;
    color: var(--ek-maroon); font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    text-decoration: underline; text-underline-offset: 3px;
}
.ekp-clear:hover { color: var(--ek-brown); }
.ekp-clear[hidden] { display: none; }
.ekp-hint { margin: 4px 0 14px; font-size: 13.5px; line-height: 1.5; color: var(--ek-ink-soft); }
/* hint + "Type dates instead" (native date inputs as an alternative to the calendar) */
.ekp-hintrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 14px; margin: 4px 0 14px; }
.ekp-hintrow .ekp-hint { flex: 1 1 220px; margin: 0; }
.ekp-panel--tryon .ekp-hintrow--step { margin: 6px 0 10px; }
.ekp-panel--tryon .ekp-hintrow--step .ekp-step { margin: 0; }
.ekp-typed {
    flex: none; min-height: 44px; margin: -12px -4px -12px 0; padding: 0 4px; border: 0; background: none; cursor: pointer;
    color: var(--ek-maroon); font-size: 12.5px; font-weight: 600; text-decoration: underline;
    text-decoration-color: rgba(112, 28, 28, .35); text-underline-offset: 3px; transition: color .2s, text-decoration-color .2s;
}
.ekp-typed:hover { color: var(--ek-brown); text-decoration-color: currentColor; }
.ekp-typed:focus-visible { outline: 2px solid var(--ek-maroon); outline-offset: 2px; border-radius: 4px; }
.ekp-typed[hidden] { display: none; }
.ekp-cal[hidden] { display: none; }
.ekp-step { margin: 18px 0 10px; padding: 0; font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ek-ink); }
.ekp-optional { font-weight: 400; letter-spacing: .04em; text-transform: none; color: var(--ek-ink-soft); }
.ekp-panel--tryon .ekp-step:first-of-type { margin-top: 6px; }
.ekp-note-field .ekp-step, .ekp-panel--tryon .ekp-note-field .ekp-step { margin-top: 18px; } /* + the field's 4px = 22px, like step 2 */
.ekp-panel--tryon .ekp-cta:not(:disabled) { background: var(--ek-brown); border-color: var(--ek-brown); }
.ekp-panel--tryon .ekp-cta:not(:disabled):hover, .ekp-panel--tryon .ekp-cta:not(:disabled):focus-visible { background: var(--ek-maroon); border-color: var(--ek-maroon); }

/* native date inputs: only when the calendar script can't load */
.ekp-fallback { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ekp-fallback .ek-field { margin-bottom: 0; }
.ekp-fallback input { min-height: 46px; }
html.ek-js .ekp-fallback { display: none; }
html.ek-js .ekp-fallback.is-shown { display: grid; }

/* ---------- inline calendars (flatpickr 4.6.13) ---------- */
.ekp-cal { min-height: 0; }
.ekp-cal .flatpickr-calendar.inline {
    width: 100%; max-width: 100%; top: 0; padding: 0; background: transparent; border: 0; border-radius: 0;
    box-shadow: none; font-family: var(--ek-font-ui); animation: none;
}
.ekp-cal .flatpickr-calendar::before, .ekp-cal .flatpickr-calendar::after { display: none; }
.ekp-cal .flatpickr-months { position: relative; align-items: center; height: 46px; margin-bottom: 4px; }
.ekp-cal .flatpickr-months .flatpickr-month { height: 46px; color: var(--ek-brown); fill: var(--ek-brown); }
.ekp-cal .flatpickr-current-month {
    position: absolute; left: 50px; right: 50px; width: auto; top: 0; height: 46px; padding: 0;
    display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 15px; font-weight: 700;
}
.ekp-cal .flatpickr-current-month span.cur-month { margin: 0; font-weight: 700; color: var(--ek-brown); }
.ekp-cal .flatpickr-current-month span.cur-month:hover { background: none; }
.ekp-cal .flatpickr-current-month .numInputWrapper { width: 5.4ch; }
.ekp-cal .flatpickr-current-month .numInputWrapper:hover { background: none; }
.ekp-cal .flatpickr-current-month input.cur-year { font-weight: 400; color: var(--ek-ink-soft); padding: 0 0 0 2px; }
.ekp-cal .numInputWrapper span { display: none; }
.ekp-cal .flatpickr-months .flatpickr-prev-month, .ekp-cal .flatpickr-months .flatpickr-next-month {
    top: 1px; width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border-radius: 50%;
    color: var(--ek-maroon); fill: var(--ek-maroon); transition: background-color .2s;
}
.ekp-cal .flatpickr-months .flatpickr-prev-month { left: 0; }
.ekp-cal .flatpickr-months .flatpickr-next-month { right: 0; }
.ekp-cal .flatpickr-months .flatpickr-prev-month svg, .ekp-cal .flatpickr-months .flatpickr-next-month svg { width: 14px; height: 14px; }
.ekp-cal .flatpickr-months .flatpickr-prev-month svg path, .ekp-cal .flatpickr-months .flatpickr-next-month svg path { fill: none; stroke: currentColor; }
.ekp-cal .flatpickr-months .flatpickr-prev-month.flatpickr-disabled, .ekp-cal .flatpickr-months .flatpickr-next-month.flatpickr-disabled { visibility: hidden; }
.ekp-cal input.flatpickr-input, .ekp-cal > input { display: none !important; }
.ekp-cal .flatpickr-months .flatpickr-prev-month:hover, .ekp-cal .flatpickr-months .flatpickr-next-month:hover { background: var(--ek-sand); }
.ekp-cal .flatpickr-months .flatpickr-prev-month:hover, .ekp-cal .flatpickr-months .flatpickr-next-month:hover { color: var(--ek-brown); }
.ekp-cal .flatpickr-months .flatpickr-prev-month:focus-visible, .ekp-cal .flatpickr-months .flatpickr-next-month:focus-visible { outline: 2px solid var(--ek-nude); outline-offset: 0; }
.ekp-cal .flatpickr-innerContainer, .ekp-cal .flatpickr-rContainer { display: block; width: 100%; }
.ekp-cal .flatpickr-weekdays { height: 32px; }
.ekp-cal .flatpickr-weekdaycontainer { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ekp-cal span.flatpickr-weekday {
    color: var(--ek-ink-soft); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: none;
}
.ekp-cal .flatpickr-days { width: 100% !important; border: 0; }
.ekp-cal .dayContainer { width: 100%; min-width: 100%; max-width: 100%; padding: 0; row-gap: 4px; justify-content: flex-start; }
.ekp-cal .flatpickr-day {
    flex: 0 0 calc(100% / 7); max-width: none; width: auto; height: 44px; line-height: 42px; margin: 0;
    border: 1px solid transparent; border-radius: 12px; color: var(--ek-ink); font-size: 14px; font-weight: 500;
    box-shadow: none !important; transition: background-color .15s, color .15s;
}
.ekp-cal .flatpickr-day:hover, .ekp-cal .flatpickr-day:focus { background: var(--ek-sand); border-color: transparent; color: var(--ek-brown); }
/* keyboard focus (roving tabindex in product.js): a clear maroon ring; cream inner ring on chosen days */
.ekp-cal .flatpickr-day:focus-visible { position: relative; z-index: 1; outline: 2px solid var(--ek-maroon); outline-offset: -2px; }
.ekp-cal .flatpickr-day.today { border-color: rgba(209, 164, 120, .9); }
.ekp-cal .flatpickr-day.prevMonthDay { visibility: hidden; }
.ekp-cal .flatpickr-day.nextMonthDay { display: none; }
/* past days: faded; booked days: hatched + struck through; days that would run a range through a
   booked day: normal ink, lighter weight, not-allowed cursor (clicking one explains why) */
.ekp-cal .flatpickr-day.flatpickr-disabled, .ekp-cal .flatpickr-day.flatpickr-disabled:hover {
    background: transparent; border-color: transparent; color: rgba(79, 48, 23, .26); cursor: default;
}
.ekp-cal .flatpickr-day.notAllowed, .ekp-cal .flatpickr-day.notAllowed:hover {
    background: transparent; border-color: transparent; color: var(--ek-ink-soft); font-weight: 400; cursor: not-allowed;
}
.ekp-cal .flatpickr-day.is-booked, .ekp-cal .flatpickr-day.is-booked:hover {
    color: rgba(112, 28, 28, .72); cursor: not-allowed; border-color: transparent;
    background: repeating-linear-gradient(135deg, rgba(112, 28, 28, .13) 0 3px, rgba(112, 28, 28, .04) 3px 7px);
    text-decoration: line-through; text-decoration-color: rgba(112, 28, 28, .6);
}
/* selection */
.ekp-cal .flatpickr-day.inRange, .ekp-cal .flatpickr-day.inRange:hover {
    background: rgba(112, 28, 28, .1); border-color: transparent; border-radius: 0; color: var(--ek-brown);
}
.ekp-cal .flatpickr-day.selected, .ekp-cal .flatpickr-day.startRange, .ekp-cal .flatpickr-day.endRange,
.ekp-cal .flatpickr-day.selected:hover, .ekp-cal .flatpickr-day.startRange:hover, .ekp-cal .flatpickr-day.endRange:hover,
.ekp-cal .flatpickr-day.selected:focus, .ekp-cal .flatpickr-day.startRange:focus, .ekp-cal .flatpickr-day.endRange:focus {
    background: var(--ek-maroon); border-color: var(--ek-maroon); color: var(--ek-on-dark); font-weight: 700;
}
.ekp-cal .flatpickr-day.startRange:not(.endRange) { border-radius: 12px 0 0 12px; }
.ekp-cal .flatpickr-day.endRange:not(.startRange) { border-radius: 0 12px 12px 0; }
.ekp-cal .flatpickr-day.startRange.endRange { border-radius: 12px; }
.ekp-cal--tryon .flatpickr-day.selected, .ekp-cal--tryon .flatpickr-day.selected:hover, .ekp-cal--tryon .flatpickr-day.selected:focus {
    background: var(--ek-brown); border-color: var(--ek-brown); border-radius: 12px;
}
.ekp-cal .flatpickr-day.selected:focus-visible, .ekp-cal .flatpickr-day.startRange:focus-visible, .ekp-cal .flatpickr-day.endRange:focus-visible {
    outline: 2px solid var(--ek-on-dark); outline-offset: -5px;
}

.ekp-legend { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--ek-ink-soft); }
.ekp-legend li { display: inline-flex; align-items: center; gap: 7px; }
.ekp-legend[hidden] { display: none; }
.ekp-swatch { width: 14px; height: 14px; flex: none; border-radius: 4px; }
.ekp-swatch--free { background: var(--ek-paper); box-shadow: inset 0 0 0 1px rgba(79, 48, 23, .3); }
.ekp-swatch--booked { background: repeating-linear-gradient(135deg, rgba(112, 28, 28, .28) 0 2px, rgba(112, 28, 28, .06) 2px 5px); }
.ekp-swatch--sel { background: var(--ek-maroon); }
.ekp-swatch--try { background: var(--ek-brown); }

/* ---------- summary + actions ---------- */
.ekp-summary { margin: 16px 0 0; padding: 14px 16px; display: grid; gap: 9px; background: var(--ek-cream); border-radius: 12px; font-size: 14px; }
.ekp-summary > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.ekp-summary dt { font-weight: 400; color: var(--ek-ink-soft); white-space: nowrap; }
.ekp-summary dd { margin: 0; text-align: right; font-weight: 700; color: var(--ek-ink); }
.ekp-summary dd small { display: block; margin-top: 1px; font-size: 12px; font-weight: 400; color: var(--ek-ink-soft); }
.ekp-summary.is-ready dd [data-ekp-sum-price] { color: var(--ek-maroon); }

.ekp-msg { margin: 12px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--ek-ink); }
.ekp-msg:empty { display: none; }
.ekp-msg.is-error { color: var(--ek-maroon); }
.ekp-msg.is-ok { color: var(--ek-green); }
/* why a day can't be chosen: right under the calendar, next to where the customer tapped */
.ekp-calmsg { margin: 10px 0 0; }
.ekp-calmsg.is-error { padding: 10px 12px; background: rgba(112, 28, 28, .06); border-radius: 10px; }

.ekp-cta { width: 100%; min-height: 52px; margin-top: 14px; font-size: 13px; }
.ekp-cta:disabled {
    opacity: 1; background: var(--ek-sand); border-color: rgba(79, 48, 23, .12); color: rgba(79, 48, 23, .55); cursor: not-allowed;
}
.ekp-cta.is-busy { opacity: .8; cursor: progress; }
.ekp-fine { margin: 10px 0 0; text-align: center; font-size: 12.5px; line-height: 1.5; color: var(--ek-ink-soft); }

.ekp-note {
    display: flex; gap: 10px; align-items: flex-start; margin: 8px 0 0; padding: 14px 16px;
    background: var(--ek-cream); border-radius: 12px; font-size: 14px; line-height: 1.55; color: var(--ek-ink);
}
.ekp-note .ekp-ico { color: var(--ek-maroon); margin-top: 1px; }
.ekp-request { display: grid; justify-items: start; gap: 8px; margin-top: 6px; padding: 16px; background: var(--ek-cream); border-radius: 12px; }
.ekp-request__when { margin: 2px 0 0; font-weight: 700; color: var(--ek-brown); }
.ekp-request__text { margin: 0 0 4px; font-size: 14px; line-height: 1.5; }
.ekp .ek-btn--sm, .ekp-modal .ek-btn--sm { min-height: 44px; }

/* try-on slot pills */
/* the spacing sits on the fieldset: a <legend> ignores its own top margin */
.ekp-slots { margin: 22px 0 0; padding: 0; border: 0; min-width: 0; }
.ekp-slots > .ekp-step, .ekp-panel--tryon .ekp-slots > .ekp-step { margin-top: 0; }
.ekp-slots__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ekp-slot { position: relative; margin: 0; }
.ekp-slot input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.ekp-slot span {
    display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 6px 8px; text-align: center;
    border: 1px solid rgba(79, 48, 23, .25); border-radius: 999px; background: var(--ek-paper);
    font-size: 13.5px; font-weight: 600; color: var(--ek-ink); transition: background-color .2s, border-color .2s, color .2s;
}
.ekp-slot:hover span { border-color: var(--ek-brown); color: var(--ek-brown); }
.ekp-slot input:checked + span { background: var(--ek-brown); border-color: var(--ek-brown); color: var(--ek-on-dark); }
.ekp-slot input:focus-visible + span { outline: 2px solid var(--ek-nude); outline-offset: 2px; }
.ekp-note-field { margin: 4px 0 0; }
.ekp-note-field label.ekp-step { margin-bottom: 4px; }
.ekp-tryon textarea, .ekp-modal textarea { resize: vertical; min-height: 92px; font-size: 15px; }

.ekp-done { display: grid; justify-items: center; gap: 8px; padding: 22px 12px 8px; text-align: center; scroll-margin-top: calc(var(--ek-header-h) + 16px); }
.ekp-done:focus { outline: none; }
.ekp-done__icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: #e8eddf; color: var(--ek-green); }
.ekp-done__title { margin: 6px 0 0; font-size: 16px; font-weight: 700; line-height: 1.4; color: var(--ek-brown); max-width: 30ch; }
.ekp-done__text { margin: 0 0 8px; font-size: 14px; line-height: 1.5; color: var(--ek-ink); max-width: 38ch; }
.ekp-done__text:empty { display: none; }

/* message the vendor */
.ekp-ask {
    display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; padding: 16px 18px;
    border: 1px solid var(--ek-line); border-radius: 16px;
}
.ekp-ask__title { margin: 0; font-size: 14.5px; font-weight: 700; color: var(--ek-brown); }
.ekp-ask__sub { margin: 2px 0 0; font-size: 13px; line-height: 1.45; color: var(--ek-ink-soft); }
.ekp-ask__btn { flex: none; min-height: 46px; padding: 10px 18px; font-size: 11.5px; }
.ekp-ask__btn .ekp-ico { margin-right: 2px; }

/* ---------- sections below ---------- */
.ekp-section { margin-top: clamp(40px, 6vw, 84px); padding: clamp(28px, 3.6vw, 44px) 0 0; border-top: 1px solid var(--ek-line); }
.ekp-section__head { margin-bottom: 20px; }
.ekp-section__title { margin: 0; font-family: var(--ek-font-ui); font-size: clamp(22px, 2.2vw, 28px); font-weight: 500; letter-spacing: -.01em; line-height: 1.2; color: var(--ek-brown); }

.ekp-pair { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.ekp-pair__card a { display: grid; gap: 4px; color: var(--ek-ink); text-decoration: none; }
.ekp-pair__media { display: block; aspect-ratio: 4 / 5; margin-bottom: 8px; border-radius: 14px; overflow: hidden; background: var(--ek-sand); }
.ekp-pair__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ek-ease); }
.ekp-pair__card a:hover .ekp-pair__media img { transform: scale(1.04); }
.ekp-pair__name { font-size: 14.5px; font-weight: 700; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: text-decoration-color .25s; }
.ekp-pair__card a:hover .ekp-pair__name, .ekp-pair__card a:focus-visible .ekp-pair__name { text-decoration-color: currentColor; }
.ekp-pair__price { font-size: 13.5px; color: var(--ek-ink-soft); }
.ekp-pair__price strong { color: var(--ek-maroon); }

.ekp-seen {
    list-style: none; margin: 0; padding: 2px 0 6px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 230px);
    gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin;
}
.ekp-seen li { scroll-snap-align: start; }

.ekp-reviews__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 8px; }
.ekp-reviews__score { margin: 0; display: flex; align-items: center; gap: 12px; }
.ekp-reviews__avg { font-size: 40px; font-weight: 300; line-height: 1; color: var(--ek-brown); letter-spacing: -.02em; }
.ekp-reviews__count { display: block; margin-top: 3px; font-size: 12.5px; color: var(--ek-ink-soft); }
.ekp-reviews__note { display: flex; align-items: center; gap: 8px; margin: 0 0 20px; font-size: 13px; color: var(--ek-ink-soft); }
.ekp-reviews__note .ekp-ico { color: var(--ek-green); }
.ekp-reviews__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ekp-review { padding: 20px 22px; background: var(--ek-paper); border: 1px solid var(--ek-line); border-radius: 16px; }
.ekp-review__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-size: 12.5px; color: var(--ek-ink-soft); }
.ekp-review__text { margin: 0 0 12px; font-size: 14.5px; line-height: 1.65; color: var(--ek-ink); overflow-wrap: anywhere; }
.ekp-review__by { margin: 0; font-size: 13px; font-weight: 700; color: var(--ek-brown); }
.ekp-review__by span { font-weight: 400; color: var(--ek-ink-soft); }
.ekp-reviews__empty { padding: 26px 22px; text-align: center; background: var(--ek-paper); border: 1px dashed rgba(79, 48, 23, .22); border-radius: 16px; }
.ekp-reviews__empty p { margin: 0; font-size: 14px; color: var(--ek-ink-soft); }
.ekp-reviews__empty .ekp-reviews__empty-title { margin-bottom: 4px; font-size: 15px; font-weight: 700; color: var(--ek-brown); }
.ekp-stars { display: inline-flex; gap: 2px; }
.ekp-stars svg { fill: rgba(112, 28, 28, .18); }
.ekp-stars svg.is-full { fill: var(--ek-maroon); }
.ekp-stars svg.is-half { fill: rgba(112, 28, 28, .55); }

/* ---------- not available ---------- */
.ekp-missing { max-width: 560px; margin: 0 auto; padding: clamp(56px, 10vw, 120px) 0; text-align: center; }
.ekp-missing__icon { width: 64px; height: 64px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 50%; background: var(--ek-sand); color: var(--ek-maroon); }
.ekp-missing__title { margin: 0 0 12px; font-family: var(--ek-font-ui); font-size: clamp(24px, 3vw, 32px); font-weight: 500; color: var(--ek-brown); letter-spacing: -.01em; }
.ekp-missing__text { margin: 0 auto 26px; max-width: 46ch; font-size: 15px; line-height: 1.65; color: var(--ek-ink); }

/* ---------- mobile booking dock + toast ---------- */
.ekp-dock { display: none; }
.ekp-toast {
    position: fixed; left: 50%; bottom: 24px; z-index: 1060; max-width: calc(100vw - 32px); margin: 0; padding: 12px 20px;
    border-radius: 999px; background: var(--ek-brown); color: var(--ek-on-dark); font-size: 13.5px; box-shadow: var(--ek-shadow);
    transform: translate(-50%, 16px); opacity: 0; pointer-events: none; transition: opacity .3s var(--ek-ease), transform .3s var(--ek-ease);
}
.ekp-toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

/* ---------- message window ---------- */
.modal-backdrop { --bs-backdrop-bg: #332219; --bs-backdrop-opacity: .45; }
.ekp-modal .modal-dialog { max-width: 520px; }
.ekp-modal .modal-content { background: var(--ek-paper); color: var(--ek-ink); border: 0; border-radius: 20px; box-shadow: 0 24px 60px rgba(51, 34, 25, .25); }
.ekp-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 18px 6px 24px; }
.ekp-modal__title { margin: 0; font-family: var(--ek-font-ui); font-size: 18px; font-weight: 700; color: var(--ek-brown); }
.ekp-modal__close {
    flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--ek-line); border-radius: 50%;
    background: transparent; color: var(--ek-maroon); font-size: 24px; line-height: 1; cursor: pointer; transition: background-color .2s;
}
.ekp-modal__close:hover, .ekp-modal__close:focus-visible { background: var(--ek-sand); color: var(--ek-brown); }
.ekp-modal__item { display: flex; align-items: center; gap: 12px; margin: 6px 24px 14px; padding: 10px; background: var(--ek-cream); border-radius: 12px; }
.ekp-modal__item img { width: 48px; height: 60px; flex: none; object-fit: cover; border-radius: 8px; }
.ekp-modal__name { margin: 0; font-size: 14px; font-weight: 700; color: var(--ek-brown); }
.ekp-modal__meta { margin: 2px 0 0; font-size: 12.5px; color: var(--ek-ink-soft); }
.ekp-modal__form { padding: 0 24px 22px; }
.ekp-modal__form .ek-help { justify-self: end; }
.ekp-modal__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.ekp-modal__actions .ek-btn { min-height: 44px; }
.ekp-modal__done { padding: 8px 24px 28px; }
.ekp-file, .ek-field > label.ekp-file { position: relative; display: block; margin: 0; font-size: inherit; font-weight: inherit; letter-spacing: normal; text-transform: none; }
.ekp-file input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.ekp-file__btn {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; max-width: 100%; padding: 8px 16px;
    border: 1px dashed rgba(79, 48, 23, .35); border-radius: 999px; color: var(--ek-maroon); font-size: 13.5px; font-weight: 600;
    cursor: pointer; transition: border-color .2s, background-color .2s;
}
.ekp-file__btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ekp-file:hover .ekp-file__btn { border-color: var(--ek-maroon); background: var(--ek-cream); }
.ekp-file input:focus-visible + .ekp-file__btn { outline: 2px solid var(--ek-nude); outline-offset: 2px; }

/* ---------- responsive ---------- */
@media (max-width: 1199.98px) {
    .ekp-detail { grid-template-columns: minmax(124px, 40%) minmax(0, 1fr); }
    .ekp-ask { flex-direction: column; align-items: stretch; }
    .ekp-ask__btn { width: 100%; }
}
@media (max-width: 991.98px) {
    .ekp-layout { grid-template-columns: minmax(0, 1fr); gap: 26px; }
    .ekp-gallery, .ekp-info { position: static; }
    .ekp-gallery--thumbs { display: block; }
    .ekp-stage { max-height: min(78vh, 820px); max-height: min(78svh, 820px); }
    .ekp-thumbs { flex-direction: row; height: auto; contain: none; overflow-x: auto; overflow-y: hidden; margin-top: 10px; gap: 8px; }
    .ekp-thumb { width: 58px; }

    .ekp-ask { flex-direction: row; align-items: center; }
    .ekp-ask__btn { width: auto; }
    .ekp-pair { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ekp-dock {
        position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 1040;
        display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 20px;
        background: rgba(251, 248, 242, .95); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
        border: 1px solid var(--ek-line); border-radius: 999px; box-shadow: var(--ek-shadow);
        transform: translateY(calc(100% + 24px)); visibility: hidden;
        transition: transform .35s var(--ek-ease), visibility 0s linear .35s;
    }
    .ekp-dock.is-shown { transform: none; visibility: visible; transition: transform .35s var(--ek-ease), visibility 0s; }
    .ekp-dock__price { margin: 0; font-size: 14px; color: var(--ek-ink); }
    .ekp-dock__price strong { color: var(--ek-maroon); font-size: 16px; }
    .ekp-dock .ek-btn { min-height: 44px; }
    .ekp-toast { bottom: 88px; }
    .ekp-reviews__list { grid-template-columns: minmax(0, 1fr); }
}
/* tablet portrait: two columns, so the name, price and booking panel share the first screen with the photo */
@media (min-width: 768px) and (max-width: 991.98px) {
    .ekp-layout { grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); gap: 24px; }
    .ekp-gallery { position: sticky; top: calc(var(--ek-header-h) + 16px); }
    .ekp-stage { max-height: none; }
    .ekp-ask { flex-direction: column; align-items: stretch; }
    .ekp-ask__btn { width: 100%; }
}
@media (max-width: 575.98px) {
    .ekp > .ek-container { padding-top: 14px; }
    .ekp-arrow { width: 44px; height: 44px; margin-top: -22px; }
    .ekp-arrow--prev { left: 10px; }
    .ekp-arrow--next { right: 10px; }
    .ekp-title { font-size: 28px; }
    .ekp-book { padding: 14px 12px; border-radius: 16px; }
    .ekp-panel { padding: 16px 2px 2px; }
    .ekp-seg__tab { letter-spacing: .1em; font-size: 11.5px; gap: 6px; }
    .ekp-detail { grid-template-columns: minmax(118px, 42%) minmax(0, 1fr); gap: 10px; font-size: 14px; }
    .ekp-ask { flex-direction: column; align-items: stretch; }
    .ekp-ask__btn { width: 100%; }
    .ekp-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ekp-seen { grid-auto-columns: 44vw; }
    .ekp-review { padding: 18px; }
    .ekp-summary { padding: 12px 14px; }
    .ekp-fallback { grid-template-columns: 1fr; }
    .ekp-modal .modal-dialog { margin: 12px; }
    .ekp-modal__head { padding: 14px 14px 4px 18px; }
    .ekp-modal__item { margin: 6px 18px 12px; }
    .ekp-modal__form { padding: 0 18px 18px; }
    .ekp-modal__actions .ek-btn { flex: 1; }
    .ekp-tryon textarea, .ekp-modal textarea, .ekp-fallback input { font-size: 16px; }
}
@media (max-width: 374.98px) {
    .ekp-book { padding: 12px 8px; }
    .ekp-seg__tab .ekp-ico { display: none; }
    .ekp-seg__tab { padding: 6px; letter-spacing: .07em; font-size: 11px; }
    .ekp-cal .flatpickr-day { height: 42px; line-height: 40px; font-size: 13.5px; border-radius: 10px; }
    .ekp-cal .flatpickr-day.startRange:not(.endRange) { border-radius: 10px 0 0 10px; }
    .ekp-cal .flatpickr-day.endRange:not(.startRange) { border-radius: 0 10px 10px 0; }
    .ekp-slots__row { grid-template-columns: minmax(0, 1fr); }
    .ekp-detail { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .ekp-dock__price { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
    .ekp-track { scroll-behavior: auto; }
    .ekp-pair__card a:hover .ekp-pair__media img { transform: none; }
}
