/* ============================================================
   Moving Sale — hand-written CSS, no framework.

   Font strategy: system font stacks for now (no @font-face).
   At deploy time, add subsetted WOFF2 files for Fraunces and
   Inter using pyftsubset (Latin + Latin-Ext, target ≤ 80 KB
   total). Until then the browser falls back gracefully to the
   platform's native serif / sans-serif.
   ============================================================ */

/* ---- Design tokens ---------------------------------------- */
:root {
  --bg:           #FBF8F3;
  --text:         #1A1A17;
  --text-muted:   #5A5A55;
  --accent:       #3A6B4F;
  --accent-soft:  #E8EFE9;
  --sold:         #B91C1C;
  --reserved:     #D97706;
  --bundle:       #6D28D9;
  --bundle-soft:  #F5F0FB;
  --radius-card:  8px;
  --radius-btn:   6px;
  --shadow-card:  0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
  --shadow-hover: 0 2px 4px rgba(0,0,0,.06), 0 12px 32px rgba(0,0,0,.08);
}

/* ---- Base -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--text);
  /* Fraunces (variable, serif) loaded self-hosted at deploy time;
     falls back to Georgia / platform serif. */
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body { margin: 0; line-height: 1.5; }

/* ---- Accessibility: skip link ----------------------------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 999;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 var(--radius-btn) 0;
  transition: top .15s;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* ---- Focus-visible (global) ------------------------------- */
/* Applies to keyboard navigation only; mouse clicks don't trigger
   focus-visible so there's no distracting outline on click. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Remove default outline where we've deliberately styled :focus-visible */
:focus:not(:focus-visible) { outline: none; }

/* ---- Layout ----------------------------------------------- */
.container { max-width: 1100px; margin: 0 auto; padding: 16px; }

/* ---- Header ----------------------------------------------- */
.site-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.brand {
  font-family: "Fraunces", Georgia, ui-serif, serif;
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  letter-spacing: -.02em;
  white-space: nowrap;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  justify-content: center;
}
.site-header nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: .9375rem;
  padding: 8px 4px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  position: relative;
}
.site-header nav a:hover { color: var(--text); }
.site-header nav a.nav-active {
  color: var(--accent);
  font-weight: 600;
}
.site-header nav a.nav-active::after {
  content: "";
  position: absolute;
  bottom: 8px;
  left: 4px;
  right: 4px;
  height: 2px;
  background: var(--accent);
  border-radius: 99px;
}

/* Lang toggle — segmented control */
.lang-toggle {
  display: inline-flex;
  gap: 0;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 999px;
  padding: 2px;
  background: #fff;
}
.lang-toggle button {
  background: none;
  border: none;
  padding: 8px 14px;
  cursor: pointer;
  font-size: .8125rem;
  border-radius: 999px;
  min-height: 36px;
  min-width: 44px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color .15s, background .15s;
}
.lang-toggle button[aria-current="true"] {
  background: var(--accent);
  color: #fff;
}
.lang-toggle button:hover:not([aria-current="true"]) { color: var(--text); }

/* Mobile: stack header */
@media (max-width: 720px) {
  .site-header {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    padding: 12px 16px;
  }
  .brand { grid-column: 1; grid-row: 1; font-size: 20px; }
  .lang-toggle { grid-column: 2; grid-row: 1; }
  .site-header nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    gap: 4px 18px;
    margin-top: 4px;
    font-size: .9375rem;
  }
  /* Keep a real 44px tap target on mobile (was 6px padding / ~28px tall). */
  .site-header nav a { padding: 10px 0; font-size: .9375rem; min-height: 44px; }
}

/* ---- Footer ----------------------------------------------- */
.site-footer {
  padding: 32px 16px;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid rgba(0,0,0,.06);
  font-size: .875rem;
}

/* ---- Display headings (Fraunces) -------------------------- */
h1, h2, h3 {
  font-family: "Fraunces", Georgia, ui-serif, serif;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(1.6rem, 4vw, 2.25rem); }
h2 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h3 { font-size: 1.125rem; }

/* ---- Hero (home) ------------------------------------------ */
.hero {
  padding: 32px 0 16px;
  text-align: left;
  max-width: 640px;
}
.hero h1 { margin-bottom: 8px; }
.hero p {
  font-size: 1.0625rem;
  color: var(--text-muted);
  margin: 0 0 20px;
  line-height: 1.55;
}
@media (max-width: 640px) {
  .hero { padding: 20px 0 12px; }
  .hero p { font-size: 1rem; }
}

