/*
 * AYYO — design layer on top of the Uomo theme (assets/css/theme.css).
 *
 * 1. Tokens        5. Product card     9.  Cart & checkout
 * 2. Base          6. Shop page        10. Home
 * 3. Controls      7. Product page     11. Footer
 * 4. Header        8. Sticky bar       12. Motion & focus
 *
 * Direction: black ink like the "ayyo." logo, warm-neutral surfaces behind photos, one accent (orchid)
 * reserved for sale prices and the bag count. Photos get a soft 12px corner, controls 8px.
 */

/* ---------- 1. Tokens ---------- */
:root {
  --font-jost: "Jost";
  --font-allura: "Allura";

  --ink: #000;
  --text: #222;
  --muted: #6e6e6e;
  --line: #e8e6e3;
  --surface: #f5f4f2;   /* behind photos, panels */
  --orchid: #9e2b66;    /* sale prices, bag count */
  --danger: #b3261e;
  --success: #2f6b4f;

  --r-photo: 12px;
  --r-control: 8px;
  --r-sm: 6px;
  --r-pill: 999px;

  --control-h: 3rem;
  --gutter: 15px;
  --header-h: 4.5rem;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-fast: 160ms;
  --t: 280ms;
  --t-slow: 450ms;
}

/* ---------- 2. Base ---------- */
html, body { overflow-x: clip; }
body { color: var(--text); font-size: 0.9375rem; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
::selection { background: var(--ink); color: #fff; }
/* The theme's d-flex / d-block are !important; the hidden attribute must still win. */
[hidden] { display: none !important; }
.ui-icon { display: block; flex: 0 0 auto; fill: none; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: #fff; padding: 0.5rem 1rem; border-radius: var(--r-control); }
.skip-link:focus { left: 1rem; top: 0.5rem; }

.display-title,
.hero__title,
.section__title,
.shop-title,
.page-title {
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
  text-transform: none;
}
.section__title { margin: 0; font-size: clamp(1.75rem, 3.4vw, 2.75rem); }
.shop-title { margin: 0.25rem 0 1.25rem; font-size: clamp(2.25rem, 5vw, 3.75rem); letter-spacing: -0.04em; }
.page-title, .shop-checkout .page-title { margin-bottom: 1.25rem; font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 500; letter-spacing: -0.04em; text-transform: none; }

.flash { padding: 0.9rem 1.1rem; border-radius: var(--r-control); background: var(--surface); border-left: 3px solid var(--ink); }
.flash--danger { border-left-color: var(--danger); }
.flash--success { border-left-color: var(--success); }

/* ---------- 3. Controls ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--control-h);
  height: auto;
  padding: 0 1.5rem;
  border-radius: var(--r-control);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.2;
  position: relative;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn-primary { background: var(--ink); border: 1px solid var(--ink); color: #fff; }
.btn-primary:hover, .btn-primary:focus { background: #2a2a2a; border-color: #2a2a2a; color: #fff; }
.btn-outline-dark { background: #fff; border: 1px solid var(--ink); color: var(--ink); }
.btn-outline-dark:hover { background: var(--ink); color: #fff; }
.btn-light { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.btn-light:hover { border-color: var(--ink); color: var(--ink); }
.btn-sm { min-height: 2.375rem; padding: 0 1rem; font-size: 0.875rem; }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }

/* Loading state: label hidden, small spinner in its place. Set with class "is-loading". */
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid currentColor;
  border-color: #fff #fff transparent transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn-outline-dark.is-loading::after, .btn-light.is-loading::after { border-color: var(--ink) var(--ink) transparent transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-control, .form-select {
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.form-control:focus, .form-select:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06); }
.form-control.is-invalid, .form-select.is-invalid { border-color: var(--danger) !important; }
.invalid-feedback { color: var(--danger); }
.form-floating > label { color: var(--muted); }

/* Quantity stepper:  [ − ] 1 [ + ] */
.qty {
  display: inline-flex;
  align-items: center;
  height: var(--control-h);
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  background: #fff;
}
.qty__btn {
  width: 2.75rem;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  color: var(--ink);
  border-radius: var(--r-control);
}
.qty__btn:hover { background: var(--surface); }
.qty__input {
  width: 2.25rem;
  border: 0;
  text-align: center;
  font-weight: 500;
  background: transparent;
  -moz-appearance: textfield;
}
.qty__input::-webkit-outer-spin-button, .qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty--sm { height: 2.5rem; }
.qty--sm .qty__btn { width: 2.25rem; }

/* Chips (category filters) */
.chips { display: flex; gap: 0.5rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 2.375rem;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--ink);
  font-size: 0.875rem;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip--sale { color: var(--orchid); }
.chip--sale.is-active { background: var(--orchid); border-color: var(--orchid); }

/* ---------- 4. Header ---------- */
.topline { background: var(--ink); color: #fff; font-size: 0.8125rem; }
.topline__inner { display: grid; padding: 0.5rem var(--gutter); text-align: center; overflow: hidden; }
/* All messages sit in the same spot: the active one is in the middle, the next waits on the right,
   the previous slides out to the left. */
.topline__msg { grid-area: 1 / 1; opacity: 0; transform: translateX(60%); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
@media (max-width: 575.98px) { .topline { font-size: 0.75rem; } }
.topline__msg.is-active { opacity: 1; transform: none; }
.topline__msg.is-leaving { opacity: 0; transform: translateX(-60%); }
@media (prefers-reduced-motion: reduce) { .topline__msg, .topline__msg.is-leaving { transition: opacity 0.3s linear; transform: none; } }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t) var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: var(--header-h); }
.site-logo { justify-self: center; display: block; line-height: 0; }
.site-logo img { height: 2.125rem; width: auto; }
.site-tools { justify-self: end; display: flex; align-items: center; gap: 0.25rem; }
.site-tools__admin { font-size: 0.8125rem; color: var(--muted); margin-right: 0.5rem; text-decoration: none; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink);
  position: relative;
  transition: background-color var(--t-fast) var(--ease);
}
.icon-btn:hover { background: var(--surface); color: var(--ink); }
.bag-count {
  position: absolute;
  top: 0.3rem;
  right: 0.2rem;
  min-width: 1.125rem;
  height: 1.125rem;
  padding: 0 0.3rem;
  border-radius: var(--r-pill);
  background: var(--orchid);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.125rem;
  text-align: center;
}

