/* ===========================================================
   Downsize My Life — public storefront
   The friendly sibling of The Curated Downsize. Same catalog,
   same prices, a different feeling: a well-run neighborhood
   sale instead of an auction house.

   One memorable thing: round garage-sale price stickers.
   Everything around them stays plain and roomy so they can
   do the talking. Sentence case everywhere, no tracked caps.

   The admin keeps using style.css; nothing here touches it.
=========================================================== */
:root {
  --paper:      #FFFFFF;
  --ink:        #23313B;   /* slate, not black: softer, still high contrast */
  --ink-soft:   #5A6972;
  --line:       #E1E7EA;
  --photo-bg:   #F1F4F3;

  --orange:     #F89D1F;   /* straight from dml-icon-orange.svg */
  --orange-ink: #8A4B00;   /* orange that passes as text on white */
  --orange-wash:#FFF3E0;

  /* the rest of the dot-sticker sheet */
  --pink:       #F79BB8;
  --green:      #A6D8A4;
  --blue:       #A3CFEC;
  --yellow:     #FFD65E;

  --sage-wash:  #EEF5EB;
  --sky-wash:   #EAF3F9;
  --green-ink:  #2F6B38;

  --font-display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --font-body:    'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --wrap: 1180px;
  --gutter: clamp(18px, 4vw, 32px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); font-optical-sizing: auto; margin: 0; }

:focus-visible {
  outline: 3px solid var(--orange-ink);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Header / footer ---------- */
.site-head { padding: 18px var(--gutter); }
.site-head-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.brand-icon { width: 42px; height: 42px; flex-shrink: 0; }
.social-icons { display: flex; gap: 6px; }
.social-icons a {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  color: var(--ink-soft);
}
.social-icons a:hover { background: var(--orange-wash); color: var(--ink); }
.social-icons svg { width: 20px; height: 20px; fill: currentColor; }

.site-main {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 12px var(--gutter) 72px;
}

.site-foot {
  background: var(--sage-wash);
  padding: 36px var(--gutter);
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.site-foot-inner {
  max-width: 60ch;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}
.site-foot p { margin: 0; }
.foot-icon { width: 30px; height: 30px; flex-shrink: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.btn:hover { background: #33444F; border-color: #33444F; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-big { width: 100%; padding: 16px 24px; font-size: 1.05rem; background: var(--orange); border-color: var(--orange); color: var(--ink); }
.btn-big:hover { background: #FFB04A; border-color: #FFB04A; }

/* ---------- The sticker ---------- */
.sticker {
  --size: 60px;
  --bg: var(--orange);
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  min-width: var(--size);
  height: var(--size);
  padding: 0 10px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
  transform: rotate(-9deg);
  /* the little sheen and lift of a real dot sticker */
  box-shadow:
    inset 0 0 0 3px rgba(255, 255, 255, 0.28),
    0 1px 2px rgba(35, 49, 59, 0.22);
  transition: transform 200ms ease;
}
.sticker-long { font-size: 0.92rem; }
.sticker-hot  { --bg: var(--pink); }
.sticker-sold { --bg: var(--ink); color: #fff; }

.sticker-lg {
  --size: 84px;
  position: relative;
  top: auto; right: auto;
  font-size: 1.4rem;
  padding: 0 14px;
  flex-shrink: 0;
}
.sticker-lg.sticker-long { font-size: 1.2rem; }

.item-card:hover .sticker { transform: rotate(-2deg) scale(1.04); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 40px;
  align-items: end;
  padding: 36px 0 34px;
}
.hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  max-width: 13ch;
}
.hero-copy p {
  margin: 20px 0 0;
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 48ch;
}
.hero-deal-lead {
  margin: 0 0 16px;
  font-weight: 600;
  max-width: 30ch;
}
.tier-stickers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tier {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  line-height: 1.1;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.3), 0 1px 2px rgba(35, 49, 59, 0.2);
}
.tier strong { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; }
.tier span { font-size: 0.78rem; font-weight: 500; }
.tier-0 { background: var(--yellow); transform: rotate(-7deg); }
.tier-1 { background: var(--green);  transform: rotate(5deg) translateY(6px); }
.tier-2 { background: var(--blue);   transform: rotate(-4deg); }
.tier-3 { background: var(--orange); transform: rotate(8deg) translateY(4px); }

/* ---------- How it works (a real sequence, so it's numbered) ---------- */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0 0 44px;
  padding: 22px 24px;
  background: var(--sky-wash);
  border-radius: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px 28px;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 34px 1fr;
  column-gap: 12px;
  align-items: start;
}
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--orange-ink);
}
.steps strong { font-weight: 600; }
.steps span { color: var(--ink-soft); font-size: 0.93rem; }

/* ---------- Shop bar: categories, budget, sort ---------- */
.shop-bar {
  scroll-margin-top: 16px;
  margin-bottom: 28px;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: #fff;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 120ms ease, background 120ms ease;
}
.chip:hover { border-color: var(--ink-soft); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-soft { font-size: 0.9rem; padding: 6px 14px; }
.chip-soft.is-on { background: var(--orange-wash); border-color: var(--orange); color: var(--ink); }

.shop-tools {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1.5px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
}
.shop-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
}
.sort-select {
  appearance: none;
  -webkit-appearance: none;
  font: 500 0.92rem var(--font-body);
  color: var(--ink);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2323313B' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 8px 38px 8px 16px;
  cursor: pointer;
}
.sort-select:hover { border-color: var(--ink-soft); }
.toggle-sold { font-size: 0.9rem; color: var(--ink-soft); }
.toggle-sold:hover { color: var(--ink); }

.btn-bundle {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--ink);
  padding: 9px 20px;
}
.btn-bundle:hover { background: #FFB04A; border-color: #FFB04A; }
.btn-bundle.is-active { background: #fff; border-color: var(--ink); color: var(--ink); }

.group-intro {
  background: var(--orange-wash);
  border-radius: 16px;
  padding: 14px 18px;
  margin: -8px 0 26px;
}
.group-intro p { margin: 0; max-width: 75ch; }

.flash {
  background: var(--sky-wash);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 22px;
  max-width: 720px;
}
.flash.error { background: #FDECEF; color: #7A1F35; }

.empty-state {
  text-align: center;
  padding: 72px 20px;
  max-width: 46ch;
  margin: 0 auto;
}
.empty-state p { font-size: 1.1rem; margin: 0 0 20px; }

/* ---------- Grid ---------- */
.item-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 26px 14px;
}
@media (min-width: 640px) { .item-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 20px; } }
@media (min-width: 960px) { .item-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 24px; } }