/* ---- Items filter bar ------------------------------------- */
/* Desktop: inline-flex row. Mobile: stack into a tidy column with
   full-width selects and checkbox rows large enough to thumb-tap. */
.items-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  margin-bottom: 16px;
}
.items-filters .filter-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .9375rem;
  color: var(--text);
}
.items-filters .filter-field input,
.items-filters .filter-field select,
.alerts-subscription .filter-field input,
.alerts-subscription .filter-field select {
  font-family: inherit;
  font-size: 16px;             /* >= 16px prevents iOS focus zoom */
  padding: 8px 12px;
  border: 1.5px solid #d9d5ce;
  border-radius: var(--radius-btn);
  background: #fff;
  color: var(--text);
  min-height: 44px;
  transition: border-color .15s, box-shadow .15s;
}

.items-filters .filter-field select,
.alerts-subscription .filter-field select {
  padding-right: 32px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' stroke='%235A5A55' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.items-filters .filter-field input:focus,
.items-filters .filter-field select:focus,
.alerts-subscription .filter-field input:focus,
.alerts-subscription .filter-field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(58, 107, 79, .15);
  outline: none;
}
.items-filters .filter-field input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}
.items-filters .filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 4px;
  cursor: pointer;
  font-size: .9375rem;
  color: var(--text);
  user-select: none;
}

@media (max-width: 640px) {
  .items-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .items-filters .filter-field {
    display: flex;
    justify-content: space-between;
    gap: 12px;
  }
  .items-filters .filter-field select {
    flex: 1 1 auto;
    min-width: 0;
  }
  .items-filters .filter-toggle {
    justify-content: flex-start;
    padding: 4px 0;
  }
}

/* ---- Items grid ------------------------------------------- */
/* 2 cols (mobile) → 3 cols (≥ 768px) → 4 cols (≥ 1280px)    */
.items-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 24px;
}

@media (min-width: 768px) {
  .items-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

@media (min-width: 1280px) {
  .items-grid { grid-template-columns: repeat(4, 1fr); gap: 24px; }
}

/* ---- Item card -------------------------------------------- */
.card {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(0,0,0,.07);
  box-shadow: var(--shadow-card);
  transition: box-shadow .2s ease, transform .2s ease;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

/* Photo wrapper enforces 4:5 aspect ratio */
.card-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #f0ede8;  /* warm grey placeholder */
}

.card-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: opacity .2s, transform .35s ease;
}
.card:hover .card-photo img {
  transform: scale(1.03);
}

.card-body { padding: 14px 14px 16px; }
.card-title {
  font-size: .9375rem;
  font-weight: 600;
  margin: 0 0 4px;
  line-height: 1.3;
  color: var(--text);
  /* Clamp to two lines so cards stay aligned vertically */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-price {
  font-size: 1.0625rem;
  color: var(--accent);
  font-weight: 700;
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.card-price-was {
  margin-left: 6px;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--text-muted);
}
.card-price-was s { color: inherit; }
.card-body .badge { margin-top: 8px; }

/* Muted meta (date, etc.) */
.card-meta {
  font-size: .8125rem;
  color: var(--text-muted);
  margin: 4px 0 0;
}

/* Status modifier — sold */
.card--sold .card-photo img { opacity: 0.5; }
.card--sold { opacity: 0.85; }

/* Status modifier — reserved */
.card--reserved .card-photo img { opacity: 0.8; }

/* ---- Status overlay: SOLD stamp --------------------------- */
.stamp--sold {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  /* Semi-opaque red background */
  background: rgba(185, 28, 28, 0.88);
  color: #fff;
  /* Dashed double-border visual trick using box-shadow + outline */
  outline: 2px dashed rgba(255,255,255,.7);
  outline-offset: 4px;
  font-family: "Fraunces", Georgia, ui-serif, serif;
  font-weight: 900;
  font-size: clamp(1.2rem, 4vw, 1.75rem);
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 6px 18px;
  border-radius: 4px;
  pointer-events: none;
  user-select: none;
  z-index: 2;
  white-space: nowrap;
}

/* ---- Status overlay: RESERVED ribbon ---------------------- */
/* Classic top-left corner ribbon */
.card-photo-wrap {
  position: relative;
  overflow: hidden;
}

.ribbon--reserved {
  position: absolute;
  top: 14px;
  left: -28px;
  width: 110px;
  background: var(--reserved);
  color: #fff;
  font-weight: 700;
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: center;
  padding: 5px 0;
  transform: rotate(-45deg);
  transform-origin: center center;
  pointer-events: none;
  user-select: none;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

/* ---- Badge / status pill ---------------------------------- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.badge--available { background: var(--accent-soft); color: var(--accent); }
.badge--reserved  { background: #FEF3C7; color: #92400E; }
.badge--sold      { background: #FEE2E2; color: var(--sold); }

/* ---- Item detail ------------------------------------------ */
.item-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  margin-top: 24px;
}

@media (max-width: 640px) {
  .item-detail { grid-template-columns: 1fr; gap: 24px; }
}

.item-detail img {
  width: 100%;
  border-radius: var(--radius-card);
  object-fit: cover;
}

.item-title {
  font-family: "Fraunces", Georgia, ui-serif, serif;
  font-size: clamp(1.6rem, 5vw, 2.25rem);
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.15;
}
.item-price {
  font-size: 1.5rem;
  color: var(--accent);
  font-weight: 700;
  margin: 0 0 12px;
}
.item-description {
  color: var(--text-muted);
  line-height: 1.7;
  white-space: pre-line;  /* preserve paragraphs */
  max-width: 62ch;
}

/* Full-width header banner above the two columns (title/author/price/tags) */
.item-detail-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}
.item-detail-header-title { flex: 1 1 320px; min-width: 0; }
.item-detail-header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}
.item-detail-header .item-title { margin: 0; }
.item-detail-header .item-price { margin: 0; }
.item-detail-header .item-tags { flex-basis: 100%; margin-top: 4px; }
.item-author { margin: 4px 0 0; color: var(--text-muted); font-style: italic; }

