:root {
  color-scheme: light;
  --bg: #fbf3e6;
  --bg-soft: #ffffff;
  --ink: #1c1610;
  --muted: #6f5e4b;
  --line: #ead8c1;
  --line-strong: #d6bf9f;
  --brand: #d9572a;
  --brand-dark: #8e2d10;
  --brand-soft: #ffe1cf;
  --green: #0e7a45;
  --green-soft: #d8f1e2;
  --gold: #e8a83a;
  --shadow-sm: 0 2px 6px rgba(60, 33, 12, 0.06);
  --shadow-md: 0 12px 28px rgba(60, 33, 12, 0.10);
  --shadow-lg: 0 28px 60px rgba(60, 33, 12, 0.16);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(1100px 600px at 88% -10%, rgba(255, 196, 110, 0.35), transparent 60%),
    radial-gradient(900px 600px at -10% 20%, rgba(217, 87, 42, 0.18), transparent 60%),
    linear-gradient(180deg, #fdf6e9 0%, #fbf3e6 60%, #f3e8d4 100%);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.scroll-lock {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.hero,
main,
.footer {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  padding: 22px 0 36px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 48px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--brand-dark);
  font-family: Fraunces, Georgia, serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand::before {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--gold) 100%);
  box-shadow: 0 10px 22px rgba(217, 87, 42, 0.32);
  content: "";
}

.nav-links {
  display: flex;
  gap: 4px;
  padding: 6px;
  border: 1px solid rgba(217, 87, 42, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav-links a:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.cart-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--brand);
  color: white;
  font-size: 0.74rem;
  font-weight: 800;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
  gap: 40px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand-dark);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 850px;
  margin-bottom: 18px;
  font-family: Fraunces, Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.6rem, 6.5vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: #1a120b;
}

h1 em {
  font-style: italic;
  color: var(--brand-dark);
}

