/* ==========================================================================
   EVLENA — Components
   Class names loosely follow WooCommerce conventions where a 1:1 Woo element
   exists (e.g. .price, .onsale, .quantity, .woocommerce-breadcrumb), so the
   styles carry over when porting.
   ========================================================================== */

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  --btn-bg: var(--c-ink);
  --btn-fg: var(--c-bg);
  --btn-bd: var(--btn-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 52px;
  padding: 0 var(--sp-6);
  border: 1px solid var(--btn-bd);
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn:hover { --btn-bg: var(--c-ink-soft); }
.btn:active { transform: scale(.98); }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.btn--block { width: 100%; }
.btn--sm { min-height: 40px; padding: 0 var(--sp-5); font-size: var(--fs-xs); }
.btn--lg { min-height: 58px; padding: 0 var(--sp-7); }
.btn--accent { --btn-bg: var(--c-clay); }
.btn--accent:hover { --btn-bg: var(--c-clay-dark); }
.btn--light { --btn-bg: var(--c-surface); --btn-fg: var(--c-ink); }
.btn--light:hover { --btn-bg: var(--c-sand-100); }
.btn--outline { --btn-bg: transparent; --btn-fg: var(--c-ink); --btn-bd: var(--c-ink); }
.btn--outline:hover { --btn-bg: var(--c-ink); --btn-fg: var(--c-bg); }
.btn--ghost-light { --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgb(255 255 255 / .7); }
.btn--ghost-light:hover { --btn-bg: #fff; --btn-fg: var(--c-ink); }

.link {
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: underline;
  text-underline-offset: .35em;
}
.link:hover { color: var(--c-clay); }
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-decoration: none;
  letter-spacing: .04em;
  white-space: nowrap !important;
  flex-shrink: 0;
  line-height: 1.2;
}
.link-arrow svg { flex-shrink: 0; display: inline-block; transition: transform var(--dur) var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  color: inherit;
  transition: background var(--dur-fast) var(--ease);
}
.icon-btn:hover { background: rgb(30 28 26 / .06); }
.icon { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon--sm { width: 16px; height: 16px; }
.count-badge {
  position: absolute; top: 4px; right: 2px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px;
  background: var(--c-clay); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 18px; text-align: center;
}

/* ---- Badges / tags ------------------------------------------------------ */
.badge {
  display: inline-flex; align-items: center;
  height: 24px; padding: 0 10px;
  border-radius: var(--radius-pill);
  background: var(--c-surface);
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.badge--sale, .onsale { background: var(--c-clay); color: #fff; }
.badge--new { background: var(--c-ink); color: var(--c-bg); }
.badge--eco { background: var(--c-sage-100); color: #3E4D3A; }

/* ---- Announcement bar --------------------------------------------------- */
.announce {
  background: var(--c-ink);
  color: var(--c-bg);
  font-size: var(--fs-xs);
  letter-spacing: .06em;
  height: var(--announce-h);
  overflow: hidden;
}
.announce__track {
  display: flex; height: 100%;
  align-items: center; justify-content: center;
  gap: var(--sp-7);
}
.announce__track span { white-space: nowrap; }
.announce a { color: inherit; }
@media (max-width: 767px) {
  .announce__track { justify-content: flex-start; animation: marquee 22s linear infinite; width: max-content; padding-left: 100%; }
  @media (prefers-reduced-motion: reduce) { .announce__track { animation: none; padding-left: var(--gutter); } }
}
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---- Header ------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0;
  z-index: var(--z-header);
  background: rgb(246 242 236 / .88);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
body.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }
.site-header.is-scrolled { border-bottom-color: var(--c-line); }
.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--header-h);
}
.site-header__left, .site-header__right { display: flex; align-items: center; gap: var(--sp-1); }
.site-header__right { justify-content: flex-end; }
.logo {
  font-family: var(--ff-display);
  font-size: 1.85rem;
  font-weight: 500;
  letter-spacing: .32em;
  margin-right: -.32em; /* optically center tracked caps */
  text-decoration: none;
  text-transform: uppercase;
  line-height: 1;
}
.logo small { display: block; font-family: var(--ff-ui); font-size: 8px; letter-spacing: .5em; text-align: center; margin-top: 4px; color: var(--c-muted); }

.main-nav { display: none; }
@media (min-width: 1024px) { .main-nav { display: block; } }
.main-nav > ul, .main-nav .menu { display: flex; gap: var(--sp-1); list-style: none; margin: 0; padding: 0; }
.main-nav .menu > li { list-style: none; margin: 0; padding: 0; position: relative; }
.main-nav__link {
  display: inline-flex; align-items: center;
  height: var(--header-h);
  padding: 0 var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: none;
  position: relative;
}
.main-nav__link::after {
  content: ""; position: absolute; left: var(--sp-3); right: var(--sp-3); bottom: 20px;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.main-nav__item:hover .main-nav__link::after,
.main-nav__item:focus-within .main-nav__link::after,
.main-nav__link--sale { color: var(--c-clay); }
.main-nav__item:first-child .main-nav__link { padding-left: 0; }
.main-nav__item:first-child .main-nav__link::after { left: 0; }

@media (max-width: 1023px) {
  .hide-mobile { display: none !important; }
}
@media (min-width: 1024px) {
  .main-nav { display: block; }
  .nav-toggle { display: none !important; }
  .hide-desktop { display: none !important; }
}

/* Mega menu */
.mega {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--c-bg);
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility 0s linear var(--dur);
}
.main-nav__item:hover .mega,
.main-nav__item:focus-within .mega { opacity: 1; visibility: visible; transform: none; transition-delay: 80ms, 80ms, 0s; }
.mega__inner {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) 1.2fr 1.2fr;
  gap: var(--sp-7);
  padding-block: var(--sp-7);
  max-width: 920px;
}
.mega h3 { font-size: var(--fs-xs); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--c-muted); margin-bottom: var(--sp-4); font-weight: 600; }
.mega ul { display: grid; gap: var(--sp-2); }
.mega a { text-decoration: none; font-size: var(--fs-sm); }
.mega a:hover { color: var(--c-clay); }
.mega-card { position: relative; display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/5; }
.mega-card img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease); }
.mega-card:hover img { transform: scale(1.04); }
.mega-card span {
  position: absolute; left: var(--sp-4); bottom: var(--sp-4);
  color: #fff; font-family: var(--ff-display); font-size: var(--fs-lg);
  text-shadow: 0 1px 12px rgb(0 0 0 / .3);
}