/* Right column wrapper: the raised purchase/ask action hierarchy */
.item-info { min-width: 0; }

/* ---- CTA row (Ask / Reserve / Buy on item detail) --------- */
.cta-row {
  display: flex;
  gap: 8px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.cta-row .btn { flex: 1 1 auto; min-width: 0; }

@media (max-width: 640px) {
  /* Buttons stack into equal-width rows; on very narrow widths each goes
     full-width rather than wrapping mid-label. */
  .cta-row { gap: 10px; }
  .cta-row .btn { flex: 1 1 100%; }
}

/* ---- Sticky CTA on mobile (item-detail reserve button) ---- */
.detail-cta {
  /* Default: inline flow on desktop */
}

@media (max-width: 640px) {
  .detail-cta {
    position: sticky;
    bottom: 0;
    z-index: 10;
    padding: 12px 16px;
    background: var(--bg);
    border-top: 1px solid rgba(0,0,0,.08);
    margin: 0 -16px;  /* bleed to container edges */
    display: flex;
    justify-content: stretch;
  }
  .detail-cta .btn {
    flex: 1;
    text-align: center;
    justify-content: center;
  }
}

/* ---- Item-detail thumbnail strip -------------------------- */
/* Horizontal-scroll on mobile so larger thumbs don't push the page wide;
   wraps to a flex row on tablet+ where there's room. */
.thumb-strip {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.thumb {
  display: inline-block;
  vertical-align: top;
  margin: 0;
  width: 88px;
}
.thumb-img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  cursor: zoom-in;
}
@media (max-width: 640px) {
  .thumb-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
  }
  .thumb { flex: 0 0 auto; scroll-snap-align: start; }
}

/* ---- Slot picker ------------------------------------------ */
.slot-picker { margin-top: 24px; }
.slot-picker h3 { margin-bottom: 12px; }
.slot-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}
.slot-list li { display: flex; }
.slot-list input[type=radio] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.slot-list label {
  display: block;
  padding: 9px 16px;
  border: 2px solid var(--accent-soft);
  border-radius: var(--radius-btn);
  cursor: pointer;
  font-size: .9rem;
  transition: border-color .15s, background .15s;
  min-height: 44px;          /* tap-target */
  display: flex;
  align-items: center;
}
.slot-list label:hover { border-color: var(--accent); }
.slot-list input[type=radio]:checked + label {
  border-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}
.slot-list input[type=radio]:focus-visible + label {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---- Sub-slot picker (button grid, no JS) ----------------- */
.slot-picker-label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
}

/* Day strip — horizontal scrollable list of date chips above the time grid */
.day-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 4px 2px 12px;
  margin-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}
