/* GnomeGrown Store Styles */
/* Extends landing page design tokens */

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

:root {
  --forest: #1a2e1a;
  --moss: #2d4a2d;
  --sage: #7a9a6e;
  --cream: #f5f0e8;
  --warm: #e8dcc8;
  --spore: #c4956a;
  --reishi: #8b3a3a;
  --mycelium: #d4c5a0;
  --gold: #c9a84c;
  --white-glass: rgba(255, 255, 255, 0.6);
  --border-light: rgba(45, 74, 45, 0.1);
  --shadow-sm: 0 2px 8px rgba(26, 46, 26, 0.06);
  --shadow-md: 0 8px 32px rgba(26, 46, 26, 0.08);
  --shadow-lg: 0 12px 40px rgba(26, 46, 26, 0.12);
}

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

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(45, 74, 45, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(196, 149, 106, 0.06) 0%, transparent 40%),
    radial-gradient(ellipse at 60% 80%, rgba(122, 154, 110, 0.05) 0%, transparent 45%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ---- Navigation ---- */
nav {
  padding: 28px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--forest);
  letter-spacing: -0.5px;
  text-decoration: none;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: var(--moss);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

.nav-links a.active {
  color: var(--forest);
  font-weight: 600;
}

.cart-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-count {
  background: var(--spore);
  color: white;
  font-size: 0.7rem;
  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:empty,
.cart-count[data-count="0"] {
  display: none;
}

/* ---- Page Header ---- */
.page-header {
  text-align: center;
  padding: 60px 0 40px;
}

.page-header .label {
  font-family: 'Syne', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--spore);
  margin-bottom: 16px;
}

.page-header h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 2.6rem;
  color: var(--forest);
  line-height: 1.1;
}

.page-header p {
  font-size: 1.1rem;
  color: var(--moss);
  margin-top: 16px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* ---- Category Tabs ---- */
.category-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 48px;
}

.category-tab {
  padding: 10px 24px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid var(--moss);
  background: transparent;
  color: var(--forest);
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}

.category-tab:hover {
  background: var(--forest);
  color: var(--cream);
  border-color: var(--forest);
}

.category-tab.active {
  background: var(--forest);
  color: var(--cream);
  border-color: var(--forest);
}

/* ---- Product Grid ---- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-bottom: 80px;
}

.product-card {
  background: var(--white-glass);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 28px 24px;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.product-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 18px;
}

.product-card-category {
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--spore);
  font-weight: 500;
  margin-bottom: 8px;
}

.product-card h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--forest);
  margin-bottom: 4px;
}

.product-card .latin {
  font-style: italic;
  font-size: 0.82rem;
  color: var(--sage);
  margin-bottom: 12px;
}

.product-card p {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--moss);
  flex: 1;
}

.product-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.product-price {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--forest);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
  text-decoration: none;
}

.btn-primary {
  background: var(--forest);
  color: var(--cream);
}

.btn-primary:hover {
  background: var(--moss);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--forest);
  border: 1.5px solid var(--moss);
}

.btn-secondary:hover {
  background: var(--forest);
  color: var(--cream);
  border-color: var(--forest);
}

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

.btn-spore:hover {
  background: #b8865c;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
}

/* ---- Product Detail ---- */
.product-detail {
  padding: 40px 0 80px;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.product-image-area {
  background: var(--white-glass);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.product-image-emoji {
  font-size: 6rem;
  position: relative;
  z-index: 2;
}

.product-image-bg {
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  opacity: 0.15;
  z-index: 1;
}

.product-info h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 2.2rem;
  color: var(--forest);
  margin-bottom: 4px;
}

.product-info .latin {
  font-style: italic;
  font-size: 1rem;
  color: var(--sage);
  margin-bottom: 8px;
}

.product-info .category-badge {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--spore);
  font-weight: 500;
  background: rgba(196, 149, 106, 0.12);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.product-price-large {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 2rem;
  color: var(--forest);
  margin-bottom: 24px;
}

.product-description {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--moss);
  margin-bottom: 32px;
}

.product-description p {
  margin-bottom: 16px;
}

.product-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
}

.quantity-selector {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--moss);
  border-radius: 100px;
  overflow: hidden;
}

.quantity-selector button {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--forest);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  font-family: 'DM Sans', sans-serif;
}

.quantity-selector button:hover {
  background: rgba(45, 74, 45, 0.06);
}

.quantity-selector input {
  width: 40px;
  text-align: center;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--forest);
  background: transparent;
  font-family: 'DM Sans', sans-serif;
}

.quantity-selector input:focus {
  outline: none;
}

/* Benefits & Cultivation sections */
.product-section {
  margin-bottom: 32px;
}

.product-section h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--forest);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.benefit-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.benefit-list li {
  font-size: 0.92rem;
  color: var(--moss);
  padding-left: 24px;
  position: relative;
  line-height: 1.5;
}

.benefit-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sage);
}

.cultivation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cultivation-item {
  background: var(--white-glass);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 14px 16px;
}

.cultivation-item .label {
  font-size: 0.72rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--spore);
  font-weight: 500;
  margin-bottom: 4px;
}

