/* ==========================================================================
   Lab Grade Supply — Brand Stylesheet
   Colors, typography, and components per 2026 Brand Guidelines
   ========================================================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,700&family=Inter:wght@400;500;600;700&display=swap');

/* --- Design Tokens --- */
:root {
  /* Primary */
  --terracotta:    #E8956A;
  --terracotta-dk: #d17a52;
  --warm-peach:    #F5C4A1;
  --charcoal:      #2B2B2B;

  /* Secondary */
  --cream:         #FDF6F0;
  --blush:         #FBF0EA;
  --sage:          #A8C5A0;

  /* Accent */
  --gold-star:     #F5A623;
  --forest-check:  #4A7C59;
  --soft-gray:     #7A7A7A;

  /* Brand accents (multi-brand marketplace) */
  --colossus:      #1a3a5c;
  --colossus-dk:   #12293f;

  /* Functional */
  --white:         #FFFFFF;
  --text-body:     #3a3a3a;
  --text-light:    #6b6b6b;
  --border-light:  #e8e0d8;

  /* Typography */
  --font-heading:  'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --container-max: 1100px;
  --space-xs:      0.5rem;
  --space-sm:      1rem;
  --space-md:      1.5rem;
  --space-lg:      2rem;
  --space-xl:      3rem;
  --space-2xl:     5rem;
}

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

/* --- Base --- */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--charcoal);
  background: var(--cream);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--charcoal);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }

a {
  color: var(--terracotta);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--terracotta-dk);
}

/* ==========================================================================
   Navbar
   ========================================================================== */

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-lg);
  background: var(--charcoal);
  border-top: 3px solid var(--terracotta);
}

.brand {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--terracotta);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.brand:hover {
  color: var(--warm-peach);
}

.brand-tagline {
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--warm-peach);
  display: block;
  margin-top: -2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-links a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--white);
}

/* ==========================================================================
   Container
   ========================================================================== */

.container {
  flex: 1;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-lg);
  width: 100%;
}

/* ==========================================================================
   Buttons — Pill-shaped per brand guide
   ========================================================================== */

.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background 0.2s ease, transform 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

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

.btn-primary:hover {
  background: var(--terracotta-dk);
  color: var(--white);
}

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

.btn-secondary:hover {
  background: var(--terracotta);
  color: var(--white);
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.75rem;
}

/* ==========================================================================
   Landing Page
   ========================================================================== */

.landing-hero {
  text-align: center;
  padding: var(--space-2xl) var(--space-sm);
  background: var(--blush);
  border-radius: 12px;
  margin: var(--space-lg) 0;
}

.landing-logo {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 700;
  font-size: 3.5rem;
  color: var(--terracotta);
  margin-bottom: var(--space-xs);
  letter-spacing: 0.02em;
}

.landing-subtitle {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--soft-gray);
  margin-bottom: var(--space-md);
}

.landing-tagline {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: var(--space-xl);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.landing-cta {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
}

.landing-contact {
  text-align: center;
  margin-top: var(--space-lg);
  font-size: 0.9rem;
  color: var(--soft-gray);
}

.landing-contact a {
  color: var(--terracotta);
  font-weight: 600;
}

/* Value props */
.value-props {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
  margin: var(--space-xl) 0;
}

.value-card {
  background: var(--white);
  border-radius: 10px;
  padding: var(--space-md);
  border-left: 3px solid var(--terracotta);
}

.value-card h3 {
  font-size: 1rem;
  margin-bottom: var(--space-xs);
  color: var(--charcoal);
}

.value-card p {
  font-size: 0.875rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* ==========================================================================
   Policy Pages
   ========================================================================== */

.policy-page {
  max-width: 780px;
  margin: 0 auto;
  padding: var(--space-lg) 0;
}

.policy-page h1 {
  font-size: 2rem;
  margin-bottom: var(--space-xs);
  color: var(--charcoal);
}

.policy-meta {
  font-size: 0.85rem;
  color: var(--soft-gray);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-light);
}

.policy-page h2 {
  font-size: 1.25rem;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xs);
  color: var(--charcoal);
}

.policy-page p,
.policy-page li {
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.7;
  margin-bottom: var(--space-sm);
}

.policy-page ul {
  padding-left: var(--space-md);
  margin-bottom: var(--space-sm);
}

.policy-page li {
  margin-bottom: var(--space-xs);
}

.policy-page strong {
  color: var(--charcoal);
}

/* Contact page specifics */
.contact-card {
  background: var(--blush);
  border-radius: 10px;
  padding: var(--space-lg);
  margin: var(--space-md) 0;
  border-left: 3px solid var(--terracotta);
}

.contact-card h3 {
  margin-bottom: var(--space-sm);
}

