:root {
  --bg: #f3f4fb;
  --surface: #ffffff;
  --navy: #0a0f1f;
  --navy-soft: #131a2e;
  --ink: #0f1729;
  --muted: #647088;
  --accent: #3ee07f;
  --accent-ink: #08381f;
  --accent-dark: #2bc769;
  --accent-soft: #e7faf0;
  --tint: #eef1fb;
  --border: #e7e9f2;
  --border-dark: #1f2740;
  --danger: #ef4444;
  --shadow: 0 6px 24px rgba(15, 23, 41, 0.06);
  --shadow-lg: 0 14px 40px rgba(15, 23, 41, 0.12);
  --radius: 16px;
  --radius-sm: 10px;

  font-family:
    -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
}

p {
  margin: 0;
}

.muted {
  color: var(--muted);
  font-size: 0.85rem;
}

/* ===== Site header ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  border-bottom: 1px solid var(--border-dark);
}

.site-header__inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}

.brand .dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--accent);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.main-nav a {
  font-size: 0.95rem;
  font-weight: 600;
  color: #aab2c5;
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.main-nav a:hover {
  color: #fff;
}

.main-nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.header-search {
  margin-left: auto;
  position: relative;
  flex: 0 1 320px;
  min-width: 0;
}

.header-search input {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.4rem;
  border-radius: 999px;
  border: 1px solid var(--border-dark);
  background: var(--navy-soft);
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
}

.header-search input::placeholder {
  color: #6b7690;
}

.header-search input:focus {
  outline: none;
  border-color: var(--accent);
}

.header-search svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #6b7690;
}

.btn-login {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
}

.btn-login:hover {
  background: var(--accent-dark);
}

.site-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1;
  min-width: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 24px;
  background: #fff;
  border-radius: 2px;
}

/* ===== Container ===== */

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ===== Breadcrumb ===== */

.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.breadcrumb a {
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent-dark);
}

/* ===== Home hero ===== */

