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

:root {
  --clay:   #1a1410;
  --kiln:   #2c1f14;
  --ember:  #8b4513;
  --ash:    #b8a89a;
  --cream:  #f0ebe3;
  --glaze:  #d4c4a8;
  --accent: #c07840;
  --border: rgba(176,148,110,0.18);
  --glow:   rgba(192,120,64,0.12);
  --sidebar-width: 260px;
}

html, body {
  height: 100%;
}

body {
  background: var(--clay);
  color: var(--cream);
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── HEADER ── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 40px 18px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(to bottom, rgba(26,15,8,0.95), transparent);
  position: relative;
  z-index: 20;
  flex-shrink: 0;
  gap: 16px;
}

.logo {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.logo-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--cream);
  line-height: 1;
  white-space: nowrap;
}

.logo-sub {
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ash);
}

.header-info {
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--ash);
  text-align: right;
  flex-shrink: 0;
}

.header-info span {
  color: var(--accent);
  font-size: 18px;
  font-family: 'Cormorant Garamond', serif;
  display: block;
  font-weight: 600;
}

/* Hamburger — hidden on desktop */
.sidebar-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--ash);
  width: 40px;
  height: 40px;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  transition: all 0.2s;
}

.sidebar-toggle:hover {
  border-color: rgba(192,120,64,0.5);
  background: rgba(192,120,64,0.08);
}

.sidebar-toggle span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--ash);
  transition: all 0.25s;
  transform-origin: center;
}

.sidebar-toggle.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.sidebar-toggle.open span:nth-child(2) {
  opacity: 0;
}
.sidebar-toggle.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ── MAIN LAYOUT ── */
.main {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: linear-gradient(to right, rgba(26,15,8,0.6), transparent);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 20px 24px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-header h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  font-weight: 400;
  font-style: italic;
  color: var(--ash);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.search-wrap {
  position: relative;
}

.search-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.4;
  width: 14px;
  height: 14px;
  color: var(--ash);
}

#searchInput {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 10px 8px 32px;
  color: var(--cream);
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.1em;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

#searchInput::placeholder { color: rgba(184,168,154,0.35); }

#searchInput:focus {
  border-color: rgba(192,120,64,0.5);
  background: rgba(255,255,255,0.07);
}

.glaze-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(192,120,64,0.3) transparent;
}

.glaze-list::-webkit-scrollbar { width: 4px; }
.glaze-list::-webkit-scrollbar-track { background: transparent; }
.glaze-list::-webkit-scrollbar-thumb {
  background: rgba(192,120,64,0.3);
  border-radius: 2px;
}

.glaze-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--ash);
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-align: left;
  transition: all 0.2s;
  margin-bottom: 2px;
}

.glaze-btn:hover {
  background: rgba(192,120,64,0.08);
  color: var(--cream);
  border-color: var(--border);
}

.glaze-btn.active {
  background: rgba(192,120,64,0.14);
  color: var(--cream);
  border-color: rgba(192,120,64,0.35);
}

.glaze-btn .count {
  font-size: 10px;
  background: rgba(192,120,64,0.25);
  color: var(--accent);
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: 0;
}

.glaze-btn.active .count {
  background: rgba(192,120,64,0.4);
}

/* Sidebar overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,6,3,0.6);
  z-index: 15;
  backdrop-filter: blur(2px);
}

.sidebar-overlay.visible { display: block; }

/* ── CONTENT AREA ── */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(192,120,64,0.3) transparent;
  position: relative;
  min-width: 0;
}

.content::-webkit-scrollbar { width: 5px; }
.content::-webkit-scrollbar-track { background: transparent; }
.content::-webkit-scrollbar-thumb {
  background: rgba(192,120,64,0.3);
  border-radius: 2px;
}

/* Empty state */
.empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  opacity: 0.45;
  pointer-events: none;
  transition: opacity 0.4s;
}

.empty-state.hidden { opacity: 0; }

.empty-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  color: var(--ash);
}

.empty-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-style: italic;
  color: var(--ash);
  text-align: center;
}

.empty-sub {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ash);
  text-transform: uppercase;
}

/* Content header */
.content-header {
  padding: 28px 40px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  gap: 20px;
  flex-shrink: 0;
  background: linear-gradient(to bottom, rgba(26,15,8,0.5), transparent);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: opacity 0.3s;
}

.content-header.hidden { opacity: 0; pointer-events: none; }

.content-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 42px;
  font-weight: 300;
  color: var(--cream);
  line-height: 1;
}

.content-title em {
  color: var(--accent);
  font-style: italic;
}

.content-meta {
  margin-bottom: 6px;
}

