/* =============================================
   NOOK EBRULİ — Allergens Page CSS
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --cream:        #F7F2EA;
  --cream-dark:   #EDE5D8;
  --dark-brown:   #3C1F08;
  --med-brown:    #7B4A28;
  --warm-brown:   #A67B52;
  --light-tan:    #C9AA85;
  --gold:         #C8973F;
  --gold-light:   #E8C07A;
  --card-bg:      #FDFAF6;
  --white:        #FFFFFF;
  --shadow-soft:  0 4px 24px rgba(60,31,8,0.08);
  --shadow-hover: 0 12px 40px rgba(60,31,8,0.16);
  --radius-card:  18px;
  --radius-sm:    10px;
  --transition:   0.35s cubic-bezier(0.4,0,0.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--dark-brown);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Background Particles ── */
.bg-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* ── Logo Circle ── */
.logo-circle-wrap,
.footer-logo-circle {
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}

/* ── Header ── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  background: rgba(247, 242, 234, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(201, 170, 133, 0.2);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.logo-circle-wrap {
  width: 42px; height: 42px;
  border: 2px solid rgba(201, 170, 133, 0.3);
}
.logo-img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.logo-text {
  flex-direction: column;
  align-items: flex-start;
}
.logo-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem; font-weight: 700;
  color: var(--dark-brown);
}
.logo-sub {
  font-size: 0.55rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--warm-brown);
}
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.back-to-menu-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dark-brown);
  background: rgba(201, 170, 133, 0.15);
  border: 1.5px solid rgba(201, 170, 133, 0.3);
  text-decoration: none;
  transition: all var(--transition);
}
.back-to-menu-btn:hover {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}
.btn-icon-sm {
  width: 14px; height: 14px;
}
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(201, 170, 133, 0.12);
  border-radius: 30px;
  padding: 4px 6px;
}
.lang-btn {
  padding: 5px 12px;
  border: none;
  background: none;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--warm-brown);
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition);
}
.lang-btn.active {
  background: var(--gold);
  color: var(--white);
}
.lang-divider {
  color: var(--light-tan);
  font-size: 0.7rem;
}

/* ── Hero ── */
.allergen-hero {
  padding-top: 120px;
  padding-bottom: 40px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.allergen-hero-content {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 24px;
}
.allergen-hero-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(200, 151, 63, 0.3);
}
.allergen-hero-icon {
  width: 36px; height: 36px;
  color: var(--white);
}
.allergen-hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--dark-brown);
  margin-bottom: 12px;
}
.allergen-hero-subtitle {
  font-size: 1rem;
  color: var(--warm-brown);
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto;
}

/* ── Search ── */
.allergen-search-section {
  max-width: 600px;
  margin: 0 auto 32px;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}
.allergen-search-container {
  position: relative;
}
.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--warm-brown);
  pointer-events: none;
}
.allergen-search {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border: 2px solid rgba(201, 170, 133, 0.3);
  border-radius: 50px;
  font-size: 0.95rem;
  color: var(--dark-brown);
  background: var(--white);
  outline: none;
  transition: all var(--transition);
  box-shadow: var(--shadow-soft);
  font-family: 'Inter', sans-serif;
}
.allergen-search:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(200, 151, 63, 0.12), var(--shadow-soft);
}
.allergen-search::placeholder {
  color: var(--light-tan);
}

/* ── Main ── */
.allergen-main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px 60px;
  position: relative;
  z-index: 1;
}

