:root {
  --primary: #ec4913;
  --primary-hover: #d33d0f;
  --secondary: #2d3436;
  --accent: #f9ca24;
  --bg-warm: #fffbf2;
  --text-main: #1e272e;
  --text-muted: #485460;
  --glass: rgba(255, 255, 255, 0.7);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --border-radius: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', 'Outfit', sans-serif;
  background-color: var(--bg-warm);
  color: var(--text-main);
  line-height: 1.7;
  font-size: 17px; /* Increased font for readability */
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  position: sticky;
  top: 0;
  background: var(--glass);
  backdrop-filter: blur(12px);
  z-index: 1000;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav {
  display: flex;
  gap: 15px;
}

.main-nav button {
  background: transparent;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
}

.main-nav button.active {
  background: var(--primary);
  color: white;
}

/* Search */
.search-bar {
  display: flex;
  align-items: center;
  background: white;
  padding: 8px 15px;
  border-radius: 25px;
  box-shadow: var(--shadow);
}

.search-bar input {
  border: none;
  outline: none;
  margin-left: 10px;
  width: 100%;
}

.search-results {
  position: absolute;
  top: 50px;
  left: 0;
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  z-index: 1001;
  max-height: 300px;
  overflow-y: auto;
}

.search-item {
  padding: 10px;
  display: flex;
  gap: 10px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}

.search-item img {
  width: 40px;
  height: 40px;
  border-radius: 4px;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  padding: 3rem 0;
}

.hero-img {
  width: 100%;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.premium-tag {
  color: var(--primary);
  font-weight: 800;
  letter-spacing: 2px;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.hero-meta {
  display: flex;
  gap: 20px;
  font-weight: 600;
  color: var(--text-muted);
}

/* Utility Bar */
.utility-bar {
  background: white;
  padding: 1.2rem;
  border-radius: var(--border-radius);
  display: flex;
  justify-content: space-between;
  margin-bottom: 3rem;
  box-shadow: var(--shadow);
}

.utility-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toggle-btn {
  border: none;
  padding: 8px 15px;
  border-radius: 20px;
  font-weight: 700;
  cursor: pointer;
}

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

/* Grids */
.ingredients-grid,
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}

.ingredient-card,
.tool-card {
  background: white;
  padding: 1.2rem;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow);
}

.ing-category {
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  display: block;
  width: fit-content;
}

.k-mart {
  background: #ffeaa7;
  color: #d35400;
}

.l-mart {
  background: #dff9fb;
  color: #130f40;
}

.texture-guide {
  background: #fdf2f2;
  border: 2px dashed var(--primary);
  padding: 2rem;
  border-radius: var(--border-radius);
}

/* Steps */
.steps-container {
  background: white;
  padding: 2.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.step-item {
  display: flex;
  gap: 20px;
  margin-bottom: 2rem;
  line-height: 1.8;
  font-size: 1.05rem;
}

.step-num {
  background: var(--primary);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Substitutes Board */
.sub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.sub-card {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border-top: 5px solid var(--primary);
}

.sub-pair {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 700;
}

.similarity-meter {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: var(--primary);
  margin-top: 5px;
}

.sub-reason {
  margin: 1rem 0;
  font-style: italic;
  color: #666;
}

.cost-comparison {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  background: #f9f9f9;
  padding: 1rem;
  border-radius: 12px;
}

.price {
  font-size: 1.5rem;
  font-weight: 800;
}

.cost-item.sub .price {
  color: #27ae60;
}

.savings-badge {
  background: #27ae60;
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Comments */
.comments-box {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
}

.comment-item {
  display: flex;
  gap: 15px;
  margin-bottom: 1.5rem;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.comment-header {
  font-weight: 700;
}

.comments-box textarea {
  width: 100%;
  padding: 15px;
  border-radius: 12px;
  border: 1px solid #ddd;
  min-height: 100px;
  margin-bottom: 15px;
}

.pantry-badge {
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
}

.pantry-desc {
  color: var(--primary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

footer {
  margin-top: 5rem;
  padding: 4rem 0;
  background: #2d3436;
  color: white;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.footer-links a {
  color: #ccc;
  text-decoration: none;
  margin-left: 20px;
}

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

  .utility-bar {
    flex-direction: column;
  }
}

.amazon-btn,
.copy-list-btn,
.signup-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.amazon-btn {
  background: #ff9900;
  font-size: 0.8rem;
}

.copy-list-btn {
  background: var(--secondary);
}

.signup-btn:hover {
  background: var(--accent);
  color: var(--secondary);
}