.day-chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 8px 12px;
  border: 1.5px solid #d9d5ce;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: center;
  user-select: none;
  transition: border-color .12s, background .12s, color .12s;
}
.day-chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.day-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.day-chip.is-selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.day-chip-date { font-weight: 600; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.day-chip-count {
  font-size: 0.75rem;
  opacity: 0.85;
  margin-top: 2px;
}
.day-chip.is-selected .day-chip-count { opacity: 1; }

/* Panels: by default (no JS) everyone shows. When JS adds .js-on to the
   picker root, only .is-active is shown. */
.day-panel { margin-bottom: 18px; }
.js-on .day-panel { display: none; }
.js-on .day-panel.is-active { display: block; }

.subslot-day {
  border: none;
  padding: 0;
  margin: 0 0 18px;
}
.subslot-day legend {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 6px;
  color: var(--text);
  padding: 0;
}
.subslot-window-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 4px 0;
}
.subslot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.subslot-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
  white-space: nowrap;
}
.subslot-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1.5px solid #d9d5ce;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  user-select: none;
  transition: border-color .12s, background .12s, color .12s;
}
.subslot-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.subslot-radio:focus-visible + .subslot-btn {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.subslot-radio:checked + .subslot-btn {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.subslot-radio:disabled + .subslot-btn {
  background: #f5f0e6;
  color: #b8b3a8;
  border-color: #ece8de;
  cursor: not-allowed;
  text-decoration: line-through;
}
.subslot-radio:disabled + .subslot-btn:hover {
  background: #f5f0e6;
  border-color: #ece8de;
}

/* ---- Forms ------------------------------------------------ */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: .9rem;
  color: var(--text);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #d9d5ce;
  border-radius: var(--radius-btn);
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  min-height: 44px;          /* tap-target */
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(58, 107, 79, .15);
  outline: none;
}
.form-group textarea { min-height: 110px; resize: vertical; }

/* Inline field error */
.field-error {
  color: var(--sold);
  font-size: .85rem;
  margin: 4px 0 0;
}

/* ---- Buttons ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 28px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-btn);
  font-size: 1rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  min-height: 44px;          /* tap-target */
  transition: opacity .15s, transform .1s;
  letter-spacing: .01em;
}
.btn:hover { opacity: 0.88; }
.btn:active { transform: scale(.98); }

.btn--secondary {
  background: var(--accent-soft);
  color: var(--accent);
}
.btn--danger {
  background: #FEE2E2;
  color: var(--sold);
}
/* Active CTA — signals "this is the section currently open below".
   All three buttons default to solid accent (dark green); the active
   one inverts to the soft variant (light green with accent text) and
   keeps a 2px accent ring so the lighter button still reads as the
   selected one. */
.btn--active {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent);
}
.btn--active:hover { opacity: 1; background: var(--accent-soft); }

/* ---- Alerts / error banners ------------------------------- */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-btn);
  margin-bottom: 20px;
  font-size: .9375rem;
  border-left: 4px solid transparent;
}
.alert--success {
  background: var(--accent-soft);
  color: #1a4030;
  border-left-color: var(--accent);
}
.alert--error {
  background: #FEE2E2;
  color: #7f1d1d;
  border-left-color: var(--sold);
}
.alert--warning {
  background: #FEF3C7;
  color: #78350f;
  border-left-color: var(--reserved);
}

/* ---- Pickup page ------------------------------------------ */
.pickup-section { max-width: 720px; margin: 32px 0; }
.pickup-section h2 { margin-bottom: 8px; }
.pickup-home-only {
  max-width: 720px;
  margin: 16px 0 24px;
  padding: 10px 14px;
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}
.copy-btn {
  margin-left: 8px;
  padding: 10px 16px;
  font-size: .9rem;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-btn);
  cursor: pointer;
  font-family: inherit;
  min-height: 44px;
  font-weight: 500;
  transition: background .15s;
}
.copy-btn:hover { background: #d0e4d6; }
@media (max-width: 640px) {
  /* Pickup address + copy stack: full-width copy below the address, easier
     to thumb-tap than a tiny inline button. */
  .copy-btn { display: block; margin: 8px 0 0; width: 100%; }
}
.pickup-maps { max-width: 720px; }
.pickup-maps-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 600px) {
  .pickup-maps-grid { grid-template-columns: 1fr 1fr; }
}
.pickup-maps-grid img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  border: 1px solid #e5e0d4;
}
.pickup-maps-link { text-align: center; margin-top: 12px; }