.contact-card p {
  margin-bottom: var(--space-xs);
}

/* ==========================================================================
   Auth Forms (allauth overrides)
   ========================================================================== */

.auth-card {
  max-width: 440px;
  margin: var(--space-xl) auto;
  background: var(--white);
  border-radius: 12px;
  padding: var(--space-xl) var(--space-lg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.auth-card .auth-logo {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 700;
  font-size: 2rem;
  color: var(--terracotta);
  text-align: center;
  display: block;
  margin-bottom: var(--space-xs);
}

.auth-card h1 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-xs);
}

.auth-card .auth-subtitle {
  text-align: center;
  color: var(--soft-gray);
  font-size: 0.9rem;
  margin-bottom: var(--space-lg);
}

.auth-card .auth-subtitle a {
  color: var(--terracotta);
  font-weight: 600;
}

/* Form fields */
.form-group {
  margin-bottom: var(--space-md);
}

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

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--charcoal);
  background: var(--cream);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(232,149,106,0.15);
}

.form-group .helptext,
.form-group .help-text {
  display: block;
  font-size: 0.78rem;
  color: var(--soft-gray);
  margin-top: 0.3rem;
  line-height: 1.4;
}

.form-group .errorlist {
  list-style: none;
  padding: 0;
  margin: 0.3rem 0 0;
}

.form-group .errorlist li {
  font-size: 0.82rem;
  color: #991b1b;
  background: #fee2e2;
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  margin-top: 0.25rem;
}

/* Non-field errors (top of form) */
.auth-card > .errorlist {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-md);
}

.auth-card > .errorlist li {
  font-size: 0.85rem;
  color: #991b1b;
  background: #fee2e2;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  margin-bottom: 0.35rem;
}

.auth-card .btn {
  width: 100%;
  margin-top: var(--space-sm);
}

.auth-card .auth-links {
  text-align: center;
  margin-top: var(--space-md);
  font-size: 0.85rem;
  color: var(--soft-gray);
}

.auth-card .auth-links a {
  color: var(--terracotta);
  font-weight: 500;
}

/* Auth message pages (verification sent, reset done, etc.) */
.auth-card .auth-message {
  text-align: center;
  color: var(--text-body);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

/* ==========================================================================
   Order Confirmation
   ========================================================================== */

.order-confirmation {
  max-width: 600px;
  margin: 0 auto;
}

.order-summary {
  text-align: left;
  background: var(--cream);
  border-radius: 8px;
  padding: var(--space-md);
  margin-top: var(--space-md);
}

.order-summary-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--soft-gray);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--border-light);
}

.order-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-sm);
}

.order-items-table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--soft-gray);
  padding: 0.4rem 0;
}

.order-items-table td {
  padding: 0.4rem 0;
  font-size: 0.9rem;
  color: var(--text-body);
  border-bottom: 1px solid var(--border-light);
}

.order-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--charcoal);
  padding-top: var(--space-sm);
}

/* ==========================================================================
   Dashboard
   ========================================================================== */

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.dashboard-header h1 {
  font-size: 1.75rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-md);
}

.dashboard-card {
  background: var(--white);
  border-radius: 10px;
  padding: var(--space-lg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.dashboard-card h2 {
  font-size: 1.15rem;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--border-light);
}

/* Orders table */
.orders-table {
  width: 100%;
  border-collapse: collapse;
}

.orders-table th {
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--soft-gray);
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

.orders-table td {
  padding: 0.65rem 0.75rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-body);
}

.orders-table tr:last-child td {
  border-bottom: none;
}

.reorder-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--terracotta);
}

