/* tatoimama.pl, warstwa „telefon” (STAŁE, DECISIONS: telefon i dane właściciela). Projektowane od 360 px.
   Nagłówek 56 px chowany przy przewijaniu w dół, menu na cały ekran (jedyny mocny element: duże nazwy działów
   z licznikami), arkusz sortowania od dołu, zwarte karty produktów. Tekst min. 17 px, pola dotyku min. 48 px.
   Zawsze jasny wygląd, bez ciemnego motywu (zasada stała). */

/* ---------- nagłówek ---------- */
.t-top { transition: transform .22s ease; will-change: transform; }
.t-top.t-schowany { transform: translateY(-100%); }
.t-menu-btn { display: none; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 14px;
  border: 0; background: var(--mieta); color: var(--szalwia-ciemna); cursor: pointer; flex: none; }
.t-menu-btn .ikona, .t-menu-btn svg { width: 26px; height: 26px; }
@media (max-width: 900px) {
  .t-top .wrap { min-height: 56px; height: 56px; }
  .t-top .logo { font-size: 24px; }
  .t-top .logo .serce { width: 17px; height: 17px; top: -5px; }
  .t-menu-btn { display: inline-flex; }
  .t-desktop { display: none !important; }
  html { scroll-padding-top: 72px; }
}

/* ---------- menu na cały ekran ---------- */
body.t-blokada { overflow: hidden; }
.t-menu { position: fixed; inset: 0; z-index: 80; background: var(--tlo); overflow-y: auto; overscroll-behavior: contain;
  padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.t-menu[hidden], .t-arkusz[hidden] { display: none !important; }
.t-menu-gora { position: sticky; top: 0; z-index: 1; height: 56px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; background: var(--tlo); border-bottom: 1px solid var(--linia); }
.t-menu-gora .logo { font-size: 24px; }
.t-zamknij { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 14px;
  background: var(--bez); color: var(--tekst); cursor: pointer; flex: none; }
.t-menu nav { max-width: 640px; margin: 0 auto; padding: 8px 16px 0; }
.t-grupy, .t-grupy ul, .t-serwis { list-style: none; margin: 0; padding: 0; }
.t-grupy > li { border-bottom: 1px solid var(--linia); }
.t-grupy summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px;
  cursor: pointer; font: 600 26px/1.15 var(--serif); color: var(--tekst); }
.t-grupy summary::-webkit-details-marker { display: none; }
.t-grupy summary::after { content: ""; width: 12px; height: 12px; border-right: 2.5px solid var(--szalwia); border-bottom: 2.5px solid var(--szalwia);
  transform: rotate(45deg) translate(-3px, -3px); margin: 0 6px 0 auto; transition: transform .18s ease; }
.t-grupy details[open] summary::after { transform: rotate(225deg) translate(-3px, -3px); }
.t-licz { min-width: 36px; height: 30px; padding: 0 10px; border-radius: 999px; display: inline-grid; place-items: center;
  background: var(--brzoskwinia-jasna); color: var(--brzoskwinia-tekst); font: 700 17px/1 var(--sans); }
.t-grupy details ul { padding: 0 0 10px; }
.t-grupy details a { display: flex; align-items: center; min-height: 56px; padding: 0 12px; border-radius: 12px; color: var(--tekst);
  text-decoration: none; font: 400 18px/1.3 var(--sans); }
.t-grupy details a:hover, .t-grupy details a:focus-visible { background: var(--mieta); }
.t-serwis { margin-top: 16px; }
.t-serwis a { display: flex; align-items: center; min-height: 56px; color: var(--szalwia-ciemna); font: 700 18px/1.3 var(--sans);
  text-decoration: none; }

/* ---------- chipy działów ---------- */
.t-chipy { background: var(--tlo); padding: 12px 0; position: relative; }
.t-chipy ul { list-style: none; margin: 0 -16px; padding: 0 16px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  scroll-snap-type: x proximity; }
.t-chipy ul::-webkit-scrollbar { display: none; }
.t-chipy li { flex: none; scroll-snap-align: start; }
.t-chipy a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px; border-radius: 999px; white-space: nowrap;
  background: var(--bialy); border: 1.5px solid var(--linia); color: var(--tekst); font: 700 17px/1 var(--sans); text-decoration: none; }
.t-chipy a:hover { border-color: var(--szalwia); }
@media (min-width: 901px) { .t-chipy { display: none; } }

/* ---------- pasek „Sortuj” i arkusz od dołu ---------- */
.t-pasek { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 16px -16px 12px; padding: 4px 16px; min-height: 56px; background: rgba(255, 251, 247, .96); border-bottom: 1px solid var(--linia);
  transition: top .22s ease; }
body:not(.t-naglowek-schowany) .t-pasek { top: 56px; }
@media (min-width: 901px) { body:not(.t-naglowek-schowany) .t-pasek { top: 72px; } .t-pasek { margin: 16px 0 12px; border-radius: 14px; } }
.t-ile { color: var(--tekst-2); font-size: 17px; }
.t-pasek-btn { min-height: 48px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--szalwia); background: var(--bialy);
  color: var(--szalwia-ciemna); font: 400 17px/1 var(--sans); cursor: pointer; white-space: nowrap; }
.t-pasek-btn strong { font-weight: 700; }
.t-arkusz { position: fixed; inset: 0; z-index: 90; background: rgba(43, 42, 51, .45); display: flex; align-items: flex-end; justify-content: center; }
.t-arkusz-panel { width: 100%; max-width: 560px; background: var(--bialy); border-radius: 22px 22px 0 0; max-height: 85vh; overflow-y: auto;
  padding: 6px 16px calc(16px + env(safe-area-inset-bottom)); animation: t-wjazd .22s ease-out; }
