:root{
  --bg: #121014;
  --paper: #F6E7C1;
  --ink: rgba(18,16,20,.92);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.72);

  --cream: rgba(246,231,193,.14);
  --card: rgba(255,255,255,.09);
  --card2: rgba(255,255,255,.06);

  --teal:#2D7C7B;
  --tomato:#D75A4A;
  --mustard:#E8C48C;

  --shadow: 0 18px 50px rgba(0,0,0,.45);
  --radius: 18px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(900px 480px at 12% -10%, rgba(215,90,74,.22), transparent 60%),
    radial-gradient(900px 600px at 92% 0%, rgba(45,124,123,.18), transparent 62%),
    radial-gradient(1100px 700px at 50% 120%, rgba(232,196,140,.14), transparent 58%),
    var(--bg);
  overflow-x:hidden;
}

/* Subtle "paper pattern" overlay */
body::before{
  content:"";
  position:fixed; inset:0;
  pointer-events:none;
  background: url("../assets/retro/pattern.svg") center/320px 320px repeat;
  mix-blend-mode: soft-light;
  opacity:.22;
}

a{color:inherit}
.container{
  width:min(1100px, 100% - 28px);
  margin-inline:auto;
}

/* Topbar with scroll animation (shrink) */
.topbar{
  position:sticky; top:0; z-index:50;
  backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, rgba(18,16,20,.95), rgba(18,16,20,.60));
  border-bottom: 1px solid rgba(255,255,255,.10);
  transition: padding .18s ease, background .18s ease, border-color .18s ease;
}
.topbar-inner{
  display:flex; align-items:center; gap:12px;
  padding: 12px 0;
  transition: padding .18s ease;
}
.topbar.shrink .topbar-inner{padding: 8px 0}
.topbar.shrink{
  background: linear-gradient(to bottom, rgba(18,16,20,.98), rgba(18,16,20,.70));
  border-color: rgba(232,196,140,.22);
}

.brand{display:flex; align-items:center; gap:10px; min-width: 210px}
.brand-badge{
  width:42px; height:42px; border-radius:14px;
  background: linear-gradient(135deg, rgba(232,196,140,.95), rgba(215,90,74,.85));
  display:grid; place-items:center;
  box-shadow: 0 12px 28px rgba(215,90,74,.18);
}
.brand-title{line-height:1.05}
.brand-title strong{display:block; font-size: 1.05rem; letter-spacing:.2px}
.brand-title span{display:block; font-size:.78rem; color:rgba(255,255,255,.70)}

.searchbar{
  flex:1;
  display:flex; align-items:center; gap:10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(246,231,193,.10);
  border: 1px solid rgba(232,196,140,.22);
}
.searchbar input{
  width:100%;
  border:0; outline:0;
  background:transparent;
  color:var(--text);
  font-size: 0.95rem;
}
.searchbar .kbd{
  font-size:.72rem;
  color: rgba(255,255,255,.70);
  padding: 4px 8px;
  border: 1px solid rgba(232,196,140,.22);
  border-bottom-color: rgba(232,196,140,.35);
  border-radius: 10px;
}

.hero{padding: 16px 0 10px}
.hero-card{
  border-radius: calc(var(--radius) + 6px);
  overflow:hidden;
  box-shadow: var(--shadow);
  position:relative;
  border: 1px solid rgba(232,196,140,.22);
  background: rgba(255,255,255,.04);
}
.hero-media{
  height: 240px;
  background:
    radial-gradient(800px 240px at 20% 20%, rgba(215,90,74,.28), transparent 65%),
    linear-gradient(90deg, rgba(18,16,20,.95), rgba(18,16,20,.35) 55%, rgba(18,16,20,.90)),
    url("images/receptek/alacena.webp") center/cover no-repeat;
  transform: scale(1.03);
}
.hero-content{
  padding: 16px;
  display:grid;
  gap: 10px;
}
.hero-content h1{margin:0; font-size: clamp(1.25rem, 3.2vw, 2.05rem); letter-spacing:.2px}
.hero-content p{margin:0; color:rgba(255,255,255,.76); max-width: 70ch}

.pills{display:flex; flex-wrap:wrap; gap:10px; margin-top:6px}
.pill{
  display:inline-flex; align-items:center; gap:8px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(232,196,140,.22);
  background: rgba(246,231,193,.08);
  cursor:pointer;
  user-select:none;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
  font-size:.9rem;
}
.pill:hover{transform: translateY(-1px); border-color: rgba(215,90,74,.35)}
.pill.active{
  background: linear-gradient(135deg, rgba(232,196,140,.18), rgba(215,90,74,.14));
  border-color: rgba(232,196,140,.45);
}