.site-nav ul { display: flex; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.site-nav__item { position: relative; }
.site-nav__link {
  display: inline-block;
  padding: 1.5rem 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 1.15rem) / 0 1px no-repeat;
  transition: background-size var(--t) var(--ease);
}
.site-nav__link:hover, .site-nav__link.is-active { background-size: 100% 1px; color: var(--ink); }
.site-nav__link--sale, .site-nav__link--sale:hover { color: var(--orchid); }
.site-nav__menu {
  position: absolute;
  top: calc(100% - 0.5rem);
  left: -1rem;
  min-width: 15rem;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-photo);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), visibility var(--t-fast);
}
.site-nav__item:hover .site-nav__menu,
.site-nav__item:focus-within .site-nav__menu { opacity: 1; visibility: visible; transform: none; }
.site-nav__menu a { display: block; padding: 0.55rem 0.75rem; border-radius: var(--r-sm); text-decoration: none; }
.site-nav__menu a:hover { background: var(--surface); }

.site-search { border-top: 1px solid var(--line); background: #fff; }
.site-search__inner { display: flex; align-items: center; gap: 0.75rem; padding-top: 1rem; padding-bottom: 1rem; }
.site-search__field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  height: 3.25rem;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  background: var(--surface);
}
.site-search__field:focus-within { border-color: var(--ink); background: #fff; }
.site-search__field input { flex: 1; border: 0; outline: none; background: transparent; font-size: 1.0625rem; min-width: 0; }

/* Mobile menu: full screen below the header */
.mobile-nav {
  position: fixed;
  inset: calc(var(--header-h) + var(--topline-h, 0px)) 0 0 0;
  z-index: 49;
  overflow-y: auto;
  background: #fff;
  border-top: 1px solid var(--line);
  animation: menu-in var(--t) var(--ease);
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } }
.mobile-nav__inner { display: flex; flex-direction: column; min-height: 100%; padding-top: 1rem; padding-bottom: 2rem; }
.mobile-nav__list { list-style: none; margin: 1rem 0 0; padding: 0; }
.mobile-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}
.mobile-nav__link .ui-icon { color: var(--muted); }
.mobile-nav__subs { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.75rem 0 1rem; border-bottom: 1px solid var(--line); }
.mobile-nav__foot { margin-top: auto; padding-top: 2rem; color: var(--muted); font-size: 0.875rem; }
.mobile-nav__foot p { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.5rem; }
/* On <html>, not <body>: html has overflow-x: clip, so overflow on body would make body the scroller and break the sticky header. */
html.menu-open { overflow: hidden; }
.mobile-nav { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

@media (max-width: 991.98px) {
  :root { --header-h: 3.75rem; }
  /* Equal side columns keep the logo exactly in the middle. */
  .site-header__inner { grid-template-columns: 1fr auto 1fr; }
  .site-start { justify-self: start; display: flex; align-items: center; margin-left: -0.625rem; }
  .site-tools { margin-right: -0.625rem; }
  .site-logo img { height: 1.625rem; }
}

/* ---------- 5. Product card ---------- */
.products-grid { --bs-gutter-x: 1.25rem; row-gap: 0.5rem; }
.product-card { margin-bottom: 1.75rem !important; }
.product-card .pc__img-wrapper {
  padding-top: 150%;          /* Eyyo photos are 2:3 */
  background: var(--surface);
  border-radius: var(--r-photo);
  isolation: isolate;         /* keeps the corners rounded while the photo zooms (Safari) */
}
.product-card .pc__img { transition: transform var(--t-slow) var(--ease); }
.product-card:hover .pc__img { transform: scale(1.03); }
/* Second photo: fades in over the first once loaded, fades out when the pointer leaves. */
.product-card .pc__img-second,
.product-card:hover .pc__img-second { opacity: 0; transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease); }
.product-card:hover .pc__img-second.is-ready { opacity: 1; }