@keyframes t-wjazd { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.t-arkusz-gora { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
.t-arkusz-gora h2 { font-size: 24px; margin: 0; }
.t-opcje { display: grid; gap: 8px; padding: 4px 0 8px; }
.t-opcje button { min-height: 56px; text-align: left; padding: 0 18px; border-radius: 14px; border: 1.5px solid var(--linia); background: var(--bialy);
  color: var(--tekst); font: 400 18px/1.2 var(--sans); cursor: pointer; }
.t-opcje button[aria-checked="true"] { border-color: var(--szalwia); background: var(--mieta); color: var(--szalwia-ciemna); font-weight: 700; }

/* ---------- zwarta karta produktu ---------- */
.produkty:has(.produkt.t) { gap: 12px; margin: 12px 0 28px; }
.produkt.t { display: block; padding: 14px 16px; border-radius: 18px; }
.t-gora { display: flex; align-items: center; gap: 12px; }
.t-foto { position: relative; flex: none; width: 64px; height: 64px; border-radius: 14px; border: 1px solid var(--linia); background: var(--bialy);
  display: grid; place-items: center; overflow: visible; }
.t-foto img { width: 100%; height: 100%; object-fit: contain; padding: 4px; border-radius: 14px; }
.t-foto .ikona, .t-foto > svg { width: 34px; height: 34px; color: var(--szalwia); }
.t-foto .miejsce { top: -8px; left: -8px; min-width: 30px; height: 30px; padding: 0 7px; border-radius: 10px; font-size: 17px; }
.t-nazwa { min-width: 0; }
.produkt.t h3 { font-size: 20px; margin: 0; line-height: 1.2; }
.produkt.t .grupa { margin: 2px 0 0; font-size: 17px; }
.t-liczby { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 10px; }
.t-liczby div { margin: 0; min-width: 0; }
.t-liczby dt { color: var(--tekst-2); font-size: 17px; line-height: 1.2; }
.t-liczby dd { margin: 2px 0 0; font: 700 19px/1.2 var(--sans); color: var(--tekst); font-variant-numeric: tabular-nums; }
.t-akcja .cta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.t-akcja .btn { width: 100%; min-height: 52px; }
.t-szczegoly { margin-top: 8px; border-top: 1px solid var(--linia); }
.t-szczegoly summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; font-weight: 700; color: var(--szalwia-ciemna); }
.t-szczegoly .plusy, .t-szczegoly .minusy { margin: 8px 0; }
.t-szczegoly table.parametry { width: 100%; table-layout: fixed; }
.t-szczegoly table.parametry th, .t-szczegoly table.parametry td { overflow-wrap: anywhere; }

/* ---------- tekst min. 17 px na telefonie ---------- */
@media (max-width: 760px) {
  body { font-size: 18px; }
  .maly, .podpis-ai, .okruszki, .meta, .kalk .pomoc, .zaufanie, .karta .czas, .produkt .foto .brak, .produkt .grupa, .plakietka,
  .parametry, .cena .zrodlo, .etykieta-partner, .zrodla-produktu, .reklama .etykieta, .stopka, .podglad-pasek,
  small, figcaption, table, td, th, dt, dd, label, input, select, button, summary { font-size: max(17px, 1em); }
  .stopka a { min-height: 48px; display: inline-flex; align-items: center; }
  .stopka li { min-height: 48px; display: flex; align-items: center; margin: 0; }
  .okruszki a { display: inline-block; padding: 12px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .t-top, .t-pasek, .t-grupy summary::after { transition: none; }
  .t-arkusz-panel { animation: none; }
}

/* poprawki po pomiarze (360 px): szczegóły karty jako zwykła linia, spis treści i opcje kalkulatora min. 48 px */
.t-ile { white-space: nowrap; }
.t-pasek-btn { padding: 0 14px; }
.produkt.t details.t-szczegoly { background: none; box-shadow: none; border-radius: 0; margin: 6px 0 0; }
.produkt.t .t-szczegoly summary { padding: 0; min-height: 48px; }
.produkt.t .t-szczegoly[open] { padding-bottom: 4px; }
.produkt.t .t-akcja .etykieta-partner { margin-top: 2px; }
@media (max-width: 760px) {
  .t-foto { width: 56px; height: 56px; }
  .produkt.t { padding: 12px 14px; }
  .t-liczby { margin: 10px 0 8px; }
  .spis li { margin: 0; }
  .spis a { display: flex; align-items: center; min-height: 48px; }
  .opcje label { display: flex; align-items: center; gap: 10px; min-height: 48px; }
  .opcje input[type="radio"], .opcje input[type="checkbox"] { width: 24px; height: 24px; flex: none; }
}
/* działy w menu: jedna płaszczyzna, bez kart z ogólnego stylu details */
.t-grupy details { background: none; box-shadow: none; border-radius: 0; margin: 0; }
.t-grupy summary { padding: 0 4px; }
.t-grupy details[open] summary::after { content: ""; }
.t-grupy summary .t-licz { margin-left: 2px; }
.t-grupy summary::after { transform: rotate(45deg); margin-top: -6px; }
.t-grupy details[open] summary::after { transform: rotate(-135deg); margin-top: 6px; }
.t-grupy summary::after, .t-grupy details[open] summary::after { content: ""; display: block; flex: none; width: 24px; height: 24px;
  border: 0; margin: 0 4px 0 auto; transform: none; font-size: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%234F7D6B' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 24px no-repeat; }
.t-grupy details[open] summary::after { transform: rotate(180deg); }