/* Loading */
.allergen-loading {
  text-align: center;
  padding: 80px 24px;
  color: var(--warm-brown);
}
.loading-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--cream-dark);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Error / Empty */
.allergen-error, .allergen-empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--warm-brown);
}
.error-icon, .empty-icon {
  width: 48px; height: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* ── Table ── */
.allergen-table-wrap {
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(201, 170, 133, 0.15);
}
.allergen-table {
  width: 100%;
  border-collapse: collapse;
}
.allergen-table thead {
  background: linear-gradient(135deg, var(--dark-brown), var(--med-brown));
}
.allergen-table th {
  padding: 16px 20px;
  text-align: left;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold-light);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.th-icon {
  width: 14px; height: 14px;
  vertical-align: middle;
  margin-right: 6px;
  opacity: 0.7;
}
.allergen-table tbody tr {
  border-bottom: 1px solid rgba(201, 170, 133, 0.12);
  transition: all 0.25s ease;
  animation: fadeInRow 0.4s ease forwards;
  opacity: 0;
}
.allergen-table tbody tr:nth-child(even) {
  background: rgba(247, 242, 234, 0.5);
}
.allergen-table tbody tr:hover {
  background: rgba(200, 151, 63, 0.06);
  transform: scale(1.005);
}
.allergen-table tbody tr:last-child {
  border-bottom: none;
}
.allergen-table td {
  padding: 14px 20px;
  font-size: 0.9rem;
  vertical-align: middle;
}

@keyframes fadeInRow {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Product name cell */
.td-product-name {
  font-weight: 600;
  color: var(--dark-brown);
  display: flex;
  align-items: center;
  gap: 10px;
}
.product-mini-img {
  width: 36px; height: 36px;
  border-radius: 10px;
  object-fit: cover;
  border: 1.5px solid var(--cream-dark);
  flex-shrink: 0;
}
.product-mini-placeholder {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.product-mini-placeholder i {
  width: 16px; height: 16px;
  color: var(--light-tan);
}

/* Calories cell */
.td-calories {
  font-weight: 600;
  color: var(--med-brown);
}
.calories-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: rgba(200, 151, 63, 0.1);
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold);
}
.calories-badge i {
  width: 12px; height: 12px;
}
.calories-unknown {
  color: var(--light-tan);
  font-weight: 400;
  font-size: 0.82rem;
}

/* Allergens cell */
.allergen-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.allergen-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: linear-gradient(135deg, rgba(200, 151, 63, 0.1), rgba(200, 151, 63, 0.05));
  border: 1px solid rgba(200, 151, 63, 0.2);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--med-brown);
  transition: all 0.2s ease;
}
.allergen-pill:hover {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}
.allergen-pill i {
  width: 12px; height: 12px;
}
.no-allergen-text {
  color: var(--light-tan);
  font-size: 0.82rem;
  font-style: italic;
}

/* ── Info Section ── */
.allergen-info-section {
  max-width: 800px;
  margin: 0 auto 60px;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}
.allergen-info-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  background: var(--white);
  border-radius: var(--radius-card);
  border-left: 4px solid var(--gold);
  box-shadow: var(--shadow-soft);
}
.info-card-icon {
  width: 24px; height: 24px;
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 2px;
}
.info-card-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--dark-brown);
  margin-bottom: 4px;
}
.info-card-desc {
  font-size: 0.82rem;
  color: var(--warm-brown);
  line-height: 1.5;
}

/* ── Footer ── */
.site-footer {
  padding: 40px 24px 32px;
  text-align: center;
  border-top: 1px solid rgba(201, 170, 133, 0.2);
  position: relative;
  z-index: 1;
}
.footer-logo {
  margin-bottom: 16px;
}
.footer-logo-circle {
  width: 50px; height: 50px;
  margin: 0 auto;
  border: 2px solid rgba(201, 170, 133, 0.3);
}
.footer-logo-img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.footer-nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
}
.footer-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--warm-brown);
  font-size: 0.82rem;
  text-decoration: none;
  transition: color var(--transition);
}
.footer-link:hover { color: var(--gold); }
.footer-link-icon {
  width: 16px; height: 16px;
}
.footer-copy {
  font-size: 0.72rem;
  color: var(--light-tan);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .allergen-hero-title { font-size: 1.8rem; }
  .allergen-hero { padding-top: 100px; padding-bottom: 24px; }

  .allergen-table-wrap {
    border-radius: 14px;
  }
  .allergen-table thead { display: none; }
  .allergen-table, .allergen-table tbody, .allergen-table tr, .allergen-table td {
    display: block;
    width: 100%;
  }
  .allergen-table tbody tr {
    padding: 16px 18px;
    margin-bottom: 8px;
    border-radius: 14px;
    border: 1px solid rgba(201, 170, 133, 0.15);
    box-shadow: 0 2px 8px rgba(60, 31, 8, 0.04);
  }
  .allergen-table tbody tr:nth-child(even) {
    background: var(--white);
  }
  .allergen-table td {
    padding: 4px 0;
  }
  .allergen-table td::before {
    content: attr(data-label);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--light-tan);
    letter-spacing: 0.04em;
    display: block;
    margin-bottom: 4px;
  }
  .allergen-table td:first-child {
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(201, 170, 133, 0.12);
    margin-bottom: 8px;
  }
  .td-product-name {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .allergen-hero-title { font-size: 1.5rem; }
  .header-inner { padding: 0 4px; }
  .back-to-menu-btn span { display: none; }
}
