/*! pa-c2.css – prodavameapple.cz, model C · 2026-12-04 · v2.0.0 · patří k pa-c2.js (nahrazuje pa-c.css)
 *  Vše je navázané na třídy html.pac-*-on, které zapíná pa-c.js. Bez skriptu styl nic nemění.
 *  Barvy a písmo z proměnných šablony (template-12); akcent = --color-secondary (#328CC1), záloha #0077B6 z prototypu.
 */
:root {
  --pac-akcent: var(--color-secondary, #0077B6);
  --pac-tmava: var(--color-primary, #0B3C5D);
  --pac-text: var(--colors-foregrounds-content-primary, #1f1f1f);
  --pac-text2: var(--colors-foregrounds-content-secondary, #4d4d4d);
  --pac-linka: var(--colors-foregrounds-borders-secondary, #dadada);
  --pac-plocha: #f5f5f7;
  --pac-sticky-vyska: 60px;
}

/* ================= 1) lišta důvěry =================
   Skript přepíše dnešní #pa-desktop-only-bar (nebo vloží vlastní .pac-lista--vlastni), dá ji pod záhlaví.
   Selektory s #id jsou nutné kvůli původnímu stylu lišty (černé pozadí, pod 991 px display:none !important). */
html.pac-lista-on .pac-lista,
html.pac-lista-on #pa-desktop-only-bar.pac-lista {
  align-items: center;
  background: var(--pac-plocha);
  border-bottom: 1px solid var(--pac-linka);
  box-sizing: border-box;
  color: var(--pac-text);
  display: flex !important; /* původní pravidlo lištu na mobilu schovává přes !important */
  font-family: inherit;
  height: 36px;
  justify-content: center;
  max-height: 36px;
  overflow: hidden;
  position: relative;
  text-decoration: none;
  width: 100%;
  z-index: 1;
}
html.pac-lista-on #pa-desktop-only-bar.pac-lista:hover { background: var(--pac-plocha); }
.pac-lista__in {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 28px;
  height: 36px;
  justify-content: center;
  max-width: 100%;
  padding: 0 16px;
}
.pac-lista__bod {
  color: var(--pac-text);
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 500;
  line-height: 36px;
  white-space: nowrap;
}
.pac-lista__bod::before {
  color: var(--pac-akcent);
  content: "\2713";
  font-weight: 700;
  margin-right: 6px;
}
@media (max-width: 991px) {
  html.pac-lista-on .pac-lista,
  html.pac-lista-on #pa-desktop-only-bar.pac-lista { justify-content: flex-start; }
  .pac-lista__in {
    -webkit-overflow-scrolling: touch;
    gap: 16px;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 12px;
    scrollbar-width: none;
    width: 100%;
  }
  .pac-lista__in::-webkit-scrollbar { display: none; }
  .pac-lista__bod { font-size: 12px; }
  .pac-lista__bod:last-child { padding-right: 16px; }
  /* náznak, že se řádek dá posunout */
  .pac-lista::after {
    background: linear-gradient(to right, rgba(245, 245, 247, 0), var(--pac-plocha));
    bottom: 0;
    content: "";
    pointer-events: none;
    position: absolute;
    right: 0;
    top: 0;
    width: 20px;
  }
}
/* mobilní pruh na úvodu („Doručení 1-2 dny“) by lištu zdvojil – !important nutné, původní styl má display:block !important */
html.pac-lista-on .pa-mobile-banner-wrapper { display: none !important; }

/* ================= 2) karta produktu – protiúčet, jistoty, příplatky pod tlačítkem ================= */
/* pořadí v bloku s cenou a tlačítkem (.p-to-cart-block je flex): cena → tlačítko → protiúčet → jistoty → příplatky.
   Jen vizuální pořadí (order); pole formuláře zůstávají v DOM na svém místě. */
html.pac-karta-on .p-detail .p-to-cart-block > * { order: 1; }
html.pac-karta-on .p-detail .p-to-cart-block > .p-final-price-wrapper { order: 2; }
html.pac-karta-on .p-detail .p-to-cart-block > .p-add-to-cart-wrapper { order: 3; }
html.pac-karta-on .p-detail .p-to-cart-block > .pac-protiucet { order: 4; }
html.pac-karta-on .p-detail .p-to-cart-block > .pac-karta { order: 5; }
html.pac-karta-on .p-detail .p-to-cart-block > #custom-upsell-box {
  flex: 1 1 100%;
  margin-bottom: 0;
  margin-top: 6px;
  order: 6;
  width: 100%;
}

.pac-protiucet, .pac-karta {
  box-sizing: border-box;
  clear: both;
  color: var(--pac-text);
  flex: 1 1 100%;
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
  width: 100%;
}
.pac-karta *, .pac-sticky * { box-sizing: border-box; }
.pac-protiucet {
  background: var(--pac-plocha);
  border-radius: 14px;
  color: var(--pac-text2);
  margin: 8px 0 0;
  padding: 12px 16px;
}
.pac-protiucet strong { color: var(--pac-text); font-weight: 600; }
.pac-karta {
  background: var(--pac-plocha);
  border-radius: 14px;
  margin: 6px 0;
  padding: 14px 16px;
}
.pac-jistoty, .pac-kroky {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pac-jistota {
  color: var(--pac-text2);
  margin: 0 0 9px;
  padding: 0 0 0 26px;
  position: relative;
}
.pac-jistota::before {
  color: var(--pac-akcent);
  content: "\2713";
  font-weight: 700;
  left: 2px;
  position: absolute;
  top: 0;
}
.pac-jistota strong, .pac-krok__t strong { color: var(--pac-text); font-weight: 600; }
.pac-postup {
  border-top: 1px solid var(--pac-linka);
  margin-top: 12px;
  padding-top: 4px;
}
.pac-postup__h {
  color: var(--pac-text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  min-height: 44px;
  padding: 12px 0;
}
.pac-kroky { padding-bottom: 4px; }
.pac-krok {
  align-items: flex-start;
  color: var(--pac-text2);
  display: flex;
  gap: 10px;
  margin: 0 0 10px;
  padding: 0;
}
.pac-krok::before { content: none; }
.pac-krok__n {
  background: var(--pac-akcent);
  border-radius: 50%;
  color: #fff;
  flex: 0 0 24px;
  font-size: 13px;
  font-weight: 600;
  height: 24px;
  line-height: 24px;
  text-align: center;
  width: 24px;
}
.pac-krok__t { flex: 1 1 auto; padding-top: 2px; }
.pac-pobocka {
  border-top: 1px solid var(--pac-linka);
  margin-top: 4px;
  padding-top: 12px;
}
.pac-pobocka__t { color: var(--pac-text); margin: 0; }
.pac-pobocka__akce {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
}
.pac-karta a.pac-odkaz, .pac-protiucet a.pac-odkaz {
  color: var(--pac-akcent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}
.pac-protiucet a.pac-odkaz::after { content: " \2192"; }
.pac-karta a.pac-tl {
  align-items: center;
  background: #fff;
  border: 1px solid var(--pac-linka);
  border-radius: 10px;
  color: var(--pac-akcent);
  display: inline-flex;
  font-weight: 600;
  min-height: 44px;
  padding: 0 14px;
  text-decoration: none;
}
.pac-karta a.pac-odkaz:hover, .pac-protiucet a.pac-odkaz:hover, .pac-karta a.pac-tl:hover { color: var(--pac-tmava); }
.pac-karta a:focus-visible, .pac-protiucet a:focus-visible, .pac-postup__h:focus-visible, .pac-sticky__btn:focus-visible {
  outline: 2px solid var(--pac-akcent);
  outline-offset: 2px;
}

/* ================= šum (modul sum) – nic se nemaže, jen schovává ================= */
/* prázdné hodnocení, prázdná měrná cena, „Diskuze (0)“ – prvky označí skript třídou pac-prazdne */
html.pac-sum-on .pac-prazdne { display: none !important; } /* !important: šablona má u těchto prvků vlastní display */
/* Tisk, Sdílet, Tweet/Facebook na kartě („Zeptat se“ zůstává) */
html.pac-sum-on .p-detail .link-icons .link-icon.print,
html.pac-sum-on .p-detail .link-icons .link-icon.share,
html.pac-sum-on .p-detail .social-buttons { display: none; }
/* kódy produktů u cen na dlaždicích */
html.pac-sum-on .products .p .p-code,
html.pac-sum-on .products .p [data-micro="sku"] { display: none; }

/* ================= lepivá lišta (jen mobil; ve výchozím stavu vypnutá v PAC_CFG) ================= */
.pac-sticky { display: none; }
@media (max-width: 767px) {
  .pac-sticky {
    align-items: center;
    background: rgba(255, 255, 255, .96);
    border-top: 1px solid var(--pac-linka);
    bottom: 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, .08);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    left: 0;
    min-height: var(--pac-sticky-vyska);
    padding: 8px 14px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    position: fixed;
    right: 0;
    transform: translateY(110%);
    transition: transform .2s ease-out, visibility 0s linear .2s;
    visibility: hidden;
    z-index: 50; /* pod hlavičkou (56), okny šablony, cookie lištou i chatem */
  }
  .pac-sticky.pac-sticky--videt {
    transform: translateY(0);
    transition: transform .2s ease-out, visibility 0s;
    visibility: visible;
  }
  /* záloha: když se chat nepodaří posunout, tlačítko uhne doleva */
  .pac-sticky.pac-sticky--odsazeni { padding-right: 84px; }
  .pac-sticky__cena {
    color: var(--pac-text);
    flex: 1 1 auto;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .pac-sticky .pac-sticky__btn {
    border-radius: 10px;
    flex: 0 0 auto;
    font-size: 15px;
    font-weight: 600;
    height: 44px;
    line-height: 1.2;
    margin: 0;
    max-width: 62%;
    min-width: 0;
    padding: 0 16px;
    position: static;
    white-space: nowrap;
    width: auto;
  }
  /* místo pro lištu na konci stránky + chat Smartsupp o výšku lišty výš
     (!important nutné – widget má vlastní inline styly) */
  html.pac-sticky-on body { padding-bottom: calc(var(--pac-sticky-vyska) + env(safe-area-inset-bottom, 0px)); }
  html.pac-sticky-on #smartsupp-widget-container > div,
  html.pac-sticky-on #chat-application {
    bottom: calc(var(--pac-sticky-vyska) + 12px + env(safe-area-inset-bottom, 0px)) !important;
    transition: bottom .2s ease-out;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pac-sticky, .pac-sticky.pac-sticky--videt { transition: none; }
}

/* ================= výpis kategorie – jen CSS ================= */
/* čitelnější karta: název, stav (štítek), cena, dostupnost */
html.pac-kategorie-on .products-block .p .name {
  color: var(--pac-text);
  font-weight: 600;
}
html.pac-kategorie-on .products-block .p .price-final strong {
  font-size: 18px;
  font-weight: 700;
}
html.pac-kategorie-on .products-block .p .availability { font-size: 13px; }
html.pac-kategorie-on .products-block .p .flags-default .flag {
  font-size: 12px;
  font-weight: 600;
}
/* vizuální šum: prázdné štítky a prázdné místo po přeškrtnuté ceně (nenese žádnou informaci) */
html.pac-kategorie-on .products-block .p .flags:empty,
html.pac-kategorie-on .products-block .p .extra-flags:empty,
html.pac-kategorie-on .products-block .p .flag:empty,
html.pac-kategorie-on .products-block .p .price-standard-wrapper-placeholder { display: none; }

@media (max-width: 767px) {
  html.pac-kategorie-on .products-block > div .p .name {
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    display: -webkit-box;
    font-size: 14px;
    height: auto;
    line-height: 1.35;
    min-height: 2.7em;
    overflow: hidden;
  }
  /* celá karta je klikací (odkaz z názvu se roztáhne přes kartu) */
  html.pac-kategorie-on .products-block .p { position: relative; }
  html.pac-kategorie-on .products-block .p a.name::after {
    bottom: 0;
    content: "";
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 1;
  }
  /* tlačítko do košíku u příslušenství musí zůstat nad klikací plochou */
  html.pac-kategorie-on .products-block .p .p-tools form,
  html.pac-kategorie-on .products-block .p .p-tools .btn-cart {
    position: relative;
    z-index: 2;
  }
  /* tlačítko „Detail“ je zdvojený odkaz (aria-hidden) – na mobilu ho nahrazuje klikací karta */
  html.pac-kategorie-on .products-block .p .p-tools > a.btn[aria-hidden="true"] { display: none; }
  @supports selector(:has(a)) {
    html.pac-kategorie-on .products-block .p .p-bottom:has(.p-tools > a.btn[aria-hidden="true"]:only-child) { padding-bottom: 16px; }
  }
}

/* ================= košík – jemné zvýraznění osobního odběru a platby na pobočce ================= */
/* řádek volby označí skript třídou pac-doporuceno; žádný zásah do polí, cen ani kroků */
html.pac-kosik-on .pac-doporuceno {
  background: var(--pac-plocha);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px var(--pac-akcent);
}

@media print {
  html .pac-lista, html.pac-lista-on .pac-lista, html.pac-lista-on #pa-desktop-only-bar.pac-lista, .pac-sticky { display: none !important; }
}

/* ====================== VERZE 2 ====================== */

/* ---------- F) lišta jistot na mobilu ----------
   Záhlaví je do 991 px přilepené (position: fixed, z-index 56) a obal stránky má odsazení shora.
   Lišta leží v toku hned za záhlavím, proto ho nepřekrývá; z-index držíme pod záhlavím.
   Řádek se posouvá prstem, posuvník není vidět v žádném prohlížeči. */
@media (max-width: 767px) {
  html.pac-lista-on .pac-lista,
  html.pac-lista-on #pa-desktop-only-bar.pac-lista {
    left: auto;
    margin: 0;
    position: relative;
    top: auto;
    transform: none;
    z-index: 1;
  }
  .pac-lista__in {
    -ms-overflow-style: none;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    touch-action: pan-x pan-y;
  }
  .pac-lista__in::-webkit-scrollbar { display: none; height: 0; width: 0; }
}

/* ---------- A) popis na kartě zařízení ---------- */
.pac-popis {
  box-sizing: border-box;
  color: var(--pac-text);
  font-size: 15px;
  line-height: 1.55;
  margin: 0 auto;
  max-width: 720px;
  padding: 4px 0 8px;
  text-align: left;
}
.pac-popis * { box-sizing: border-box; }
.pac-popis__h {
  color: var(--pac-text);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin: 24px 0 8px;
}
.pac-popis__h:first-child { margin-top: 0; }
.pac-popis p { color: var(--pac-text2); margin: 0 0 8px; }
.pac-popis__stav { color: var(--pac-text); font-size: 16px; }
.pac-popis__zn {
  background: var(--pac-plocha);
  border-radius: 6px;
  color: var(--pac-text);
  font-weight: 700;
  padding: 1px 7px;
  white-space: nowrap;
}
.pac-popis__bat strong { color: var(--pac-text); }
.pac-popis__seznam, .pac-popis__kroky {
  color: var(--pac-text2);
  margin: 0 0 8px;
  padding: 0 0 0 22px;
}
.pac-popis__seznam li, .pac-popis__kroky li { margin: 0 0 4px; padding: 0; }
.pac-popis__seznam { list-style: disc; }
.pac-popis__kroky { list-style: decimal; }
.pac-stavy {
  border-collapse: collapse;
  font-size: 14px;
  margin: 4px 0 0;
  width: 100%;
}
.pac-stavy th, .pac-stavy td {
  border-bottom: 1px solid var(--pac-linka);
  color: var(--pac-text2);
  font-weight: 400;
  padding: 10px 10px;
  text-align: left;
  vertical-align: top;
}
.pac-stavy tr:first-child th {
  color: var(--pac-text);
  font-size: 13px;
  font-weight: 600;
}
.pac-stavy th[scope="row"] {
  color: var(--pac-text);
  font-weight: 600;
  width: 34%;
}
.pac-stavy__ted th, .pac-stavy__ted td {
  background: var(--pac-plocha);
  color: var(--pac-text);
}
.pac-stavy__ted td { font-weight: 600; }
.pac-stavy__zn {
  color: var(--pac-akcent);
  display: block;
  font-size: 12px;
  font-weight: 600;
}

/* ---------- B) čipy v horním popisu kategorie: <p class="pac-cipy"><a href="…">iPhone 13</a>…</p> ---------- */
html.pac-cipy-on p.pac-cipy {
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 8px 0 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 0 4px;
  scrollbar-width: none;
}
html.pac-cipy-on p.pac-cipy::-webkit-scrollbar { display: none; }
html.pac-cipy-on p.pac-cipy a {
  align-items: center;
  background: var(--pac-plocha);
  border-radius: 22px;
  color: var(--pac-text);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 500;
  min-height: 44px;
  padding: 0 16px;
  text-decoration: none;
  white-space: nowrap;
}
html.pac-cipy-on p.pac-cipy a:hover { color: var(--pac-tmava); text-decoration: none; }
html.pac-cipy-on p.pac-cipy a:focus-visible { outline: 2px solid var(--pac-akcent); outline-offset: -2px; }
@media (max-width: 767px) {
  /* řádek čipů až k okrajům displeje, ať je vidět, že pokračuje */
  html.pac-cipy-on .category-perex p.pac-cipy { margin-left: -12px; margin-right: -12px; padding-left: 12px; padding-right: 12px; }
}

/* ---------- C) štítky – marketingové pryč, štítky stavu zůstávají ---------- */
html.pac-stitky-on .flags .flag.flag-new,
html.pac-stitky-on .flags .flag.flag-tip,
html.pac-stitky-on .flags .flag.flag-top-volba,
html.pac-stitky-on .flags .flag.flag-vyhodna-koupe,
html.pac-stitky-on .flags .flag.pac-stitek-skryty { display: none; }

/* v2.0.1: na mobilu menší nadpis karty, aby cena a tlačítko byly výš */
@media (max-width: 767px) {
  body.type-product .p-detail h1 { font-size: 24px; line-height: 1.2; }
  body.type-product .p-image-wrapper { max-height: 240px; }
  body.type-product .p-image-wrapper img { max-height: 240px; width: auto; margin: 0 auto; }
}