.actions{
  display:flex; gap:10px; flex-wrap:wrap; margin-top: 6px;
}

.grid{
  padding: 10px 0 80px;
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

/* Cards + reveal on scroll */
.card{
  grid-column: span 12;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card), var(--card2));
  border: 1px solid rgba(232,196,140,.18);
  overflow:hidden;
  box-shadow: 0 16px 34px rgba(0,0,0,.28);
  cursor:pointer;
  transition: transform .14s ease, border-color .14s ease, opacity .45s ease, transform .45s ease;
  opacity:0;
  transform: translateY(14px);
}
.card.is-visible{
  opacity:1;
  transform: translateY(0);
}
.card:hover{transform: translateY(-2px); border-color: rgba(215,90,74,.35)}
.card-inner{display:flex; gap: 12px; padding: 12px}

.thumb{
  width: 108px; min-width:108px; height: 108px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(232,196,140,.22), rgba(18,16,20,.0)),
    url("../assets/retro/kitchen_1800s.jpg") center/cover no-repeat;
  overflow:hidden;
  position:relative;
  border: 1px solid rgba(232,196,140,.18);
}
.thumb img{width:100%; height:100%; object-fit:cover; display:block; transform: scale(1.03)}
.badge{
  position:absolute; left:10px; top:10px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size:.72rem;
  background: rgba(18,16,20,.65);
  border: 1px solid rgba(232,196,140,.18);
}
.meta{min-width:0}
.meta h3{margin: 2px 0 6px; font-size: 1.02rem}
.meta p{
  margin:0;
  color: rgba(255,255,255,.74);
  font-size:.9rem;
  display:-webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:hidden;
}
.meta .mini{
  margin-top: 10px;
  display:flex; gap:10px; flex-wrap:wrap;
  color: rgba(255,255,255,.72);
  font-size: .78rem;
}

.chip{
  display:inline-flex; align-items:center; gap:6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(246,231,193,.08);
  border: 1px solid rgba(232,196,140,.18);
}

/* Buttons */
.btn{
  border: 1px solid rgba(232,196,140,.22);
  background: rgba(246,231,193,.08);
  color: var(--text);
  border-radius: 14px;
  padding: 10px 12px;
  cursor:pointer;
  font-size:.92rem;
  display:inline-flex; align-items:center; gap:8px;
}
.btn.primary{
  border-color: rgba(215,90,74,.42);
  background: linear-gradient(135deg, rgba(215,90,74,.20), rgba(232,196,140,.14));
}
.btn:active{transform: translateY(1px)}
.small{font-size:.78rem; color: rgba(255,255,255,.72)}

/* Floating Back-to-top */
.fab{
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 80;
  opacity: 0;
  transform: translateY(10px);
  pointer-events:none;
  transition: opacity .2s ease, transform .2s ease;
}
.fab.show{
  opacity:1;
  transform: translateY(0);
  pointer-events:auto;
}
.fab .btn{
  border-radius: 999px;
  padding: 12px 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,.38);
}

/* Modal */
.modal-backdrop{
  position: fixed; inset: 0;
  background: rgba(0,0,0,.66);
  display:none;
  z-index: 100;
  padding: 18px 14px;
}
.modal{
  width: min(760px, 100%);
  margin: 0 auto;
  border-radius: 22px;
  overflow:hidden;
  border: 1px solid rgba(232,196,140,.24);
  background: linear-gradient(180deg, rgba(246,231,193,.10), rgba(255,255,255,.06));
  box-shadow: 0 34px 90px rgba(0,0,0,.55);
}
.modal-head{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(232,196,140,.18);
}
.modal-head h2{margin:0; font-size: 1.05rem}
.modal-body{padding: 14px; display:grid; gap: 14px}
.modal-hero{
  border-radius: 18px;
  overflow:hidden;
  border: 1px solid rgba(232,196,140,.18);
  background: rgba(246,231,193,.06);
}
.modal-hero img{width:100%; height: 240px; object-fit:cover; display:block}
.block{
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(232,196,140,.18);
  background: rgba(246,231,193,.06);
}
.block h4{margin:0 0 8px; font-size: .95rem}
.block p{margin:0; color: rgba(255,255,255,.78); white-space: pre-line}
.list{margin:0; padding-left: 18px; color: var(--text)}

