/* pa-qa5-menu-rada2.css – prodavameapple.cz, telefon do 767 px (2026-12-05, NAHRAZUJE pa-qa5-menu-rada.css)
   A) mobilní menu: 4 hlavní řádky + druhotná skupina (prototyp MainMobil)
   B) stránka řady /pouzity-iphone-…/ (prototyp KategorieRadaMobil)
   Načítat ZA pa-qa3.css, spolu s pa-qa5-menu-rada.js. Počítač (od 768 px) se nemění:
   vše je v @media (max-width: 767px), prvky vložené skriptem jsou mimo telefon skryté.
   Vrácení: odebrat tento soubor a pa-qa5-menu-rada.js. */

/* prvky vložené skriptem – mimo telefon nikdy nevidět */
#navigation li.paq5-m-iphone,
#navigation .paq5-lbl,
.paq5-sklad, .paq5-bar, .paq5-pocet, .paq5-stavy, .paq5-nic, .paq5-sr, .paq5-sousede { display: none !important; }

@media (max-width: 767px) {

  /* =====================================================================
     A) MENU – hlavní řádky 52 px / 17 px / 600, druhotné 44 px / 15 px / 400
     ===================================================================== */
  html body.mobile #header #navigation .menu-level-1.paq5-menu {
    display: flex !important;
    flex-direction: column;
  }
  html body.mobile #header #navigation .menu-level-1.paq5-menu > li { order: var(--paq5-o, 50); }
  html body.mobile #header #navigation .menu-level-1 > li.paq5-m-iphone { display: block !important; }
  html body.mobile #header #navigation .menu-level-1 > li > a.paq5-relbl > b:not(.paq5-lbl) { display: none !important; }
  html body.mobile #header #navigation .menu-level-1 > li > a.paq5-relbl > b.paq5-lbl { display: inline !important; }

  /* druhotná skupina: bez linek, menší a šedší */
  html body.mobile #header #navigation .menu-level-1.paq5-menu > li.paq5-dr { border-top: 0 !important; }
  html body.mobile #header #navigation .menu-level-1.paq5-menu > li.paq5-dr-1 {
    border-top: 1px solid #424245 !important;
    padding-top: 8px !important;
  }
  html body.mobile #header #navigation .menu-level-1.paq5-menu > li.paq5-dr > a {
    min-height: 44px;
    font-size: 15px !important;
    font-weight: 400 !important;
    color: #A1A1A6 !important;
  }
  html body.mobile #header #navigation .menu-level-1.paq5-menu > li.paq5-dr > a b { font-weight: 400 !important; }
  html body.mobile #header #navigation .menu-level-1.paq5-menu > li.paq5-dr > a .submenu-arrow {
    flex: 0 0 44px;
    width: 44px !important;
    height: 44px !important;
    margin: 0 -14px 0 0 !important;
  }
  html body.mobile #header #navigation .menu-level-1.paq5-menu > li.paq5-dr > .menu-level-2 > li > a { color: #A1A1A6 !important; }
  html body.mobile #header #navigation .navigationActions.paq5-akce > li { border-top: 0 !important; padding-bottom: 8px !important; }
  html body.mobile #header #navigation .navigationActions.paq5-akce > li > a { min-height: 44px; }

  /* =====================================================================
     B) STRÁNKA ŘADY
     ===================================================================== */

  /* ---------- úvod: černý blok přes celou šířku (drobečky + H1 + popis + skladem/od) ---------- */
  html.paq5-rada body.type-category #content-wrapper > .breadcrumbs {
    background: #000000 !important;
    color: #86868B !important;
  }
  html.paq5-rada body.type-category #content-wrapper > .breadcrumbs a,
  html.paq5-rada body.type-category #content-wrapper > .breadcrumbs a .sr-only,
  html.paq5-rada body.type-category #content-wrapper > .breadcrumbs a span { color: #E8E8ED !important; }
  html.paq5-rada body.type-category #content-wrapper > .breadcrumbs > span[data-testid="breadcrumbsLastLevel"] > span,
  html.paq5-rada body.type-category #content-wrapper > .breadcrumbs > span:last-child > span { color: #2997FF !important; }
  html.paq5-rada body.type-category main#content { padding-top: 0 !important; }
  html.paq5-rada body.type-category .category-top {
    margin: 0 -20px !important;
    padding: 8px 20px 28px !important;
    background: #000000 !important;
    color: #F5F5F7 !important;
  }
  /* pořadí v úvodu: H1 → popis → řádek o skladu (i stávající „N kusů skladem“, kde cena není) */
  html.paq5-rada body.type-category .category-top { display: flex !important; flex-direction: column; }
  html.paq5-rada body.type-category .category-top > * { order: 4; }
  html.paq5-rada body.type-category .category-top > h1.category-title { order: 1; }
  html.paq5-rada body.type-category .category-top > .category-perex { order: 2; }
  html.paq5-rada body.type-category .category-top > .paq-count,
  html.paq5-rada body.type-category .category-top > .paq5-sklad { order: 3; }
  html.paq5-rada body.type-category .category-top h1.category-title { margin-top: 0 !important; color: #FFFFFF !important; }
  html.paq5-rada body.type-category .category-top .category-perex {
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
    margin: 10px 0 0 !important;
    padding: 0 !important;
    max-width: none !important;
    background: transparent !important;
  }
  html.paq5-rada body.type-category .category-top .category-perex,
  html.paq5-rada body.type-category .category-top .category-perex p {
    font-size: 15px !important;
    line-height: 1.47 !important;
    font-weight: 400 !important;
    color: #A1A1A6 !important;
    text-align: left !important;
  }
  html.paq5-rada body.type-category .category-top .category-perex p { display: inline !important; margin: 0 !important; padding: 0 !important; }
  html.paq5-rada body.type-category .category-top .paq-count { color: #A1A1A6 !important; margin-top: 12px !important; }
  html.paq5-rada body.type-category .category-top.paq5-ma-sklad .paq-count { display: none !important; }
  html.paq5-rada body.type-category .category-top .paq5-sklad {
    display: block !important;
    margin: 12px 0 0 !important;
    padding: 0 !important;
    font-size: 15px !important;
    line-height: 1.47 !important;
    font-weight: 400 !important;
    color: #A1A1A6 !important;
  }
  html.paq5-rada body.type-category .category-top .paq5-sklad b { font-weight: 600 !important; color: #FFFFFF !important; white-space: nowrap; }

  /* ---------- rychlé pilulky: lepí se pod hlavičku (53 px) ---------- */
  html.paq5-rada body.type-category #content > .paq5-bar {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    position: -webkit-sticky;
    position: sticky;
    top: 53px;
    z-index: 4;
    margin: 0 -20px !important;
    padding: 12px 0 !important;
    background: #F5F5F7 !important;
    border-bottom: 1px solid #D2D2D7;
    transition: top .15s;
  }
  /* hlavička při scrollu dolů odjíždí (html.scrolled-down) → pilulky se přilepí až nahoru */
  html.paq5-rada.scrolled-down body.type-category:not(.navigation-window-visible) #content > .paq5-bar { top: 0; }
  html.paq5-rada body.type-category .paq5-seg {
    display: grid;
    grid-template-columns: repeat(var(--paq5-n, 3), minmax(0, 1fr));
    gap: 4px;
    margin: 0 20px;
    padding: 4px;
    background: #E8E8ED;
    border-radius: 980px;
  }
  html.paq5-rada body.type-category .paq5-seg > .paq5-p {
    -webkit-appearance: none; appearance: none;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 0 8px;
    border: 0;
    border-radius: 980px;
    background: transparent;
    color: #5E5E63;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  html.paq5-rada body.type-category .paq5-seg > .paq5-p.paq5-p--on {
    background: #FFFFFF;
    color: #1D1D1F;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
  }
  html.paq5-rada body.type-category .paq5-pily {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0 20px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  html.paq5-rada body.type-category .paq5-pily::-webkit-scrollbar { display: none; }
  html.paq5-rada body.type-category .paq5-pily::after { content: ""; flex: 0 0 12px; }
  html.paq5-rada body.type-category .paq5-pily > .paq5-p {
    -webkit-appearance: none; appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    box-sizing: border-box;
    min-height: 44px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid #D2D2D7;
    border-radius: 980px;
    background: #FFFFFF;
    color: #1D1D1F;
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  html.paq5-rada body.type-category .paq5-pily > .paq5-p.paq5-p--on {
    padding: 0 13px;
    border: 2px solid #0077B6;
    background: #E8F4FB;
  }
  html.paq5-rada body.type-category .paq5-pily > .paq5-p.paq5-p--nic { opacity: .5; }
  html.paq5-rada body.type-category .paq5-p__n { font-size: 12px; font-weight: 400; color: #6E6E73; }
  html.paq5-rada body.type-category .paq5-p:focus-visible,
  html.paq5-rada body.type-category .paq5-nic__b:focus-visible,
  html.paq5-rada body.type-category .paq5-stavy__s:focus-visible,
  html.paq5-rada body.type-category .paq5-soused:focus-visible { outline: 3px solid rgba(0, 119, 182, .45); outline-offset: 2px; }

  /* ---------- vysvětlení stavů ---------- */
  html.paq5-rada body.type-category #content > .paq5-stavy {
    display: block !important;
    margin: 12px 0 0 !important;
    padding: 0 14px;
    background: #FFFFFF;
    border-radius: 14px;
    color: #5E5E63;
  }
  html.paq5-rada body.type-category .paq5-stavy__s {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.3;
    color: #0077B6;
    cursor: pointer;
    list-style: none;
    -webkit-tap-highlight-color: transparent;
  }
  html.paq5-rada body.type-category .paq5-stavy__s::-webkit-details-marker { display: none; }
  html.paq5-rada body.type-category .paq5-stavy__s::after {
    content: "";
    flex: 0 0 15px;
    width: 15px; height: 15px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386868B' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / 15px 15px no-repeat;
    transition: transform .15s ease;
  }
  html.paq5-rada body.type-category .paq5-stavy[open] > .paq5-stavy__s::after { transform: rotate(180deg); }
  html.paq5-rada body.type-category .paq5-stavy__l {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px 12px;
    margin: 0;
    padding: 2px 0 14px;
    font-size: 13px;
    line-height: 1.45;
  }
  html.paq5-rada body.type-category .paq5-stavy__l dt { margin: 0; padding: 0; font-weight: 600; color: #1D1D1F; }
  html.paq5-rada body.type-category .paq5-stavy__l dd { margin: 0; padding: 0; color: #5E5E63; }

  /* řádek Filtry + řazení o kousek blíž k pilulkám */
  html.paq5-rada body.type-category #content > .paq5-stavy + .paq5-sr + .category-content-wrapper,
  html.paq5-rada body.type-category #content > .paq5-stavy + .category-content-wrapper { margin-top: 16px !important; }

  /* ---------- filtrování dlaždic + prázdný stav ---------- */
  html.paq5-rada body.type-category #products .product.paq5-off { display: none !important; }
  html.paq5-rada body.type-category #content.paq5-prazdno #products { display: none !important; }
  html.paq5-rada body.type-category #content > .paq5-nic {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 20px 0 0 !important;
    padding: 40px 20px;
    background: #FFFFFF;
    border-radius: 16px;
    text-align: center;
  }
  html.paq5-rada body.type-category #content > .paq5-nic[hidden] { display: none !important; }
  html.paq5-rada body.type-category .paq5-nic__h { font-size: 20px; font-weight: 600; line-height: 1.3; color: #1D1D1F; }
  html.paq5-rada body.type-category .paq5-nic__t { font-size: 15px; line-height: 1.47; color: #6E6E73; }
  html.paq5-rada body.type-category .paq5-nic__b {
    -webkit-appearance: none; appearance: none;
    width: 100%;
    height: 50px;
    margin: 0;
    padding: 0 20px;
    border: 0;
    border-radius: 980px;
    background: #0077B6;
    color: #FFFFFF;
    font: inherit;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
  }
  html.paq5-rada body.type-category #content > .paq5-sr {
    display: block !important;
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px !important; padding: 0 !important;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  /* ---------- sousední řady ---------- */
  html.paq5-rada body.type-category #content > .paq5-sousede {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
    margin: 0 !important;
    padding: 40px 0 36px;
  }
  html.paq5-rada body.type-category #content > .paq5-sousede[hidden] { display: none !important; }
  html.paq5-rada body.type-category .paq5-sousede__h {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    line-height: 1.17 !important;
    letter-spacing: -0.02em !important;
    color: #1D1D1F !important;
    text-align: left !important;
  }
  html.paq5-rada body.type-category .paq5-soused {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 16px;
    align-items: center;
    column-gap: 12px;
    row-gap: 4px;
    min-height: 44px;
    padding: 16px;
    background: #FFFFFF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386868B' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") right 14px center / 16px 16px no-repeat;
    border-radius: 16px;
    color: #1D1D1F !important;
    text-decoration: none !important;
  }
  html.paq5-rada body.type-category .paq5-soused__j { grid-column: 1; font-size: 17px; font-weight: 600; line-height: 1.3; color: #1D1D1F; }
  html.paq5-rada body.type-category .paq5-soused__c { grid-column: 1; font-size: 15px; font-weight: 600; line-height: 1.3; color: #1D1D1F; }
}

/* ---------- v2 (5. 12.): opravy po 4. kole kontroly ---------- */
@media (max-width: 767px) {
  /* M2: „O nás“ v druhotné skupině skryté (je v „Kontakt a o nás“) */
  html body.mobile #header #navigation .menu-level-1.paq5-menu > li.paq5-skryt { display: none !important; }
  /* M3: „MacBook“ v podmenu */
  html body.mobile #header #navigation .menu-level-2 > li > a.paq5-relbl > span.paq5-orig { display: none !important; }
  html body.mobile #header #navigation .menu-level-2 > li > a.paq5-relbl > span.paq5-lbl { display: inline !important; }
  /* R1: segment jiného modelu = odkaz na jeho řadu */
  html.paq5-rada body.type-category .paq5-seg > a.paq5-p--odkaz {
    display: flex; align-items: center; justify-content: center;
    text-decoration: none !important; color: #5E5E63 !important;
  }
  html.paq5-rada body.type-category .paq5-seg > a.paq5-p--odkaz::after { content: " \203A"; white-space: pre; }
  /* R2: „Zobrazeno N z M“ pod pilulkami */
  html.paq5-rada body.type-category .paq5-pocet {
    display: block !important; margin: 0; padding: 0 20px;
    font-size: 13px; line-height: 1.3; color: #6E6E73;
  }
  /* R6: pilulka s 0 kusy neklikací */
  html.paq5-rada body.type-category .paq5-p[aria-disabled="true"] { cursor: default; pointer-events: none; }
  /* R5: nadpis řady 32 px */
  html.paq5-rada body.type-category[class*="in-pouzity-iphone"] .category-top h1.category-title { font-size: 32px !important; line-height: 1.1 !important; }
}