.content-meta p {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ash);
}

.content-meta strong {
  color: var(--accent);
  font-weight: 400;
}

/* Grid */
.mixtures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
  padding: 0;
  transition: opacity 0.3s;
}

.mixtures-grid.hidden { opacity: 0; pointer-events: none; }

.mixture-card {
  background: var(--clay);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  transition: transform 0.3s ease;
}

.mixture-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(15,8,4,0.85) 100%);
  transition: opacity 0.3s;
}

.mixture-card:hover::after { opacity: 0.7; }

.mixture-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25,0.46,0.45,0.94), filter 0.3s;
  filter: brightness(0.88) saturate(1.1);
}

.mixture-card:hover img {
  transform: scale(1.05);
  filter: brightness(1) saturate(1.2);
}

.mixture-card .card-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 18px 18px;
  z-index: 2;
  transform: translateY(4px);
  transition: transform 0.3s;
}

.mixture-card:hover .card-label { transform: translateY(0); }

.card-combo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--cream);
  letter-spacing: 0.05em;
  line-height: 1;
  margin-bottom: 4px;
}

.card-combo em {
  color: var(--accent);
  font-style: normal;
}

.card-sub {
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(240,235,227,0.55);
}

/* Decorative line */
.deco-line {
  width: 40px;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
  display: inline-block;
  vertical-align: middle;
  margin: 0 10px;
}

.no-results {
  padding: 60px 40px;
  text-align: center;
  color: var(--ash);
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-style: italic;
  display: none;
}

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10,6,3,0.93);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(6px);
}

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

.lightbox-inner {
  max-width: 85vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  transform: scale(0.96);
  transition: transform 0.3s;
  padding: 0 16px;
}

.lightbox.open .lightbox-inner { transform: scale(1); }

.lightbox-img {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 40px 100px rgba(0,0,0,0.7);
}

.lightbox-info { text-align: center; }

.lightbox-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 300;
  color: var(--cream);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.lightbox-title em { color: var(--accent); font-style: normal; }

.lightbox-caption {
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ash);
}

.lightbox-close {
  position: fixed;
  top: 30px;
  right: 36px;
  background: none;
  border: 1px solid var(--border);
  color: var(--ash);
  font-size: 22px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-family: 'Jost', sans-serif;
  font-weight: 200;
  line-height: 1;
}

.lightbox-close:hover {
  background: rgba(192,120,64,0.15);
  border-color: rgba(192,120,64,0.5);
  color: var(--cream);
}

.lightbox-nav {
  display: flex;
  gap: 12px;
}

.lb-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--ash);
  font-size: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.lb-btn:hover {
  background: rgba(192,120,64,0.15);
  border-color: rgba(192,120,64,0.5);
  color: var(--cream);
}

/* ── RESPONSIVE ── */

/* Tablet */
@media (max-width: 900px) {
  header {
    padding: 16px 24px 14px;
  }

  .logo-title {
    font-size: 20px;
  }

  .mixtures-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .content-header {
    padding: 20px 24px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .content-title {
    font-size: 32px;
  }
}

/* Mobile */
@media (max-width: 640px) {
  html, body {
    height: auto;
    overflow: auto;
  }

  body {
    min-height: 100dvh;
  }

  header {
    padding: 14px 16px 12px;
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--clay);
  }

  .logo-title {
    font-size: 18px;
    letter-spacing: 0.05em;
  }

  .logo-sub {
    font-size: 9px;
    letter-spacing: 0.2em;
  }

  .header-info {
    font-size: 10px;
  }

  .header-info span {
    font-size: 15px;
  }

  .sidebar-toggle {
    display: flex;
  }

  .main {
    overflow: visible;
    flex-direction: column;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 25;
    transform: translateX(-100%);
    background: var(--clay);
    border-right: 1px solid var(--border);
    padding-top: 60px;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .content {
    overflow: visible;
    height: auto;
  }

  .empty-state {
    position: relative;
    min-height: 60vh;
    inset: auto;
    opacity: 1;
    padding: 40px 16px;
  }

  .empty-state.hidden {
    display: none;
  }

  .content-header {
    padding: 16px 16px 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    position: sticky;
  }

  .content-title {
    font-size: 28px;
  }

  .mixtures-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lightbox-inner {
    max-width: 95vw;
    gap: 16px;
  }

  .lightbox-title {
    font-size: 22px;
  }

  .lightbox-close {
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .no-results {
    padding: 40px 16px;
    font-size: 17px;
  }
}

/* Very small screens */
@media (max-width: 360px) {
  .mixtures-grid {
    grid-template-columns: 1fr;
  }
}
