* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: #FFF5EE;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: #2A2A2A;
  overflow-x: hidden;
}

.navbar {
  background: #ad103c;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-brand {
  color: #FFF !important;
  font-weight: 700;
  font-size: 1.5rem;
}

.navbar-nav .nav-link {
  color: #FFF !important;
  font-weight: 600;
  transition: all 0.2s ease-in-out;
}

.navbar-nav .nav-link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffccd6 !important;
}

.navbar-nav .nav-link.active {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff !important;
}

.navbar .btn-search-toggle {
  color: #FFF;
  background: none;
  border: none;
  font-size: 1.2rem;
  transition: all 0.2s ease-in-out;
}

.navbar .btn-search-toggle:hover {
  color: #ffccd6;
}

.hero {
  background: #FFF;
  padding: 3rem 1rem;
  text-align: center;
  margin-bottom: 3rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  animation: fadeIn 0.5s ease-in;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.hero h1 {
  color: #ad103c;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  color: #2A2A2A;
  font-size: 1.1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.nutrition-section {
  background: #FFF;
  border: 2px solid #ad103c !important;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  animation: fadeIn 0.5s ease-in;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  outline: 1px solid blue; /* Debug: Remove in production */
}

.nutrition-section:hover {
  transform: translateY(-3px);
}

.nutrition-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ad103c;
  margin-bottom: 1.5rem;
}

.nutrition-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.nutrition-item {
  background: #F9F6F2;
  border: 1px solid rgba(173, 16, 60, 0.2) !important;
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.3s ease;
  position: relative;
}

.nutrition-item.active {
  background: #FFF5EE;
  border: 1px solid #ad103c !important;
}

.nutrition-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.nutrition-item .item-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nutrition-item .item-header i {
  font-size: 1.25rem;
  color: #ad103c;
}

.nutrition-item .item-header span {
  font-weight: 600;
  font-size: 1rem;
}

.nutrition-item p {
  font-size: 1rem;
  font-weight: 500;
  margin-top: 0.75rem;
}

.nutrition-item[title]:hover::after {
  content: attr(title);
  position: absolute;
  top: -2rem;
  left: 50%;
  transform: translateX(-50%);
  background: #ad103c;
  color: #FFF;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 10;
}

.what-is-section {
  background: #FFF;
  border: 2px solid #ad103c !important;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: all 0.3s ease;
  animation: fadeIn 0.5s ease-in;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  outline: 1px solid blue; /* Debug: Remove in production */
}

.what-is-section:hover {
  transform: translateY(-3px);
}

.what-is-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ad103c;
  margin-bottom: 1rem;
}

.what-is-section p {
  font-size: 1rem;
  font-weight: 500;
  max-width: 600px;
  margin: 0 auto;
}

.ingredients-section {
  background: #FFF;
  border: 2px solid #ad103c !important;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  animation: fadeIn 0.5s ease-in;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  outline: 1px solid blue; /* Debug: Remove in production */
}

.ingredients-section:hover {
  transform: translateY(-3px);
}

.ingredients-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ad103c;
  margin-bottom: 1.5rem;
}

.ingredients-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ingredients-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  font-weight: 500;
}

.ingredients-list li i {
  font-size: 0.5rem;
  color: #ad103c;
}

.allergen-section {
  background: #FFF;
  border: 2px solid #ad103c !important;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  animation: fadeIn 0.5s ease-in;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  outline: 1px solid blue; /* Debug: Remove in production */
}

.allergen-section:hover {
  transform: translateY(-3px);
}

.allergen-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ad103c;
  margin-bottom: 1.5rem;
}

.allergen-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.allergen-item {
  background: #F9F6F2;
  border: 2px solid #ccc !important;
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
  outline: 1px solid green; /* Debug: Remove in production */
}

.allergen-item.contains {
  background: #FFF5EE;
  border: 2px solid #ad103c !important;
}

.allergen-item.none {
  background: #FFF;
  border: 2px solid #ccc !important;
}