/* Nav dropdown (Помощь) */
.main-nav__item--dropdown { position: relative; }
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--sp-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility 0s linear var(--dur);
  z-index: 100;
}
.nav-dropdown::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  height: 12px;
}
.main-nav__item:hover .nav-dropdown,
.main-nav__item:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 80ms, 80ms, 0s;
}
.main-nav__item:last-child .nav-dropdown {
  left: auto;
  right: 0;
}
.nav-dropdown ul {
  display: grid;
  gap: 2px;
}
.nav-dropdown a {
  display: block;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  color: var(--c-ink);
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.nav-dropdown a:hover {
  background: var(--c-sand-100);
  color: var(--c-clay);
}


/* ---- Dialog / drawers --------------------------------------------------- */
dialog:not([open]) {
  display: none !important;
}

dialog {
  padding: 0; border: 0;
  color: inherit;
  background: var(--c-bg);
  max-width: none; max-height: none;
}
dialog[open] {
  display: flex;
}
dialog.search-dialog[open] {
  display: block;
}
dialog.modal[open] {
  display: block;
}
dialog::backdrop { background: rgb(30 28 26 / .42); backdrop-filter: blur(2px); }

.drawer {
  position: fixed; inset: 0 0 0 auto;
  margin: 0;
  width: min(440px, 100vw);
  height: 100dvh;
  display: flex; flex-direction: column;
}
.drawer--left { inset: 0 auto 0 0; }
.drawer[open] { animation: drawer-in-r var(--dur) var(--ease); }
.drawer--left[open] { animation-name: drawer-in-l; }
@keyframes drawer-in-r { from { transform: translateX(100%); } }
@keyframes drawer-in-l { from { transform: translateX(-100%); } }
dialog[open]::backdrop { animation: fade-in var(--dur) var(--ease); }
@keyframes fade-in { from { opacity: 0; } }

.drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--c-line);
  min-height: var(--header-h);
}
.drawer__head h2 { font-size: var(--fs-lg); }
.drawer__body { flex: 1; overflow-y: auto; padding: var(--sp-5); overscroll-behavior: contain; }
.drawer__foot { padding: var(--sp-5); border-top: 1px solid var(--c-line); background: var(--c-surface); }

