:root {
  --bg: #f7f3ed;
  --bg-warm: #efe8dc;
  --surface: #fffcf8;
  --surface-elevated: #ffffff;
  --text: #2c2419;
  --text-muted: #7a6f63;
  --accent: #8b6914;
  --accent-light: #c4a035;
  --accent-soft: rgba(139, 105, 20, 0.12);
  --cork: #c9a86c;
  --cork-dark: #a08050;
  --border: rgba(44, 36, 25, 0.08);
  --shadow: 0 4px 24px rgba(44, 36, 25, 0.06);
  --shadow-lg: 0 20px 60px rgba(44, 36, 25, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Outfit', system-ui, sans-serif;
  --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 {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 243, 237, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

.logo__mark {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--cork), var(--cork-dark));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  box-shadow: var(--shadow);
}

.logo__text {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav__link {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 100px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav__link:hover,
.nav__link.active {
  color: var(--text);
  background: var(--accent-soft);
}

.fav-badge {
  background: var(--accent);
  color: white;
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: 100px;
  min-width: 1.2rem;
  text-align: center;
}

.fav-badge:empty,
.fav-badge[data-count="0"] {
  display: none;
}

/* Main */
#app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 6rem;
}

.view {
  display: none;
  animation: fadeIn 0.5s ease;
}

.view--active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.hidden {
  display: none !important;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  min-height: 70vh;
  padding: 2rem 0 4rem;
}

.hero__eyebrow,
.section-eyebrow {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.hero__title,
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero__title em {
  font-style: italic;
  color: var(--accent);
}

.hero__subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 420px;
  margin-bottom: 2rem;
  font-weight: 300;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero__visual {
  position: relative;
}

.hero__image-stack {
  position: relative;
  height: 480px;
}

.hero__img {
  position: absolute;
  border-radius: var(--radius);
  object-fit: cover;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.hero__img--1 {
  width: 75%;
  height: 85%;
  top: 0;
  left: 0;
  z-index: 2;
}

.hero__img--2 {
  width: 65%;
  height: 70%;
  bottom: 0;
  right: 0;
  z-index: 1;
}

.hero__badge {
  position: absolute;
  bottom: 2rem;
  left: -1rem;
  background: var(--surface-elevated);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 3;
  text-align: center;
}

.hero__badge-num {
  display: block;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}

.hero__badge-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Highlights */
.highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.highlight-card {
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.highlight-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.highlight-card--link {
  cursor: pointer;
}

.highlight-card--link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

a.btn {
  text-decoration: none;
  display: inline-flex;
}

.highlight-card__icon {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.highlight-card h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.highlight-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 300;
}

/* Buttons */
.btn {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.85rem 1.75rem;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--cork-dark));
  color: white;
  box-shadow: 0 4px 16px rgba(139, 105, 20, 0.3);
}

.btn--primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 105, 20, 0.4);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn--ghost:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Berater */
.berater {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 0;
}

.berater__header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 100px;
  margin-top: 1.5rem;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--cork));
  border-radius: 100px;
  transition: width 0.5s ease;
  width: 20%;
}

.berater__options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.option-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  font-family: inherit;
  width: 100%;
}

.option-card:hover {
  border-color: var(--cork);
  background: var(--surface-elevated);
}

.option-card.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: var(--shadow);
}

.option-card__icon {
  font-size: 1.75rem;
  width: 3rem;
  text-align: center;
  flex-shrink: 0;
}

.option-card__text strong {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
}

.option-card__text span {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 300;
}

.berater__nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

/* Results */
.results {
  padding: 2rem 0;
}

.results__header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.results__subtitle {
  color: var(--text-muted);
  font-weight: 300;
  margin-top: 0.5rem;
}

.results__restart {
  display: block;
  margin: 2rem auto 0;
}

/* Collection */
.collection-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-chip {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.filter-chip:hover,
.filter-chip.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.product-card__image-wrap {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--bg-warm);
}

.product-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.product-card:hover .product-card__image {
  transform: scale(1.05);
}

.product-card__match {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
}

.product-card__fav {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 2;
}

.product-card__fav:hover {
  transform: scale(1.1);
}

.product-card__fav.active {
  color: #e74c3c;
}

.product-card__body {
  padding: 1.25rem;
}