.status-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.status-paid       { background: #d1fae5; color: #065f46; }
.status-processing { background: #dbeafe; color: #1e40af; }
.status-fulfilled  { background: #e0e7ff; color: #3730a3; }
.status-shipped    { background: #fef3c7; color: #92400e; }
.status-delivered  { background: #d1fae5; color: #065f46; }
.status-cancelled  { background: #fee2e2; color: #991b1b; }
.status-awaiting_payment { background: #fef3c7; color: #92400e; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: var(--space-lg) var(--space-sm);
  color: var(--soft-gray);
}

.empty-state p {
  margin-bottom: var(--space-sm);
}

/* Quick actions */
.quick-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.quick-actions .btn {
  text-align: center;
}

/* ==========================================================================
   Account Settings
   ========================================================================== */

.settings-page {
  max-width: 640px;
  margin: 0 auto;
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.settings-header h1 {
  font-size: 1.75rem;
}

.settings-card {
  background: var(--white);
  border-radius: 10px;
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.settings-card h2 {
  font-size: 1.15rem;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--border-light);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

/* Settings form inputs — same style as auth */
.settings-card input[type="text"],
.settings-card input[type="email"] {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--charcoal);
  background: var(--cream);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.settings-card input:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(232,149,106,0.15);
}

.settings-card input:disabled {
  background: var(--blush);
  color: var(--soft-gray);
  cursor: not-allowed;
}

/* ==========================================================================
   Catalog
   ========================================================================== */

.catalog-page {
  max-width: 960px;
  margin: 0 auto;
}

.catalog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.catalog-header h1 {
  font-size: 1.75rem;
}

/* Search & Filters */
.catalog-filters {
  margin-bottom: var(--space-lg);
}

.search-form {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.search-input {
  flex: 1;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--border-light);
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--white);
  color: var(--charcoal);
  transition: border-color 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(232,149,106,0.15);
}

.filter-clear {
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  color: var(--soft-gray);
  padding: 0 0.5rem;
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.category-tag {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--white);
  color: var(--text-body);
  border: 1px solid var(--border-light);
  transition: all 0.15s ease;
}

.category-tag:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
}

.category-tag.active {
  background: var(--terracotta);
  color: var(--white);
  border-color: var(--terracotta);
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-md);
}

.product-card {
  background: var(--white);
  border-radius: 10px;
  padding: var(--space-md);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: box-shadow 0.2s ease;
}

.product-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.product-card-body {
  margin-bottom: var(--space-sm);
}

.product-category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--soft-gray);
  margin-bottom: 0.35rem;
}

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

.product-card h3 a {
  color: var(--charcoal);
}

.product-card h3 a:hover {
  color: var(--terracotta);
}

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

.btn-add-cart {
  width: 100%;
}

/* Brand filter row */
.brand-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.brand-tag {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--white);
  color: var(--text-body);
  border: 1px solid var(--border-light);
  transition: all 0.15s ease;
}

.brand-tag:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
}

.brand-tag--colossus:hover {
  border-color: var(--colossus);
  color: var(--colossus);
}

.brand-tag.active {
  background: var(--terracotta);
  color: var(--white);
  border-color: var(--terracotta);
}

.brand-tag--colossus.active {
  background: var(--colossus);
  color: var(--white);
  border-color: var(--colossus);
}

/* Product image (card) — uniform height, contain so vial labels aren't cropped */
.product-image {
  display: block;
  width: 100%;
  height: 280px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: var(--space-sm);
  background: #f8f8f8;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f8f8f8;
  display: block;
}

.product-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--blush), var(--warm-peach));
}

.product-image-placeholder--colossus {
  background: linear-gradient(135deg, #24425f, var(--colossus));
}

.product-image-placeholder .brand-label {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--white);
  text-align: center;
  padding: 0 0.5rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.product-image-placeholder--bodela .brand-label {
  color: var(--charcoal);
  text-shadow: none;
}

/* Brand + size labels */
.product-brand {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.2rem;
  margin-right: 0.4rem;
}

.product-brand--bodela {
  color: var(--terracotta);
}

.product-brand--colossus {
  color: var(--colossus);
}

.product-size {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--soft-gray);
  margin: 0.15rem 0 0.35rem;
}

/* ==========================================================================
   Product Detail
   ========================================================================== */

.product-detail-image {
  width: 100%;
  max-width: 360px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: var(--space-md);
  background: #f8f8f8;
}

.product-detail-image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: contain;
  border-radius: 12px;
}

.product-size-lg {
  font-size: 1rem;
}

.product-detail {
  max-width: 640px;
  margin: 0 auto;
}

.back-link {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--soft-gray);
  margin-bottom: var(--space-md);
}

.back-link:hover {
  color: var(--terracotta);
}

.product-detail-card {
  background: var(--white);
  border-radius: 10px;
  padding: var(--space-xl);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.product-detail-card h1 {
  font-size: 1.75rem;
  margin-bottom: var(--space-xs);
}

.product-sku {
  font-size: 0.8rem;
  color: var(--soft-gray);
  margin-bottom: var(--space-sm);
}

.product-price-lg {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--terracotta);
  margin-bottom: var(--space-md);
}

.product-description {
  color: var(--text-body);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

.product-recurring-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--forest-check);
  background: #e8f5e3;
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  margin-bottom: var(--space-md);
}

/* ==========================================================================
   Cart
   ========================================================================== */

.cart-page {
  max-width: 800px;
  margin: 0 auto;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.cart-header h1 {
  font-size: 1.75rem;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  margin-bottom: var(--space-md);
}

.cart-table th {
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--soft-gray);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--blush);
}

.cart-table td {
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-body);
  vertical-align: middle;
}

.cart-table tr:last-child td {
  border-bottom: none;
}

.cart-table td a {
  color: var(--charcoal);
  font-weight: 500;
}

