/* PiacMa V1 — utilitárius marketplace (Fraunces + Karla, papír/zöld/borostyán) */
:root {
  --paper: #FAF7F2; --ink: #1B1A17; --muted: #6E6A61; --line: #E7E1D6;
  --green: #0F6E56; --green-deep: #0A4A3A; --amber: #F5B301; --card: #FFFFFF;
  --danger: #C0392B;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink);
  font-family: 'Karla', sans-serif; font-size: 16px; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.serif { font-family: 'Fraunces', serif; }

/* top bar */
.top { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 20; }
.top-in { display: flex; align-items: center; gap: 18px; padding: 13px 0; }
.logo { font-family: 'Fraunces', serif; font-weight: 900; font-size: 24px; letter-spacing: -0.5px; white-space: nowrap; }
.logo em { font-style: normal; color: var(--green); }
.top nav { display: flex; gap: 20px; font-size: 14.5px; color: var(--muted); font-weight: 500; margin-left: auto; }
.top nav a:hover { color: var(--ink); }
.top .mini-search { flex: 1; max-width: 380px; display: flex; border: 1.5px solid var(--line);
  border-radius: 10px; background: var(--card); overflow: hidden; }
.top .mini-search input { flex: 1; border: 0; outline: 0; padding: 9px 13px; font: inherit; font-size: 14px; background: none; min-width: 0; }
.top .mini-search button { border: 0; background: var(--green); color: #fff; font-weight: 700; padding: 0 14px; cursor: pointer; }

/* gombok */
.btn { display: inline-block; border: 0; border-radius: 11px; font: inherit; font-weight: 700;
  padding: 13px 22px; cursor: pointer; text-align: center; transition: background .15s; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-deep); }
.btn-outline { background: var(--card); color: var(--ink); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.btn-outline:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* címek */
h2.sec { font-family: 'Fraunces', serif; font-weight: 700; font-size: 25px; margin: 40px 0 4px; }
.sub { color: var(--muted); font-size: 14.5px; margin: 0 0 16px; }
.h-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.more { font-size: 14px; font-weight: 700; color: var(--green); white-space: nowrap; }

/* chipek */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font-size: 13.5px; font-weight: 500; padding: 7px 14px; border: 1px solid var(--line);
  border-radius: 99px; background: var(--card); cursor: pointer; transition: all .15s; color: inherit; display: inline-block; }
.chip:hover, .chip.on { border-color: var(--green); color: var(--green); }

/* kártyák */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.g { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  transition: transform .15s; position: relative; display: block; }
.g:hover { transform: translateY(-3px); }
.g img { width: 100%; height: 150px; object-fit: contain; background: #fff; display: block; }
.g .b { padding: 10px 12px 12px; }
.g .t { font-weight: 600; font-size: 13.5px; line-height: 1.3; height: 2.6em; overflow: hidden; }
.g .p { color: var(--green); font-weight: 700; font-size: 15px; margin-top: 5px; }
/* Darabszam a kartyan: halvanyabb, hogy az ar maradjon a fo informacio. */
.g .p .qty { color: var(--muted, #71717a); font-weight: 600; font-size: 12px; margin-left: 7px; white-space: nowrap; }
/* Az ar EGY darabra ertendo, ezert a '/db' kozvetlenul az ar utan all. */
.g .p .unit { font-weight: 600; font-size: 11.5px; margin-left: 1px; opacity: .75; }
/* Egysegar (4/2009. NFGM-SZMM): jol olvashato, de az eladasi ar a hangsulyos. */
.g .ea { color: var(--muted, #71717a); font-size: 12px; font-weight: 600; padding: 0 8px 6px; }
/* Maganszemely eladonal a vevot NEM illetik meg a fogyasztoi jogok (Fttv. 7. § (5) f). */
.g .v .mag { display:inline-block; margin-left:5px; background:#fef3c7; color:#92400e;
  font-size:10.5px; font-weight:700; padding:1px 6px; border-radius:99px; vertical-align:middle; }
.g .v { color: var(--muted); font-size: 11.5px; margin-top: 3px; text-transform: uppercase; letter-spacing: .4px; }
.off { position: absolute; top: 10px; left: 10px; background: var(--amber); color: var(--ink);
  font-weight: 700; font-size: 13px; padding: 3px 9px; border-radius: 7px; z-index: 2; }
.res-badge { position: absolute; top: 10px; right: 10px; background: #FEF3C7; color: #92400E;
  font-weight: 700; font-size: 12px; padding: 3px 9px; border-radius: 7px; z-index: 2; }
.g.reserved { opacity: .6; }

/* vízszintes deal-sor */
.deals { display: grid; grid-auto-flow: column; grid-auto-columns: 225px; gap: 14px;
  overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory; }
.deals .g { scroll-snap-align: start; }
.deals .g img { height: 145px; }

/* lábléc */
footer { margin-top: 56px; border-top: 1px solid var(--line); padding: 24px 0 40px;
  color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* űrlapok */
.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 13px; font-weight: 700; margin-bottom: 5px; }
.field input { width: 100%; font: inherit; padding: 11px 13px; border: 1.5px solid var(--line);
  border-radius: 10px; background: var(--card); outline: 0; }
.field input:focus { border-color: var(--green); }
.alert { border-radius: 10px; padding: 11px 14px; font-size: 14px; margin-top: 12px; display: none; }
.alert.ok { display: block; background: #E7F3EC; color: var(--green-deep); }
.alert.err { display: block; background: #FBEAE7; color: var(--danger); }

/* mobil */
@media (max-width: 760px) {
  .wrap { padding: 0 14px; }
  .top nav { display: none; }
  .top .mini-search { max-width: none; }
  h2.sec { font-size: 21px; margin-top: 30px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .g img { height: 120px; }
  .deals { grid-auto-columns: 180px; }
}

/* bevásárlólista gomb + badge */
.lista-btn { position: absolute; top: 10px; right: 10px; z-index: 3; width: 34px; height: 34px;
  border-radius: 50%; border: 1.5px solid var(--line); background: rgba(255,255,255,.94);
  font-size: 16px; cursor: pointer; display: grid; place-items: center; transition: all .15s;
  filter: grayscale(1); }
.lista-btn:hover { border-color: var(--green); }
.lista-btn.in { background: var(--green); border-color: var(--green); filter: none; box-shadow: 0 2px 8px rgba(15,110,86,.35); }
.lista-badge { display: none; background: var(--amber); color: var(--ink); font-weight: 700;
  font-size: 11.5px; border-radius: 99px; padding: 1px 7px; margin-left: 4px; vertical-align: 2px; }
@media (max-width: 760px) { .lista-btn { width: 32px; height: 32px; } }

/* ── mennyiség-lépegető (bevásárlólista) ── */
.lista-step { position: absolute; top: 10px; right: 10px; z-index: 3; display: inline-flex; align-items: center;
  background: var(--green); border-radius: 10px; box-shadow: 0 2px 8px rgba(15,110,86,.35); overflow: hidden; }
.lista-step button { width: 30px; height: 34px; border: 0; background: transparent; color: #fff;
  font-size: 17px; font-weight: 700; cursor: pointer; line-height: 1; }
.lista-step button:hover { background: rgba(255,255,255,.15); }
.lista-step b { color: #fff; font-size: 14px; min-width: 20px; text-align: center; }
/* sorban (lista-oldal): statikus változat */
.row-step { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--paper); }
.row-step button { width: 30px; height: 34px; border: 0; background: transparent; cursor: pointer; font-size: 16px; font-weight: 700; color: var(--ink); }
.row-step button:hover { background: #EAF3EF; }
.row-step b { min-width: 26px; text-align: center; font-size: 14px; }
/* standon belüli kereső */
.standsearch { margin-top: 14px; }
.standsearch input { width: 100%; font: inherit; font-size: 15px; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.standsearch input:focus { outline: 2px solid var(--green); border-color: var(--green); }

/* ── Lebego bevasarlolista-gomb (csak mobilon) ──────────────────────────────
   760px alatt a .top nav el van rejtve, es abban volt az egyetlen ut a
   bevasarlolistahoz. Ez potolja, huvelykujjal elerheto helyen.            */
#lista-fab { display: none; }
@media (max-width: 760px) {
  #lista-fab {
    display: inline-flex; align-items: center; gap: 7px;
    position: fixed; right: 14px; bottom: 16px; z-index: 60;
    background: var(--green, #0f6e56); color: #fff; text-decoration: none;
    padding: 11px 16px 11px 13px; border-radius: 99px; font-weight: 700; font-size: 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,.24);
  }
  #lista-fab .ikon { font-size: 17px; line-height: 1; }
  #lista-fab .szam {
    background: #fff; color: var(--green, #0f6e56); border-radius: 99px;
    min-width: 21px; height: 21px; display: inline-flex; align-items: center;
    justify-content: center; font-size: 12.5px; font-weight: 800; padding: 0 5px;
  }
}