.footer{padding: 18px 0 90px; color: rgba(255,255,255,.66); font-size:.82rem}

@media (min-width: 720px){
  .hero-media{height: 280px}
  .card{grid-column: span 6}
  .thumb{width: 120px; min-width:120px; height:120px}
  .modal-hero img{height: 300px}
}
@media (min-width: 980px){
  .card{grid-column: span 4}
}

/* Modal recipe content */
.h3{
  font-size: .95rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.82);
  margin: 14px 0 8px;
}
.steps{
  margin: 0;
  padding-left: 18px;
}
.steps li{
  margin: 6px 0;
  color: rgba(255,255,255,.86);
}


/* --- Modal usability fixes (v3.1) --- */
.modal-backdrop{
  background: rgba(0,0,0,.78);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.modal{
  max-height: calc(100vh - 36px);
  background: linear-gradient(180deg, rgba(18,16,20,.92), rgba(18,16,20,.86));
}
.modal-body{
  max-height: calc(100vh - 140px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.block{
  background: rgba(18,16,20,.55);
  border-color: rgba(232,196,140,.22);
}
.block p{color: rgba(255,255,255,.86)}
/* --- end modal fixes --- */


/* --- Hero header image upgrade (v3.2) --- */
.hero-media{
  height: 220px;
  background:
    linear-gradient(180deg, rgba(18,16,20,.62), rgba(18,16,20,.20) 40%, rgba(18,16,20,.68)),
    url("../assets/retro/header.jpg") center/cover no-repeat;
  transform: none;
}
@media (min-width: 720px){
  .hero-media{height: 260px}
}
/* --- end hero upgrade --- */


/* --- Retro badge + vignette (v3.3) --- */
.hero-card{position:relative}
.hero-media{position:relative}
.hero-media::after{
  content:"";
  position:absolute; inset:0;
  background:
    radial-gradient(900px 220px at 50% 110%, rgba(18,16,20,.92), transparent 62%),
    linear-gradient(to bottom, rgba(0,0,0,.10), rgba(0,0,0,.05), rgba(0,0,0,.18));
  pointer-events:none;
}
.hero-media::before{
  content:"";
  position:absolute; inset:0;
  background: radial-gradient(700px 280px at 12% 10%, rgba(232,196,140,.10), transparent 60%);
  mix-blend-mode: screen;
  opacity:.35;
  pointer-events:none;
}
.hero-badge{
  position:absolute;
  left: 14px;
  top: 14px;
  transform: rotate(-2deg);
  filter: drop-shadow(0 18px 26px rgba(0,0,0,.35));
}
.hero-badge-inner{
  padding: 10px 12px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(246,231,193,.92), rgba(246,231,193,.78));
  border: 2px solid rgba(215,90,74,.55);
  box-shadow: inset 0 0 0 2px rgba(45,124,123,.22);
  position:relative;
  overflow:hidden;
}
.hero-badge-inner::after{
  content:"";
  position:absolute; inset:0;
  background:
    repeating-linear-gradient(45deg, rgba(0,0,0,.05) 0 6px, rgba(0,0,0,0) 6px 12px);
  opacity:.18;
  pointer-events:none;
}
.stamp{
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  color: rgba(18,16,20,.92);
  font-weight: 800;
  letter-spacing: .6px;
  font-size: 1.05rem;
  text-transform: uppercase;
  line-height:1.05;
}
.stamp-sub{
  margin-top: 2px;
  color: rgba(18,16,20,.72);
  font-size: .78rem;
  letter-spacing: .2px;
}
@media (min-width: 720px){
  .hero-badge{left:18px; top:18px}
  .stamp{font-size:1.12rem}
}
/* --- end v3.3 --- */


/* --- Fixed background image (v3.5) --- */
body{
  background:
    linear-gradient(180deg, rgba(18,16,20,.76), rgba(18,16,20,.62)),
    url("../assets/retro/bg_dinnermenu.webp") center/cover no-repeat fixed;
}
/* keep subtle pattern overlay but reduce intensity over photo */
body::before{
  opacity:.14;
  mix-blend-mode: overlay;
}
/* --- end v3.5 --- */


/* --- Header banner (mintaképen: header.jpg) --- */
.hero-media{
  height: 170px;
  background:
    linear-gradient(180deg, rgba(18,16,20,.55), rgba(18,16,20,.25) 45%, rgba(18,16,20,.65)),
    url("../assets/retro/header.jpg") center/cover no-repeat;
  transform:none;
}
@media (min-width: 720px){
  .hero-media{height: 190px}
}
.hero-content h1{
  font-size: clamp(1.02rem, 2.2vw, 1.38rem);
}
.hero-content p{font-size: .88rem;}
/* make badge slightly smaller so it doesn't dominate */
.hero-badge-inner{
  padding: 8px 10px;
  border-radius: 14px;
}
.stamp{font-size: .98rem}
.stamp-sub{font-size: .74rem}
/* --- end v3.5 --- */


/* --- FAB icon button (v3.5) --- */
.fab .btn{
  padding: 10px;
  width: 52px;
  height: 52px;
  justify-content:center;
}
.fab img{filter: drop-shadow(0 10px 18px rgba(0,0,0,.35));}
/* --- end v3.5 --- */


/* --- Header text area uses header image (v3.6) --- */
.hero-content{
  position: relative;
  overflow: hidden;
}
.hero-content::before{
  content:"";
  position:absolute; inset:0;
  background:
    linear-gradient(180deg, rgba(18,16,20,.78), rgba(18,16,20,.72)),
    url("../assets/retro/header.jpg") center/cover no-repeat;
  filter: blur(6px);
  transform: scale(1.08);
  opacity: .95;
  z-index: 0;
}
.hero-content > *{ position: relative; z-index: 1; }
/* --- end v3.6 --- */


/* --- Footer like original sample (v3.6) --- */
.site-footer{
  margin-top: 18px;
  padding: 18px 0 90px;
  background: rgba(0,0,0,.35);
  border-top: 1px solid rgba(255,255,255,.10);
  text-align: center;
}
.site-footer-inner{
  width:min(1100px, 100% - 28px);
  margin-inline:auto;
}
.foot-main{
  color: rgba(255,255,255,.88);
  font-size: .95rem;
  display:flex;
  flex-wrap: wrap;
  justify-content:center;
  gap: 8px;
}
.foot-main .sep{ color: rgba(255,255,255,.45); }
.foot-legal{
  margin: 10px auto 0;
  max-width: 92ch;
  font-size: .64rem;
  line-height: 1.45;
  color: rgba(255,255,255,.55);
}
/* --- end footer v3.6 --- */


/* --- Full-width footer bar (v3.7) --- */
.site-footer{
  width: 100%;
  background: linear-gradient(to top, rgba(18,16,20,.96), rgba(18,16,20,.70));
  backdrop-filter: blur(10px);
}
/* make footer content align with page container */
.site-footer-inner{
  width: min(1100px, 100% - 28px);
  margin-inline: auto;
}
/* --- end footer v3.7 --- */


/* --- Single continuous header image (v3.7) --- */
.hero-card{
  background: url("../assets/retro/header_dinnerware.webp") center/cover no-repeat;
}
.hero-media{
  /* only a darkening overlay so the image continues seamlessly */
  background: linear-gradient(180deg, rgba(18,16,20,.25), rgba(18,16,20,.55));
}
.hero-media::before,
.hero-media::after{
  /* reduce extra layers so it doesn't look doubled */
  opacity: .22;
}
.hero-content{
  /* blur what is behind (same header image), not a second copy */
  background: rgba(18,16,20,.46);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
/* disable the v3.6 duplicated background layer */
.hero-content::before{ display:none !important; }
/* --- end header v3.7 --- */


/* --- Footer full width force (v3.8) --- */
.site-footer{
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;
}
/* --- end v3.8 --- */

/* --- Logo badge instead of orange tile (v3.9) --- */
.logo-badge{
  background: transparent !important;
  box-shadow: none !important;
}
.logo-badge img{
  border-radius: 12px;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.35));
}
/* --- end v3.9 --- */


/* --- Logo + count placement (v3.9) --- */
.brand-badge{
  background: rgba(246,231,193,.10);
  border: 1px solid rgba(232,196,140,.28);
  box-shadow: 0 10px 22px rgba(0,0,0,.25);
}
.brand-badge img{
  width: 32px;
  height: 32px;
}
.count-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 6px 10px;
  margin-right: 8px;
  border-radius: 999px;
  background: rgba(246,231,193,.10);
  border: 1px solid rgba(232,196,140,.22);
  color: rgba(255,255,255,.84);
  font-size: .78rem;
  white-space: nowrap;
}
/* --- end v3.9 --- */


