/* No Comparison: one light, strictly black-and-white theme shared by the
   comparison tab and settings. Photos carry the only colour. */
:root {
  color-scheme: light;
  --bg: #fff;
  --card: #fff;
  --text: #000;
  --muted: #000;
  --border: #000;
  --accent: #000;
  --accent-text: #fff;
  --danger: #000;
  --serif: Georgia, "Times New Roman", serif;
  font-family: Arial, Helvetica, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); }
button { font: inherit; }
:focus-visible { outline: 2px solid #000; outline-offset: 3px; }

/* ---- Site header: wordmark + navigation ---- */
.site-head {
  height: 76px; padding: 0 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  border-bottom: 1px solid #000; background: #fff;
}
.site-logo { display: block; width: 236px; height: auto; }
.site-head nav { display: flex; align-items: center; gap: 28px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.site-head nav .active { box-shadow: inset 0 -2px #000; }
.header-button {
  border: 0; background: none; padding: 29px 0; color: #000; cursor: pointer;
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
}
.header-button:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---- Page heading ---- */
main { max-width: 1440px; margin: 0 auto; padding: 44px 40px 72px; }
.heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 30px; }
.eyebrow { margin: 0 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .17em; text-transform: uppercase; }
h1 { margin: 0; font: 400 42px/1.1 var(--serif); letter-spacing: -.04em; }
#summary { margin: 10px 0 0; font-size: 14px; }

/* ---- Buttons ---- */
.tryon-button {
  border: 1px solid #000; border-radius: 2px; padding: 10px 16px; background: #000; color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: .04em; line-height: 1.2; cursor: pointer; white-space: nowrap;
}
.tryon-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.tryon-button:disabled { cursor: not-allowed; text-decoration: none; background: #fff; color: #000; border-style: dashed; }
.tryon-link { border: 0; background: none; padding: 6px 2px; color: #000; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.time-hint { font-size: 11px; white-space: nowrap; letter-spacing: .02em; }
.time-hint::before { content: "◷ "; }

/* ---- Comparison grid ---- */
.products {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 36px 56px; /* column gap leaves room for the gallery chevrons */
  grid-template-columns: repeat(auto-fill, minmax(min(var(--card-min, 260px), 100%), 1fr));
  align-items: start;
}
.products > li { display: grid; gap: 10px; }
.card {
  display: flex; flex-direction: column; width: 100%; padding: 0; border: 0; border-radius: 0;
  background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.stage { position: relative; }
.card:focus-visible { outline: 2px solid #000; outline-offset: 4px; }
.figure { position: relative; }
.card img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; background: #fff; }
.card:hover .product-image, .card:hover .tryon-image { outline: 1px solid #000; outline-offset: -1px; }
.badge {
  display: none; position: absolute; top: 12px; left: 12px; padding: 6px 9px;
  background: #000; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.figure.showing-tryon .badge { display: block; }
.image-fallback {
  display: grid; place-items: center; width: 100%; aspect-ratio: 2 / 3; padding: 16px;
  border: 1px dashed #000; font-size: 13px; text-align: center;
}
.meta { padding: 14px 0 0; margin-top: 12px; border-top: 1px solid #000; display: grid; gap: 4px; }
.brand { font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.name { font: 400 20px/1.25 var(--serif); letter-spacing: -.02em; }
.details, .site, .tabs { font-size: 12px; }
.price { font-size: 14px; }
.tabs { font-style: italic; }
.tryon { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 40px; }
.tryon-status { font-size: 12px; display: inline-flex; align-items: center; gap: 8px; }
.tryon-status::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  border: 1.5px solid #000; border-top-color: transparent; animation: spin .8s linear infinite;
}
.tryon-error { flex-basis: 100%; font-size: 12px; padding: 6px 8px; border: 1px solid #000; }
.segmented { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid #000; background: #fff; }
.segment { border: 0; padding: 8px 12px; background: transparent; color: #000; font-size: 11px; cursor: pointer; white-space: nowrap; }
.segment[aria-pressed="true"] { background: #000; color: #fff; }
.empty { font-size: 14px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Remove from Compare (X), tags and the last-activity pill ---- */
.remove-card {
  position: absolute; top: 8px; right: 8px; z-index: 2; width: 34px; height: 34px; padding: 0; display: grid; place-items: center;
  border: 1px solid #000; border-radius: 50%; background: #fff; color: #000; cursor: pointer;
}
.remove-card svg, .toast-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.remove-card:hover { background: #000; color: #fff; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.tags { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.tag {
  padding: 3px 7px; border: 1px solid #000; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
}
.tag-tried { background: #000; color: #fff; }
.tags .tag-failed { background: #fff !important; color: #000; border: 1.5px dashed #000; }
/* a failed try-on (history.js failureOf): the reason in a box, Retry under it */
.history-failure { display: grid; gap: 8px; flex-basis: 100%; justify-items: start; }
.history-failure .tryon-error { margin: 0; }
.pill { margin-left: auto; padding: 4px 10px; border: 1px solid #000; border-radius: 999px; font-size: 11px; white-space: nowrap; }
.in-compare { font-size: 12px; font-weight: 700; letter-spacing: .04em; }

/* ---- One-time note after removing a card ---- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 10; width: min(560px, calc(100% - 32px));
  display: flex; align-items: center; gap: 16px; padding: 14px 16px; background: #fff; color: #000; border: 1px solid #000;
  box-shadow: 4px 4px 0 #000;
}
.toast p { margin: 0; flex: 1; font-size: 13px; line-height: 1.4; }
.toast-actions { display: flex; align-items: center; gap: 8px; }
.toast-close { width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border: 0; background: none; color: #000; cursor: pointer; }

/* ---- Gallery: chevrons beside the photo, bubbles under it ---- */
.figure { overflow: hidden; touch-action: pan-y; }
.figure.slide-next > img:not([hidden]), .figure.slide-next > .image-fallback:not([hidden]) { animation: slide-from-right .28s ease-out; }
.figure.slide-prev > img:not([hidden]), .figure.slide-prev > .image-fallback:not([hidden]) { animation: slide-from-left .28s ease-out; }
@keyframes slide-from-right { from { transform: translateX(14%); opacity: .25; } to { transform: none; opacity: 1; } }
@keyframes slide-from-left { from { transform: translateX(-14%); opacity: .25; } to { transform: none; opacity: 1; } }
/* overlay sized to the 2:3 image, outside the card button (buttons can't nest) */
.nav { position: absolute; top: 0; left: 0; width: 100%; aspect-ratio: 2 / 3; pointer-events: none; }
.nav button { pointer-events: auto; cursor: pointer; border: 0; padding: 0; display: grid; place-items: center; }
.nav svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.nav-chevron {
  position: absolute; top: 50%; width: 42px; height: 42px; margin-top: -21px; border-radius: 50%;
  background: #fff; color: #000; border: 1px solid #000 !important; transition: transform .15s ease;
}
.nav-chevron svg { width: 20px; height: 20px; stroke-width: 2; }
.nav-chevron.prev { left: -18px; }
.nav-chevron.next { right: -18px; }
.nav-chevron:hover { transform: scale(1.08); }
/* the bubble row sits in a strip just under the photo (never over the feet) */
.has-gallery .meta { margin-top: 40px; }
.dots-row {
  position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%);
  display: flex; align-items: center; gap: 2px; pointer-events: auto;
}
.dots-window { position: relative; height: 18px; overflow: hidden; }
.dots-track { position: relative; height: 18px; transition: transform .3s cubic-bezier(.3, .7, .2, 1); }
.dots-track .dot, .dot-indicator { position: absolute; top: 5px; width: 8px; height: 8px; margin-left: 5px; border-radius: 50%; }
.dots-track .dot { background: #fff !important; border: 1px solid #000 !important; transition: transform .2s ease; }
.dots-track .dot.has-tryon { border-width: 2.5px !important; }
.dots-track .dot.edge { transform: scale(.65); }
.dots-track .dot:hover { transform: scale(1.25); }
.dot-indicator { left: 0; background: #000; pointer-events: none; z-index: 1; transition: transform .3s cubic-bezier(.3, .7, .2, 1); }
/* small chevrons: shift the bubble row when there are more than 5 photos */
.dots-shift { width: 22px; height: 22px; border-radius: 50%; background: transparent; color: #000; }
.dots-shift svg { width: 14px; height: 14px; stroke-width: 2.6; }
.dots-shift:hover:not(:disabled) { outline: 1px solid #000; }
.dots-shift:disabled { opacity: .3; cursor: default; }

/* Phone / narrow window: one column of full-width cards, bigger tap targets. */
@media (max-width: 600px) {
  .site-head { height: auto; padding: 14px 16px; flex-wrap: wrap; }
  .site-logo { width: 190px; }
  .site-head nav { gap: 6px 18px; flex-wrap: wrap; }
  .header-button { padding: 10px 0; }
  .remove-card { width: 40px; height: 40px; }
  .toast { flex-direction: column; align-items: stretch; bottom: 16px; }
  .toast-actions { justify-content: space-between; }
  .toast-close { width: 40px; height: 40px; }
  main { padding: 24px 16px 40px; }
  h1 { font-size: 34px; }
  .products { grid-template-columns: 1fr; gap: 32px; max-width: 480px; margin: 0 auto; }
  .nav-chevron.prev { left: -10px; } .nav-chevron.next { right: -10px; }
  .name { font-size: 18px; }
  .tryon-button { padding: 12px 18px; font-size: 13px; }
  .segment { padding: 10px 16px; font-size: 13px; }
  .tryon-link { padding: 8px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .figure.slide-next > *, .figure.slide-prev > * { animation: none !important; }
  .dots-track, .dot-indicator, .nav-chevron { transition: none !important; }
  .tryon-status::before { animation: none; }
}

/* ---- daily quotas (cache.js pastQuota): past the quota, Try on is disabled and says so */
.quota-line { margin: 4px 0 0; font-size: 12px; }
.quota-line.over { font-weight: 700; }
.quota-hint { font-size: 11px; font-weight: 700; white-space: nowrap; letter-spacing: .02em; }
.quota-hint::before { content: "⊘ "; }
.tryon-link:disabled { cursor: not-allowed; text-decoration: none; opacity: .5; }
/* Account tab */
.account-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 8px 0 24px; font-size: 14px; }
.account-facts dt { font-weight: 700; }
.account-facts dd { margin: 0; overflow-wrap: anywhere; }
.quota-heading { font: 400 20px/1.2 Georgia, serif; margin: 0 0 4px; }
.quota-note { margin: 0 0 12px; font-size: 13px; }
.quota-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; max-width: 520px; }
.quota-item { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 12px; border: 1px solid #000; }
.quota-item.over { border-width: 2px; }
.quota-name { font-weight: 700; }
.quota-count { font-size: 13px; text-align: right; }
.quota-bar { grid-column: 1 / -1; height: 6px; border: 1px solid #000; }
.quota-bar span { display: block; height: 100%; background: #000; }
/* Settings → Learn your look */
.training { margin-top: 16px; padding: 12px; border: 1px solid #000; }
.training h3 { margin: 0 0 4px; font-size: 14px; }
.training-note { margin: 0 0 8px; font-size: 12px; }
.training-missing { margin: 0 0 8px; padding-left: 18px; font-size: 12px; }
.training-missing:empty { display: none; }
.training-actions .time-hint:empty { display: none; }
.training-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
@media (max-width: 560px) { .quota-item { grid-template-columns: 1fr; } .quota-count { text-align: left; } }

/* ---- setup bar (setup-ui.js): top of every tab while setup isn't done ---- */
.setup-bar { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 22px; padding: 10px 14px 14px; border: 1px solid #000; background: #fff; }
.setup-bar[hidden] { display: none; }
.setup-bar p { margin: 0; flex: 1 1 240px; font-size: 13px; line-height: 1.4; min-width: 0; overflow-wrap: anywhere; }
.setup-bar.action { border-width: 2px; }
.setup-bar.action p { font-weight: 700; }
.setup-bar a { color: #000; font-size: 13px; font-weight: 700; text-underline-offset: 3px; }
.setup-bar-track { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: #fff; border-top: 1px solid #000; }
.setup-bar-track span { display: block; height: 100%; width: 0; background: #000; transition: width .4s ease; }
.tryon-queued { font-weight: 700; }
