:root {
  --ink: #171512;
  --paper: #f6f3ec;
  --panel: #ffffff;
  --line: #dedacd;
  --muted: #7a7566;
  --accent: #b5461c;

  --bar: #b5461c;
  --bar-tint: #f6f3ec;
  --board: #b5461c;
  --board-tint: #f6f3ec;
  --base: #b5461c;
  --base-tint: #f6f3ec;
  --ok: #2f6b4f;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}
/* Applied to both elements while the cart drawer or checkout modal is
   open, so the page behind them doesn't scroll on touch. */
html.scroll-locked,
html.scroll-locked body {
  overflow: hidden;
}
section[id] {
  scroll-margin-top: 84px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
}
img {
  max-width: 100%;
  display: block;
}

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 243, 236, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
}
nav.links {
  display: flex;
  gap: 26px;
}
nav.links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.15s;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
nav.links a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
@media (max-width: 720px) {
  nav.links {
    display: none;
  }
}

.cart-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--paper);
  border: none;
  padding: 10px 16px;
  border-radius: 2px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
}
.cart-count {
  background: var(--board);
  color: #fff;
  border-radius: 50%;
  width: 19px;
  height: 19px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* ---------- Hero ---------- */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 24px 56px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 40px;
  }
}
.hero-text {
  max-width: 520px;
}
.hero .eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--board);
  font-weight: 700;
  margin-bottom: 14px;
}
.hero h1 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}
.hero p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  max-width: 48ch;
  margin: 0 0 28px;
}
.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-visual {
  position: relative;
  aspect-ratio: 1/1;
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
}
.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.hero-visual img.loaded {
  opacity: 1;
}
.hero-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(181, 70, 28, 0.05),
    transparent 60%
  );
  pointer-events: none;
}
@media (max-width: 820px) {
  .hero-visual {
    max-width: 420px;
    margin: 0 auto;
  }
}
.btn-primary,
.btn-ghost {
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  padding: 13px 22px;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  border: none;
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-primary:hover {
  opacity: 0.85;
}
.btn-ghost:hover {
  border-color: var(--ink);
}

/* ---------- Category sections ---------- */
.category {
  padding: 64px 24px;
}
.category-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.cat-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 34px;
  gap: 24px;
  flex-wrap: wrap;
}
.cat-head .tag {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 10px;
}
.cat-head h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 32px;
  margin: 0 0 8px;
}
.cat-head p {
  color: var(--muted);
  font-size: 14.5px;
  max-width: 52ch;
  margin: 0;
  line-height: 1.55;
}

#bar .tag {
  color: var(--bar);
}
#board .tag {
  color: var(--board);
}
#base .tag {
  color: var(--base);
}
#accessories .tag {
  color: var(--ink);
}

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

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition:
    border-color 0.15s,
    transform 0.15s;
}
.card:hover {
  border-color: var(--ink);
}

.card-visual {
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: #fff;
  overflow: hidden;
}