/* --- Retro enhancements pack (v4.0) --- */
/* warm light wash */
body::after{
  content:"";
  position:fixed; inset:0;
  pointer-events:none;
  background: radial-gradient(900px 520px at 20% 10%, rgba(232,196,140,.16), transparent 60%),
              radial-gradient(900px 520px at 90% 15%, rgba(215,90,74,.12), transparent 62%);
  mix-blend-mode: soft-light;
  opacity:.55;
}

/* sticky category bar */
.pillbar{
  position: sticky;
  top: 62px; /* below topbar */
  z-index: 30;
  padding-top: 8px;
  padding-bottom: 8px;
  background: linear-gradient(to bottom, rgba(18,16,20,.78), rgba(18,16,20,.20));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
}
@media (min-width: 720px){
  .pillbar{ top: 70px; }
}

/* nicer hover glow */
.card:hover{
  box-shadow: 0 20px 46px rgba(0,0,0,.34);
}
.card:hover::after{
  content:"";
  position:absolute; inset:-2px;
  border-radius: var(--radius);
  background: radial-gradient(400px 200px at 20% 20%, rgba(232,196,140,.18), transparent 60%),
              radial-gradient(420px 220px at 80% 30%, rgba(215,90,74,.14), transparent 62%);
  pointer-events:none;
}
.card{ position:relative; }