/* ---- Pickup transport providers ----------------------- */
.pickup-transport { margin-top: 24px; }
.transport-group  { margin-top: 16px; }
.transport-group h3 { margin-bottom: 4px; }
.transport-cards  { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; }
.transport-card {
  flex: 1 1 240px;
  padding: 12px;
  border: 1px solid var(--border-color, #d9d5ce);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  background: #fff;
}
.transport-card:hover { border-color: var(--accent); }
.transport-card h4 { margin: 8px 0 4px; font-size: 1rem; }
.transport-card p  { margin: 0; font-size: .9rem; color: var(--text-muted, #666); }
/* Logo plate: all providers sit on the same neutral surface so brand
   backgrounds (e.g. Lalamove's orange gradient) don't visually
   dominate the card row. Each logo is centred within a fixed-height
   tile and clipped to a rounded rectangle. */
.transport-logo {
  box-sizing: border-box;
  height: 56px;
  width: 100%;
  max-width: 200px;
  padding: 6px 10px;
  object-fit: contain;
  display: block;
  margin-bottom: 10px;
  background: #f5efde;
  border-radius: 6px;
}
.transport-badge {
  display: inline-block;
  padding: 6px 12px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 4px;
  font-weight: 600;
  margin-bottom: 8px;
}
.transport-disclaimer {
  border-left: 3px solid var(--border-color, #d9d5ce);
  padding-left: 12px;
  color: var(--text-muted, #666);
  font-size: .85rem;
  font-style: italic;
  margin-top: 16px;
}

/* ---- Reservation status page ------------------------------ */
.reservation-card {
  max-width: 560px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: var(--radius-card);
  padding: 28px 32px;
  box-shadow: var(--shadow-card);
  margin: 32px 0;
}

.btn--retract {
  background: #fff;
  border: 1px solid #c00;
  color: #c00;
}
.btn--retract:hover { background: #FEE2E2; opacity: 1; }
@media (max-width: 640px) {
  /* Make the retract action a confident full-width button on phones —
     easier to find at the bottom of a status screen than a small chip. */
  .btn--retract { width: 100%; }
}

/* ---- Disclosure (optional fields on reserve form) --------- */
.reserve-optional {
  margin: 0 0 20px;
  border-top: 1px solid rgba(0,0,0,.08);
  padding-top: 12px;
}
.reserve-optional > summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: .9rem;
  padding: 12px 0;
  list-style: none;
  font-weight: 500;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.reserve-optional > summary::before {
  content: "+ ";
  color: var(--accent);
  font-weight: 700;
}
.reserve-optional[open] > summary::before { content: "− "; }
.reserve-optional > summary:hover { color: var(--text); }

/* Slot-proposal toggle on the reserve form — same tap-target treatment as
   the optional-fields summary so it's reachable on mobile. */
.propose-slot > summary {
  cursor: pointer;
  color: var(--text-muted);
  padding: 12px 0;
  min-height: 44px;
  display: flex;
  align-items: center;
}

/* ---- Lightbox ---------------------------------------------- */
.zoomable { cursor: zoom-in; }
.lightbox-dialog {
  border: none;
  padding: 0;
  background: transparent;
  max-width: 100vw;
  max-height: 100vh;
  margin: auto;
}
.lightbox-dialog::backdrop {
  background: rgba(0,0,0,.85);
  backdrop-filter: blur(4px);
}
.lightbox-dialog img {
  display: block;
  max-width: 95vw;
  max-height: 92vh;
  border-radius: 8px;
  box-shadow: 0 12px 48px rgba(0,0,0,.5);
}
.lightbox-figure {
  margin: 0;
  position: relative;
  display: inline-block;
}
.lightbox-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 18px;
  background: linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,0));
  color: #fff;
  font-size: .95rem;
  line-height: 1.4;
  font-style: italic;
  border-radius: 0 0 8px 8px;
  text-shadow: 0 1px 2px rgba(0,0,0,.4);
  pointer-events: none;
}
.lightbox-close {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.lightbox-close:hover { background: #fff; }

/* ---- Slot select (grouped <select>) ----------------------- */
.slot-select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #d9d5ce;
  border-radius: var(--radius-btn);
  background: #fff;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  min-height: 48px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' stroke='%235A5A55' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.slot-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(58,107,79,.15);
  outline: none;
}
.slot-select optgroup {
  font-style: normal;
  font-weight: 700;
  color: var(--accent);
}
.slot-select option { font-weight: 400; color: var(--text); padding: 6px; }

/* ---- Favorite heart button on cards ----------------------- */
.fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.9);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
  transition: background .15s, transform .15s;
  z-index: 3;
}
.fav-btn:hover { background: #fff; transform: scale(1.06); }
.fav-btn .fav-heart { color: var(--text-muted); transition: color .15s, fill .15s; }
.fav-btn--on { background: #fff; }
.fav-btn--on .fav-heart { color: var(--sold); fill: var(--sold); }

.fav-btn--overlay:hover { transform: scale(1.1); background: #fff !important; }

.card { position: relative; }

/* ---- Bundles ---------------------------------------------- */
.badge--bundle, .pill--bundle { background: #ede9fe; color: var(--bundle); }
/* Distinctive treatment for bundle cards: subtle purple tint + visible
   purple border + a prominent "🎁 BUNDLE" badge in the top-left corner.
   The tint is kept light so it doesn't fight the photo; the border +
   badge carry the affordance. Pattern mirrors --sold / --reserved. */
.card--bundle {
  background: var(--bundle-soft);
  border: 2px solid var(--bundle);
}
.card--bundle::before {
  content: "🎁 BUNDLE";
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--bundle);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 5px 10px;
  border-radius: 999px;
  z-index: 2;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0,0,0,.18);
}
.bundle-children {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.bundle-child {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid rgba(0,0,0,.07);
  border-radius: 8px;
  overflow: hidden;
  transition: transform .15s;
}
.bundle-child:hover { transform: translateY(-2px); }
.bundle-child-photo img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
.bundle-child-meta { padding: 8px 10px 10px; }
.bundle-child-title {
  margin: 0 0 2px;
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bundle-child-price { margin: 0; font-size: .85rem; color: var(--accent); font-weight: 700; }

/* ---- Multi-step Buy Flow ---------------------------------- */
#buy-step-2[hidden] {
  display: none;
}
.btn--paid {
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
  box-shadow: inset 0 0 0 2px var(--accent) !important;
  pointer-events: none;
}
.btn--paid::before {
  content: "✓ ";
  font-weight: 700;
}

/* ---- Photo Navigation ------------------------------------- */
.photo-viewer {
  position: relative;
  width: 100%;
}
.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.7);
  color: var(--text);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: background .2s, opacity .2s;
  opacity: 0;
}
.photo-viewer:hover .nav-arrow { opacity: 1; }
.nav-arrow:hover { background: #fff; }
.nav-prev { left: 10px; }
.nav-next { right: 10px; }

/* Lightbox arrows */
.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  text-shadow: 0 2px 10px rgba(0,0,0,.5);
  transition: transform .15s;
}
.lightbox-nav:hover { transform: translateY(-50%) scale(1.1); }
.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }

@media (max-width: 640px) {
  .nav-arrow { opacity: 0.8; width: 36px; height: 36px; font-size: 20px; }
  .lightbox-nav { width: 44px; height: 44px; font-size: 32px; }
}

/* ---- Design audit fixes ----------------------------------- */

/* Better text contrast for muted text */
:root {
  --text-muted: #4B4B44; /* Darker than #5A5A55 for better WCAG contrast */
  --bg-card:    #ffffff;
  --border-color: rgba(0,0,0,.08);
}

/* Fix contrast for reserved badge */
.badge--reserved {
  background: #FFFBEB;
  color: #92400E;
  border: 1px solid #FEF3C7;
}

/* Ensure detail-cta doesn't overlap content on mobile when sticky */
@media (max-width: 640px) {
  body { padding-bottom: 80px; } /* Room for sticky CTA */
}

/* Refine item cards in grid */
.card-title {
  min-height: 2.6em; /* Ensure consistent height for alignment */
}

/* Checkout page polish */
.checkout-page {
  animation: fadeIn .3s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.items-grid {
  gap: 16px; /* Slightly tighter gap for a more cohesive look */
}

/* Admin Grid view polish */
.admin-item-card {
  transition: box-shadow .2s, transform .2s;
}
.admin-item-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  transform: translateY(-3px);
}
.admin-item-card .btn-link.b-neutral {
  background: #fff !important;
  color: var(--text) !important;
  border: 1.5px solid var(--border-color) !important;
}
.admin-item-card .btn-link.b-neutral:hover {
  background: var(--accent-soft) !important;
  border-color: var(--accent) !important;
}

/* Focus states for better accessibility */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Form field improvements */
.form-group input, .form-group textarea {
  border: 1.5px solid #d9d5ce;
  transition: border-color .15s, box-shadow .15s;
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
