@font-face { font-family: 'Fixture'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/Fixture_Regular.otf') format('opentype'); }
@font-face { font-family: 'Fixture'; font-weight: 500; font-style: normal; font-display: swap; src: url('/fonts/Fixture_Medium.otf') format('opentype'); }
@font-face { font-family: 'Fixture'; font-weight: 600; font-style: normal; font-display: swap; src: url('/fonts/Fixture_SemiBold.otf') format('opentype'); }
@font-face { font-family: 'Fixture'; font-weight: 700; font-style: normal; font-display: swap; src: url('/fonts/Fixture_Bold.otf') format('opentype'); }

:root {
  --cream-bg: #f8f3ea;
  --cream-panel: #efe7d6;
  --cream-panel-2: #f2ecdf;
  --ink: #292929;
  --ink-2: #535353;
  --muted: #9a9998;
  --gold: #ac8639;
  --gold-dark: #97722d;
  --gold-ink: #f8f3ea;
  --line: #e2d8c4;
  --radius: 8px;
  --font: 'Fixture', 'Helvetica Neue', Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  font-family: var(--font);
  background: var(--cream-bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* ---- Header ---- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(16px, 5vw, 80px);
  background: var(--cream-panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.logo { display: inline-flex; align-items: center; }
.logo img { height: clamp(14px, 3.4vw, 18px); width: auto; display: block; }
.header-note {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* ---- Layout ---- */
.pdp {
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 72px) clamp(16px, 5vw, 80px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}

/* photo sits in the right column on desktop, on top on mobile */
.hero-media { grid-column: 2; grid-row: 1; position: sticky; top: 96px; }
.order-panel, .confirmation { grid-column: 1; grid-row: 1; }

.hero-frame {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--cream-panel);
  aspect-ratio: 1 / 1;
}
.hero-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- Product header ---- */
.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
.product-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.price { margin: 6px 0 18px; font-size: 20px; color: var(--gold); font-weight: 600; }
.price-unit { color: var(--muted); font-weight: 400; font-size: 15px; }
.product-desc { margin: 0 0 28px; color: var(--muted); max-width: 46ch; }

/* ---- Fields ---- */
.section { padding-top: 26px; margin-top: 26px; border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-title { margin: 0 0 14px; font-size: 16px; font-weight: 600; }
.hint { font-size: 13px; color: var(--muted); }

.field-group { display: flex; gap: 14px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; flex: 1 1 180px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }

input, select {
  width: 100%;
  padding: 12px 13px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s;
}
input:focus, select:focus { outline: none; border-color: var(--gold); }
select { appearance: none; background-image: 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 1l5 5 5-5' stroke='%23535353' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px; }

/* ---- Roast steppers ---- */
.roast-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: var(--cream-panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
}
.roast-name { display: block; font-weight: 600; font-size: 15px; }
.roast-sub { display: block; font-size: 13px; color: var(--muted); }

.stepper { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px; }
.step-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: none; border-radius: 6px;
  background: transparent;
  color: var(--gold);
  font-size: 20px; line-height: 1; cursor: pointer;
  transition: background 0.12s;
}
.step-btn:hover:not(:disabled) { background: var(--cream-panel); }
.step-btn:disabled { color: var(--line); cursor: not-allowed; }
.step-count { min-width: 26px; text-align: center; font-weight: 600; font-size: 16px; }

/* ---- Pickup time chips ---- */
.slot-list { display: flex; flex-wrap: wrap; gap: 10px; }
.slot-chip {
  padding: 11px 16px;
  font: inherit; font-size: 14px; font-weight: 500;
  background: var(--cream-panel);
  color: var(--ink);
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.slot-chip:hover { border-color: var(--gold); }
.slot-chip.selected { border-color: var(--gold); background: #fff; }
.slot-empty { color: var(--muted); font-size: 14px; margin: 0; }
.slot-loading { color: var(--muted); font-size: 14px; margin: 0; }

/* ---- Card ---- */
.card-box {
  min-height: 56px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card-placeholder { margin: 0; color: var(--muted); font-size: 14px; }

/* ---- CTA ---- */
.error { color: #b00020; font-size: 14px; margin: 16px 0 0; }
.cta {
  width: 100%;
  margin-top: 24px;
  padding: 17px 20px;
  font: inherit; font-size: 15px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold-ink);
  background: var(--gold);
  border: none; border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s;
}
.cta:hover:not(:disabled) { background: var(--gold-dark); }
.cta:disabled { background: var(--cream-panel); color: var(--muted); cursor: not-allowed; }
.tax-note { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); text-align: center; }

/* ---- Confirmation ---- */
.confirmation { text-align: center; padding-top: 24px; }
.confirm-badge {
  width: 56px; height: 56px; margin: 0 auto 18px;
  display: grid; place-items: center;
  background: var(--gold); color: var(--gold-ink);
  border-radius: 50%; font-size: 28px;
}
.confirm-text { font-size: 17px; margin: 10px 0 6px; }
.confirm-sub { color: var(--muted); }

.app-version {
  position: fixed;
  bottom: 8px;
  right: 10px;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--muted);
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
  z-index: 20;
}

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .pdp { grid-template-columns: 1fr; }
  .hero-media { grid-column: 1; grid-row: 1; position: static; }
  .order-panel, .confirmation { grid-column: 1; grid-row: 2; }
  .hero-frame { aspect-ratio: 4 / 3; }
}
