:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --text: #1a1614;
  --muted: #6b6560;
  --accent: #c45c26;
  --accent-dark: #9a4520;
  --border: #e8e2db;
  --success: #2d6a4f;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(26, 22, 20, 0.06);
  --font: 'DM Sans', system-ui, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--text);
}

.logo span { color: var(--accent); }

.main-nav { display: flex; gap: 1.5rem; }
.main-nav a { color: var(--muted); font-weight: 500; font-size: 0.95rem; }
.main-nav a:hover { color: var(--text); }

.cart-btn {
  position: relative;
  color: var(--text);
  padding: 0.5rem;
}

.cart-count {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--accent);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-content { flex: 1; padding: 2rem 0 4rem; }

/* Hero */
.hero {
  text-align: center;
  padding: 3rem 0 4rem;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero p {
  color: var(--muted);
  font-size: 1.125rem;
  max-width: 520px;
  margin: 0 auto 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover { background: var(--accent-dark); color: white; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text);
}

.btn-outline:hover { border-color: var(--text); color: var(--text); }

/* Product grid */
.page-title {
  font-family: var(--serif);
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}

.page-subtitle { color: var(--muted); margin-bottom: 2rem; }

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

.product-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.product-card:hover { transform: translateY(-4px); }

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

.product-card-body { padding: 1.25rem; }

.product-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.product-card .price {
  font-weight: 700;
  color: var(--accent);
  font-size: 1.1rem;
}

.product-card .category {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

/* Product detail */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 768px) {
  .product-detail { grid-template-columns: 1fr; }
  .main-nav { display: none; }
}

.product-detail img {
  width: 100%;
  border-radius: var(--radius);
  aspect-ratio: 1;
  object-fit: cover;
}

.product-detail h1 {
  font-family: var(--serif);
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.product-detail .price-lg {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  margin: 1rem 0;
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.qty-row input {
  width: 72px;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  text-align: center;
}

/* Cart & checkout */
.cart-table, .checkout-form {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.cart-table table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.cart-table th { font-size: 0.8rem; text-transform: uppercase; color: var(--muted); }

.checkout-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 900px) {
  .checkout-layout { grid-template-columns: 1fr; }
}

.form-group { margin-bottom: 1rem; }

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.order-summary {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  position: sticky;
  top: 88px;
}

.order-summary h3 { margin-bottom: 1rem; }
.summary-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.summary-line.total {
  font-weight: 700;
  font-size: 1.15rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.policy-checkboxes {
  margin: 1.25rem 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.policy-checkboxes label {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  cursor: pointer;
}

.policy-checkboxes input { margin-top: 0.2rem; flex-shrink: 0; }

.alert {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.alert-error { background: #fde8e8; color: #9b2222; }
.alert-success { background: #e8f5e9; color: var(--success); }
.alert-info { background: #e8f0fe; color: #1a4d8c; }

.test-pay-banner ul {
  margin: 0.75rem 0 0.5rem 1.25rem;
  font-size: 0.9rem;
}

.test-pay-banner code {
  background: rgba(0, 0, 0, 0.06);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.85em;
}

.test-pay-note {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  opacity: 0.9;
}

/* Policy pages */
.policy-page {
  max-width: 720px;
  margin: 0 auto;
}

.policy-page h1 {
  font-family: var(--serif);
  font-size: 2.5rem;
  margin-bottom: 0.25rem;
}

.policy-page .updated {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.policy-page h2 {
  font-size: 1.15rem;
  margin: 2rem 0 0.75rem;
}

.policy-page p, .policy-page li {
  margin-bottom: 0.75rem;
  color: #333;
}

.policy-page ul { padding-left: 1.5rem; }

.contact-card {
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 2rem;
}

.contact-card h2 { font-size: 1.25rem; margin-bottom: 1rem; }

.success-page {
  text-align: center;
  padding: 3rem 1rem;
}

.success-page h1 {
  font-family: var(--serif);
  font-size: 2.5rem;
  color: var(--success);
  margin-bottom: 1rem;
}

/* Footer */
.site-footer {
  background: #1a1614;
  color: #c4bdb6;
  padding: 3rem 0 1.5rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

.footer-grid h4 {
  color: white;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 0.5rem; }
.footer-grid a { color: #c4bdb6; }
.footer-grid a:hover { color: white; }

.footer-legal-name { color: white; font-weight: 600; margin-bottom: 0.5rem; }
.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 1.5rem;
  font-size: 0.85rem;
  text-align: center;
}

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