/*!
 * UK Pasta Finder Dark Theme
 * MIT License
 */

:root {
  --bg-dark: #0a0e27;
  --bg-card: #1a1f3a;
  --bg-hover: #252b47;
  --border-color: #2d3548;
  --text-primary: #e4e7eb;
  --text-secondary: #9ca3af;
  --accent-teal: #14b8a6;
  --accent-purple: #8b5cf6;
  --warning: #f59e0b;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

.simple-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Header */
.site-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.site-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Disclaimer */
.disclaimer {
  background: rgba(245, 158, 11, 0.1);
  border-left: 4px solid var(--warning);
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  border-radius: 6px;
  color: var(--text-primary);
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
}

.product-image {
  width: 100%;
  height: 300px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.product-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-details {
  padding: 1.5rem;
}

.product-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.price-main {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-teal);
}

.price-per-unit {
  font-size: 1rem;
  color: var(--text-secondary);
}

.product-store {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.product-store a {
  color: var(--accent-teal);
  text-decoration: none;
  transition: color 0.2s;
}

.product-store a:hover {
  color: var(--accent-purple);
  text-decoration: underline;
}

.product-ingredients {
  padding: 1rem;
  background: var(--bg-dark);
  border-radius: 6px;
  border: 1px solid var(--border-color);
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.product-ingredients strong {
  color: var(--text-primary);
}

/* Card */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.card p {
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.card ul {
  margin-left: 2rem;
  margin-top: 1rem;
  color: var(--text-secondary);
}

.card li {
  margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid var(--border-color);
  margin-top: 3rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.site-footer a {
  color: var(--accent-teal);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .simple-container {
    padding: 1rem;
  }

  .site-header h1 {
    font-size: 1.75rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .product-name {
    font-size: 1.25rem;
  }

  .price-main {
    font-size: 1.75rem;
  }
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.site-nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.55rem 0.9rem;
  line-height: 1.2;
}

.site-nav a.brand {
  background: transparent;
  border-color: transparent;
  font-size: 1.2rem;
  padding-left: 0;
  padding-right: 0.4rem;
}

.site-nav a.active,
.site-nav a:hover {
  color: #042f2e;
  background: var(--accent-teal);
  border-color: var(--accent-teal);
}

.site-nav a.brand:hover,
.site-nav a.brand.active {
  color: var(--text-primary);
  background: transparent;
  border-color: transparent;
}

.disclaimer a,
.product-link a,
.prose a,
.empty-note a {
  color: var(--accent-teal);
}

.product-link {
  margin-top: 1rem;
}

.section-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.section-lead,
.empty-note p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.empty-note {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
}

.prose {
  max-width: none;
}

.prose h2 {
  font-size: 1.35rem;
  margin: 1.75rem 0 0.6rem;
}

.prose p {
  color: var(--text-secondary);
  margin-bottom: 0.9rem;
}

.prose {
  max-width: none;
}

.prose figure {
  margin: 0 0 1rem;
  width: 46%;
}

.prose figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.prose figcaption {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 0.4rem;
}

.prose .float-right {
  float: right;
  margin: 0.25rem 0 1rem 1.25rem;
}

.prose .float-left {
  float: left;
  margin: 0.25rem 1.25rem 1rem 0;
}

.prose::after {
  content: "";
  display: block;
  clear: both;
}

@media (max-width: 768px) {
  .prose figure,
  .prose .float-right,
  .prose .float-left {
    float: none;
    width: 100%;
    margin: 0 0 1rem;
  }
}

.prose hr {
  clear: both;
  border: 0;
  border-top: 1px solid var(--border-color);
  margin: 2rem 0 1.5rem;
}

.site-title {
  text-align: center;
  margin-bottom: 1.25rem;
}

.site-title h1 {
  font-size: 2.5rem;
  margin: 0;
}

.site-title a {
  color: var(--text-primary);
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.store-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0 0 1.5rem;
}

.filter-label {
  color: var(--text-secondary);
  margin-right: 0.25rem;
}

.filter-btn {
  font: inherit;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
}


.filter-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.filter-btn.active {
  color: #042f2e;
  background: var(--accent-teal);
  border-color: var(--accent-teal);
}

.store-tag {
  display: inline-block;
  margin: 0 0 0.5rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: var(--accent-teal);
  font-size: 0.85rem;
  font-weight: 700;
}

.product-card[hidden] {
  display: none;
}

.category-index {
  columns: 2;
  padding-left: 1.2rem;
}
.category-index a {
  color: var(--accent-teal);
}

.product-check {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0.4rem 0 0.6rem;
}