.item-card.feature-wide  { grid-column: span 2; }
.item-card.feature-wide .item-thumb { aspect-ratio: 8 / 5; }
.item-card.feature-tall  { grid-row: span 2; }
.item-card.feature-tall .item-thumb { aspect-ratio: 2 / 5; }
.item-card.feature-large { grid-column: span 2; grid-row: span 2; }
.item-card.feature-large .sticker,
.item-card.feature-wide .sticker { --size: 76px; font-size: 1.3rem; top: 16px; right: 16px; }

.item-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-self: start;
}
.item-card-link { display: contents; text-decoration: none; color: inherit; }

.item-thumb {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 16px;
  overflow: hidden;
  background: var(--photo-bg);
  transition: box-shadow 150ms ease;
}
.item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.item-thumb.no-image {
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.item-thumb.is-dimmed img { opacity: 0.55; }
.item-card.is-sold .item-thumb img { opacity: 0.6; filter: grayscale(0.7); }

.thumb-note {
  position: absolute;
  left: 10px;
  bottom: 10px;
  right: 10px;
  width: fit-content;
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
}
.kind-chip {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #fff;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 0.82rem;
  font-weight: 600;
}

.item-body { padding: 12px 2px 0; }
.item-title {
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}
.item-card:hover .item-title { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.item-specline { font-size: 0.9rem; color: var(--ink-soft); margin-top: 3px; }

.badge {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #FDE7EE;
  color: #7A1F35;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ---------- Bundle & save mode ---------- */
.group-select { display: none; }
.item-grid.group-mode .group-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.item-grid.group-mode .item-card.bundle-selected .item-thumb { box-shadow: 0 0 0 3px var(--orange); }

.bundle-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 4px 0;
}
.bundle-check input[type=checkbox] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px; height: 22px;
  margin: 0;
  border: 2px solid var(--ink);
  border-radius: 7px;
  background: #fff;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}
.bundle-check input[type=checkbox]:checked { background: var(--orange); border-color: var(--orange); }
.bundle-check input[type=checkbox]:checked::after {
  content: "";
  position: absolute;
  left: 6px; top: 2px;
  width: 5px; height: 10px;
  border: solid var(--ink);
  border-width: 0 2.2px 2.2px 0;
  transform: rotate(45deg);
}

.bundle-stepper { display: inline-flex; align-items: center; gap: 6px; }
.bundle-stepper.disabled { opacity: 0.35; pointer-events: none; }
.stepper-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: 600 1rem var(--font-body);
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.stepper-btn:hover { border-color: var(--ink); }
.stepper-count { min-width: 18px; text-align: center; font-weight: 600; }

.group-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  background: #fff;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -6px 24px rgba(35, 49, 59, 0.12);
  padding: 16px var(--gutter) calc(16px + env(safe-area-inset-bottom, 0px));
  transform: translateY(110%);
  visibility: hidden;
  transition: transform 260ms ease, visibility 0s linear 260ms;
}
.group-bar.visible { transform: translateY(0); visibility: visible; transition: transform 260ms ease; }
.group-bar-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px 24px;
  flex-wrap: wrap;
}
.group-bar-stats { display: flex; align-items: baseline; gap: 6px 18px; flex-wrap: wrap; }
.group-bar-count { font-weight: 600; }
.group-bar-math { display: inline-flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.group-bar-was { color: var(--ink-soft); }
.group-bar-total { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.02em; }
.group-bar-save { color: var(--green-ink); font-weight: 600; }
.group-bar-inner .btn { margin-left: auto; background: var(--orange); border-color: var(--orange); color: var(--ink); }
.group-bar-inner .btn:hover:not(:disabled) { background: #FFB04A; border-color: #FFB04A; }
body.group-bar-active { padding-bottom: 100px; }
@media (max-width: 600px) {
  .group-bar-inner .btn { width: 100%; margin-left: 0; }
  body.group-bar-active { padding-bottom: 150px; }
}

/* ---------- Item / bundle detail ---------- */
.back-link {
  display: inline-block;
  margin: 8px 0 22px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
}
.back-link:hover { color: var(--ink); text-decoration: underline; }

.item-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.gallery-main {
  aspect-ratio: 4 / 5;
  border-radius: 20px;
  overflow: hidden;
  background: var(--photo-bg);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-main .item-thumb { height: 100%; border-radius: 0; }
.gallery-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.gallery-thumbs button {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  background: none;
  cursor: pointer;
  opacity: 0.7;
}
.gallery-thumbs button.active { border-color: var(--orange); opacity: 1; }
.gallery-thumbs button:hover { opacity: 1; }
.gallery-thumbs img { width: 64px; height: 64px; object-fit: cover; }

.detail-cat { margin: 4px 0 8px; color: var(--ink-soft); font-weight: 500; }
.detail-ref { opacity: 0.7; margin-left: 6px; font-size: 0.9rem; }
.detail-title {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.detail-price {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 22px 0 22px;
}
.detail-price-notes { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.detail-price-notes .badge { margin-top: 0; }
.detail-qty { color: var(--ink-soft); font-size: 0.95rem; }

.status-line {
  background: var(--sky-wash);
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 600;
  margin: 0 0 20px;
}
.detail-desc { white-space: pre-wrap; margin-bottom: 22px; max-width: 62ch; font-size: 1.03rem; }

.list-title { font-size: 1.1rem; font-weight: 700; margin: 0 0 8px; }
.spec-list { margin: 0 0 28px; padding: 0; }
.spec-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1.5px dashed var(--line);
}
.spec-row:first-child { border-top: 1.5px dashed var(--line); }
.spec-row dt { color: var(--ink-soft); }
.spec-row dd { margin: 0; font-weight: 500; text-align: right; }

.get-it {
  background: var(--sage-wash);
  border-radius: 22px;
  padding: 24px;
}
.get-it h2 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 14px; }
.get-it p { margin: 10px 0 0; }
.get-it-pay { font-weight: 600; }
.get-it-note { color: var(--ink-soft); font-size: 0.93rem; }
.get-it-contact {
  white-space: pre-wrap;
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
}
.get-it.is-off { background: #F3F4F5; }
.get-it .btn-outline { margin-top: 14px; }
.hold-status {
  display: inline-block;
  margin: 0 !important;
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff;
  font-weight: 600;
}
.hold-status.is-mine { background: var(--green); }

/* ---------- Bundle receipt (after Bundle & save) ---------- */
.receipt { max-width: 620px; }
.receipt .detail-title { margin-bottom: 24px; }
.receipt-lines { list-style: none; margin: 0; padding: 0; }
.receipt-lines li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1.5px dashed var(--line);
}
.receipt-lines a { font-weight: 500; }
.receipt-qty { color: var(--ink-soft); }
.receipt-sum { padding: 14px 0 26px; }
.receipt-sum > div { display: flex; justify-content: space-between; padding: 4px 0; }
.receipt-save { color: var(--green-ink); font-weight: 600; }
.receipt-total {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  margin-top: 6px;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 26px; padding-top: 20px; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .item-detail { grid-template-columns: 1fr; }
  .shop-tools { align-items: stretch; flex-direction: column; flex-wrap: nowrap; }
  .shop-tools > * { min-width: 0; }
  .chip-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter); }
  .chip-row::-webkit-scrollbar { display: none; }
}
@media (max-width: 480px) {
  .site-brand { font-size: 1.15rem; gap: 10px; }
  .brand-icon { width: 36px; height: 36px; }
  .tier { width: 78px; height: 78px; }
  .tier strong { font-size: 1rem; }
  .tier span { font-size: 0.7rem; }
  .sticker { --size: 50px; font-size: 0.88rem; top: 8px; right: 8px; padding: 0 8px; }
  .sticker-long { font-size: 0.8rem; }
  .sticker-lg { --size: 72px; font-size: 1.2rem; }
  .item-title { font-size: 0.95rem; }
  .thumb-note { font-size: 0.75rem; padding: 5px 10px; left: 8px; bottom: 8px; }
  .get-it { padding: 20px 18px; }
  .site-foot-inner { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .item-card:hover .sticker { transform: rotate(-9deg); }
}
