:root {
  --bg: #0f0f12;
  --bg-soft: #16171c;
  --card: #1b1d23;
  --text: #e8e8ea;
  --muted: #b7bcc8;
  --brand: #ff7a1a;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  --radius: 16px;
  --radius-sm: 12px;
  --container: 1200px;
}

/* =======================
   GLOBAL
======================= */
body {
  background: linear-gradient(145deg, #0f0f12, #12131a 55%, #0c0d11);
  color: var(--text);
  font-family: 'Josefin Sans', sans-serif;
  margin: 0;
  padding: 0;
}

.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

/* =======================
   LAYOUT
======================= */
.recepti-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 380px;
  gap: 20px;
  margin-top: 22px;
  align-items: start;
}

#filtersPane {
  position: sticky;
  top: 90px;
  height: calc(100vh - 110px);
  overflow-y: auto;
}

#recipesPane {
  height: calc(100vh - 110px);
  overflow-y: auto;
}

#recipeDetailPane {
  position: sticky;
  top: 90px;
  height: calc(100vh - 110px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#filtersPane,
#recipesPane,
#recipeDetailPane {
  scrollbar-width: thin;
}

@media (max-width: 1100px) {
  .recepti-grid {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  #filtersPane {
    height: calc(100vh - 110px);
    overflow-y: auto;
  }

  #recipesPane {
    height: calc(100vh - 110px);
    overflow-y: auto;
  }

  #recipeDetailPane {
    grid-column: 1 / -1;
    position: static;
    height: auto;
    overflow: visible;
  }
}

@media (max-width: 800px) {
  .recepti-grid {
    grid-template-columns: 1fr;
  }

  #filtersPane,
  #recipesPane,
  #recipeDetailPane {
    position: static;
    height: auto;
    overflow: visible;
  }
}

/* =======================
   LEVI PANEL
======================= */
.pane-title {
  font-size: 1.2rem;
  margin: 0 0 12px;
}

.cat-chips {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cat-section {
  margin-bottom: 8px;
}

.cat-section .chip {
  width: 100%;
  text-align: left;
}

.cat-recipe-list {
  list-style: none;
  padding: 8px 6px 2px 8px;
  margin: 6px 0 0;
  max-height: 260px;
  overflow: auto;
}

.cat-recipe-list li {
  margin: 6px 0;
}

.recipe-link {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
}

.recipe-link:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.cat-chips .chip {
  padding: 10px 14px;
  background: #2a2b33;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cat-chips .chip:hover {
  background: #ff7a1a;
  color: #111;
  transform: translateX(4px);
  box-shadow: 0 3px 12px rgba(255, 122, 26, 0.4);
}

.cat-chips .chip.active {
  background: var(--brand);
  color: #111;
  border-color: var(--brand);
  font-weight: 700;
}

/* =======================
   SREDNJI PANEL
======================= */
.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.recipe-card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--bg-soft);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  box-shadow: var(--shadow);
}

.recipe-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.recipe-card.is-active {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand) inset;
}

.recipe-card__image-wrap {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.recipe-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.recipe-card__body {
  padding: 14px;
}

.recipe-card__cat {
  margin: 0 0 8px;
  font-size: 0.84rem;
  color: var(--muted);
}

.recipe-card__title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.recipe-card__excerpt {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.95rem;
}

.recipe-card__meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--muted);
}

/* =======================
   SKELETON
======================= */
.recipes-skeleton {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.recipes-skeleton .s-card {
  height: 220px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

/* =======================
   DESNI PANEL
======================= */
.recipe-hero {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recipe-hero img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.recipe-meta {
  margin-top: 10px;
  font-size: 0.95rem;
}

.meta-list {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--muted);
}

.recipe-section {
  margin-top: 10px;
}

.recipe-section h3 {
  margin-bottom: 8px;
  font-size: 1.1rem;
  color: var(--brand);
}

.ingredients-list,
.steps-list {
  margin: 0;
  padding-left: 20px;
}

.ingredients-list li,
.steps-list li {
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.steps-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.step-thumb img,
.steps-gallery img {
  width: 100%;
  max-width: 220px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: var(--shadow);
  display: block;
}

.muted-note {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 6px 0 0;
}

.muted-note a {
  color: var(--brand);
  text-decoration: none;
}

/* =======================
   PAGINATION
======================= */
.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 16px 0 6px;
  flex-wrap: wrap;
}

.page-btn,
.pagination .page {
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  min-width: 36px;
  text-align: center;
  font-weight: 600;
}

.page-btn:hover,
.pagination .page:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.06);
}

.page-btn.active,
.pagination .page.active {
  background: var(--brand);
  color: #111;
  border-color: var(--brand);
}

/* =======================
   FOOTER
======================= */
.footer {
  margin: 40px auto 20px;
  max-width: var(--container);
  padding: 12px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  display: flex;
  justify-content: center;
}