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

/* ── Google Fonts ────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@700;900&family=Barlow:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
  /* Brand palette — exact from netinn.de/mp/norman/ */
  --brand:        #eea205;
  --brand-dark:   #d09000;
  --brand-shadow: rgba(180, 115, 0, 0.22);

  /* Backgrounds */
  --bg:           #eea205;   /* page background = brand yellow  */
  --bg-card:      #FFFFFF;   /* product cards = white            */
  --bg-surface:   #f5b220;   /* image placeholder = bright amber */
  --bg-modal:     #FFFFFF;

  /* Text */
  --text:         #1C1C18;   /* near-black */
  --text-sub:     #4A4840;
  --text-muted:   #8A7F60;

  /* Accent — dark on yellow */
  --accent:       #1C1C18;
  --accent-dim:   #4A4840;

  /* Borders */
  --border:       rgba(28, 28, 24, 0.10);
  --border-mid:   rgba(28, 28, 24, 0.20);
  --border-dark:  rgba(28, 28, 24, 0.50);

  --font:         'Barlow', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-display: 'Barlow Condensed', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --radius:       3px;
  --radius-card:  12px;
  --gap:          clamp(12px, 2vw, 20px);
  --transition:   0.20s cubic-bezier(0.4, 0, 0.2, 1);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  line-height: 1.5;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

/* ── Header ──────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--brand);
  border-bottom: 2px solid var(--brand-dark);
  padding: 0 clamp(16px, 4vw, 48px);
}

.header-inner {
  display: flex;
  align-items: center;
  height: 52px;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.brand.visible {
  opacity: 1;
  pointer-events: auto;
}

.brand.visible:hover { opacity: 0.70; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: clamp(48px, 8vw, 96px) clamp(16px, 4vw, 48px) clamp(40px, 7vw, 80px);
  border-bottom: 2px solid var(--brand-dark);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.hero-fish {
  width: clamp(120px, 48vw, 520px);
  margin-bottom: clamp(16px, 3vw, 28px);
}

.hero-fish svg { display: block; width: 100%; height: auto; }

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 13vw, 9rem);
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 0.85;
  margin: 0;
}

.hero-tagline {
  font-family: var(--font);
  font-size: clamp(1.25rem, 3.5vw, 2rem);
  font-style: italic;
  color: var(--text-sub);
  margin-top: clamp(10px, 1.5vw, 18px);
  letter-spacing: 0.01em;
}

.hero-hint {
  margin-top: clamp(16px, 2.5vw, 28px);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.45;
}

/* ── Category nav ─────────────────────────────────────────────────────────── */
.category-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 28px clamp(16px, 4vw, 48px) 0;
  flex-wrap: wrap;
}

.cat-btn {
  padding: 6px 16px;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  border: 2px solid var(--border-dark);
  background: transparent;
  transition: var(--transition);
  transition-property: color, border-color, background;
}

.cat-btn:hover {
  background: rgba(28, 28, 24, 0.08);
}

.cat-btn.active {
  color: var(--brand);
  background: var(--text);
  border-color: var(--text);
}

/* ── Main & Grid ──────────────────────────────────────────────────────────── */
main {
  flex: 1;
  padding: 28px clamp(16px, 4vw, 48px) 56px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
  margin-top: 28px;
}

@media (max-width: 1200px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .product-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; } }
@media (max-width: 320px)  { .product-grid { grid-template-columns: 1fr; } }

/* ── Product card ─────────────────────────────────────────────────────────── */
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: var(--radius-card);
  border: 3px solid rgba(50, 50, 50);
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  box-shadow: 0 2px 8px var(--brand-shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

@media (hover: hover) {
  .product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px var(--brand-shadow);
  }
}

.card-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--bg-surface);
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

.card-img-wrap img.img-loaded { opacity: 1; }

@media (hover: hover) {
  .product-card:hover .card-img-wrap img { transform: scale(1.04); }
}

.img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  color: var(--brand-dark);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.55;
}

/* card-badge, card-body, card-name, card-desc, card-footer, card-price
   intentionally removed — Phase 3+ only */

/* ── Like button (card) — overlay bottom-right of image ───────────────────── */
.card-like {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(4px);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color var(--transition), background var(--transition), transform var(--transition);
  box-shadow: 0 1px 6px rgba(0,0,0,0.12);
}

.card-like:hover:not(:disabled) {
  color: #c0404a;
  background: rgba(255, 255, 255, 0.98);
  transform: scale(1.06);
}

.card-like.liked {
  color: #c0404a;
  background: rgba(255, 255, 255, 0.98);
  cursor: default;
}

.card-like .heart-icon { flex-shrink: 0; }

@keyframes like-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.5); }
  70%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}

.card-like.like-pop { animation: like-pop 0.35s cubic-bezier(0.4, 0, 0.2, 1); }

