/* Client shop */
.hero { display: grid; justify-items: center; padding: 22px 16px 12px; }
.hero-logo { width: min(220px, 58vw); height: auto; }
.tagline { margin: 10px 0 0; color: var(--muted); font-size: 14px; text-align: center; }

.chips {
  position: sticky; top: 0; z-index: 5;
  display: flex; gap: 8px; overflow-x: auto;
  padding: 10px 16px; background: var(--bg); border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }

main { max-width: 1000px; margin: 0 auto; padding: 14px 12px 24px; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }

.card {
  position: relative; display: block; width: 100%; overflow: hidden; padding: 0;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  color: inherit; text-align: left; cursor: pointer;
}
.card:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.card-img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; background: #1a1a1a; }
.card-body { display: grid; gap: 2px; padding: 10px 12px 12px; }
.card-name {
  display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  font-size: 15px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere;
}
.card-price { font-family: var(--heading); font-size: 16px; }
.badge {
  position: absolute; top: 8px; left: 8px; padding: 4px 8px; border-radius: 6px;
  background: var(--fg); color: #000; font-family: var(--heading); font-size: 11px; letter-spacing: .06em;
}
.card.is-sold .card-img { opacity: .4; filter: grayscale(1); }

.status-msg { display: grid; justify-items: center; gap: 12px; padding: 48px 16px; color: var(--muted); text-align: center; }
.status-msg p { margin: 0; }
.foot { padding: 8px 16px calc(110px + env(safe-area-inset-bottom)); color: #555; font-size: 12px; text-align: center; }

/* Sticky checkout bar */
.cart-bar {
  position: fixed; right: 0; bottom: 0; left: 0; z-index: 40;
  padding: 18px 12px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--bg) 35%);
}
.cart-bar .btn {
  justify-content: space-between; max-width: 560px; min-height: 56px; margin: 0 auto; padding: 0 22px;
  font-size: 16px; box-shadow: 0 8px 30px rgba(0, 0, 0, .6);
}

/* Product detail */
.gallery {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  border-radius: 12px; background: #000; scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: 0 0 100%; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; scroll-snap-align: center; }
.dots { display: flex; justify-content: center; gap: 6px; margin: 10px 0 0; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #444; }
.dot.on { background: var(--fg); }
.detail-price { margin: 12px 0 4px; font-family: var(--heading); font-size: 26px; }
.detail-details { margin: 0 0 6px; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.label { margin: 16px 0 8px; color: var(--muted); font-size: 14px; font-weight: 700; }
.size-row { display: flex; flex-wrap: wrap; gap: 8px; }
.size-row .chip { min-width: 52px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; }
.qty button { width: 42px; height: 42px; border: 0; background: transparent; color: var(--fg); font-size: 20px; cursor: pointer; }
.qty button:disabled { opacity: .3; }
.qty span { min-width: 28px; font-weight: 800; text-align: center; }
.detail-actions { display: grid; gap: 10px; margin-top: 20px; }

/* Cart */
.notice {
  margin: 0 0 10px; padding: 10px 12px; border: 1px solid #5a3d1a; border-radius: 10px;
  background: #2a1d10; color: #ffcf8a; font-size: 14px;
}
.cart-line {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.cart-line img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: #111; }
.cart-line.is-sold > :not(.line-side) { opacity: .45; }
.line-name { font-weight: 700; overflow-wrap: anywhere; }
.line-meta { color: var(--muted); font-size: 14px; }
.line-sold { color: var(--danger); font-size: 13px; font-weight: 700; }
.line-side { display: grid; justify-items: end; gap: 6px; }
.line-side .qty button { width: 34px; height: 34px; font-size: 18px; }
.link-btn { padding: 4px; border: 0; background: none; color: var(--muted); font-size: 13px; text-decoration: underline; cursor: pointer; }
.cart-total { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; font-family: var(--heading); font-size: 20px; }
.cart-empty { padding: 24px 0; color: var(--muted); text-align: center; }
a.btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }
