/* =========================================================================
   NUTRIGUIA - DESIGN SYSTEM
   ========================================================================= */

.nutriguia-body {
  /* Inherit main site background */
  color: var(--ns-text);
}

/* --- Hero Section --- */
.ng-hero {
  text-align: center;
  padding: 80px 20px 40px;
  background: transparent; /* Remove custom white background to blend with grain */
}

.ng-hero h1 {
  font-family: var(--ns-font-headers, 'Fraunces', serif);
  font-weight: 700;
  font-size: 40px;
  color: var(--ns-green, #31513c); /* Use site's dark green */
  margin-bottom: 16px;
}

.ng-hero p {
  font-family: var(--ns-font-body, 'DM Sans', sans-serif);
  font-size: 18px;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
}

/* --- Main Container --- */
.ng-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px 80px;
}

/* --- Cards Grid --- */
.ng-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.ng-card {
  background: var(--ns-surface, #ffffff);
  border-radius: var(--ns-rad, 16px);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.ng-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.ng-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--ns-surface, #ffffff);
}

.ng-card-body {
  padding: 24px;
  text-align: center;
}

.ng-card-body h3 {
  font-family: var(--ns-font-headers, 'Fraunces', serif);
  font-size: 24px;
  color: var(--ns-green, #31513c);
  margin-bottom: 8px;
}

.ng-card-body p {
  font-family: var(--ns-font-body, 'DM Sans', sans-serif);
  color: #666;
  font-size: 14px;
}

/* --- Category Page --- */
.ng-category-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.ng-btn-back {
  background: none;
  border: none;
  color: var(--ns-green, #31513c);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ns-font-headers, 'Fraunces', serif);
  text-decoration: none;
  transition: opacity 0.2s;
}

.ng-btn-back:hover {
  opacity: 0.7;
}

.ng-category-title {
  font-family: var(--ns-font-headers, 'Fraunces', serif);
  font-size: 32px;
  color: var(--ns-green, #31513c);
  flex: 1;
}

/* --- Food Table --- */
/* --- Food Table --- */
.ng-table-wrapper {
  background: var(--ns-surface, #ffffff);
  border-radius: var(--ns-rad, 16px);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  width: 100%;
}

.ng-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.ng-table th, .ng-table td {
  padding: 16px 24px;
  border-bottom: 1px solid #f3f2eb;
}

.ng-table th {
  background: #fdfcf9;
  font-family: var(--ns-font-body, 'DM Sans', sans-serif);
  font-weight: 600;
  color: #555;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.ng-table th:hover {
  background: #f3f2eb;
  color: var(--ns-green, #31513c);
}

.ng-table tbody tr {
  transition: background-color 0.2s ease;
}

.ng-table tbody tr:hover {
  background-color: #fdfdfa;
}

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

.ng-table td {
  font-family: var(--ns-font-body, 'DM Sans', sans-serif);
  font-size: 16px;
  color: var(--ns-text);
  vertical-align: middle;
}

.ng-food-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--ns-green);
}

.ng-food-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ns-bg, #f3f2eb);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

@media (max-width: 768px) {
  .ng-table-wrapper {
    background: transparent;
    box-shadow: none;
  }
  .ng-table {
    display: block;
  }
  .ng-table thead {
    display: none;
  }
  .ng-table tbody, .ng-table tr, .ng-table td {
    display: block;
    width: 100%;
  }
  .ng-table tr {
    background: var(--ns-surface, #ffffff);
    margin-bottom: 16px;
    border-radius: var(--ns-rad, 16px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    padding: 16px 20px;
    border: 1px solid #f3f2eb;
  }
  .ng-table td {
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: right;
  }
  .ng-table td:last-child {
    border-bottom: none;
  }
  .ng-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #888;
    font-size: 14px;
    text-align: left;
    margin-right: 16px;
  }
  .ng-food-cell {
    font-size: 18px;
  }
  .ng-table td[data-label="Imagem"], 
  .ng-table td[data-label="Imagen"], 
  .ng-table td[data-label="Image"] {
    justify-content: flex-end;
  }
  .ng-table td[data-label="Imagem"]::before, 
  .ng-table td[data-label="Imagen"]::before, 
  .ng-table td[data-label="Image"]::before {
    margin-right: auto;
  }
}

/* =========================================================================
   FITOGUIA - SPECIFIC STYLES
   ========================================================================= */

/* Inline plant icon in the name cell */
.ng-plant-icon {
  font-size: 22px;
  margin-right: 10px;
  line-height: 1;
  flex-shrink: 0;
}

.ng-food-cell {
  display: flex;
  align-items: center;
  gap: 0;
  font-weight: 600;
}

/* Scientific name — italic, muted green */
.ng-sci-name {
  font-style: italic;
  font-size: 13px;
  color: var(--ns-green);
  opacity: 0.75;
  white-space: nowrap;
}

/* Precaution badge — subtle warning tint */
.ng-precaution {
  font-size: 13px;
  color: #8a6b00;
  background: #fff9e6;
  border: 1px solid #f5d97a;
  border-radius: 6px;
  padding: 4px 8px;
  display: inline-block;
  line-height: 1.4;
}
