:root {
  color-scheme: light;
  --bg: #f5f7fa;
  --card: #ffffff;
  --ink: #171717;
  --muted: #5f6672;
  --line: #d7dde5;
  --brand: #2d4059;
  --brand-soft: #eef2f6;
  --shadow: 0 2px 8px rgba(22, 30, 41, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.site-home,
.label-page {
  width: min(100%, 448px);
  margin: 0 auto;
  padding: 16px;
}

.label-page {
  padding-top: 48px;
}

.site-home {
  min-height: 100vh;
  display: grid;
  align-content: center;
  gap: 18px;
}

.home-footer {
  margin-top: 8px;
}

.home-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  line-height: 1.1;
}

.wine-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wine-list a {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-weight: 700;
  text-decoration: none;
}

.wine-list a:focus-visible,
.wine-list a:hover {
  border-color: var(--brand);
  outline: none;
}

.card {
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.product-card {
  padding: 24px;
}

.producer-name {
  margin: 0 0 4px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-card h1 {
  margin: 0 0 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  line-height: 1.1;
}

.wine-meta {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.facts {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.facts strong {
  font-weight: 700;
}

.grapes {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.grapes strong {
  color: var(--ink);
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
}

.info-copy {
  min-width: 0;
}

.section-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.25;
}

.info-copy p,
.section-body p {
  margin: 4px 0 0;
  color: var(--ink);
}

.small-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  object-fit: contain;
}

.card-heading {
  padding: 12px 16px;
  background: var(--brand);
  color: #fff;
}

.card-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0;
}

.section-body {
  padding: 16px;
}

.nutrition {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.nutrition td {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.nutrition tr:last-child td {
  border-bottom: 0;
}

.nutrition td:last-child {
  width: 42%;
  text-align: right;
  font-weight: 600;
}

.nutrition .sub td {
  color: var(--muted);
  font-size: 13px;
}

.nutrition .sub td:first-child {
  padding-left: 16px;
}

.per {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.ingredients {
  color: #252a31;
  font-size: 15px;
}

.ingredients strong {
  font-weight: 800;
}

.note {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-style: italic;
}

.allergen {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #f1d697;
  border-radius: 10px;
  background: #fffbeb;
  color: #713f12;
  font-weight: 700;
}

.allergen img {
  width: 58px;
  height: 52px;
  object-fit: contain;
}

.warning-list {
  display: grid;
  gap: 12px;
}

.warning-item,
.pack-row,
.operator {
  display: flex;
  align-items: center;
  gap: 12px;
}

.warning-item img {
  width: 40px;
  height: 40px;
}

.warning-item p,
.pack-row p,
.operator p {
  margin: 0;
}

.sustainability {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sustainability p {
  margin: 0;
  font-weight: 700;
}

.certification {
  display: flex;
  align-items: center;
  gap: 14px;
}

.certification p {
  margin: 0;
}

.certification strong {
  display: block;
}

.certification span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.pack-list {
  display: grid;
  gap: 14px;
}

.pack-row {
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.pack-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.pack-copy {
  min-width: 0;
}

.pack-copy strong {
  display: block;
}

.pack-copy span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.pack-row img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.pack-list .note {
  padding-top: 0;
  border-top: 0;
}

.operator img {
  width: 76px;
  height: 76px;
  flex: 0 0 auto;
  border-radius: 8px;
  object-fit: contain;
}

.operator {
  align-items: flex-start;
}

.operator strong {
  display: block;
  margin-bottom: 3px;
}

.operator a {
  color: var(--brand);
  overflow-wrap: anywhere;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.contact-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.operator .contact-icon {
  width: 16px;
  height: 16px;
  border-radius: 0;
}

.theme-red {
  --brand: #43232a;
  --brand-soft: #f6eeee;
}

.theme-primitivo {
  --brand: #4a1f32;
  --brand-soft: #f8edf2;
}

.theme-white {
  --brand: #3f4b2b;
  --brand-soft: #f4f6ee;
}

.theme-rose {
  --brand: #7a3444;
  --brand-soft: #fbf0f2;
}

@media (max-width: 380px) {
  .site-home,
  .label-page {
    padding: 12px;
  }

  .label-page {
    padding-top: 44px;
  }

  .product-card {
    padding: 20px;
  }

  .product-card h1 {
    font-size: 27px;
  }

  .facts {
    font-size: 14px;
  }
}