/* Bottom sheet on mobile (filters) */
@media (max-width: 767px) {
  .drawer--sheet {
    inset: auto 0 0 0; width: 100vw; height: 88dvh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
  .drawer--sheet[open] { animation-name: sheet-in; }
}
@keyframes sheet-in { from { transform: translateY(100%); } }

.modal {
  margin: auto;
  width: min(720px, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  border-radius: var(--radius-lg);
  overflow: auto;
}
.modal[open] { animation: modal-in var(--dur) var(--ease); }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }

/* Mobile nav */
.mobile-nav__list { display: grid; }
.mobile-nav__list > li > a, .mobile-nav__list summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-4) 0;
  font-family: var(--ff-display); font-size: 1.6rem;
  text-decoration: none; border-bottom: 1px solid var(--c-line);
  cursor: pointer; list-style: none;
}
.mobile-nav__list summary::-webkit-details-marker { display: none; }
.mobile-nav__sub { display: grid; gap: var(--sp-3); padding: var(--sp-4) 0 var(--sp-5); }
.mobile-nav__sub a { text-decoration: none; color: var(--c-ink-soft); }
.mobile-nav__promo { margin-top: var(--sp-6); display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }

/* Search overlay */
.search-dialog {
  position: fixed; inset: 0 0 auto 0; margin: 0;
  width: 100vw;
  padding: var(--sp-5) 0 var(--sp-7);
  box-shadow: var(--shadow-lg);
}
.search-dialog[open] { animation: search-in var(--dur) var(--ease); }
@keyframes search-in { from { transform: translateY(-100%); } }
.search-form { display: flex; align-items: center; gap: var(--sp-3); border-bottom: 1px solid var(--c-ink); padding-bottom: var(--sp-3); }
.search-form input {
  flex: 1; border: 0; background: transparent; outline: none;
  font-family: var(--ff-display); font-size: var(--fs-xl);
  min-width: 0;
}
.search-suggest { display: grid; gap: var(--sp-6); margin-top: var(--sp-6); }
@media (min-width: 768px) { .search-suggest { grid-template-columns: 1fr 2fr; } }
.chip-list { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.chip {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  height: 36px; padding: 0 var(--sp-4);
  border: 1px solid var(--c-line); border-radius: var(--radius-pill);
  background: var(--c-surface);
  font-size: var(--fs-sm); text-decoration: none;
  transition: border-color var(--dur-fast) var(--ease);
}
.chip:hover { border-color: var(--c-ink); }
.chip--active { background: var(--c-ink); color: var(--c-bg); border-color: var(--c-ink); }

/* ---- Product card ------------------------------------------------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr));
  gap: var(--sp-6) var(--sp-3);
}
@media (min-width: 768px) { .product-grid { --cols: 3; gap: var(--sp-7) var(--sp-4); } }
@media (min-width: 1200px) { .product-grid { --cols: 4; } }

.product-card { position: relative; display: flex; flex-direction: column; }
.product-card__media {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--c-sand-100);
}
.product-card__media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: opacity var(--dur-slow) var(--ease), transform 1.2s var(--ease);
}
.product-card__media img + img { opacity: 0; }
@media (hover: hover) {
  .product-card:hover .product-card__media img:first-child { transform: scale(1.03); }
  .product-card:hover .product-card__media img + img { opacity: 1; }
}
.product-card__badges { position: absolute; top: var(--sp-3); left: var(--sp-3); display: flex; gap: var(--sp-1); flex-wrap: wrap; z-index: 1; }
.product-card__wish,
.product-card__quick-atc {
  position: absolute;
  top: var(--sp-2);
  z-index: 2;
  background: rgb(255 253 249 / .85);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgb(0 0 0 / .06);
  transition: opacity var(--dur) var(--ease), transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.product-card__wish {
  right: var(--sp-2);
}
.product-card__wish[aria-pressed="true"] .icon {
  fill: var(--c-clay);
  stroke: var(--c-clay);
}
.product-card__quick-atc {
  right: calc(var(--sp-2) + 44px + 6px);
}
.product-card__wish:hover,
.product-card__quick-atc:hover {
  background: var(--c-ink);
  color: #fff;
  transform: scale(1.06);
}

@media (hover: hover) {
  .product-card__quick-atc {
    opacity: 0;
    pointer-events: none;
    transform: translateX(4px);
  }
  .product-card:hover .product-card__quick-atc,
  .product-card:focus-within .product-card__quick-atc {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
  .product-card:hover .product-card__quick-atc:hover,
  .product-card:focus-within .product-card__quick-atc:hover {
    transform: scale(1.06);
  }
}

.product-card__body { display: grid; gap: 4px; padding-top: var(--sp-3); }
.product-card__title { font-size: var(--fs-sm); font-weight: 500; line-height: 1.4; }
.product-card__title a { text-decoration: none; }
.product-card__title a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.product-card__meta { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2); }
.product-card .swatches { position: relative; z-index: 1; }
.product-card__wish, .product-card__quick-atc { z-index: 2; }

.price { font-size: var(--fs-sm); font-weight: 600; display: inline-flex; gap: var(--sp-2); align-items: baseline; }
.price del { color: var(--c-muted); font-weight: 400; }
.price ins { text-decoration: none; color: var(--c-clay); }

/* Swatches */
.swatches { display: flex; gap: 6px; align-items: center; }
.swatch {
  --sw: var(--c-sand-300);
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--sw);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / .12);
}
.swatches__more { font-size: 11px; color: var(--c-muted); }
.swatch--sand { --sw: #D6C6AC; }
.swatch--white { --sw: #F8F5EF; }
.swatch--clay { --sw: #A65A3E; }
.swatch--sage { --sw: #8C9F86; }
.swatch--blue { --sw: #8AA0B5; }
.swatch--black { --sw: #24221F; }
.swatch--olive { --sw: #6C6B48; }
.swatch--rose { --sw: #D2A79A; }

/* ---- Forms -------------------------------------------------------------- */
.field { display: grid; gap: 6px; }
.field label, .field__label { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .04em; color: var(--c-ink-soft); }
.input, .select, .textarea {
  width: 100%;
  min-height: 52px;
  padding: 0 var(--sp-4);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-surface);
  font-size: 1rem; /* ≥16px prevents iOS zoom */
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.textarea { min-height: 140px; padding: var(--sp-3) var(--sp-4); resize: vertical; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--c-sand-500); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--c-ink); box-shadow: 0 0 0 3px rgb(30 28 26 / .08); }
.input:user-invalid, .select:user-invalid, .textarea:user-invalid { border-color: var(--c-error); }
.field__error { display: none; font-size: var(--fs-xs); color: var(--c-error); }
.field:has(:user-invalid) .field__error { display: block; }
.input:autofill { box-shadow: 0 0 0 100px var(--c-sand-100) inset; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%231E1C1A' stroke-width='1.5'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
  padding-right: 40px;
}
.select--inline { min-height: 40px; border: 0; background-color: transparent; font-size: var(--fs-sm); font-weight: 600; padding-left: 0; }

.check { display: flex; align-items: center; gap: var(--sp-3); cursor: pointer; font-size: var(--fs-sm); }
.check input {
  appearance: none; flex: none;
  width: 20px; height: 20px; margin: 0;
  border: 1px solid var(--c-sand-500); border-radius: var(--radius-sm);
  background: var(--c-surface);
  display: grid; place-content: center;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.check input[type="radio"] { border-radius: 50%; }
.check input:checked { background: var(--c-ink); border-color: var(--c-ink); }
.check input[type="checkbox"]:checked::after {
  content: ""; width: 10px; height: 6px; margin-top: -2px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg);
}
.check input[type="radio"]:checked::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.check__count { margin-left: auto; color: var(--c-muted); font-size: var(--fs-xs); }

/* Option cards (delivery / payment) */
.option-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: var(--sp-3); align-items: center;
  padding: var(--sp-4);
  border: 1px solid var(--c-line); border-radius: var(--radius);
  background: var(--c-surface);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.option-card:hover { border-color: var(--c-sand-500); }
.option-card:has(input:checked) { border-color: var(--c-ink); box-shadow: inset 0 0 0 1px var(--c-ink); }
.option-card input { appearance: none; margin: 0; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--c-sand-500); display: grid; place-content: center; }
.option-card input:checked { border-color: var(--c-ink); }
.option-card input:checked::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c-ink); }
.option-card__title { font-weight: 600; font-size: var(--fs-sm); }
.option-card__desc { font-size: var(--fs-xs); color: var(--c-muted); }
.option-card__price { font-weight: 600; font-size: var(--fs-sm); text-align: right; }
.option-card__logos { display: flex; gap: 6px; }
.pay-logo { height: 24px; padding: 0 8px; border: 1px solid var(--c-line); border-radius: 4px; display: inline-flex; align-items: center; font-size: 10px; font-weight: 800; letter-spacing: .02em; background: #fff; }

/* Size selector */
.size-options { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.size-option { position: relative; }
.size-option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.size-option span {
  display: grid; place-items: center;
  min-width: 56px; height: 48px; padding: 0 var(--sp-3);
  border: 1px solid var(--c-line); border-radius: var(--radius);
  background: var(--c-surface);
  font-size: var(--fs-sm); font-weight: 600;
  transition: all var(--dur-fast) var(--ease);
}
.size-option:hover span { border-color: var(--c-ink); }
.size-option input:checked + span { background: var(--c-ink); color: var(--c-bg); border-color: var(--c-ink); }
.size-option input:focus-visible + span { outline: 2px solid var(--c-focus); outline-offset: 2px; }
.size-option input:disabled + span {
  color: var(--c-sand-500);
  background: linear-gradient(to top right, transparent calc(50% - .5px), var(--c-line) 50%, transparent calc(50% + .5px)), var(--c-surface);
}
.size-option--low span::after { content: ""; position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--c-clay); }

.color-options { display: flex; gap: var(--sp-2); }
.color-option { position: relative; }
.color-option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.color-option span {
  display: block; width: 36px; height: 36px; border-radius: 50%;
  background: var(--sw);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / .12), 0 0 0 3px var(--c-bg), 0 0 0 4px transparent;
  transition: box-shadow var(--dur-fast) var(--ease);
}
.color-option input:checked + span { box-shadow: inset 0 0 0 1px rgb(0 0 0 / .12), 0 0 0 3px var(--c-bg), 0 0 0 4px var(--c-ink); }
.color-option input:focus-visible + span { outline: 2px solid var(--c-focus); outline-offset: 5px; }

/* Quantity stepper */
.quantity {
  display: inline-flex; align-items: center;
  border: 1px solid var(--c-line); border-radius: var(--radius-pill);
  background: var(--c-surface);
  height: 40px;
}
.quantity button { width: 36px; height: 100%; display: grid; place-items: center; border-radius: var(--radius-pill); }
.quantity button:hover { background: var(--c-sand-100); }
.quantity input {
  width: 32px; border: 0; background: transparent; text-align: center; font-weight: 600; font-size: var(--fs-sm);
  appearance: textfield; -moz-appearance: textfield;
}
.quantity input::-webkit-inner-spin-button, .quantity input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* ---- Accordion (native details) ---------------------------------------- */
.accordion { border-top: 1px solid var(--c-line); }
.accordion details { border-bottom: 1px solid var(--c-line); }
.accordion summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-4) 0;
  font-weight: 600; font-size: var(--fs-sm);
  cursor: pointer; list-style: none;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: ""; width: 12px; height: 12px; flex: none;
  background:
    linear-gradient(currentColor 0 0) center / 12px 1.5px no-repeat,
    linear-gradient(currentColor 0 0) center / 1.5px 12px no-repeat;
  transition: transform var(--dur) var(--ease);
}
.accordion details[open] > summary::after { transform: rotate(45deg); }
.accordion__content { padding-bottom: var(--sp-5); color: var(--c-ink-soft); font-size: var(--fs-sm); }
.accordion__content > * + * { margin-top: var(--sp-3); }
.accordion__content ul { padding-left: 1.1em; margin: 0; }

/* ---- Breadcrumbs -------------------------------------------------------- */
.woocommerce-breadcrumb { font-size: var(--fs-xs); color: var(--c-muted); padding-block: var(--sp-4); }
.woocommerce-breadcrumb ol { display: flex; flex-wrap: wrap; gap: var(--sp-2); list-style: none; margin: 0; padding: 0; }
.woocommerce-breadcrumb li + li::before { content: "/"; margin-right: var(--sp-2); color: var(--c-sand-500); }
.woocommerce-breadcrumb a { text-decoration: none; }
.woocommerce-breadcrumb a:hover { color: var(--c-ink); }

/* ---- Rating ------------------------------------------------------------- */
.rating { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-xs); }
.stars { --pct: 96%; position: relative; display: inline-block; font-size: 14px; letter-spacing: 2px; line-height: 1; color: var(--c-sand-300); }
.stars::before { content: "★★★★★"; }
.stars::after { content: "★★★★★"; position: absolute; inset: 0; width: var(--pct); overflow: hidden; color: var(--c-ink); }

