/**
 * Inhaltsstoffe – Template CSS v1.0
 * CI: aligned with vinni's main page (public/css/main.css)
 * Colors: bg #f25a73, highlight #5aff15, text #000, white #fff
 */

@font-face {
  font-family: 'Bahnschrift';
  src: url('../fonts/bahnschrift.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

:root {
  --ci-bg:        #f25a73;
  --ci-highlight: #5aff15;
  --ci-text:      #000;
  --ci-white:     #fff;
  --r:            16px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Bahnschrift', 'Arial Narrow', Arial, sans-serif;
  /*
  background-color: var(--ci-bg);
  */
  color: var(--ci-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== Header ===== */

.site-header {
  background-color: var(--ci-bg);
  color: var(--ci-highlight);
  padding: calc(var(--r) * 1.5) var(--r) var(--r);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--r) * 0.5);
}

.site-header__logo-link {
  display: inline-block;
  line-height: 0;
}

.site-header__logo {
  width: 120px;
  height: auto;
}

.site-header__tagline {
  font-size: 1.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ci-highlight);
}

/* ===== Content ===== */

.content {
  flex: 1;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: calc(var(--r) * 1.5) var(--r);
  position: relative;
  z-index: 1;
  box-shadow: 0 30px 30px -30px rgba(0, 0, 0, 0.18);
}

h1 {
  font-size: 1.4rem;
  margin-bottom: calc(var(--r) * 0.25);
}

/* ===== Product header (v-pages) ===== */

.product-header {
  margin-bottom: calc(var(--r) * 1.25);
}

.back-actions {
  margin-bottom: var(--r);
}

.product-meta {
  font-size: 0.875rem;
  margin-bottom: calc(var(--r) * 1.5);
  opacity: 0.8;
}

/* ===== Data Tables ===== */

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: calc(var(--r) * 1.5);
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.1);
}

.data-table caption {
  text-align: left;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: calc(var(--r) * 0.5) 0 calc(var(--r) * 0.25);
  color: var(--ci-text);
}

.data-table th,
.data-table td {
  padding: calc(var(--r) * 0.4) calc(var(--r) * 0.75);
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  text-align: left;
}

.data-table th {
  background-color: #000;
  color: var(--ci-white);
  font-weight: normal;
}

/* Right-align value column by default (nutrition table) */
.data-table th:last-child,
.data-table td:last-child {
  text-align: right;
}

/* Modifier: keep last column left-aligned (ingredients table) */
.data-table--left th:last-child,
.data-table--left td:last-child {
  text-align: left;
}

.data-table tbody tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.45);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* Indented sub-rows (e.g. "davon gesättigte Fettsäuren") */
.data-table .sub-row td:first-child {
  padding-left: calc(var(--r) * 1.75);
  font-size: 0.85rem;
}

/* simple light grey #ededed hover effect for tr */
.data-table tbody tr:hover {
  background-color: #eef7ea;
}

.placeholder {
  background-color: #fff200;
  color: var(--ci-text);
  padding: 0 0.15em;
}

.hidden {
  display: none !important;
}

/* ===== Notice (e.g. "Enthält Farbstoff") ===== */

.notice {
  font-size: 0.85rem;
  padding: calc(var(--r) * 0.25) 0 calc(var(--r) * 1.5);
  opacity: 0.75;
}

/* ===== Overview list ===== */

/* Center overview page heading (not inside .product-header) */
.content > h1 {
    margin: 16px;
}

.overview-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: calc(var(--r) * 0.5);
  margin-top: calc(var(--r) * 0.75);
  
}

.overview-list li {
  display: block;
  width: 100%;
}

.overview-list a {
  display: inline-block;
}

.overview-list a {
  display: block;
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--ci-text);
  text-decoration: none;
  padding: calc(var(--r) * 0.75) var(--r);
  border-radius: 6px;
  font-size: 1rem;
  transition: background-color 0.2s ease;
}

.overview-list a:hover {
  background-color: var(--ci-highlight);
}

/* ===== Button ===== */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  color: var(--ci-text);
  text-decoration: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: bold;
  letter-spacing: 0.04em;
  padding: calc(var(--r) * 0.6) calc(var(--r) * 1.25);
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  min-height: 44px;           /* touch-friendly minimum tap target */
  min-width: 44px;
  line-height: 1.2;
  -webkit-tap-highlight-color: transparent;
}

.button:hover {
  background-color: var(--ci-bg);
}

.button:active {
  transform: scale(0.97);
}

/* ===== Footer ===== */

.site-footer {
  background-color: var(--ci-white);
  color: var(--ci-text);
  padding: var(--r);
  font-size: 0.85rem;
}

.footer-inner {
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: calc(var(--r) * 0.5);
}

.footer-left,
.footer-right {
  display: flex;
  align-items: center;
  gap: calc(var(--r) * 0.5);
}

.site-footer .button {
  background-color: var(--ci-bg);
}

.site-footer .button:hover {
  background-color: var(--ci-highlight);
}

.site-footer a:not(.button) {
  color: var(--ci-highlight);
  text-decoration: none;
}

.site-footer a:not(.button):hover {
  text-decoration: underline;
}
