/* Stockwell Design System — shared across all pages */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --cream: #F7F3ED;
  --forest: #2C4A3E;
  --sage: #7A9E8E;
  --terracotta: #C67D5B;
  --terracotta-hover: #b46a49;
  --charcoal: #2A2A2A;
  --warm-white: #FDFCFA;
  --sand: #E8DFD3;
  --light-gray: #f0ebe4;
  --border: #e0d8cd;
  --success: #3d8b5e;
  --danger: #c44;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--cream);
  color: var(--charcoal);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ─── Shared Nav ─────────────────────────────── */
.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 48px;
  background: var(--warm-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-nav .logo {
  font-family: 'DM Serif Display', serif;
  font-size: 24px;
  color: var(--forest);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.site-nav .logo:hover { opacity: 0.8; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--charcoal);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--terracotta); }
.nav-links a.active { color: var(--terracotta); font-weight: 600; }

/* Cart badge */
.cart-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cart-count {
  background: var(--terracotta);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -8px;
  right: -12px;
}
.cart-count.hidden { display: none; }

/* ─── Shared Footer ──────────────────────────── */
.site-footer {
  padding: 48px;
  background: var(--forest);
  text-align: center;
  margin-top: 80px;
}
.site-footer .footer-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  color: var(--warm-white);
  margin-bottom: 12px;
}
.site-footer p {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

/* ─── Buttons ────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary {
  background: var(--terracotta);
  color: #fff;
}
.btn-primary:hover { background: var(--terracotta-hover); transform: translateY(-1px); }
.btn-secondary {
  background: var(--forest);
  color: #fff;
}
.btn-secondary:hover { opacity: 0.9; }
.btn-outline {
  background: transparent;
  color: var(--forest);
  border: 1.5px solid var(--forest);
}
.btn-outline:hover { background: var(--forest); color: #fff; }
.btn-sm { padding: 10px 20px; font-size: 13px; }
.btn-lg { padding: 16px 36px; font-size: 16px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── Container ──────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ─── Page Header ────────────────────────────── */
.page-header {
  padding: 48px 0 32px;
  text-align: center;
}
.page-header h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 36px;
  color: var(--forest);
  margin-bottom: 8px;
}
.page-header p {
  font-size: 16px;
  color: #777;
}

/* ─── Category Filter Tabs ───────────────────── */
.category-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.category-tab {
  padding: 10px 22px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  border: 1.5px solid var(--border);
  background: var(--warm-white);
  color: var(--charcoal);
  cursor: pointer;
  transition: all 0.2s;
}
.category-tab:hover { border-color: var(--sage); }
.category-tab.active {
  background: var(--forest);
  color: #fff;
  border-color: var(--forest);
}

/* ─── Product Grid ───────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

/* Product Card */
.product-card {
  background: var(--warm-white);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(44,74,62,0.08);
}
.product-card-image {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  background: linear-gradient(135deg, var(--cream) 0%, var(--sand) 100%);
}
.product-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-card-category {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--sage);
  margin-bottom: 6px;
}
.product-card-name {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  color: var(--forest);
  margin-bottom: 6px;
}
.product-card-desc {
  font-size: 13px;
  color: #888;
  line-height: 1.5;
  flex: 1;
  margin-bottom: 16px;
}
.product-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.product-card-price {
  font-size: 20px;
  font-weight: 600;
  color: var(--forest);
}
.product-card .btn-add-cart {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  background: var(--terracotta);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.product-card .btn-add-cart:hover { background: var(--terracotta-hover); }

/* ─── Product Detail ─────────────────────────── */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding: 60px 0;
  align-items: start;
}
.product-image-lg {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 120px;
  background: linear-gradient(135deg, var(--cream) 0%, var(--sand) 100%);
  border-radius: 24px;
}
.product-info h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 36px;
  color: var(--forest);
  margin-bottom: 8px;
}
.product-info .product-category-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--sage);
  margin-bottom: 20px;
  display: inline-block;
}
.product-info .product-price-lg {
  font-size: 32px;
  font-weight: 700;
  color: var(--forest);
  margin-bottom: 24px;
}
.product-info .product-description {
  font-size: 16px;
  line-height: 1.8;
  color: #666;
  margin-bottom: 32px;
}
.quantity-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.quantity-selector label {
  font-size: 14px;
  font-weight: 500;
  color: #666;
}
.quantity-selector .qty-controls {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.quantity-selector button {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--warm-white);
  font-size: 18px;
  cursor: pointer;
  color: var(--charcoal);
  transition: background 0.2s;
}
.quantity-selector button:hover { background: var(--cream); }
.quantity-selector .qty-value {
  width: 48px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
.breadcrumb {
  padding: 20px 0;
  font-size: 14px;
  color: #999;
}
.breadcrumb a {
  color: var(--sage);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--terracotta); }