.allergen-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.allergen-item i {
  font-size: 1.25rem;
  color: #ad103c;
}

.allergen-item.none i {
  color: #999;
}

.allergen-item div {
  display: flex;
  flex-direction: column;
}

.allergen-item span {
  font-weight: 600;
  font-size: 1rem;
}

.allergen-item p {
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 0.25rem;
}

.allergen-item.contains p {
  color: #ad103c;
}

.allergen-item.none p {
  color: #999;
}

.related-section {
  background: #FFF;
  border: 2px solid #ad103c !important;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  animation: fadeIn 0.5s ease-in;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  outline: 1px solid blue; /* Debug: Remove in production */
}

.related-section:hover {
  transform: translateY(-3px);
}

.related-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ad103c;
  margin-bottom: 1.5rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.related-item {
  background: #F9F6F2;
  border: 1px solid rgba(173, 16, 60, 0.2) !important;
  border-radius: 8px;
  padding: 1rem;
  text-decoration: none;
  color: #2A2A2A;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
}

.related-item:hover {
  background: #ffccd6;
  color: #ad103c;
  border-color: #ad103c !important;
  transform: scale(1.05);
}

.related-item div {
  flex: 1;
}

.related-item span {
  font-weight: 600;
  font-size: 1rem;
}

.related-item p {
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 0.25rem;
}

.back-link {
  color: #ad103c;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  transition: all 0.2s ease-in-out;
  margin-bottom: 3rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  display: block;
}

.back-link i {
  margin-right: 0.5rem;
  font-size: 1rem;
}

.back-link:hover {
  color: #ffccd6;
  text-decoration: underline;
}

.ad-banner {
  background: #F9F6F2;
  height: 90px;
  margin: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

footer {
  background: #ad103c;
  color: #FFF;
  padding: 2rem 0;
  margin-top: auto;
}

footer .container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
}

footer .logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

footer .logo i {
  font-size: 1.5rem;
}

footer .logo span {
  font-weight: 700;
  font-size: 1.25rem;
}

footer p {
  font-size: 0.9rem;
  font-weight: 500;
}

footer h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

footer a {
  color: #FFF;
  text-decoration: none;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.75rem;
  transition: all 0.2s ease-in-out;
}

footer a:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffccd6;
}

footer .ad {
  background: #F9F6F2;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
}

footer .disclaimer {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-top: 1rem;
  text-align: center;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 991px) {
  .nutrition-grid, .allergen-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .hero {
    padding: 2rem 1rem;
  }
  .nutrition-section, .what-is-section, .ingredients-section, .allergen-section, .related-section {
    padding: 1.5rem;
  }
}

@media (max-width: 767px) {
  .hero h1 {
    font-size: 1.8rem;
  }
  .hero p, .what-is-section p, .nutrition-item p, .allergen-item p, .related-item p, .ingredients-list li {
    font-size: 0.85rem;
  }
  .nutrition-section h2, .what-is-section h2, .ingredients-section h2, .allergen-section h2, .related-section h2 {
    font-size: 1.3rem;
  }
  .nutrition-grid, .allergen-grid, .related-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .nutrition-section, .what-is-section, .ingredients-section, .allergen-section, .related-section {
    padding: 1rem;
  }
  .ad-banner {
    height: 60px;
    font-size: 0.75rem;
  }
}

@media (max-width: 576px) {
  .navbar-brand {
    font-size: 1.2rem;
  }
  .hero h1 {
    font-size: 1.6rem;
  }
  .hero p {
    font-size: 0.9rem;
  }
  .nutrition-item .item-header i, .allergen-item i {
    font-size: 1rem;
  }
  .nutrition-item .item-header span, .allergen-item span {
    font-size: 0.9rem;
  }
  .nutrition-item p, .allergen-item p, .related-item p {
    font-size: 0.8rem;
  }
  footer .container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  footer .logo {
    justify-content: center;
  }
  footer p, footer a {
    font-size: 0.85rem;
  }
  footer .ad {
    height: 200px;
  }
}