:root {
  --bg: #F6F3EC;
  --ink: #1B211D;
  --pine: #23392F;
  --pine-light: #2F6F5E;
  --mustard: #D9A441;
  --card: #FFFFFF;
  --line: #E4DFD3;
  --error: #B3452C;
  --radius: 4px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2 {
  font-family: 'Fraunces', serif;
  margin: 0;
}

/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 48px;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.cart-toggle {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  padding: 6px;
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -6px;
  background: var(--mustard);
  color: var(--pine);
  font-size: 11px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hero */
.hero {
  padding: 72px 48px 48px;
  max-width: 720px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 600;
  color: var(--pine-light);
  margin: 0 0 12px;
}

.hero h1 {
  font-size: 52px;
  line-height: 1.05;
  font-weight: 600;
  color: var(--pine);
}

.hero-sub {
  margin-top: 20px;
  font-size: 16px;
  line-height: 1.6;
  color: #4A5750;
  max-width: 480px;
}

/* Product grid */
main {
  padding: 0 48px 64px;
}

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

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

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -12px rgba(27, 33, 29, 0.18);
}

.product-image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--line);
}

.product-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-name {
  font-weight: 600;
  font-size: 15px;
  margin: 0 0 4px;
}

.product-desc {
  font-size: 13px;
  color: #6B756E;
  margin: 0 0 16px;
  flex: 1;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-price {
  font-weight: 700;
  font-family: 'Fraunces', serif;
  font-size: 17px;
  color: var(--pine);
}

.add-btn {
  background: var(--pine);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.add-btn:hover { background: var(--pine-light); }

.add-btn.added {
  background: var(--mustard);
  color: var(--pine);
}

/* Footer */
.site-footer {
  padding: 24px 48px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: #8A9089;
}

/* Cart drawer */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(27, 33, 29, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 380px;
  max-width: 92vw;
  background: var(--bg);
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 20;
  display: flex;
  flex-direction: column;
}

.cart-drawer.open { transform: translateX(0); }

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.cart-header button {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: var(--ink);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 8px 24px;
}

.cart-empty {
  color: #8A9089;
  font-size: 14px;
  padding: 32px 0;
  text-align: center;
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.cart-item img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-item-name {
  font-size: 13px;
  font-weight: 600;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.qty-btn {
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}

.remove-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--error);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}

.cart-item-price {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 13px;
  align-self: flex-start;
}

.cart-receipt {
  border-top: 2px dashed var(--line);
  padding: 20px 24px 28px;
}

.receipt-line {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.receipt-note {
  font-size: 12px;
  color: #8A9089;
  margin: 0 0 16px;
}

.checkout-btn {
  width: 100%;
  background: var(--pine);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.checkout-btn:hover:not(:disabled) { background: var(--pine-light); }

.checkout-btn:disabled {
  background: #C7CBC5;
  cursor: not-allowed;
}

.checkout-error {
  color: var(--error);
  font-size: 12px;
  margin: 10px 0 0;
  min-height: 14px;
}

@media (max-width: 640px) {
  .site-header, .hero, main, .site-footer { padding-left: 20px; padding-right: 20px; }
  .hero h1 { font-size: 36px; }
}