.cultivation-item .value {
  font-size: 0.9rem;
  color: var(--forest);
  font-weight: 500;
}

.cultivation-notes {
  grid-column: 1 / -1;
}

.cultivation-notes .value {
  line-height: 1.5;
  color: var(--moss);
  font-weight: 400;
}

/* ---- Cart Page ---- */
.cart-page {
  padding: 40px 0 80px;
}

.cart-empty {
  text-align: center;
  padding: 80px 0;
}

.cart-empty p {
  font-size: 1.1rem;
  color: var(--moss);
  margin-bottom: 24px;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.cart-item {
  background: var(--white-glass);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.cart-item-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
}

.cart-item-info h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--forest);
  margin-bottom: 2px;
}

.cart-item-info .latin {
  font-style: italic;
  font-size: 0.8rem;
  color: var(--sage);
}

.cart-item-price {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--forest);
  min-width: 70px;
  text-align: right;
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--reishi);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.2s;
  font-family: 'DM Sans', sans-serif;
}

.cart-item-remove:hover {
  background: rgba(139, 58, 58, 0.08);
}

.cart-summary {
  background: var(--white-glass);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 32px;
  max-width: 400px;
  margin-left: auto;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}

.cart-summary-row.total {
  border-top: 2px solid var(--border-light);
  margin-top: 8px;
  padding-top: 16px;
}

.cart-summary-row .label {
  color: var(--moss);
  font-size: 0.95rem;
}

.cart-summary-row .value {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  color: var(--forest);
  font-size: 1rem;
}

.cart-summary-row.total .value {
  font-size: 1.4rem;
}

.cart-checkout-btn {
  width: 100%;
  margin-top: 20px;
  justify-content: center;
  padding: 14px 32px;
  font-size: 1rem;
}

/* ---- Success Page ---- */
.success-page {
  text-align: center;
  padding: 100px 0;
}

.success-icon {
  font-size: 4rem;
  margin-bottom: 24px;
}

.success-page h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 2.4rem;
  color: var(--forest);
  margin-bottom: 16px;
}

.success-page p {
  font-size: 1.1rem;
  color: var(--moss);
  max-width: 500px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

/* ---- Out of Stock ---- */
.out-of-stock {
  opacity: 0.6;
}

.out-of-stock .btn {
  pointer-events: none;
  background: var(--mycelium);
}

/* ---- Breadcrumb ---- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--sage);
  padding: 20px 0 0;
}

.breadcrumb a {
  color: var(--sage);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--forest);
}

.breadcrumb .sep {
  color: var(--mycelium);
}

/* ---- Toast Notification ---- */
.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: var(--forest);
  color: var(--cream);
  padding: 16px 24px;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transform: translateY(120%);
  transition: transform 0.3s ease;
}

.toast.show {
  transform: translateY(0);
}

/* ---- Footer ---- */
footer {
  padding: 32px 0;
  text-align: center;
  border-top: 1px solid var(--border-light);
}

footer p {
  font-size: 0.82rem;
  color: var(--sage);
}

footer a {
  color: var(--spore);
  text-decoration: none;
}

/* ---- Icon Backgrounds ---- */
.icon-lions { background: linear-gradient(135deg, #f0e6d3, #e8d5b5); }
.icon-reishi { background: linear-gradient(135deg, #e0c8c8, #d4a8a8); }
.icon-turkey { background: linear-gradient(135deg, #d5ddd5, #b8c8b8); }
.icon-chaga { background: linear-gradient(135deg, #d4c5a0, #bfae87); }
.icon-shiitake { background: linear-gradient(135deg, #ddd5c8, #c8b8a0); }
.icon-oyster { background: linear-gradient(135deg, #e8d0d8, #dbb8c5); }
.icon-chestnut { background: linear-gradient(135deg, #d8c8b0, #c4a880); }
.icon-golden { background: linear-gradient(135deg, #e8dca0, #d4c878); }
.icon-pink { background: linear-gradient(135deg, #e8c8d0, #dba8b8); }
.icon-maitake { background: linear-gradient(135deg, #c8d8c0, #a8c8a0); }
.icon-tincture { background: linear-gradient(135deg, #d0d8e0, #b0c0d0); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-detail-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .product-image-area {
    height: 300px;
  }
}

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

  .page-header h1 {
    font-size: 2rem;
  }

  .page-header {
    padding: 40px 0 24px;
  }

  .category-tabs {
    flex-wrap: wrap;
  }

  .nav-links {
    gap: 16px;
  }

  .nav-links a {
    font-size: 0.85rem;
  }

  .cart-item {
    flex-wrap: wrap;
  }

  .cart-summary {
    max-width: none;
  }

  .product-info h1 {
    font-size: 1.8rem;
  }

  .cultivation-grid {
    grid-template-columns: 1fr;
  }

  .product-actions {
    flex-direction: column;
  }

  .product-actions .btn {
    justify-content: center;
  }
}

/* ---- Loading States ---- */
.skeleton {
  background: linear-gradient(90deg, var(--warm) 25%, var(--cream) 50%, var(--warm) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- Divider ---- */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--mycelium), transparent);
  margin: 20px 0;
}