/* ---- Free-shipping progress -------------------------------------------- */
.ship-progress { display: grid; gap: var(--sp-2); font-size: var(--fs-sm); }
.ship-progress__bar { height: 4px; border-radius: 2px; background: var(--c-sand-200); overflow: hidden; }
.ship-progress__bar span { display: block; height: 100%; width: var(--p, 60%); background: var(--c-sage); border-radius: inherit; transition: width var(--dur-slow) var(--ease); }

/* ---- Mini cart line ----------------------------------------------------- */
.line-item { display: grid; grid-template-columns: 88px 1fr; gap: var(--sp-4); padding-block: var(--sp-4); border-bottom: 1px solid var(--c-line); }
.line-item__img { aspect-ratio: 3/4; border-radius: var(--radius-sm); overflow: hidden; background: var(--c-sand-100); }
.line-item__img img { width: 100%; height: 100%; object-fit: cover; }
.line-item__info { display: grid; gap: 4px; align-content: start; }
.line-item__title { font-size: var(--fs-sm); font-weight: 600; text-decoration: none; }
.line-item__meta { font-size: var(--fs-xs); color: var(--c-muted); }
.line-item__row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-top: var(--sp-2); }
.remove-link { font-size: var(--fs-xs); color: var(--c-muted); text-decoration: underline; text-underline-offset: .25em; }
.remove-link:hover { color: var(--c-error); }