.cart-table td a:hover {
  color: var(--terracotta);
}

.cart-item-category {
  display: block;
  font-size: 0.72rem;
  color: var(--soft-gray);
  margin-top: 0.15rem;
}

.line-total {
  font-weight: 600;
  color: var(--charcoal);
}

/* Quantity controls */
.qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  overflow: hidden;
}

.qty-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--cream);
  color: var(--charcoal);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.qty-btn:hover {
  background: var(--warm-peach);
}

.qty-value {
  width: 36px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  border-left: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  line-height: 32px;
}

.remove-btn {
  background: none;
  border: none;
  color: #991b1b;
  font-size: 0.8rem;
  cursor: pointer;
  font-weight: 500;
}

.remove-btn:hover {
  text-decoration: underline;
}

/* Cart summary */
.cart-summary {
  background: var(--white);
  border-radius: 10px;
  padding: var(--space-lg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  text-align: right;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-light);
}

.total-amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--terracotta);
}

.btn-checkout {
  min-width: 220px;
}

.cart-note {
  font-size: 0.8rem;
  color: var(--soft-gray);
  margin-top: var(--space-sm);
}

/* Variant select in product cards */
.variant-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237A7A7A'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
  background-size: 10px;
  padding-right: 2rem !important;
  cursor: pointer;
}

.variant-select:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(232,149,106,0.15);
}

/* ==========================================================================
   Add-to-cart feedback — toast, button states, badge bounce
   ========================================================================== */

.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: 320px;
  background: var(--charcoal);
  color: var(--white);
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.22);
  pointer-events: auto;
  animation: toast-in 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.toast-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--forest-check);
  color: var(--white);
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.toast-body {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
}

.toast-body strong {
  font-size: 0.88rem;
  font-weight: 600;
}

.toast-body small {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast-action {
  flex-shrink: 0;
  color: var(--terracotta);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.toast-action:hover {
  color: var(--warm-peach);
}

.toast--exit {
  animation: toast-out 0.3s ease forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(40px); }
}

/* Button state feedback */
.btn-add-cart.is-adding {
  pointer-events: none;
  opacity: 0.75;
}

.btn-add-cart.is-added {
  background: var(--forest-check);
  color: var(--white);
  pointer-events: none;
}

/* Cart badge bounce */
.cart-link.badge-pop,
.nav-cart-count.badge-pop {
  animation: badge-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes badge-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.25); }
  70%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.nav-cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--terracotta);
  color: var(--white);
  border-radius: 50px;
  font-size: 0.68rem;
  font-weight: 700;
  margin-left: 4px;
  line-height: 1;
}

@media (max-width: 640px) {
  .toast-container {
    top: auto;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
  }
  .toast {
    max-width: none;
  }
}

/* ==========================================================================
   Responsive — Dashboard, Settings, Catalog, Cart
   ========================================================================== */

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

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

  .orders-table th:nth-child(4),
  .orders-table td:nth-child(4) {
    display: none;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-sm);
  }

  .cart-table th:nth-child(2),
  .cart-table td:nth-child(2) {
    display: none;
  }
}

/* ==========================================================================
   Messages / Alerts
   ========================================================================== */

.messages {
  margin-bottom: var(--space-md);
}

.alert {
  padding: 0.75rem var(--space-sm);
  border-radius: 8px;
  margin-bottom: var(--space-xs);
  font-size: 0.9rem;
}

.alert-success { background: #d1fae5; color: #065f46; }
.alert-error   { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-info    { background: #dbeafe; color: #1e40af; }

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
  background: var(--charcoal);
  color: rgba(255,255,255,0.6);
  padding: var(--space-xl) var(--space-lg);
  margin-top: auto;
  border-top: 3px solid var(--terracotta);
}

.footer-content {
  max-width: var(--container-max);
  margin: 0 auto;
  text-align: center;
}

.footer-brand {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--terracotta);
  display: block;
  margin-bottom: var(--space-md);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-xs) var(--space-md);
  margin-bottom: var(--space-md);
}

.footer-links a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--warm-peach);
}

.footer-contact {
  font-size: 0.85rem;
  margin-bottom: var(--space-xs);
  color: rgba(255,255,255,0.5);
}

.footer-contact a {
  color: var(--warm-peach);
}

.footer-copy {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 640px) {
  .navbar {
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-sm);
  }

  .nav-links {
    gap: var(--space-sm);
  }

  .landing-logo {
    font-size: 2.5rem;
  }

  .landing-tagline {
    font-size: 1.1rem;
  }

  .container {
    padding: var(--space-sm);
  }

  .footer-links {
    flex-direction: column;
    gap: var(--space-xs);
  }

  .value-props {
    grid-template-columns: 1fr;
  }
}