.home-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 30%, rgba(62, 224, 127, 0.12), transparent 45%),
    linear-gradient(135deg, var(--navy) 0%, #0d1730 100%);
  border-radius: 24px;
  padding: 3.5rem;
  color: #fff;
  margin-bottom: 2.5rem;
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

.home-hero > * {
  position: relative;
  z-index: 1;
}

.home-hero h1 {
  font-size: 3.2rem;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
  max-width: 14ch;
  margin-bottom: 1.25rem;
}

.home-hero .lede {
  color: #aab2c5;
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 50ch;
  margin-bottom: 2rem;
}

.hero-search {
  display: flex;
  gap: 0.75rem;
  max-width: 640px;
  margin-bottom: 1.5rem;
}

.hero-search input {
  flex: 1;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  border: none;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.hero-search input:focus {
  outline: 2px solid var(--accent);
}

.hero-search button {
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  padding: 0 2rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.hero-search button:hover {
  background: var(--accent-dark);
}

.quick-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.quick-links .label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: #6b7690;
  font-weight: 600;
}

.quick-links a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.quick-links a:hover {
  text-decoration: underline;
}

/* ===== Feature cards ===== */

.feature-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.feature-card .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--tint);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.feature-card .icon.green {
  background: var(--accent-soft);
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* ===== Section head ===== */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.section-head h2 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-head .sub {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

.section-head .link {
  color: var(--accent-dark);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
}

/* ===== Page header (listing/landing) ===== */

.page-banner {
  background: var(--tint);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.25rem 2.5rem;
  margin-bottom: 2rem;
}

.page-banner h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.page-banner .lede {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 65ch;
}

.banner-pills {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

/* ===== Listing layout ===== */

.listing-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 6rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar__title {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sidebar__title + .sub {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

.sidebar__group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.sidebar input[type="search"],
.sidebar select {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink);
}

.sidebar input[type="search"]:focus,
.sidebar select:focus {
  outline: none;
  border-color: var(--accent);
}

.sidebar .toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  color: var(--ink);
}

.sidebar .toggle input {
  accent-color: var(--accent-dark);
  width: 16px;
  height: 16px;
}

.btn-reset {
  width: 100%;
  background: var(--navy);
  color: #fff;
  border: none;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.7rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn-reset:hover {
  background: var(--navy-soft);
}

/* ===== Listing toolbar ===== */

.listing-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.listing-toolbar .count {
  color: var(--muted);
  font-size: 0.9rem;
}

.listing-toolbar .sort {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.listing-toolbar select {
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font: inherit;
  font-size: 0.85rem;
  color: var(--ink);
}

/* ===== Product grid ===== */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.product-card__media {
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--tint);
  position: relative;
}

.product-card__media img,
.product-card__media .avatar-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.product-card__media .avatar-placeholder {
  font-size: 2.2rem;
}

.card-flag {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
}

.product-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.1rem 1.25rem 1.25rem;
  flex: 1;
}

.product-card__brand {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.product-card__name {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: inherit;
  text-decoration: none;
  line-height: 1.25;
}

.product-card__name:hover {
  color: var(--accent-dark);
}

.product-card__pricing {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.product-card__price .amount {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.product-card__price .sub {
  font-size: 0.78rem;
  color: var(--muted);
}

.kr-badge {
  background: var(--tint);
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  text-align: center;
  flex-shrink: 0;
}

.kr-badge.best {
  background: var(--accent-soft);
}

.kr-badge .label {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  line-height: 1.2;
}

.kr-badge .val {
  font-size: 0.95rem;
  font-weight: 700;
}

.product-card__cta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--navy);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.8rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.15s;
}

.product-card__cta:hover {
  background: var(--accent);
  color: var(--accent-ink);
}

.product-card__tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.flavor-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.flavor-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 0.15rem 0.75rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--border);
}

.flavor-row__name {
  font-weight: 600;
  color: inherit;
  text-decoration: none;
}

.flavor-row__name:hover {
  color: var(--accent-dark);
}

.flavor-row .sub {
  font-size: 0.78rem;
  color: var(--muted);
  grid-column: 1;
}

.flavor-row__kr {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}

.flavor-row__kr.best {
  color: var(--accent-dark);
}

/* ===== Variant detail ===== */

.detail-top {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.detail-media {
  aspect-ratio: 1;
  background: var(--tint);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.detail-media img,
.detail-media .avatar-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  font-size: 3rem;
}

.detail-info h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.detail-info .subtitle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.stat-boxes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.stat-box {
  background: var(--tint);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
}

.stat-box .label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.stat-box .val {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.best-price-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--navy);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  color: #fff;
}

.best-price-box .label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.best-price-box .price {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.best-price-box .price small {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

.btn-shop {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.9rem 1.5rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
}

.btn-shop:hover {
  background: var(--accent-dark);
}

/* ===== Price comparison table ===== */

.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.section-card h2 {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
}

.price-table th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0 0.75rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.price-table td {
  padding: 0.9rem 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  vertical-align: middle;
}

.price-table tr:last-child td {
  border-bottom: none;
}

.price-table .retailer {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 600;
}

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

.price-table .best-tag {
  display: block;
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 700;
}

.price-table .buy {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.price-table .buy:hover {
  background: var(--accent);
  color: var(--accent-ink);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}

.avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.price-table .avatar,
.price-table .avatar-placeholder {
  font-size: 0.8rem;
}

/* ===== Chart ===== */

.chart {
  width: 100%;
  display: block;
}

.chart .chart-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
}

.chart .chart-dot {
  fill: var(--accent);
}

.chart .axis {
  font-size: 10px;
  fill: var(--muted);
}

.chart-low {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.badge {
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.in-stock {
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 0.85rem;
}

.out-stock {
  color: var(--danger);
  font-weight: 600;
  font-size: 0.85rem;
}

/* ===== Footer ===== */

footer {
  background: var(--navy);
  color: #aab2c5;
  margin-top: 3rem;
}

footer .footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
}

footer .footer-brand {
  color: var(--accent);
  font-weight: 800;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

footer p {
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
  max-width: 50ch;
}

footer .footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: flex-start;
  font-size: 0.85rem;
}

footer .footer-links a {
  color: #aab2c5;
  text-decoration: none;
}

footer .footer-links a:hover {
  color: #fff;
}

/* ===== Responsive ===== */

@media (max-width: 960px) {
  .listing-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .detail-top {
    grid-template-columns: 1fr;
  }

  .feature-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header__inner {
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
  }

  .nav-toggle {
    display: flex;
  }

  .site-menu {
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding-top: 0.5rem;
    display: none;
  }

  .site-menu.is-open {
    display: flex;
  }

  .main-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .header-search {
    order: 3;
    flex-basis: 100%;
    margin-left: 0;
  }

  .home-hero {
    padding: 2rem 1.5rem;
  }

  .home-hero h1 {
    font-size: 2.2rem;
  }

  .hero-search {
    flex-direction: column;
  }

  .page-banner {
    padding: 1.5rem;
  }

  .page-banner h1 {
    font-size: 1.85rem;
  }

  .best-price-box {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  footer .footer-inner {
    grid-template-columns: 1fr;
  }
}