/* ---- Trust strip -------------------------------------------------------- */
.trust { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-5) var(--sp-4); }
@media (min-width: 900px) { .trust { grid-template-columns: repeat(4, 1fr); } }
.trust__item { display: flex; gap: var(--sp-3); align-items: flex-start; }
.trust__item .icon { width: 28px; height: 28px; stroke-width: 1.2; color: var(--c-clay); }
.trust__item strong { display: block; font-size: var(--fs-sm); }
.trust__item span { font-size: var(--fs-xs); color: var(--c-muted); }

/* Compact trust list (cart/pdp) */
.assurances { display: grid; gap: var(--sp-3); font-size: var(--fs-sm); }
.assurances li { display: flex; gap: var(--sp-3); align-items: center; }
.assurances .icon { width: 20px; height: 20px; color: var(--c-sage); }

/* ---- Carousel (scroll-snap) -------------------------------------------- */
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--rail-w, 72%);
  gap: var(--sp-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  padding-inline: var(--gutter);
  margin-inline: calc(var(--gutter) * -1);
  padding-bottom: var(--sp-2);
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
@media (min-width: 768px) { .rail { --rail-w: calc((100% - var(--gutter) * 2 - var(--sp-4) * 2) / 3); gap: var(--sp-4); } }
@media (min-width: 1200px) { .rail { --rail-w: calc((100% - var(--gutter) * 2 - var(--sp-4) * 3) / 4); } }
.rail-nav { display: none; gap: var(--sp-2); }
@media (min-width: 768px) { .rail-nav { display: flex; } }
.rail-nav button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--c-line); display: grid; place-items: center; transition: all var(--dur-fast) var(--ease); }
.rail-nav button:hover { background: var(--c-ink); color: var(--c-bg); border-color: var(--c-ink); }

