/* rellastore storefront — Singapore-only public shop. */
:root {
  --bg: #f7f4ef;
  --surface: #ffffff;
  --ink: #1a1a1a;
  --muted: #6e6e6e;
  --line: #e6e2db;
  --accent: #c44a3a;
  --accent-dark: #9c372a;
  --ok: #2e8b57;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--ink);
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }

.store-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand { font-size: 1.35rem; font-weight: 700; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand span { color: var(--accent); font-weight: 500; }
.cart-link { color: var(--ink); font-weight: 500; position: relative; }
.cart-link .badge {
  background: var(--accent); color: white; border-radius: 99px;
  padding: 0.1rem 0.45rem; font-size: 0.75rem; margin-left: 0.3rem;
  display: inline-block; vertical-align: middle;
}

.store-main { max-width: 1100px; margin: 2.5rem auto; padding: 0 2rem; }
.store-footer {
  margin-top: 4rem; padding: 2rem; text-align: center;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem;
}

.muted { color: var(--muted); }
.empty { color: var(--muted); padding: 3rem 0; text-align: center; }
.back { color: var(--muted); display: inline-block; margin-bottom: 1.5rem; }

.hero {
  text-align: center; padding: 2rem 0 3rem;
}
.hero h1 { font-size: 2.4rem; letter-spacing: -0.02em; margin: 0 0 0.75rem; }
.hero p { color: var(--muted); margin: 0; }

.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  color: var(--ink);
  transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.06); text-decoration: none; }
.card-image { aspect-ratio: 1/1; background: #f0ece5; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-image-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, #ecead4, #d8d4c4); }
.card-image-placeholder.big { aspect-ratio: 1/1; border-radius: 8px; }
.card-image-placeholder.small { width: 60px; height: 60px; border-radius: 4px; }
.card-body { padding: 1rem; }
.card-body h3 { margin: 0 0 0.4rem; font-size: 1rem; font-weight: 600; }
.price { color: var(--ink); font-weight: 600; }
.price.big { font-size: 1.5rem; margin: 0.5rem 0 1.25rem; }

.product { display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; }
.product-gallery { display: flex; flex-direction: column; gap: 1rem; }
.product-gallery img { width: 100%; border-radius: 8px; }
.product-info h1 { font-size: 1.8rem; letter-spacing: -0.01em; margin: 0 0 0.5rem; }
.description { white-space: pre-wrap; margin: 1.5rem 0; color: #333; }
.oos {
  display: inline-block; padding: 0.3rem 0.7rem;
  background: rgba(196,74,58,0.1); color: var(--accent);
  border-radius: 4px; margin-bottom: 1rem; font-size: 0.85rem; font-weight: 600;
}

.add-to-cart {
  display: flex; gap: 0.75rem; align-items: end;
  padding: 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  margin: 1.5rem 0;
}
.add-to-cart label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.85rem; color: var(--muted); }
.add-to-cart input[type=number] { width: 70px; padding: 0.5rem; border: 1px solid var(--line); border-radius: 4px; font: inherit; }

.btn {
  padding: 0.7rem 1.5rem; border: none; border-radius: 6px;
  background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 500; cursor: pointer; text-decoration: none;
  display: inline-block;
}
.btn:hover { background: #f0ece5; text-decoration: none; }
.btn.primary { background: var(--accent); color: white; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.primary.big { padding: 0.95rem 2.5rem; font-size: 1.05rem; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.btn.ghost:hover { color: var(--ink); border-color: var(--ink); }
.btn.ghost.small { padding: 0.35rem 0.7rem; font-size: 0.85rem; }
.btn.ghost.danger { color: var(--accent); }
.btn.ghost.danger:hover { color: var(--accent-dark); border-color: var(--accent); }

dl.meta { margin-top: 2rem; display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1rem; font-size: 0.9rem; }
dl.meta dt { color: var(--muted); }
dl.meta dd { margin: 0; }

.cart-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 8px; overflow: hidden; }
.cart-table th, .cart-table td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-table thead th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); background: #faf7f1; }
.cart-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.cart-table tbody tr:last-child td { border-bottom: 1px solid var(--line); }
.cart-table tfoot th, .cart-table tfoot td { border-top: 1px solid var(--line); color: var(--muted); border-bottom: none; }
.cart-table tfoot tr:last-child th, .cart-table tfoot tr:last-child td { color: var(--ink); font-size: 1.1rem; }

.cart-item { display: flex; gap: 0.85rem; align-items: center; }
.cart-item img { width: 60px; height: 60px; object-fit: cover; border-radius: 4px; }

.qty-form { display: inline-flex; gap: 0.4rem; align-items: center; }
.qty-form input[type=number] { width: 60px; padding: 0.4rem; border: 1px solid var(--line); border-radius: 4px; font: inherit; text-align: right; }

.checkout-form { margin-top: 2rem; text-align: center; }
.checkout-form .muted { margin-top: 0.6rem; font-size: 0.85rem; }

.confirm { text-align: center; padding: 3rem 0; }
.confirm h1 { font-size: 2rem; margin: 0 0 0.75rem; }
.confirm .lede { color: var(--muted); margin-bottom: 2rem; font-size: 1.05rem; }
.confirm .btn { margin: 0 0.25rem; }

.order-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 1.5rem; max-width: 520px; margin: 0 auto 2rem;
  text-align: left;
}
.order-card-header { display: flex; justify-content: space-between; margin-bottom: 1rem; }
.order-card-header .muted { font-size: 0.8rem; }
.order-id, .order-total { font-size: 1.15rem; font-weight: 600; }
.order-total { color: var(--ok); }

@media (max-width: 720px) {
  .product { grid-template-columns: 1fr; gap: 1.5rem; }
  .store-main { padding: 0 1rem; margin-top: 1.5rem; }
  .store-nav { padding: 0.85rem 1rem; }
}