/* ── Product modal ────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(200, 140, 0, 0.45);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-modal);
  border-radius: var(--radius);
  width: min(840px, 100%);
  max-height: 90dvh;
  overflow: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  transform: translateY(16px);
  transition: transform var(--transition);
  box-shadow: 0 24px 80px rgba(0,0,0,0.22);
}

.modal-overlay.open .modal { transform: translateY(0); }

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

.modal-img-wrap {
  aspect-ratio: 4 / 5;
  background: var(--bg-surface);
  overflow: hidden;
}

.modal-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.modal-img-wrap img.img-loaded { opacity: 1; }

.modal-content {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-category {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.modal-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.1;
  color: var(--text);
}

.modal-short {
  font-size: 0.82rem;
  color: var(--brand-dark);
  font-style: italic;
}

.modal-price {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}

.modal-description {
  font-size: 0.82rem;
  color: var(--text-sub);
  line-height: 1.75;
  white-space: pre-line;
  flex: 1;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 1rem;
  transition: color var(--transition), background var(--transition);
  line-height: 1;
}

.modal-close:hover {
  color: var(--text);
  background: rgba(28, 28, 24, 0.08);
}

/* ── Like button (modal) ──────────────────────────────────────────────────── */
.modal-like {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: 2px solid var(--border-mid);
  color: var(--text-sub);
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-top: 8px;
  background: transparent;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.modal-like:hover:not(:disabled) {
  color: #c0404a;
  border-color: #c0404a;
}

.modal-like.liked {
  color: #c0404a;
  border-color: rgba(192, 64, 74, 0.30);
  background: rgba(192, 64, 74, 0.07);
  cursor: default;
}

.modal-like .like-label { font-size: 0.7rem; }
.modal-like.like-pop    { animation: like-pop 0.35s cubic-bezier(0.4, 0, 0.2, 1); }

/* ── Load more ────────────────────────────────────────────────────────────── */
.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

.btn-load-more {
  padding: 11px 36px;
  border: 2px solid var(--border-dark);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text);
  background: transparent;
  transition: var(--transition);
  transition-property: color, background, border-color;
}

.btn-load-more:hover {
  background: var(--text);
  color: var(--brand);
  border-color: var(--text);
}

/* ── States ───────────────────────────────────────────────────────────────── */
.state-loading,
.state-empty,
.state-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 16px;
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.state-error {
  color: #993333;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.btn-retry {
  padding: 9px 28px;
  border: 2px solid #993333;
  border-radius: var(--radius);
  color: #993333;
  background: transparent;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  transition: background var(--transition), color var(--transition);
}

.btn-retry:hover { background: #993333; color: #fff; }

/* ── Skeleton cards ───────────────────────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}

.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(90deg,
    rgba(255,255,255,0.3) 25%,
    rgba(255,255,255,0.6) 50%,
    rgba(255,255,255,0.3) 75%
  );
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite linear;
}

.skeleton-card {
  background: rgba(255,255,255,0.55);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 2px 8px var(--brand-shadow);
}

.skeleton-img  { aspect-ratio: 4 / 5; }

.skeleton-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-line {
  height: 10px;
  border-radius: 2px;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 2px solid var(--brand-dark);
  padding: 20px clamp(16px, 4vw, 48px);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  color: var(--text-sub);
  text-transform: uppercase;
}

/* ── Touch & Mobile ───────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Hero kompakter auf Mobile */
  .hero { padding: clamp(24px, 5vw, 48px) clamp(12px, 4vw, 48px) clamp(20px, 4vw, 40px); }
  .hero-fish { margin-bottom: clamp(10px, 2vw, 20px); }
  .hero-tagline { margin-top: clamp(6px, 1.5vw, 12px); }
  .hero-hint { margin-top: clamp(10px, 2vw, 18px); }

  /* Größere Touch-Targets für Like-Button */
  .card-like {
    padding: 7px 12px;
    gap: 5px;
    bottom: 8px;
    right: 8px;
  }
  .card-like .heart-icon { width: 16px; height: 16px; }

  /* Weniger Padding im Katalogbereich */
  main { padding: 16px 12px 40px; }
  .category-nav { padding: 16px 12px 0; }
}

@media (max-width: 640px) {
  /* Modal mobiloptimiert */
  .modal-overlay { padding: 8px; }
  .modal         { max-height: 95dvh; }

  /* Größerer Close-Button für Touch */
  .modal-close { width: 44px; height: 44px; font-size: 1.2rem; }

  .modal-content { padding: 20px 16px 24px; }
  .modal-name    { font-size: 1.3rem; }

  /* Modal-Bild auf Mobile kompakter */
  .modal-img-wrap { aspect-ratio: 3 / 2; }
}

/* ── Scrollbar ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--brand); }
::-webkit-scrollbar-thumb { background: var(--brand-dark); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--text); }