/* modal: paper texture */
.modal{
  background:
    radial-gradient(900px 420px at 10% 0%, rgba(232,196,140,.12), transparent 60%),
    linear-gradient(180deg, rgba(18,16,20,.94), rgba(18,16,20,.86));
}
.modal::after{
  content:"";
  position:absolute; inset:0;
  pointer-events:none;
  background: url("../assets/retro/pattern.svg") center/320px 320px repeat;
  opacity:.10;
  mix-blend-mode: overlay;
}
.modal > *{ position:relative; z-index:1; }

.modal-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.checklist li{
  margin: 6px 0;
}
.checklist li label{
  display:flex;
  gap:10px;
  align-items:flex-start;
  cursor:pointer;
}
.checklist input[type="checkbox"]{
  margin-top: 3px;
  transform: scale(1.15);
}
.checklist .done{
  text-decoration: line-through;
  opacity:.70;
}

/* kitchen mode: bigger, cleaner */
body.kitchen-mode .modal{
  width: min(840px, 100%);
}
body.kitchen-mode .modal-body{
  font-size: 1.07rem;
}
body.kitchen-mode .modal-body h4{
  font-size: 1.05rem;
}
body.kitchen-mode .modal-hero{ display:none; }
body.kitchen-mode .modal-actions{
  position: sticky;
  top: 0;
  background: rgba(18,16,20,.88);
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(232,196,140,.18);
  backdrop-filter: blur(10px);
}

/* favorites state */
.pill.fav-only{
  border-color: rgba(215,90,74,.45);
}
.fav-badge{
  position:absolute;
  right:10px;
  bottom:10px;
  padding:6px 10px;
  border-radius: 999px;
  background: rgba(18,16,20,.68);
  border: 1px solid rgba(232,196,140,.18);
  font-size: .72rem;
}

/* --- end v4.0 --- */


/* --- Modal actions sticky fix (v4.1) --- */
.modal-body{
  position: relative;
}
.modal-actions{
  position: sticky;
  top: 0;
  z-index: 6;
  padding: 10px 8px;
  margin: 8px 0 6px;
  background: rgba(18,16,20,.80);
  border: 1px solid rgba(232,196,140,.16);
  border-radius: 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
/* keep kitchen mode nice but don't double-style */
body.kitchen-mode .modal-actions{
  padding: 10px 8px;
}
/* --- end v4.1 --- */


/* --- Sticky pillbar only when stuck (v4.1) --- */
.pillbar{
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: 0;
  padding-top: 0;
  padding-bottom: 0;
}
.pillbar.stuck{
  padding-top: 8px;
  padding-bottom: 8px;
  border-radius: 16px;
  background: linear-gradient(to bottom, rgba(18,16,20,.78), rgba(18,16,20,.20));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
/* --- end v4.1 --- */


/* --- Pillbar glass background REMOVED (v4.2) --- */
.pillbar,
.pillbar.stuck{
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  border: none !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
/* --- end v4.2 --- */


/* --- Modal close + copy buttons fix (v4.3) --- */
.btn.icon{
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 1.05rem;
  line-height: 1;
}
#closeBtn{
  color: rgba(255,255,255,.86);
}
#closeBtn:hover{
  transform: translateY(-1px);
}
#copyBtn{
  margin-top: 10px;
}
/* --- end v4.3 --- */