.product-card .pc__info { padding-top: 0.875rem; }
.product-card .pc__title { margin-bottom: 0.25rem; font-size: 0.9375rem; font-weight: 400; line-height: 1.35; text-transform: none; }
.product-card .pc__title a { color: var(--text); text-decoration: none; }
.product-card:hover .pc__title a { text-decoration: underline; }
.price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.15rem 0.5rem; font-variant-numeric: tabular-nums; }
.price { font-weight: 500; color: var(--ink); }
.price--old { color: var(--muted); font-weight: 400; text-decoration: line-through; }
.price--sale { color: var(--orchid); }

.card-badges { position: absolute; top: 0.625rem; left: 0.625rem; right: 0.625rem; z-index: 2; display: flex; justify-content: space-between; pointer-events: none; }
.badge-pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.3;
}
.badge-pill--sale { background: var(--orchid); color: #fff; }
.stock-note { margin-top: 0.35rem; font-size: 0.8125rem; color: var(--muted); }
.stock-note--low { color: var(--orchid); }
.card-sizes { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.5rem; }
.card-sizes span { padding: 0.05rem 0.4rem; border: 1px solid var(--line); border-radius: 4px; font-size: 0.75rem; color: var(--muted); }
.card-sizes .is-out { color: #bdbdbd; text-decoration: line-through; border-color: #f0efed; }

@media (max-width: 767.98px) {
  .products-grid { --bs-gutter-x: 0.625rem; }
  .product-card { margin-bottom: 1.25rem !important; }
  .product-card .pc__title { font-size: 0.875rem; }
  .card-sizes { display: none; }
}

/* ---------- 6. Shop page ---------- */
.shop-main { padding-top: 1.75rem; }
.shop-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.breadcrumb { font-size: 0.8125rem; color: var(--muted); margin: 0; }
.crumb { color: var(--muted); text-decoration: none; }
.crumb:hover { color: var(--ink); text-decoration: underline; }
.crumb.is-current { color: var(--ink); }
.crumb-sep { margin: 0 0.4rem; color: #c4c4c4; }
.sort-select {
  height: 2.375rem;
  padding: 0 2.25rem 0 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background-position: right 0.85rem center;
  font-size: 0.875rem;
  text-transform: none;
  width: auto;
}
.shop-more { margin-top: 1rem; }
.shop-pages__num, .shop-pages__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.5rem;
  border-radius: var(--r-control);
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}
.shop-pages__num:hover, .shop-pages__arrow:hover { background: var(--surface); color: var(--ink); }
.shop-pages__num.is-active { background: var(--ink); color: #fff; }

/* ---------- 7. Product page ---------- */
.pd { padding-top: 1.5rem; }
.pd__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 3.5rem; align-items: start; }
.pd__info { position: sticky; top: calc(var(--header-h) + 1.5rem); }
@media (max-width: 991.98px) {
  .pd { padding-top: 0; }
  .pd__grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .pd__info { position: static; }
}

/* Gallery — desktop: thumbnails + large photo with cross-fade */
.pd-gallery { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 0.75rem; align-items: start; }
.pd-gallery--single { grid-template-columns: minmax(0, 1fr); }
.pd-gallery__thumbs { display: flex; flex-direction: column; gap: 0.625rem; max-height: calc(100vh - var(--header-h) - 3rem); overflow-y: auto; scrollbar-width: none; }
.pd-gallery__thumbs::-webkit-scrollbar { display: none; }
.pd-gallery__thumb {
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface);
  opacity: 0.55;
  transition: opacity var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.pd-gallery__thumb img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; }
.pd-gallery__thumb:hover { opacity: 1; }
.pd-gallery__thumb.is-active { opacity: 1; border-color: var(--ink); }
.pd-gallery__stage {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: var(--r-photo);
  background: var(--surface);
  isolation: isolate;
}
.pd-gallery__stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pd-gallery__stage .pd-gallery__next-img { opacity: 0; transition: opacity var(--t) var(--ease); }
.pd-gallery__stage .pd-gallery__next-img.is-in { opacity: 1; }
.pd-gallery__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transition: opacity var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.pd-gallery__stage:hover .pd-gallery__nav, .pd-gallery__nav:focus-visible { opacity: 1; }
.pd-gallery__nav:hover { background: #fff; }
.pd-gallery__prev { left: 0.875rem; }
.pd-gallery__next { right: 0.875rem; }

/* Gallery — phones: native swipe, one photo per screen, counter */
.pd-swipe { display: none; }
@media (max-width: 991.98px) {
  .pd-gallery { display: none; }
  .pd-swipe { display: block; position: relative; margin: 0 calc(var(--gutter) * -1); }
  .pd-swipe__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .pd-swipe__track::-webkit-scrollbar { display: none; }
  .pd-swipe__slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 2 / 3; background: var(--surface) center / cover no-repeat; }
  .pd-swipe__slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .pd-swipe__count {
    position: absolute;
    right: 0.875rem;
    bottom: 0.875rem;
    padding: 0.2rem 0.6rem;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.8125rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
  }
}

/* Info column */
.pd__title { margin: 0.75rem 0 0.5rem; font-size: clamp(1.6rem, 2.6vw, 2.25rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; color: var(--ink); }
.pd__price { font-size: 1.375rem; margin-bottom: 1.5rem; }
.pd__price .badge-pill { font-size: 0.8125rem; }
.pd__label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.625rem; font-size: 0.875rem; font-weight: 500; color: var(--ink); }
.pd__label span { font-weight: 400; color: var(--muted); }

.size-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(3.5rem, 1fr)); gap: 0.5rem; margin-bottom: 0.5rem; }
.size-grid input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.size-grid label {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.size-grid label:hover { border-color: var(--ink); }
.size-grid input:checked + label { background: var(--ink); border-color: var(--ink); color: #fff; }
.size-grid input:focus-visible + label { outline: 2px solid var(--ink); outline-offset: 2px; }
.size-grid input:disabled + label { color: #c2c2c2; text-decoration: line-through; border-color: #f0efed; cursor: not-allowed; background: #fff; }
.pd__note { min-height: 1.25rem; margin-bottom: 1rem; font-size: 0.8125rem; color: var(--muted); }
.pd__note.is-error { color: var(--danger); font-weight: 500; }
.pd__note.is-low { color: var(--orchid); }

.pd__buy { display: grid; grid-template-columns: auto 1fr; gap: 0.625rem; margin-bottom: 0.625rem; }
.pd__buy .btn { min-height: var(--control-h); }

.pd__perks { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 0.75rem; }
.pd__perks li { display: flex; gap: 0.75rem; align-items: flex-start; font-size: 0.875rem; line-height: 1.45; }
.pd__perks .ui-icon { color: var(--ink); margin-top: 0.05rem; }
.pd__perks strong { display: block; color: var(--ink); font-weight: 500; }
.pd__perks span { color: var(--muted); }

.pd-colors { margin-bottom: 1.5rem; }
.pd-colors__list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pd-colors__item { display: block; width: 3.75rem; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; transition: border-color var(--t-fast) var(--ease); }
.pd-colors__item:hover { border-color: var(--ink); }
.pd-colors__item img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; }

.pd-acc { border-top: 1px solid var(--line); }
.pd-acc details { border-bottom: 1px solid var(--line); }
.pd-acc summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.pd-acc summary::-webkit-details-marker { display: none; }
.pd-acc summary .ui-icon { transition: transform var(--t) var(--ease); }
.pd-acc details[open] summary .ui-icon { transform: rotate(180deg); }
.pd-acc__body { padding: 0 0 1.125rem; color: var(--muted); font-size: 0.9375rem; }
.pd-acc__body p { margin: 0 0 0.35rem; }
.pd-acc__body dl { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem; margin: 0; }
.pd-acc__body dt { font-weight: 400; color: var(--muted); }
.pd-acc__body dd { margin: 0; color: var(--ink); }

/* ---------- 8. Sticky add-to-bag bar (phones) ---------- */
.buybar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: none;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem var(--gutter) calc(0.625rem + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  transform: translateY(100%);
  transition: transform var(--t) var(--ease);
}
.buybar.is-visible { transform: none; }
.buybar__info { min-width: 0; flex: 1; font-size: 0.8125rem; line-height: 1.3; }
.buybar__name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.buybar .btn { flex: 0 0 auto; }
@media (max-width: 991.98px) { .buybar { display: flex; } .has-buybar .site-main { padding-bottom: 6rem; } }

/* ---------- 9. Cart & checkout ---------- */
.shop-checkout { padding-top: 2rem; }
.checkout-steps__item { text-decoration: none; }
.checkout-steps__item-title span, .checkout__totals h3, .checkout-cart-items th, .checkout-totals th { text-transform: none; }

.cart { display: grid; grid-template-columns: minmax(0, 1fr) 24rem; gap: 3rem; align-items: start; }
.cart-lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.cart-line { display: grid; grid-template-columns: 6rem minmax(0, 1fr) auto; gap: 1.25rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line); align-items: start; }
.cart-line__img { display: block; border-radius: var(--r-sm); overflow: hidden; background: var(--surface); }
.cart-line__img img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; }
.cart-line__name { display: block; color: var(--ink); font-weight: 500; text-decoration: none; margin-bottom: 0.25rem; }
.cart-line__meta { color: var(--muted); font-size: 0.875rem; margin-bottom: 0.75rem; }
.cart-line__side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; height: 100%; gap: 0.75rem; }
.cart-line__remove { background: none; border: 0; padding: 0; color: var(--muted); font-size: 0.8125rem; text-decoration: underline; text-underline-offset: 3px; }
.cart-line__remove:hover { color: var(--ink); }
.cart-actions { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.25rem; flex-wrap: wrap; }