.product-card__category {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.product-card__name {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.product-card__tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 0.75rem;
}

.product-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-card__price {
  font-weight: 500;
  color: var(--text);
}

.product-card__stars {
  display: flex;
  gap: 2px;
  font-size: 0.65rem;
  color: var(--cork);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state__icon {
  font-size: 3rem;
  color: var(--cork);
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Modal */
.modal {
  border: none;
  padding: 0;
  max-width: 900px;
  width: calc(100% - 2rem);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}

.modal::backdrop {
  background: rgba(44, 36, 25, 0.5);
  backdrop-filter: blur(4px);
}

.modal--wide {
  max-width: 1000px;
}

.modal__inner {
  padding: 2rem;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.modal__inner--compare {
  display: block;
}

.modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal__close:hover {
  background: var(--accent-soft);
}

.modal__gallery {
  position: sticky;
  top: 0;
}

.modal__image {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--bg-warm);
}

.modal__thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.modal__thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.7;
  transition: var(--transition);
}

.modal__thumb.active,
.modal__thumb:hover {
  border-color: var(--accent);
  opacity: 1;
}

.modal__category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.modal__title {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.modal__price {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.modal__desc {
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.modal__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tag {
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 100px;
}

.modal__specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.spec-item label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.spec-bar {
  display: flex;
  gap: 3px;
}

.spec-bar__dot {
  width: 100%;
  height: 6px;
  border-radius: 100px;
  background: var(--border);
}

.spec-bar__dot.filled {
  background: var(--cork);
}

.spec-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.spec-color {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  background: var(--bg-warm);
  border-radius: 4px;
}

.modal__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Compare Bar */
.compare-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface-elevated);
  border-top: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  z-index: 200;
  box-shadow: 0 -4px 24px rgba(44, 36, 25, 0.08);
}

.compare-bar__items {
  display: flex;
  gap: 0.75rem;
  flex: 1;
  overflow-x: auto;
}

.compare-bar__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg);
  padding: 0.35rem 0.75rem 0.35rem 0.35rem;
  border-radius: 100px;
  font-size: 0.8rem;
  white-space: nowrap;
}

.compare-bar__item img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.compare-bar__item button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 0 0.25rem;
}

.compare-bar__actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Compare Table */
.compare-table {
  margin-top: 1.5rem;
  overflow-x: auto;
}

.compare-matrix {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 560px;
}

.compare-matrix__row {
  display: grid;
  gap: 0.75rem;
  align-items: start;
  border-bottom: 1px solid var(--border);
}

.compare-matrix--cols-1 .compare-matrix__row { grid-template-columns: 110px 1fr; }
.compare-matrix--cols-2 .compare-matrix__row { grid-template-columns: 110px 1fr 1fr; }
.compare-matrix--cols-3 .compare-matrix__row { grid-template-columns: 110px 1fr 1fr 1fr; }

.compare-matrix__row--head {
  border-bottom: none;
  margin-bottom: 0.5rem;
}

.compare-matrix__label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0.75rem 0;
  font-weight: 500;
  position: sticky;
  left: 0;
  background: var(--surface);
}

.compare-matrix__cell {
  padding: 0.75rem 0.5rem;
  font-size: 0.85rem;
  line-height: 1.5;
  text-align: left;
}

.compare-matrix__cell--head {
  padding-top: 0;
}

.compare-matrix__thumb {
  width: 100%;
  max-width: 140px;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: block;
  margin: 0 auto;
}

.compare-cell__sub {
  display: block;
  font-size: 0.8rem;
  color: var(--accent);
  font-style: italic;
  margin-top: 0.2rem;
}

.compare-cell__desc {
  margin: 0;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.6;
}

.compare-col {
  text-align: center;
}

.compare-col__img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.compare-col__name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.compare-col__row {
  padding: 0.6rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}

.compare-col__row label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 300;
}

/* Responsive */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero__visual {
    order: -1;
  }

  .hero__image-stack {
    height: 320px;
  }

  .highlights {
    grid-template-columns: 1fr;
  }

  .modal__inner {
    grid-template-columns: 1fr;
  }

  .collection-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .nav__link:not(.nav__link--fav) {
    display: none;
  }

  .header__inner {
    padding: 0.75rem 1rem;
  }

  #app {
    padding: 1rem 1rem 5rem;
  }

  .hero__title {
    font-size: 2.25rem;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .compare-bar {
    flex-direction: column;
    padding: 1rem;
  }
}
