/* =========================================================================
   Global Kitchen — styles
   ========================================================================= */
:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --ink: #2b2520;
  --ink-soft: #6b625a;
  --line: #e8e1d8;
  --accent: #c0392b;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(43, 37, 32, 0.07);
  --shadow-lift: 0 8px 24px rgba(43, 37, 32, 0.14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}

h1, h2, h3 { font-family: "Playfair Display", Georgia, serif; }

.hidden { display: none !important; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1400px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.brand-icon { font-size: 1.6rem; }
.brand-name { font-family: "Playfair Display", serif; font-weight: 700; font-size: 1.3rem; white-space: nowrap; }
.search-wrap { flex: 1; max-width: 560px; }
#searchInput {
  width: 100%; padding: 10px 16px; font-size: 0.95rem;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg); outline: none; font-family: inherit;
}
#searchInput:focus { border-color: var(--accent); }
.recipe-count-badge {
  margin-left: auto; white-space: nowrap; font-weight: 600; font-size: 0.85rem;
  background: var(--ink); color: #fff; padding: 6px 14px; border-radius: 999px;
}

/* ---------- Hero ---------- */
.hero {
  text-align: center; padding: 56px 24px 40px;
  background: linear-gradient(180deg, #fff6ec 0%, var(--bg) 100%);
}
.hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); margin-bottom: 10px; }
.hero p { color: var(--ink-soft); font-size: 1.1rem; }
.quick-filters { margin-top: 24px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  padding: 10px 20px; border-radius: 999px; font-size: 0.95rem; font-weight: 600;
  font-family: inherit; box-shadow: var(--shadow); transition: transform 0.15s, box-shadow 0.15s;
}
.chip:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }

/* ---------- Cuisine columns ---------- */
.cuisine-columns {
  max-width: 1400px; margin: 0 auto; padding: 32px 24px 64px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  align-items: start;
}
.cuisine-col {
  background: var(--surface); border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius); box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden;
}
.col-head { padding: 20px 20px 12px; }
.col-icon { font-size: 1.8rem; }
.col-head h2 { font-size: 1.35rem; margin: 4px 0 6px; }
.col-blurb { color: var(--ink-soft); font-size: 0.86rem; }
.sub-list { list-style: none; padding: 0 12px; flex: 1; }
.sub-link {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 10px 10px; border: none; background: none; cursor: pointer;
  font-family: inherit; font-size: 0.95rem; color: var(--ink);
  border-radius: 8px; transition: background 0.12s;
}
.sub-link:hover { background: var(--bg); }
.sub-count {
  font-size: 0.75rem; font-weight: 700; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, white);
  padding: 2px 9px; border-radius: 999px;
}
.col-desserts {
  margin: 4px 12px 0; padding: 9px; cursor: pointer;
  background: #fde2ec; color: #b03a64; border: none; font-weight: 600;
  font-family: inherit; border-radius: 9px; font-size: 0.86rem; transition: filter 0.12s;
}
.col-desserts:hover { filter: brightness(0.97); }
.col-all {
  margin: 8px 12px 14px; padding: 10px; border: none; cursor: pointer;
  background: var(--accent); color: #fff; font-weight: 600; font-family: inherit;
  border-radius: 9px; font-size: 0.88rem; transition: filter 0.12s;
}
.col-all:hover { filter: brightness(1.1); }

/* ---------- Browser ---------- */
.browser { max-width: 1400px; margin: 0 auto; padding: 28px 24px 64px; }
.browser-head { margin-bottom: 18px; }
.back-btn {
  border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  padding: 7px 16px; border-radius: 999px; font-family: inherit; font-size: 0.88rem;
  margin-bottom: 14px;
}
.back-btn:hover { background: var(--bg); }
.browser-head h2 { font-size: 1.8rem; }
.browser-sub { color: var(--ink-soft); margin-top: 4px; }

.filter-bar {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 18px; margin-bottom: 22px;
  font-size: 0.92rem;
}
.filter-bar label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.filter-bar select {
  margin-left: auto; padding: 7px 12px; border: 1px solid var(--line);
  border-radius: 8px; font-family: inherit; background: var(--bg);
}

.recipe-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 18px 16px; cursor: pointer; box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.card-top {
  display: flex; justify-content: space-between; align-items: center;
  margin: 0 -18px 12px; padding: 10px 14px;
  background: color-mix(in srgb, var(--accent) 8%, white);
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
}
.card-flag { font-size: 1.3rem; }
.card-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.badge { font-size: 0.68rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.badge-quick { background: #fdebd0; color: #9c640c; }
.badge-crock { background: #e8daef; color: #6c3483; }
.badge-veg { background: #d5f5e3; color: #1e8449; }
.badge-dessert { background: #fde2ec; color: #b03a64; }
.card h3 { font-size: 1.05rem; line-height: 1.3; margin-bottom: 6px; }
.card-meta { font-size: 0.8rem; color: var(--ink-soft); font-weight: 500; }
.card-flavor { font-size: 0.83rem; color: var(--ink-soft); margin-top: 8px; }
.empty { grid-column: 1 / -1; text-align: center; color: var(--ink-soft); padding: 48px 0; }

.pager { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 30px; }
.pager button {
  border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  padding: 9px 20px; border-radius: 999px; font-family: inherit; font-weight: 600;
}
.pager button:disabled { opacity: 0.4; cursor: default; }
#pageInfo { font-size: 0.9rem; color: var(--ink-soft); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(43, 37, 32, 0.55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto;
}
.modal {
  background: var(--surface); border-radius: var(--radius); max-width: 860px; width: 100%;
  padding: 32px 36px; position: relative; box-shadow: var(--shadow-lift);
}
.modal-close {
  position: absolute; top: 14px; right: 14px; border: none; cursor: pointer;
  background: var(--bg); width: 36px; height: 36px; border-radius: 50%; font-size: 1rem;
}
.modal-crumb { font-size: 0.82rem; color: var(--ink-soft); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.modal h2 { font-size: 1.7rem; margin: 6px 0 14px; }
.modal-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.modal-stats span {
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 13px; font-size: 0.84rem; font-weight: 600;
}
.modal-cols { display: grid; grid-template-columns: 1fr 1.4fr; gap: 30px; }
.modal-cols h3 { font-size: 1.15rem; margin-bottom: 10px; border-bottom: 2px solid var(--line); padding-bottom: 6px; }
.ing-list { list-style: none; }
.ing-list li { padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 0.92rem; }
.step-list { padding-left: 20px; }
.step-list li { padding: 6px 0; font-size: 0.94rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); padding: 28px 24px; text-align: center;
  color: var(--ink-soft); font-size: 0.85rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .modal-cols { grid-template-columns: 1fr; }
  .recipe-count-badge { display: none; }
}
@media (max-width: 600px) {
  .header-inner { flex-wrap: wrap; }
  .search-wrap { order: 3; max-width: none; flex-basis: 100%; }
  .cuisine-columns { grid-template-columns: 1fr; }
}