.summary { background: var(--surface); border-radius: var(--r-photo); padding: 1.5rem; position: sticky; top: calc(var(--header-h) + 1.5rem); }
.summary__title { font-size: 1.125rem; font-weight: 500; color: var(--ink); margin: 0 0 1rem; text-transform: none; }
.summary__row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.summary__row span:first-child { color: var(--muted); }
.summary__row--total { border-top: 1px solid var(--line); margin-top: 0.5rem; padding-top: 0.875rem; font-weight: 500; font-size: 1.0625rem; color: var(--ink); }
.summary__row--total span:first-child { color: var(--ink); }
.summary__note { display: flex; gap: 0.625rem; align-items: flex-start; margin: 1rem 0; font-size: 0.875rem; color: var(--muted); }
.summary__note .ui-icon { color: var(--ink); }
.summary__items { list-style: none; margin: 0 0 0.75rem; padding: 0; }
.summary__items li { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; gap: 0.75rem; align-items: center; padding: 0.5rem 0; font-size: 0.875rem; }
.summary__items img { width: 3rem; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; background: #fff; }
.summary__items small { display: block; color: var(--muted); }
@media (max-width: 991.98px) {
  .cart { grid-template-columns: 1fr; gap: 1.5rem; }
  .summary { position: static; }
}
@media (max-width: 575.98px) {
  .cart-line { grid-template-columns: 5rem minmax(0, 1fr); }
  .cart-line__side { grid-column: 2; flex-direction: row; align-items: center; height: auto; }
}

.co-fields .form-floating > label { color: var(--muted); }
.pay-box { display: flex; gap: 0.75rem; align-items: flex-start; padding: 1rem; border: 1px solid var(--ink); border-radius: var(--r-control); background: #fff; margin-bottom: 1rem; }
.pay-box strong { display: block; color: var(--ink); font-weight: 500; }
.pay-box span { font-size: 0.875rem; color: var(--muted); }

/* ---------- 10. Home ---------- */
.hero { padding-top: clamp(2rem, 5vw, 4rem); }
.hero__head { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 2rem 4rem; align-items: end; margin-bottom: clamp(1.75rem, 4vw, 3rem); }
.hero__title { margin: 0; font-size: clamp(2.75rem, 7.5vw, 6.5rem); line-height: 0.92; letter-spacing: -0.045em; }
.hero__aside p { color: var(--muted); font-size: 1.0625rem; line-height: 1.6; margin-bottom: 1.5rem; max-width: 30rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
@media (max-width: 767.98px) { .hero__head { grid-template-columns: 1fr; } }

.runway { position: relative; }
.runway__track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin-right: calc((100% - 100vw) / 2);  /* starts at the content edge, runs off the right edge */
  padding-right: var(--gutter);
  scrollbar-width: none;
  outline: none;
}
.runway__track::-webkit-scrollbar { display: none; }
.runway__item { flex: 0 0 clamp(11rem, 21vw, 19rem); scroll-snap-align: start; text-decoration: none; color: var(--text); }
.runway__photo, .tile__photo { display: block; overflow: hidden; background: var(--surface); border-radius: var(--r-photo); isolation: isolate; margin-bottom: 0.75rem; }
.runway__photo { aspect-ratio: 2 / 3; }
.tile__photo { aspect-ratio: 3 / 4; }
.runway__photo img, .tile__photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--t-slow) var(--ease); }
.tile__photo img { object-position: top; }
.runway__item:hover img, .tile:hover img { transform: scale(1.03); }
.runway__name { display: block; font-size: 0.9375rem; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.runway__price { display: block; margin-top: 0.15rem; }
.runway__controls { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; }
.runway__btn { width: 2.75rem; height: 2.75rem; border: 1px solid var(--line); border-radius: 50%; background: #fff; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); transition: border-color var(--t-fast) var(--ease); }
.runway__btn:hover { border-color: var(--ink); }
@media (hover: none) { .runway__controls { display: none; } }
@media (max-width: 575.98px) { .runway__item { flex-basis: 40vw; } .runway__track { gap: 0.625rem; } }

.promise { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: clamp(2.5rem, 6vw, 4.5rem); }
.promise__item { display: flex; gap: 0.875rem; align-items: flex-start; padding: 1.25rem; border-radius: var(--r-photo); background: var(--surface); }
.promise__item .ui-icon { color: var(--ink); }
.promise__item strong { display: block; color: var(--ink); font-weight: 500; margin-bottom: 0.15rem; }
.promise__item span { color: var(--muted); font-size: 0.875rem; line-height: 1.5; }
@media (max-width: 767.98px) { .promise { grid-template-columns: 1fr; gap: 0.625rem; } }

.section { margin-top: clamp(3rem, 7vw, 5.5rem); }
.section__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1.5rem; }
.section__link { white-space: nowrap; font-size: 0.9375rem; }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.tile { text-decoration: none; color: var(--text); }
.tile__name { display: block; font-size: 1.0625rem; font-weight: 500; color: var(--ink); }
@media (max-width: 767.98px) { .tiles { grid-template-columns: repeat(2, 1fr); gap: 0.625rem; } }

.insta { margin-top: clamp(3rem, 7vw, 5.5rem); }
.insta__inner { background: var(--ink); color: #fff; border-radius: var(--r-photo); padding: clamp(2rem, 6vw, 4rem); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.insta__title { margin: 0; font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; max-width: 32rem; }

/* ---------- 11. Footer ---------- */
.site-main { min-height: 50vh; padding-bottom: clamp(3rem, 7vw, 5.5rem); }
.site-footer { background: var(--ink); color: #cfcfcf; font-size: 0.9375rem; padding-top: clamp(2.5rem, 6vw, 4rem); }
.site-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; }
.site-footer__brand img { height: 1.75rem; width: auto; filter: invert(1); margin-bottom: 1.25rem; }  /* black PNG -> white */
.site-footer__brand p { max-width: 18rem; color: #9a9a9a; }
.site-footer__title { font-size: 0.8125rem; font-weight: 500; color: #8a8a8a; margin-bottom: 1rem; text-transform: none; letter-spacing: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.site-footer a { color: #e8e8e8; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__bottom { border-top: 1px solid #262626; margin-top: 2.5rem; padding: 1.25rem 0; font-size: 0.8125rem; color: #8a8a8a; }
@media (max-width: 767.98px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__brand { grid-column: 1 / -1; }
}

/* ---------- 12. Motion & focus ---------- */
a:focus-visible, button:focus-visible, .btn:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.insta a:focus-visible, .site-footer a:focus-visible { outline-color: #fff; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
legend.pd__label { float: none; width: 100%; padding: 0; }
#cartForm.is-saving .cart-lines { opacity: 0.55; transition: opacity var(--t-fast) var(--ease); pointer-events: none; }

/* Checkout steps:  (1) Shporta — (2) Dërgesa — (3) Konfirmimi */
.steps { display: flex; align-items: center; gap: 0.75rem; list-style: none; padding: 0; margin: 0 0 2rem; font-size: 0.875rem; color: var(--muted); }
.steps__item { display: flex; align-items: center; gap: 0.5rem; }
.steps__item + .steps__item::before { content: ""; width: 2rem; height: 1px; background: var(--line); margin-right: 0.25rem; }
.steps__dot { display: inline-flex; align-items: center; justify-content: center; width: 1.625rem; height: 1.625rem; border-radius: 50%; border: 1px solid var(--line); font-size: 0.75rem; font-weight: 500; }
.steps__item.is-current { color: var(--ink); font-weight: 500; }
.steps__item.is-current .steps__dot, .steps__item.is-done .steps__dot { background: var(--ink); border-color: var(--ink); color: #fff; }
.steps__item a { color: var(--ink); }
@media (max-width: 575.98px) {
  /* Phones: only the current step keeps its label */
  .steps { gap: 0.5rem; }
  .steps__item + .steps__item::before { width: 1rem; }
  .steps__item:not(.is-current) > span:last-child, .steps__item:not(.is-current) > a { display: none; }
}
/* Badge sits next to the price on the product page (not pushed to the edge) */
.pd__price .badge-pill--sale { margin-left: 0.25rem; }
.pd__note { margin-bottom: 0.75rem; }
@media (max-width: 767.98px) {
  /* Filters get their own row; sort below them */
  .shop-bar { flex-wrap: wrap; }
  .shop-bar .chips { flex: 1 1 100%; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 2px; }
  .shop-bar form { margin-left: auto; }
  .shop-title { margin-bottom: 1rem; }
}

/* ---------- Wishlist hearts ---------- */
.wish-form { margin: 0; }
.wish-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  transition: transform var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.wish-btn:hover { background: #fff; }
.wish-btn:active { transform: scale(0.92); }
.wish-btn.is-on { color: var(--orchid); }
.wish-btn.is-on .ui-icon { fill: currentColor; }
.wish-btn.is-on .ui-icon { animation: wish-pop var(--t) var(--ease); }
@keyframes wish-pop { 50% { transform: scale(1.2); } }
.card-wish { position: absolute; top: 0.5rem; right: 0.5rem; z-index: 3; }
.wish-btn--box { width: var(--control-h); height: var(--control-h); border: 1px solid var(--line); border-radius: var(--r-control); background: #fff; }
.wish-btn--box:hover { border-color: var(--ink); }
.wish-btn--wide { width: 100%; height: var(--control-h); gap: 0.5rem; border: 1px solid var(--ink); border-radius: var(--r-control); background: #fff; font-weight: 500; }
.wish-btn--wide:hover { background: var(--surface); }

/* ---------- Sold out (still listed, at the end) ---------- */
.badge-pill--soldout { background: var(--ink); color: #fff; }
.product-card.is-soldout .pc__img-wrapper::after { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(255, 255, 255, 0.45); pointer-events: none; }
.product-card.is-soldout .price { color: var(--muted); font-weight: 400; }
.pd__soldout { display: grid; gap: 0.75rem; justify-items: start; padding: 1rem 0 0.5rem; }
.pd__soldout p { margin: 0; color: var(--muted); }
.pd__buy { grid-template-columns: auto 1fr auto; }
.wish-count { background: var(--ink); }

/* ---------- Login / register ---------- */
.auth { padding-top: clamp(1.5rem, 5vw, 3.5rem); }
.auth__card { max-width: 28rem; margin: 0 auto; }
.auth__tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem; padding: 0.25rem; margin-bottom: 2rem; background: var(--surface); border-radius: var(--r-control); }
.auth__tab { padding: 0.6rem; border-radius: var(--r-sm); text-align: center; font-weight: 500; color: var(--muted); text-decoration: none; transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.auth__tab.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06); }
.auth__title { font-size: clamp(1.75rem, 4vw, 2.25rem); font-weight: 500; letter-spacing: -0.035em; color: var(--ink); margin: 0 0 0.5rem; }
.auth__lead { color: var(--muted); margin-bottom: 1.5rem; }
.auth__row { display: flex; justify-content: flex-end; margin: 0.25rem 0 1rem; font-size: 0.875rem; }
.auth__note { margin-top: 1.5rem; text-align: center; font-size: 0.875rem; color: var(--muted); }

/* ---------- Account ---------- */
.account { padding-top: 2rem; }
.account__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.account__head .page-title { margin: 0; }
.account__nav { margin: 1.25rem 0 2rem; }
.account__block { margin-bottom: 2.5rem; scroll-margin-top: calc(var(--header-h) + 1rem); }
.account__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
@media (max-width: 767.98px) { .account__grid { grid-template-columns: 1fr; gap: 0; } }
.order-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.order-row { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto auto auto; gap: 1rem; align-items: center; padding: 0.875rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.order-row:hover { background: linear-gradient(90deg, transparent, var(--surface) 20%, var(--surface) 80%, transparent); }
.order-row img { width: 3rem; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; background: var(--surface); }
.order-row__main strong { display: block; color: var(--ink); font-weight: 500; }
.order-row__main small { color: var(--muted); }
.order-row .ui-icon { color: var(--muted); }
.order-status { display: inline-block; padding: 0.15rem 0.6rem; border-radius: var(--r-pill); font-size: 0.8125rem; background: var(--surface); color: var(--ink); white-space: nowrap; }
.order-status--delivered { background: #e7f2ec; color: var(--success); }
.order-status--cancelled, .order-status--returned { color: var(--muted); }
@media (max-width: 575.98px) {
  .order-row { grid-template-columns: 3rem minmax(0, 1fr) auto; }
  .order-row .order-status { grid-column: 2; justify-self: start; }
  .order-row .price { grid-column: 3; grid-row: 1; }
  .order-row > .ui-icon { display: none; }
}
.done-mark { display: inline-flex; align-items: center; justify-content: center; width: 4rem; height: 4rem; border-radius: 50%; background: var(--ink); color: #fff; margin-bottom: 1rem; }

/* ---------- App (PWA) install, in the mobile menu ---------- */
.app-install { display: flex; align-items: center; gap: 0.875rem; margin: 1.25rem 0 0; padding: 0.875rem 1rem; border: 1px solid var(--line); border-radius: var(--r-control); }
.app-install__mark { flex: none; width: 2.5rem; height: 2.5rem; border-radius: 0.625rem; background: var(--ink); color: #fff; display: grid; place-items: center; font: 400 1.375rem Georgia, serif; }
.app-install div { display: grid; gap: 0.125rem; flex: 1; font-size: 0.875rem; line-height: 1.35; }
.app-install div span { color: var(--muted); }
/* Opened as the app: room for the phone's status bar and home bar. */
@media (display-mode: standalone) {
  .topline { padding-top: env(safe-area-inset-top); }
  .site-footer { padding-bottom: env(safe-area-inset-bottom); }
}

/* ---------- Instagram posts on the home page ---------- */
.ig__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
@media (min-width: 992px) { .ig__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.75rem; } }
.ig__post { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--r-photo); background: var(--surface); }
.ig__post img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity var(--t) var(--ease), transform 0.6s var(--ease); }
.ig__post:hover img { opacity: 0.88; transform: scale(1.03); }
.ig__video { position: absolute; top: 0.5rem; right: 0.5rem; color: #fff; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5)); }
@media (prefers-reduced-motion: reduce) { .ig__post img { transition: none; } .ig__post:hover img { transform: none; } }
