/* ==========================================================================
   Vegetables — subcategory hub, result cards, detail page
   ========================================================================== */

/* Full-width vegetables mode — override Plant Finder sidebar grid */
.plant-finder--vegetables .finder-layout {
  display: block !important;
  grid-template-columns: none !important;
}

.plant-finder--vegetables .filters-sidebar {
  display: none !important;
}

.plant-finder--vegetables .filter-toggle-btn,
.plant-finder--vegetables .drawer-backdrop {
  display: none !important;
}

.plant-finder--vegetables .finder-main {
  display: block !important;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

.plant-finder--vegetables .veg-subcat-grid,
.plant-finder--vegetables .veg-results-grid {
  display: block;
  width: 100%;
}

.veg-finder-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.veg-finder-crumb a {
  color: var(--color-accent);
  font-weight: 600;
}

.veg-finder-lead {
  margin: 0 0 1.5rem;
  max-width: 40rem;
  color: var(--color-text-muted);
  font-size: 0.9875rem;
  line-height: 1.6;
}

/* Vegetables category banner / header — full-bleed image with text overlay */
.veg-category-hero {
  position: relative;
  width: 100%;
  height: 260px;
  margin: 0 0 1.75rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  background: #1a2e22;
}

.veg-category-hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.veg-category-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem 1.15rem 1.35rem;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.55),
    rgba(0, 0, 0, 0.2),
    rgba(0, 0, 0, 0.1)
  );
}

.veg-category-hero__title {
  margin: 0 0 0.4rem;
  font-size: clamp(1.65rem, 4vw, 2.25rem);
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.veg-category-hero__text {
  margin: 0;
  max-width: 32rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.9375rem;
  line-height: 1.55;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

@media (min-width: 768px) {
  .veg-category-hero {
    height: 340px;
  }

  .veg-category-hero__overlay {
    padding: 1.75rem 1.75rem 1.85rem;
  }

  .veg-category-hero__text {
    font-size: 1.0125rem;
  }
}

@media (min-width: 1024px) {
  .veg-category-hero {
    height: 420px;
  }

  .veg-category-hero__overlay {
    padding: 2rem 2rem 2.1rem;
  }
}

/* Subcategory cards */

.veg-subcat-grid__items {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.veg-subcat-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.veg-subcat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.veg-subcat-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background: rgba(45, 106, 79, 0.08);
  overflow: hidden;
}

.veg-subcat-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.veg-subcat-card__icon {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.veg-subcat-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.1rem 1.15rem 1.2rem;
  flex: 1;
}

.veg-subcat-card__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
}

.veg-subcat-card__title {
  margin: 0;
  font-size: 1.1rem;
}

.veg-subcat-card__count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.veg-subcat-card__desc {
  margin: 0;
  flex: 1;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}

/* Vegetable result cards */

.veg-results-grid__items {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.veg-result-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.veg-result-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.veg-result-card__media {
  display: block;
  aspect-ratio: 4 / 3;
  background: rgba(45, 106, 79, 0.06);
  overflow: hidden;
}

.veg-result-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.veg-result-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.15rem 1.2rem 1.25rem;
  flex: 1;
}

.veg-result-card__name {
  margin: 0;
  font-size: 1.2rem;
}

.veg-result-card__botanical {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.veg-result-card__specs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
}

.veg-result-card__specs li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8125rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--color-border);
}

.veg-result-card__specs strong {
  color: var(--color-text-muted);
  font-weight: 600;
}

.veg-result-card__facts {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.veg-result-card__facts li + li {
  margin-top: 0.25rem;
}

/* Detail page */

.veg-page {
  padding-bottom: 3.5rem;
}

.veg-page .site-container {
  max-width: 1100px;
}

.veg-detail-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 1rem 0 2rem;
}

.veg-detail-hero__visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: rgba(45, 106, 79, 0.06);
  aspect-ratio: 4 / 3;
}

.veg-detail-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.veg-detail-hero__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  letter-spacing: -0.02em;
}

.veg-detail-hero__botanical {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  color: var(--color-text-muted);
}

.veg-detail-hero__desc {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text-muted);
}

.veg-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0 0;
}

.veg-detail-badge {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--color-accent-light);
  color: var(--color-accent-hover);
  font-size: 0.75rem;
  font-weight: 700;
}

.veg-section {
  margin-top: 2.25rem;
}

.veg-section__title {
  margin: 0 0 0.85rem;
  font-size: 1.35rem;
}

.veg-specs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.veg-spec {
  padding: 0.9rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.veg-spec__label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.veg-spec__value {
  font-size: 0.95rem;
  font-weight: 600;
}

.veg-prose {
  max-width: 42rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  font-size: 0.9875rem;
}

.veg-prose p + p,
.veg-list li + li {
  margin-top: 0.55rem;
}

.veg-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.veg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.veg-chip {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: 0.8125rem;
  font-weight: 600;
}

.veg-chip--warn {
  border-color: #fdba74;
  background: #fff7ed;
}

.veg-faq details {
  padding: 0.85rem 1rem;
  margin-bottom: 0.55rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.veg-faq summary {
  cursor: pointer;
  font-weight: 600;
}

.veg-faq p {
  margin: 0.65rem 0 0;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.veg-related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.veg-related-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  text-align: center;
  transition: border-color var(--transition), transform var(--transition);
}

.veg-related-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.veg-related-card__emoji {
  font-size: 1.5rem;
}

.veg-related-card__name {
  font-weight: 700;
  font-size: 0.9rem;
}

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

.veg-page-state[hidden],
.veg-content[hidden] {
  display: none !important;
}

.veg-content:not([hidden]) {
  display: block;
}

@media (min-width: 640px) {
  .veg-subcat-grid__items,
  .veg-results-grid__items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .veg-specs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .veg-result-card__specs {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 960px) {
  .veg-subcat-grid__items {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .veg-results-grid__items {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .veg-detail-hero {
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
  }

  .veg-specs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .veg-related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