/* ---- Toast -------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: var(--sp-5); z-index: 90;
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  background: var(--c-ink); color: var(--c-bg);
  border-radius: var(--radius-pill); box-shadow: var(--shadow-lg);
  font-size: var(--fs-sm);
  transform: translate(-50%, 150%); opacity: 0;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

/* ---- Pagination / load more -------------------------------------------- */
.load-more { display: grid; justify-items: center; gap: var(--sp-4); margin-top: var(--sp-8); text-align: center; }
.load-more__bar { width: 200px; height: 2px; background: var(--c-sand-200); }
.load-more__bar span { display: block; height: 100%; background: var(--c-ink); width: var(--p, 33%); }

/* ---- Newsletter --------------------------------------------------------- */
.newsletter { display: grid; gap: var(--sp-6); align-items: center; }
@media (min-width: 900px) { .newsletter { grid-template-columns: 1.1fr 1fr; gap: var(--sp-8); } }
.newsletter-form { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.newsletter-form .input { flex: 1 1 220px; border-radius: var(--radius-pill); padding-left: var(--sp-5); }
.newsletter-form .btn { flex: 0 0 auto; }

/* ---- Footer ------------------------------------------------------------- */
.site-footer { background: var(--c-ink); color: #D9D2C7; padding-top: var(--sp-9); font-size: var(--fs-sm); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-top { display: grid; gap: var(--sp-7); padding-bottom: var(--sp-8); border-bottom: 1px solid rgb(255 255 255 / .12); }
@media (min-width: 900px) { .footer-top { grid-template-columns: 1.4fr repeat(3, 1fr) 1.2fr; } }
.footer-brand .logo { color: #fff; }
.footer-brand p { margin-top: var(--sp-4); max-width: 32ch; color: #A9A196; }
.footer-col h3 { color: #fff; font-size: var(--fs-xs); letter-spacing: var(--tracking-caps); text-transform: uppercase; margin-bottom: var(--sp-4); font-weight: 600; }
.footer-col ul, .footer-col .menu { display: grid; gap: var(--sp-3); list-style: none; padding: 0; margin: 0; }
.footer-col .menu li { list-style: none; margin: 0; padding: 0; }
.footer-col details summary { list-style: none; }
.footer-col details summary::-webkit-details-marker { display: none; }
@media (max-width: 899px) {
  .footer-col { border-bottom: 1px solid rgb(255 255 255 / .12); }
  .footer-col h3 { margin: 0; padding: var(--sp-4) 0; display: flex; justify-content: space-between; cursor: pointer; }
  .footer-col h3::after { content: "+"; font-size: 16px; }
  .footer-col details[open] h3::after { content: "–"; }
  .footer-col ul { padding-bottom: var(--sp-5); }
  .footer-top { gap: 0; }
  .footer-brand { padding-bottom: var(--sp-6); }
  .footer-contact { padding-top: var(--sp-6); }
}
.footer-contact a.big { display: block; font-family: var(--ff-display); font-size: var(--fs-lg); color: #fff; }
.socials { display: flex; gap: var(--sp-2); margin-top: var(--sp-4); }
.socials a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .2); display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.socials a:hover { background: #fff; color: var(--c-ink); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: var(--sp-4); justify-content: space-between; align-items: center; padding-block: var(--sp-5); font-size: var(--fs-xs); color: #8F877C; }
.footer-bottom .option-card__logos .pay-logo { background: transparent; border-color: rgb(255 255 255 / .2); color: #D9D2C7; }
.footer-wordmark {
  font-family: var(--ff-display); font-weight: 500;
  font-size: clamp(4rem, 19vw, 22rem); line-height: .8;
  letter-spacing: .08em; text-align: center; color: rgb(255 255 255 / .06);
  user-select: none; overflow: hidden; padding-top: var(--sp-5);
}

/* ---- Sticky mobile action bar ------------------------------------------ */
.sticky-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-sticky);
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--gutter) calc(var(--sp-3) + env(safe-area-inset-bottom));
  background: rgb(255 253 249 / .95); backdrop-filter: blur(12px);
  border-top: 1px solid var(--c-line);
  transform: translateY(110%);
  transition: transform var(--dur) var(--ease);
}
.sticky-bar.is-visible { transform: none; }
.sticky-bar .btn { flex: 1; }
