/* Komponenty wspólne: karta produktu, siatki, chipsy, akordeon, paginacja,
 * okruszki, pole treści CMS, opinie, lista ✓, pola formularzy, CF7, krokomierz. */

/* ---------------------------------------------------------------- Nagłówek sekcji */
.fm-sechead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.fm-sechead__rate { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 13px; font-weight: 700; }
.fm-sec { padding-top: 88px; display: flex; flex-direction: column; gap: 26px; }

/* ---------------------------------------------------------------- Karta produktu */
/* Zasada z 21.09.2026: maks. 4 karty w rzędzie (siatki produktów 4, sekcje
   produktu 3). Przy 5-6 elementach wiersz robi się nieczytelny, dlatego
   auto-fit ma podłogę max(min, (100% - luki) / N) - nigdy nie zmieści więcej. */
.fm-grid { display: grid; gap: 14px; }
.fm-grid--home { grid-template-columns: repeat(auto-fit, minmax(min(100%, max(240px, (100% - 42px) / 4)), 1fr)); }
.fm-grid--list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.fm-grid--favs { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 270px)); justify-content: start; }
.fm-grid__cell { display: flex; min-width: 0; }
.fm-grid__cell > .fm-card { flex: 1 1 auto; }

.fm-card { background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; transition: border-color 200ms, box-shadow 200ms; min-width: 0; }
.fm-card:hover { border-color: var(--ink); box-shadow: 0 12px 30px rgba(20, 20, 18, 0.08); }
.fm-card__media { background: #fff; padding: 28px; position: relative; border-bottom: 1px solid var(--line); }
.fm-card__img { display: block; }
.fm-card__img img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; display: block; }
.fm-badge { position: absolute; top: 16px; left: 16px; background: var(--sage-ink); color: #fff; font-family: var(--mono); font-size: 11px; font-weight: 700; padding: 6px 10px; border-radius: 4px; line-height: normal; }
.fm-badge.is-sale { background: var(--red); }
.fm-fav { cursor: pointer; position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 17px; line-height: 1; border: 1px solid var(--line); background: #fff; color: var(--muted-2); padding: 0; transition: background 200ms, color 200ms; }
.fm-fav.is-on { background: var(--red); color: #fff; }
.fm-card__body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; }
.fm-card__cat { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--muted-2); text-transform: uppercase; line-height: normal; }
.fm-card__name { font-size: 17px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; text-wrap: pretty; }
.fm-card__rate { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.fm-card__portion { font-family: var(--mono); font-size: 12px; color: var(--muted); line-height: normal; }
.fm-card__foot { display: flex; flex-direction: column; gap: 12px; margin-top: auto; padding-top: 10px; }
.fm-card__prices { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.fm-card__price { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; line-height: normal; }
.fm-card__price--fav { font-size: 18px; }
.fm-card__old { font-family: var(--mono); font-size: 12px; color: var(--muted-2); text-decoration: line-through; }
.fm-card__add { cursor: pointer; width: 100%; border: none; border-radius: 6px; background: var(--ink); color: #fff; padding: 0 16px; height: 44px; font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; transition: background 200ms; line-height: normal; }
.fm-theme .fm-card__add, .fm-theme a.fm-card__add:hover { color: #fff; }
.fm-card__add:hover { background: var(--red); }
.fm-card__add.is-done { background: var(--sage-ink); }
.fm-card__plus { font-size: 18px; line-height: 1; }

/* ---------------------------------------------------------------- Chipsy (blog, przepisy) */
.fm-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.fm-chips--pt { padding-top: 6px; }
.fm-chip { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 100px; padding: 9px 16px; font-size: 13px; font-weight: 700; line-height: normal; }
.fm-theme .fm-chip:hover { border-color: var(--ink); color: var(--ink); }
.fm-theme .fm-chip.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------------------------------------------------------------- Nagłówek podstrony */
.fm-phead { padding-top: 56px; padding-bottom: 24px; display: flex; flex-direction: column; gap: 16px; }
.fm-phead__lead { font-size: 16px; line-height: 1.55; color: var(--muted); max-width: 56ch; }
.fm-phead__lead--70 { line-height: 1.6; max-width: 70ch; }
.fm-phead__lead--56 { max-width: 56ch; }
.fm-recipes .fm-phead, .fm-delivery .fm-phead, .fm-returns .fm-phead { gap: 12px; }

/* Ciemny nagłówek (kategorie, FAQ) */
.fm-darkhead { background: var(--ink); color: #fff; }
.fm-darkhead__in { max-width: var(--max); margin: 0 auto; padding: 56px var(--gut) 48px; display: flex; flex-direction: column; gap: 18px; }
.fm-darkhead__in--help { padding: 64px var(--gut) 56px; gap: 22px; align-items: flex-start; }
.fm-darkhead__lead { font-size: 17px; line-height: 1.5; color: var(--on-dark); max-width: 60ch; }
.fm-darkhead__lead--62 { max-width: 62ch; }

/* ---------------------------------------------------------------- Okruszki */
.fm-crumbs { font-family: var(--mono); font-size: 12px; color: var(--muted-2); display: flex; gap: 8px; flex-wrap: wrap; line-height: normal; }
.fm-crumbs a { color: var(--muted-2); }
.fm-theme .fm-crumbs a:hover { color: var(--ink); }
.fm-crumbs__cur { color: var(--ink); }
.fm-crumbs--dark .fm-crumbs__cur { color: #fff; }
.fm-theme .fm-crumbs--dark a:hover { color: #fff; }

/* ---------------------------------------------------------------- Pole treści CMS (kategorie) */
.fm-cms { background: #fff; border-radius: 20px; overflow: hidden; }
.fm-cms__in { padding: 24px var(--gut); font-size: 16px; line-height: 1.7; color: var(--body); max-width: 90ch; }
.fm-cms__in h2 { font-size: 24px; }

/* ---------------------------------------------------------------- Akordeon */
.fm-acc__q { cursor: pointer; width: 100%; background: transparent; border: none; display: flex; align-items: flex-start; gap: 14px; text-align: left; font-family: var(--font); font-weight: 700; color: var(--ink); line-height: normal; }
.fm-acc__q > span:first-child { flex: 1 1 auto; min-width: 0; text-wrap: pretty; }
.fm-acc__s { font-family: var(--mono); font-weight: 400; color: var(--muted); }
.fm-acc--faq { display: flex; flex-direction: column; border-top: 1px solid var(--ink); }
.fm-acc--faq .fm-acc__i { border-bottom: 1px solid #d8d7d0; }
.fm-acc--faq .fm-acc__q { padding: 22px 2px; font-size: 16px; }
.fm-acc--faq .fm-acc__s { font-size: 20px; }
.fm-acc--faq .fm-acc__a p { padding: 0 2px 24px; font-size: 15px; line-height: 1.6; color: var(--body); max-width: 70ch; }

/* ---------------------------------------------------------------- Paginacja */
.fm-pgwrap { padding-top: 32px; }
.fm-pager { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.fm-pager--center { flex-direction: column; justify-content: center; }
.fm-pager__range { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.06em; }
.fm-pgwrap--r { padding-top: 36px; }
.fm-pgwrap--r .fm-pager__range { letter-spacing: 0.1em; }
.fm-pager__btns { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: center; }
.fm-pager__b { border: 1px solid var(--line); background: #fff; border-radius: 100px; width: 42px; height: 42px; font-size: 16px; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.fm-theme .fm-pager__b:hover { border-color: var(--ink); color: var(--ink); }
.fm-pager__n { font-family: var(--mono); font-size: 13px; font-weight: 700; }
.fm-theme .fm-pager__n.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.fm-pager__gap { width: 28px; text-align: center; font-family: var(--mono); font-size: 13px; color: var(--muted-2); }

/* ---------------------------------------------------------------- Opinie */
.fm-reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.fm-review { background: #fff; border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.fm-review__q { font-size: 44px; line-height: 0.6; font-weight: 700; color: var(--sage); }
.fm-review p { font-size: 16px; line-height: 1.5; text-wrap: pretty; }
.fm-review__a { font-family: var(--mono); font-size: 11px; color: var(--muted-2); letter-spacing: 0.08em; margin-top: auto; }

/* ---------------------------------------------------------------- Lista ✓ */
.fm-checks { display: flex; flex-direction: column; background: #fff; border-radius: 16px; overflow: hidden; }
.fm-checks__i { display: flex; gap: 14px; align-items: center; padding: 16px 20px; font-size: 16px; font-weight: 500; line-height: 1.5; color: var(--ink); }
.fm-checks__i + .fm-checks__i { border-top: 1px solid var(--line-soft); }
.fm-checks__o { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--sage); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.fm-checks--sm .fm-checks__i { padding: 14px 18px; font-size: 14px; }
.fm-checks--sm .fm-checks__o { width: 26px; height: 26px; font-size: 12px; }

/* ---------------------------------------------------------------- Pola formularzy */
.fm-lbl { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; margin: 0; }
.fm-lbl__row { display: flex; justify-content: space-between; gap: 12px; }
.fm-lbl__row a { font-weight: 500; color: var(--muted); text-decoration: underline; }
.fm-theme .fm-lbl input, .fm-theme .fm-lbl select, .fm-theme .fm-lbl textarea, .fm-theme .fm-cf input[type="text"], .fm-theme .fm-cf input[type="email"], .fm-theme .fm-cf select, .fm-theme .fm-cf textarea { width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; font-size: 15px; font-weight: 400; outline: none; background: #fff; color: var(--ink); box-shadow: none; height: auto; line-height: normal; }
.fm-theme .fm-lbl input:focus, .fm-theme .fm-lbl select:focus, .fm-theme .fm-lbl textarea:focus, .fm-theme .fm-cf input:focus, .fm-theme .fm-cf select:focus, .fm-theme .fm-cf textarea:focus { border-color: var(--ink); }
.fm-theme .fm-cf textarea { resize: vertical; min-height: 130px; }
.fm-mlbl { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.fm-mlbl > span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; color: var(--muted); }
.fm-theme .fm-mlbl input { border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px; font-size: 14px; background: #faf9f5; outline: none; box-shadow: none; height: auto; }
.fm-theme .fm-mlbl input.is-mono { font-family: var(--mono); }
.fm-theme .fm-mlbl input:focus { border-color: var(--ink); }
.fm-f2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 12px; }
.fm-f3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; }

/* Contact Form 7 */
.fm-cf { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.fm-cf .wpcf7-form-control-wrap { display: block; }
.fm-cf--kontakt .fm-lbl + .fm-lbl, .fm-cf--kontakt .fm-f2 + .fm-lbl { margin-top: 0; }
.fm-cf-acc { font-size: 13px; color: var(--muted); line-height: 1.45; }
.fm-cf-acc .wpcf7-list-item { margin: 0; }
.fm-cf-acc label { display: flex; gap: 10px; align-items: flex-start; }
.fm-cf-acc input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--ink); }
.fm-theme .fm-cf .fm-cf-submit { cursor: pointer; border: none; border-radius: 100px; background: var(--ink); color: #fff; padding: 16px; font-size: 15px; font-weight: 700; width: 100%; transition: background 200ms; line-height: normal; }
.fm-theme .fm-cf .fm-cf-submit:hover { background: var(--red); }
.fm-cf .wpcf7-spinner { display: none; }
.fm-cf .wpcf7-not-valid { border-color: var(--red) !important; }
.fm-cf .wpcf7-not-valid-tip { color: var(--red); font-size: 12px; font-weight: 500; margin-top: 4px; display: block; }
.fm-cf .wpcf7-response-output { margin: 0 !important; border-radius: 12px; padding: 12px 14px !important; font-size: 14px; border: 1px solid var(--sage) !important; background: rgba(188, 212, 167, 0.35); color: var(--sage-ink); }
.fm-cf.invalid .wpcf7-response-output, .fm-cf.unaccepted .wpcf7-response-output, .fm-cf.failed .wpcf7-response-output { border-color: var(--red) !important; background: #fff; color: var(--red); }
.fm-cf.sent .fm-cf-submit { background: var(--sage-ink); }

/* Newsletter (CF7 w kaflu) */
.fm-cf--newsletter { gap: 8px; }
.fm-nlform { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fm-nlform .wpcf7-form-control-wrap { flex: 1 1 180px; min-width: 0; }
.fm-theme .fm-cf--newsletter input[type="email"] { height: 52px; padding: 0 20px; border: none; border-radius: 100px; background: #fff; font-size: 16px; }
.fm-theme .fm-cf--newsletter .fm-cf-submit { width: auto; flex: 0 0 auto; height: 52px; padding: 0 26px; }
.fm-nlform__acc { font-size: 12px; color: var(--sage-ink); line-height: 1.45; }
.fm-nlform__acc .wpcf7-list-item { margin: 0; }
.fm-nlform__acc label { display: flex; gap: 8px; align-items: flex-start; }
.fm-nlform__acc input { margin-top: 2px; accent-color: var(--ink); }
.fm-cf--newsletter .wpcf7-response-output { background: #fff; }

/* ---------------------------------------------------------------- Krokomierz */
.fm-stepper { display: flex; align-items: center; border: 1px solid var(--ink); border-radius: 100px; padding: 3px; gap: 2px; flex: none; }
.fm-stepper button { cursor: pointer; width: 32px; height: 32px; border: none; background: transparent; font-size: 18px; font-weight: 700; border-radius: 100px; padding: 0; line-height: 1; }
.fm-stepper button:hover { background: var(--paper); }
.fm-stepper span { min-width: 22px; text-align: center; font-family: var(--mono); font-size: 14px; font-weight: 700; }

/* Pusty stan */
.fm-empty { background: #fff; border-radius: 20px; padding: 56px 36px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.fm-empty__heart { font-size: 40px; color: var(--sage); line-height: 1; }
.fm-empty__t { font-size: 20px; font-weight: 700; letter-spacing: -0.015em; }
.fm-empty__p { font-size: 16px; line-height: 1.5; color: var(--muted); max-width: 52ch; }

.fm-card-panel { background: #fff; border-radius: 20px; padding: 40px; }

/* Contact Form 7 bez własnego arkusza: chowamy elementy, które wtyczka normalnie
 * ukrywa sama (pola ukryte w <fieldset>, komunikat dla czytników, pusty box odpowiedzi). */
.fm-theme .wpcf7 .hidden-fields-container, .fm-theme .wpcf7 fieldset.hidden-fields-container { display: none; border: 0; margin: 0; padding: 0; }
.fm-theme .wpcf7 .screen-reader-response { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); white-space: nowrap; }
.fm-theme .wpcf7-response-output:empty { display: none; }
