/* ── Fonts ── */
@font-face {
  font-family: "Geist";
  src: url("/fonts/Geist/Geist-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/fonts/Geist/Geist-Black.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/Geist_Mono/static/GeistMono-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ── Variables ── */
:root {
  --bg-default: #ffffff;
  --bg-vegan: #f0fff0;
  --bg-hit: #fff5f5;
  --bg-seasonal: #fffbf0;
  --bg-new: #f0f7ff;
  --bg: var(--bg-default);
  --text: #000000;
  --font-family: "Geist", sans-serif;
  --font-mono: "Geist Mono", monospace;

  --header-height: 92px;
  --container-padding: 0 4rem;
  --logo-size: 2rem;

  --header-main-padding: 0;
  --header-main-gap: 0;
  --header-padding-top: 2rem;
  --header-padding-bottom: 1.5rem;
  --header-direction: row;
  --header-justify: flex-start;
  --header-align: center;
  --header-container-gap: 5rem;

  --logo-area-direction: row;
  --logo-area-align: baseline;
  --logo-area-gap: 1.5rem;

  --footer-direction: row;
  --footer-align: flex-end;
  --footer-text-align: right;

  --theme-transition: background-color 0.4s ease;
  --sticky-height: 160px;
}

body.theme-default { --bg: var(--bg-default); }
body.theme-vegan   { --bg: var(--bg-vegan); }
body.theme-hit     { --bg: var(--bg-hit); }
body.theme-seasonal { --bg: var(--bg-seasonal); }
body.theme-new     { --bg: var(--bg-new); }

@media (max-width: 768px) {
  :root {
    --container-padding: 0 1.5rem;
    --header-height: 104px;
    --header-main-padding: 2rem 0 0 0;
    --header-main-gap: 1rem;
    --header-padding-top: 0;
    --header-padding-bottom: 0;
    --header-direction: column-reverse;
    --header-justify: flex-start;
    --header-align: flex-start;
    --header-container-gap: 1rem;
    --logo-area-direction: column;
    --logo-area-align: flex-start;
    --logo-area-gap: 0.25rem;
    --footer-direction: column;
    --footer-align: flex-start;
    --footer-text-align: left;
  }
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 500;
  text-transform: lowercase;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: var(--theme-transition);
}

h1, h2, h3, h4, h5, h6 { font-weight: 800; margin-top: 0; }

a { color: #000; text-decoration: none; }

img { max-width: 100%; height: auto; vertical-align: middle; }

/* ── Layout ── */
.container {
  width: 100%;
  margin: 0;
  padding: var(--container-padding);
}

/* ── Header ── */
.main-header {
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 1000;
  min-height: var(--header-height);
  display: flex;
  flex-direction: column;
  padding: var(--header-main-padding);
  gap: var(--header-main-gap);
  transition: var(--theme-transition);
}

.header-container {
  display: flex;
  flex-direction: var(--header-direction);
  justify-content: var(--header-justify);
  align-items: var(--header-align);
  width: 100%;
  gap: var(--header-container-gap);
  padding-top: var(--header-padding-top);
  padding-bottom: var(--header-padding-bottom);
}

.logo-area {
  display: flex;
  flex-direction: var(--logo-area-direction);
  align-items: var(--logo-area-align);
  gap: var(--logo-area-gap);
}

.logo {
  font-weight: 800;
  font-size: var(--logo-size);
  line-height: 1;
  padding-bottom: 0.5rem;
  display: inline-block;
  color: #000;
}

.address {
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.6;
}

/* ── Nav ── */
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.main-nav a {
  font-weight: 500;
  font-size: 1.25rem;
  color: #000;
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.main-nav a.active,
.main-nav a:hover {
  border-bottom-color: #000;
}

@media (max-width: 768px) {
  .main-nav ul {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -1.5rem;
    padding: 0 1.5rem;
    white-space: nowrap;
  }
  .main-nav ul::-webkit-scrollbar { display: none; }
}

/* ── Filters ── */
.filters-wrap {
  background: var(--bg);
  z-index: 900;
  padding: 0 0 1.5rem 0;
  width: 100%;
  overflow: hidden;
  transition: var(--theme-transition);
}

.filters {
  display: flex;
  gap: 2rem;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 4rem 5px 4rem;
}

.filters::-webkit-scrollbar { display: none; }

.filter-link {
  font-size: 1.25rem;
  font-weight: 500;
  color: #000;
  text-decoration: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.link-text {
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.filter-link.active .link-text { border-bottom-color: #000; }

.filter-link[data-tag="true"] { transform: translateY(-2px); }
.filter-link[data-tag="true"] .link-text {
  font-weight: 800;
  border-bottom: none;
  padding-bottom: 0;
}
.filter-link[data-tag="true"].active .link-text {
  text-decoration: underline;
  text-decoration-style: wavy;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
  border-bottom-color: transparent;
}

.filter-link.tag-vegan { color: #4CAF50; }

@media (max-width: 1024px) {
  .filters { padding: 0 1.5rem 5px 1.5rem; }
}

/* ── Main ── */
main {
  margin-bottom: 8rem;
  flex-grow: 1;
}

/* ── Showcase ── */
.showcase-section {
  margin-bottom: 3rem;
  scroll-margin-top: calc(var(--sticky-height) + 1rem);
  overflow-x: clip;
  overflow-y: visible;
}

.showcase-header {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.showcase-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
}

.showcase-scroll {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 2rem;
  padding: 0.375rem 0 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.showcase-scroll::-webkit-scrollbar { display: none; }

.showcase-block {
  flex-shrink: 0;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: hidden;
  background-color: var(--bg);
  border: 2px solid #000;
  border-radius: 1.5rem;
  box-shadow: 5px 5px 0 #000;
  padding: 1.5rem 0;
  transition: var(--theme-transition);
}

.showcase-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 1.5rem;
  line-height: 1;
  cursor: default;
  border-radius: 4px;
}

.showcase-row[data-img]:not([data-img=""]):not([data-img="null"]) { cursor: pointer; }
.showcase-row[data-img]:not([data-img=""]):not([data-img="null"]):hover .item-name,
.showcase-row[data-img]:not([data-img=""]):not([data-img="null"]):hover .item-price {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.item-name,
.item-price {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  white-space: nowrap;
  color: #000;
}

.item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.item-price {
  flex-shrink: 0;
  margin-left: 0.5rem;
}

/* ── Showcase preview ── */
#showcase-preview {
  position: fixed;
  display: none;
  z-index: 9999;
  pointer-events: none;
}

#showcase-preview img {
  display: block;
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 1rem;
  border: 2px solid #000;
  box-shadow: 4px 4px 0 #000;
  background: #f0f0f0;
}

/* ── Ticker ── */
.showcase-ticker {
  margin-top: 1rem;
  overflow: hidden;
  white-space: nowrap;
  max-width: 100%;
}

.ticker-track {
  display: inline-flex;
  gap: 3rem;
  animation: ticker-scroll 50s linear infinite;
}

.ticker-track span {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  color: #000;
  opacity: 0.3;
  white-space: nowrap;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (max-width: 768px) {
  .showcase-block { width: 260px; }
  .showcase-scroll { gap: 1rem; }
}

/* ── Categories ── */
.category-block {
  padding-top: 1rem;
  scroll-margin-top: calc(var(--sticky-height) + 1rem);
}

.category-block:not(:last-child) { margin-bottom: 3.5rem; }

.category-block.hidden   { display: none; }
.showcase-section.hidden { display: none; }

.category-header {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.category-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
}

/* ── Product grid ── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .products-grid { grid-template-columns: 1fr; }
}

/* ── Product card ── */
.product-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(80px);
  transition:
    transform 0.2s ease,
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1) var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.product-card.visible { opacity: 1; transform: translateY(0); }
.product-card:hover { transform: translateY(-4px); }
.product-card.hidden { display: none; }

.image-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: #f5f5f5;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}

.product-card:hover .product-image { transform: scale(1.05); }

.image-placeholder {
  width: 100%;
  height: 100%;
  background-color: #f5f5f5;
}

.card-content {
  padding: 1rem 0 0 0;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-content h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  line-height: 1.1;
  color: #000;
}

.card-content p {
  font-size: 1.1rem;
  font-weight: 500;
  color: #333;
  margin: 0;
  line-height: 1.3;
  flex-grow: 1;
}

.card-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 0.75rem;
}

.price {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 600;
  color: #000;
}

/* ── Badges ── */
.inline-badges {
  display: inline-flex;
  gap: 0.5rem;
  margin-right: 0.2rem;
}

.badge {
  font-size: inherit;
  font-weight: 800;
  color: #000;
  text-decoration: underline;
  text-decoration-style: wavy;
  text-underline-offset: 0.1em;
  text-decoration-thickness: 2px;
}

.badge-hit      { color: #FF5252; text-decoration-color: #FF5252; }
.badge-vegan    { color: #4CAF50; text-decoration-color: #4CAF50; }
.badge-seasonal { color: #FFA000; text-decoration-color: #FFA000; }
.badge-new      { color: #2196F3; text-decoration-color: #2196F3; }

/* ── Footer ── */
.main-footer { padding: 4rem 0; }

.footer-container {
  display: flex;
  flex-direction: var(--footer-direction);
  justify-content: space-between;
  align-items: var(--footer-align);
  gap: 3rem;
}

.footer-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-nav a {
  font-size: 1.25rem;
  font-weight: 500;
  color: #000;
  line-height: 1;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
  display: inline-block;
}

.footer-nav a:hover { border-bottom-color: #000; }

.footer-info {
  font-size: 1.25rem;
  font-weight: 500;
  color: #000;
  line-height: 1;
  text-align: var(--footer-text-align);
}