.gallery {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
}
.gallery-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.gallery-track img {
  width: 100%;
  height: 100%;
  flex: none;
  object-fit: cover;
  user-select: none;
}
.gal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(23, 21, 18, 0.55);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 2;
}
.gallery:hover .gal-nav {
  opacity: 1;
}
@media (hover: none) {
  .gal-nav {
    opacity: 1;
  }
}
@media (max-width: 480px) {
  .gal-nav {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }
}
.gal-prev {
  left: 8px;
}
.gal-next {
  right: 8px;
}
.gallery-dots {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 5px;
  z-index: 2;
}
.gallery-dots .dot {
  box-sizing: content-box;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(23, 21, 18, 0.3);
  cursor: pointer;
  padding: 6px;
  background-clip: content-box;
  transition:
    width 0.25s ease,
    border-radius 0.25s ease,
    background-color 0.25s ease;
}
.gallery-dots .dot.active {
  background: var(--accent);
  width: 16px;
  border-radius: 3px;
}
.badge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-size: 18px;
  color: #fff;
}
.card-body {
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-body .name {
  font-weight: 600;
  font-size: 14.5px;
  margin-bottom: 4px;
}
.card-body .desc {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
  margin-bottom: 14px;
  flex: 1;
}
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.price {
  font-family: 'Fraunces', serif;
  font-size: 17px;
}
.add-btn {
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 13px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.15s;
}
.add-btn:hover {
  background: var(--ink);
  color: var(--paper);
}
.add-btn.added {
  background: var(--ok);
  color: #fff;
  border-color: var(--ok);
}

/* ---------- Delivery note ---------- */
.delivery-note {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 40px;
}
.delivery-note .box {
  border: 1px dashed var(--line);
  padding: 16px 20px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.delivery-note .box strong {
  color: var(--ink);
}

footer {
  border-top: 1px solid var(--line);
  padding: 36px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
}

/* ---------- Cart drawer ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 23, 18, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  z-index: 50;
}
.overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 120%);
  background: var(--ink);
  color: var(--paper);
  padding: 13px 14px 13px 18px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  z-index: 80;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: calc(100% - 32px);
}
.cart-toast.show {
  transform: translate(-50%, 0);
}
.cart-toast span {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-toast button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 2px;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.cart-toast button:hover {
  opacity: 0.9;
}
@media (max-width: 480px) {
  .cart-toast {
    left: 16px;
    right: 16px;
    transform: translateY(120%);
    width: auto;
  }
  .cart-toast.show {
    transform: translateY(0);
  }
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100%);
  background: var(--panel);
  z-index: 60;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}
.drawer.open {
  transform: translateX(0);
}
.drawer-head {
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.drawer-head h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 20px;
  margin: 0;
}
.close-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
}
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 24px;
}
.empty-cart {
  color: var(--muted);
  font-size: 13.5px;
  text-align: center;
  padding: 60px 10px;
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.cart-item .mini-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-size: 12px;
  color: #fff;
}
.cart-item .info {
  flex: 1;
  min-width: 0;
}
.cart-item .info .name {
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 2px;
}
.cart-item .info .unit {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.stepper {
  display: flex;
  align-items: center;
  gap: 10px;
}
.step-btn {
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  background: var(--paper);
  cursor: pointer;
  font-size: 13px;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-val {
  font-size: 13px;
  font-weight: 600;
  min-width: 16px;
  text-align: center;
}
.remove-link {
  font-size: 11px;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
  margin-left: auto;
}
.item-total {
  font-family: 'Fraunces', serif;
  font-size: 14px;
  white-space: nowrap;
}

.drawer-foot {
  border-top: 1px solid var(--line);
  padding: 20px 24px 26px;
}
.subtotal-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 6px;
}
.subtotal-row .lbl {
  color: var(--muted);
}
.subtotal-row .amt {
  font-family: 'Fraunces', serif;
  font-size: 20px;
}
.excl-note {
  font-size: 11.5px;
  color: var(--muted);
  margin: 6px 0 16px;
  line-height: 1.5;
}
.checkout-btn {
  width: 100%;
  padding: 14px;
  background: var(--ink);
  color: var(--paper);
  border: none;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border-radius: 2px;
}
.checkout-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---------- Checkout modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 23, 18, 0.5);
  display: none;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  z-index: 70;
  padding: 40px 16px;
}
.modal-overlay.open {
  display: flex;
}
.modal {
  background: var(--panel);
  max-width: 640px;
  width: 100%;
  padding: 36px;
  border: 1px solid var(--line);
}
.modal .eyebrow {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--board);
  font-weight: 700;
  margin-bottom: 8px;
}
.modal h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 28px;
  margin: 0 0 6px;
}
.modal .sub {
  color: var(--muted);
  font-size: 13.5px;
  margin: 0 0 26px;
}

.order-summary {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 14px 16px;
  margin-bottom: 28px;
}

.customize-block {
  border: 1px solid var(--line);
  margin-bottom: 16px;
}
.customize-head {
  background: var(--paper);
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}
.customize-head .mini-badge {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  flex: none;
}
.customize-head .cname {
  font-weight: 600;
  font-size: 13.5px;
}
.customize-head .cqty {
  color: var(--muted);
  font-size: 12px;
  margin-left: auto;
}
.customize-body {
  padding: 14px 16px;
}
.unit-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 12px;
  margin-bottom: 10px;
  border-top: 1px solid var(--line);
}
.unit-label:first-child {
  padding-top: 0;
  border-top: none;
}
.tile-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.tile-row:last-child {
  margin-bottom: 0;
}
.tile-label {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  min-width: 64px;
}
/* On narrow screens the three-column row squeezes the link field down to
   a few characters — drop the label onto its own line instead. */
@media (max-width: 620px) {
  .tile-row {
    grid-template-columns: 1fr auto;
    margin-bottom: 14px;
  }
  .tile-label {
    grid-column: 1 / -1;
    margin-bottom: -4px;
  }
}
.tile-row input[type='text'] {
  padding: 9px 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--ink);
  border-radius: 2px;
  outline: none;
  width: 100%;
}
.tile-row input[type='text']:focus {
  border-color: var(--ink);
}
.tile-upload {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  border: 1px dashed var(--line);
  padding: 8px 10px;
  border-radius: 2px;
  white-space: nowrap;
}
.tile-upload:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.tile-upload input {
  display: none;
}
.tile-upload.has-file {
  border-color: var(--ok);
  color: var(--ok);
  border-style: solid;
}
.tile-upload img.thumb {
  width: 16px;
  height: 16px;
  object-fit: cover;
  border-radius: 3px;
}
.customize-note {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.5;
}
.os-item {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 5px 0;
}
.os-item .n {
  color: var(--ink);
}
.os-item .p {
  color: var(--muted);
}
.os-total {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 10px;
  font-weight: 600;
  font-size: 14px;
}

.section-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin: 0 0 16px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}
.section-label:not(:first-of-type) {
  margin-top: 30px;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 540px) {
  .row {
    grid-template-columns: 1fr;
  }
}
.field {
  margin-bottom: 14px;
}
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 6px;
}
.field label .opt {
  color: var(--muted);
  font-weight: 400;
}
.field input,
.field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--ink);
  border-radius: 2px;
  outline: none;
}
.field input:focus,
.field textarea:focus {
  border-color: var(--ink);
}
.field textarea {
  resize: vertical;
  min-height: 64px;
}
.err {
  color: var(--base);
  font-size: 11.5px;
  margin-top: 4px;
  display: none;
}

.place-order-btn {
  width: 100%;
  margin-top: 22px;
  padding: 15px;
  background: var(--ink);
  color: var(--paper);
  border: none;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border-radius: 2px;
}
.place-order-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--muted);
}
.modal {
  position: relative;
}

/* ---------- Success screen ---------- */
.success {
  text-align: center;
  padding: 20px 6px 6px;
}
.success .mark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 20px;
}
.success h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 26px;
  margin: 0 0 10px;
}
.success p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 4px;
}
.order-id {
  display: inline-block;
  margin: 16px 0 24px;
  padding: 8px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--muted);
}
.action-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wa-btn {
  background: #25d366;
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 2px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
.dl-btn {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 13px;
  border-radius: 2px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
}
.wa-help {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: -4px;
  line-height: 1.5;
}
