:root {
  --bg: #faf8f5;
  --fg: #1a1a1a;
  --muted: #6b6b6b;
  --border: #e6e2dc;
  --card: #ffffff;
  --accent: #1a1a1a;
  --accent-fg: #ffffff;
  --highlight: #fde68a;
  --success: #065f46;
  --danger: #b91c1c;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.5;
}

a { color: inherit; }

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

header.site .brand {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  font-size: 0.95rem;
}

header.site nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9rem;
}

header.site nav a {
  text-decoration: none;
  color: var(--muted);
}

header.site nav a.active,
header.site nav a:hover {
  color: var(--fg);
}

header.site .cart-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
}

header.site .cart-link .count {
  font-weight: 600;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

h1 { font-size: 2rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.25rem; margin: 2rem 0 1rem; }

.muted { color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.btn:hover { opacity: 0.9; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--fg); }
.btn.small { padding: 0.4rem 0.8rem; font-size: 0.8rem; }

.hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2rem 0 3rem;
}

.hero h1 {
  font-size: 2.5rem;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 12px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px -10px rgba(0,0,0,0.25);
}

.product-card img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
}

.product-card .body {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}

.product-card .name { font-weight: 500; font-size: 0.95rem; }
.product-card .price { color: var(--muted); font-size: 0.9rem; }

.product-card .tag {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--highlight);
  color: var(--fg);
  margin-top: 0.25rem;
  align-self: flex-start;
}

/* data-rvx-allow-reorder subtree — no visual change, just declarative opt-in */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0 1.5rem;
}

.chip {
  border: 1px solid var(--border);
  background: var(--card);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
}

.chip.active {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
}

.pdp {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.pdp img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 12px;
}

.pdp .price-big {
  font-size: 1.5rem;
  margin: 0.5rem 0 1rem;
}

.pdp .actions {
  display: flex;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.cart-lines {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cart-line {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 1rem;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem;
}

.cart-line img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
}

.cart-line .qty {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1rem 0.3rem;
}

.cart-line .qty button {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.1rem 0.35rem;
  font-size: 1rem;
}

.summary {
  margin-top: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.summary .total { font-size: 1.2rem; font-weight: 600; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--fg);
  color: var(--bg);
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  z-index: 100;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }

.empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}

.banner {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #7c2d12;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; }
  .pdp { grid-template-columns: 1fr; }
  header.site nav { display: none; }
}