h2 {
  margin-bottom: 10px;
  font-family: Fraunces, Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.04rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.lead {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  line-height: 1.65;
}

.hero-actions,
.form-actions,
.receipt-heading,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:active:not(:disabled) {
  transform: translateY(0);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.primary {
  background: linear-gradient(135deg, var(--brand) 0%, #ef7041 100%);
  color: white;
  box-shadow: 0 14px 30px rgba(217, 87, 42, 0.34);
}

.primary:hover:not(:disabled) {
  box-shadow: 0 18px 34px rgba(217, 87, 42, 0.4);
}

.secondary {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.85);
  color: var(--brand-dark);
}

.secondary:hover:not(:disabled) {
  background: white;
  border-color: var(--brand);
}

.whatsapp {
  background: #25d366;
  color: #062b16;
  box-shadow: 0 14px 30px rgba(37, 211, 102, 0.28);
}

.hero-card,
.notice,
.toolbar,
.item-card,
.cart-panel,
.contact-form,
.receipt-output {
  border: 1px solid rgba(155, 96, 54, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-md);
}

.hero-card {
  padding: 28px;
  background: linear-gradient(160deg, #ffffff 0%, #fff7eb 100%);
}

.hero-card strong {
  display: block;
  margin: 18px 0 10px;
  font-family: Fraunces, Georgia, serif;
  font-weight: 700;
  font-size: 1.55rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero-card p,
.section-heading p,
.fine-print,
.description,
.condition {
  color: var(--muted);
  line-height: 1.55;
}

.sale-badge,
.category-pill,
.photo-count,
.zoom-hint {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.sale-badge {
  padding: 8px 14px;
  background: var(--green-soft);
  color: var(--green);
}

dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0 0;
}

dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

dd {
  margin: 6px 0 0;
  font-weight: 800;
  font-size: 1.02rem;
}

main {
  display: grid;
  gap: 32px;
  padding-bottom: 60px;
}

.notice {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(300px, 1.2fr);
  gap: 26px;
  padding: 28px;
}

.notice ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.55;
}

.notice li::marker {
  color: var(--brand);
  font-weight: 800;
}

.toolbar {
  position: sticky;
  top: 12px;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  padding: 14px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.78);
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
}

label span,
.fine-print {
  font-size: 0.82rem;
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--ink);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input,
select {
  height: 48px;
  padding: 0 14px;
}

textarea {
  min-height: 120px;
  padding: 14px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(217, 87, 42, 0.14);
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: #c4361a;
  box-shadow: 0 0 0 4px rgba(196, 54, 26, 0.12);
}

.field-error {
  display: block;
  margin-top: 4px;
  color: #b13317;
  font-size: 0.82rem;
  font-weight: 700;
}

.form-error {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fde8e1;
  color: #8e2d10;
  font-size: 0.9rem;
  font-weight: 700;
}

.catalog-section,
.checkout {
  scroll-margin-top: 110px;
}

.section-heading {
  margin-bottom: 20px;
  max-width: 720px;
}

.catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.item-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: white;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.image-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f3e3cc;
  outline: none;
}

.image-wrap:focus-visible {
  box-shadow: inset 0 0 0 3px var(--brand);
}

.image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.item-card:hover .image-wrap img {
  transform: scale(1.06);
}

.photo-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 11px;
  background: rgba(28, 22, 16, 0.78);
  color: white;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.photo-count.single {
  display: none;
}

.zoom-hint {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand-dark);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.image-wrap:hover .zoom-hint,
.image-wrap:focus-visible .zoom-hint {
  opacity: 1;
  transform: translateY(0);
}

.item-body {
  display: grid;
  gap: 10px;
  padding: 18px 18px 20px;
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.category-pill {
  padding: 6px 10px;
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.pickup-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #fde7d3;
  color: #8a4a13;
  border: 1px solid #f4c590;
}

.pickup-pill[hidden] {
  display: none;
}

.price {
  color: var(--green);
  font-family: Fraunces, Georgia, serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.description,
.condition {
  margin-bottom: 0;
  font-size: 0.92rem;
}

.condition {
  min-height: 2.8em;
  color: #876d52;
  font-size: 0.86rem;
  font-style: italic;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

.add-button {
  flex: 1;
  background: var(--ink);
  color: white;
  min-height: 44px;
}

.add-button:hover:not(:disabled) {
  background: #2d1f12;
}

.add-button.selected {
  background: var(--green);
}

.view-photos {
  flex: 0 0 auto;
  white-space: nowrap;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.cart-panel {
  position: sticky;
  top: 84px;
}

.cart-panel,
.contact-form,
.receipt-output {
  padding: 24px;
}

.cart-heading,
.cart-row,
.totals {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--brand-dark);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 8px 4px;
}

.text-button:hover:not(:disabled) {
  color: var(--brand);
  text-decoration: underline;
}

.cart-items {
  display: grid;
  gap: 4px;
  min-height: 86px;
  margin: 16px 0;
}

.cart-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.cart-row:last-child {
  border-bottom: 0;
}

.cart-row span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.cart-row button {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: #f7e7dc;
  color: var(--brand-dark);
  cursor: pointer;
  font-weight: 900;
  font-size: 1.05rem;
  line-height: 1;
  transition: background 0.18s ease, color 0.18s ease;
}

.cart-row button:hover {
  background: var(--brand);
  color: white;
}

.empty-cart {
  align-self: center;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.totals {
  padding-top: 18px;
  border-top: 2px solid var(--line);
  font-weight: 800;
  font-size: 1.05rem;
}

.totals strong {
  color: var(--green);
  font-family: Fraunces, Georgia, serif;
  font-weight: 700;
  font-size: 1.5rem;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.receipt-output {
  margin-top: 18px;
}

.receipt-heading {
  justify-content: space-between;
  margin-bottom: 14px;
}

pre {
  overflow: auto;
  max-height: 520px;
  margin: 0;
  padding: 18px;
  border-radius: 16px;
  background: #1c1610;
  color: #fbf3e6;
  font: 0.9rem/1.6 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
}

.footer {
  padding: 32px 0 42px;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 14, 8, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.lightbox-frame {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 12px;
  width: min(1100px, 100%);
  max-height: calc(100dvh - 32px);
  padding: 20px;
  border-radius: var(--radius-lg);
  background: #fbf3e6;
  box-shadow: var(--shadow-lg);
}

.lightbox-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.lightbox-header h2 {
  margin: 0 0 4px;
  font-size: clamp(1.1rem, 2.6vw, 1.6rem);
  letter-spacing: -0.01em;
}

.lightbox-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.lightbox-close {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: #ead8c1;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1;
}

.lightbox-close:hover {
  background: var(--brand);
  color: white;
}

.lightbox-stage {
  position: relative;
  min-height: 220px;
  display: grid;
  place-items: center;
  background: #1c1610;
  border-radius: 18px;
  overflow: hidden;
}

.lightbox-stage img {
  display: block;
  max-width: 100%;
  max-height: min(70vh, 720px);
  object-fit: contain;
  background: #1c1610;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: var(--shadow-md);
  transition: background 0.18s ease, transform 0.18s ease;
}

.lightbox-nav:hover:not(:disabled) {
  background: white;
  transform: translateY(-50%) scale(1.05);
}

.lightbox-nav:disabled {
  display: none;
}

.lightbox-nav.prev {
  left: 14px;
}

.lightbox-nav.next {
  right: 14px;
}

.lightbox-counter {
  position: absolute;
  right: 16px;
  bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(28, 22, 16, 0.72);
  color: white;
  font-size: 0.82rem;
  font-weight: 800;
}

.lightbox-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.lightbox-thumbs:empty {
  display: none;
}

.lightbox-thumbs button {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.lightbox-thumbs button:hover {
  transform: translateY(-2px);
}

.lightbox-thumbs button.active {
  border-color: var(--brand);
}

.lightbox-thumbs img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lightbox-footer {
  display: flex;
  justify-content: flex-end;
}

.lightbox-footer .add-button {
  min-width: 200px;
}

@media (max-width: 960px) {
  .hero-grid,
  .notice,
  .checkout-grid {
    grid-template-columns: 1fr;
  }

  .cart-panel {
    position: static;
  }
}

@media (max-width: 680px) {
  .hero,
  main,
  .footer {
    width: min(100% - 22px, 1200px);
  }

  .nav {
    align-items: stretch;
    margin-bottom: 30px;
  }

  .nav-links {
    overflow-x: auto;
    border-radius: 999px;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .nav-links a {
    white-space: nowrap;
  }

  .hero-card,
  .notice,
  .cart-panel,
  .contact-form,
  .receipt-output {
    padding: 20px;
  }

  dl {
    grid-template-columns: repeat(3, 1fr);
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .toolbar {
    position: static;
    grid-template-columns: 1fr;
  }

  .catalog {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
  }

  .lightbox-frame {
    padding: 14px;
    border-radius: 20px;
  }

  .lightbox-nav {
    width: 40px;
    height: 40px;
  }
}