/* ─── Cart ───────────────────────────────────── */
.cart-empty {
  text-align: center;
  padding: 80px 0;
}
.cart-empty p {
  font-size: 18px;
  color: #888;
  margin-bottom: 24px;
}
.cart-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 40px;
}
.cart-table th {
  text-align: left;
  padding: 16px 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--sage);
  border-bottom: 2px solid var(--border);
}
.cart-table td {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.cart-item-info {
  display: flex;
  align-items: center;
  gap: 16px;
}
.cart-item-emoji {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}
.cart-item-name {
  font-weight: 600;
  color: var(--forest);
  font-size: 15px;
}
.cart-item-price { color: #666; font-size: 14px; }
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cart-item-qty button {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--warm-white);
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
}
.cart-item-qty button:hover { border-color: var(--sage); }
.cart-item-qty span {
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}
.cart-remove {
  background: none;
  border: none;
  color: #bbb;
  cursor: pointer;
  font-size: 18px;
  transition: color 0.2s;
}
.cart-remove:hover { color: var(--danger); }
.cart-summary {
  max-width: 400px;
  margin-left: auto;
  background: var(--warm-white);
  border-radius: 16px;
  padding: 32px;
  border: 1px solid var(--border);
}
.cart-summary h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  color: var(--forest);
  margin-bottom: 20px;
}
.cart-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  font-size: 15px;
  color: #666;
  border-bottom: 1px solid var(--border);
}
.cart-summary-row.total {
  border-bottom: none;
  padding-top: 16px;
  font-size: 18px;
  font-weight: 700;
  color: var(--forest);
}
.cart-summary .btn { width: 100%; margin-top: 20px; }

/* ─── Order Confirmation ─────────────────────── */
.confirmation-box {
  max-width: 600px;
  margin: 60px auto;
  text-align: center;
  background: var(--warm-white);
  border-radius: 24px;
  padding: 60px 40px;
  border: 1px solid var(--border);
}
.confirmation-box .check-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(61,139,94,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 36px;
}
.confirmation-box h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 32px;
  color: var(--forest);
  margin-bottom: 12px;
}
.confirmation-box p {
  font-size: 16px;
  color: #777;
  line-height: 1.6;
  margin-bottom: 32px;
}

/* ─── Loading / Toast ────────────────────────── */
.loading-spinner {
  display: flex;
  justify-content: center;
  padding: 60px 0;
}
.loading-spinner::after {
  content: '';
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--terracotta);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--forest);
  color: #fff;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ─── Mobile ─────────────────────────────────── */
@media (max-width: 768px) {
  .site-nav { padding: 16px 20px; }
  .nav-links { gap: 20px; }
  .container { padding: 0 20px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .product-detail { grid-template-columns: 1fr; gap: 32px; }
  .product-image-lg { font-size: 80px; }
  .cart-summary { max-width: 100%; }
  .site-footer { padding: 32px 20px; margin-top: 40px; }
  .cart-table th:nth-child(3),
  .cart-table td:nth-child(3) { display: none; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .product-card-image { font-size: 48px; }
  .page-header h1 { font-size: 28px; }
}
