/* ==========================================================================
   Pokladna podle návrhu ve Figmě (BCG E-shop, obrazovka Pokladna).
   Všechna pravidla jsou pod .eshop-co, protože se pokladna vykresluje i přímo
   ve stránce WordPressu a nesmí ovlivnit nic dalšího na webu.
   Barvy jdou měnit v administraci (Nastavení → Vzhled pokladny).
   ========================================================================== */
.eshop-co {
  --primary: #075092;
  --accent: #075092;
  --dark: #023e75;
  --totals: #135897;
  --panel: #f5f6f8;
  --text: #0e1627;
  --ink: #1f2f4e;
  --line: rgba(31, 47, 78, .1);
  --error: #c62828;
  --ok: #009f00;
  --radius: 0px;
  --head-font: "Plus Jakarta Sans", "Montserrat", "Segoe UI", sans-serif;
  color: var(--text);
  font: 400 15px/1.5 var(--head-font);
  -webkit-font-smoothing: antialiased;
  width: 100%;
  max-width: 1278px;
  margin: 0 auto;
  text-align: left;
}
.eshop-co *, .eshop-co *::before, .eshop-co *::after { box-sizing: border-box; }
.eshop-co a { color: inherit; }
.eshop-co button, .eshop-co input, .eshop-co textarea { font: inherit; color: inherit; margin: 0; }
.eshop-co .hidden { display: none !important; }
.eshop-co .muted { color: #6b7280; }

/* --- samostatná pokladna na doméně e-shopu ------------------------------- */
body:has(> .eshop-co) { margin: 0; background: #fff; }
.eshop-co.app { padding: 24px 16px 48px; }
.embed .eshop-co.app { padding: 0; }
.eshop-co .topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.eshop-co .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; text-decoration: none; }
.eshop-co .brand img { max-height: 50px; max-width: 180px; }
.eshop-co .back { font-size: 14px; font-weight: 500; text-decoration: none; }
.eshop-co .test-banner { background: #fff4d6; color: #7a5300; padding: 8px 14px; font-size: 13px; margin-bottom: 16px; text-align: center; }

/* --- rozložení: dva sloupce 623 px, mezera 32 px --------------------------- */
.eshop-co .layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.eshop-co .main { display: grid; gap: 22px; min-width: 0; }
.eshop-co #form-alert:empty { display: none; }
.eshop-co .summary { display: grid; gap: 22px; align-content: start; min-width: 0; }

/* --- karty ---------------------------------------------------------------- */
.eshop-co .card { background: var(--panel); border-radius: var(--radius); padding: 30px 38px 34px 36px; }
.eshop-co .title { margin: 0; padding-bottom: 20px; border-bottom: 1.5px solid var(--line); font: 600 18px/23px var(--head-font); color: var(--ink); letter-spacing: 0; text-transform: none; }
.eshop-co .group { margin: 22px 0 13px; font: 600 14.5px/16px var(--head-font); color: var(--ink); letter-spacing: 0; text-transform: none; }
.eshop-co .title + .group { margin-top: 24px; }
.eshop-co .grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 14px; }
.eshop-co .grid .full { grid-column: 1 / -1; }

/* --- pole: bílá, výška 53 px, popisek uvnitř ------------------------------- */
.eshop-co .field input, .eshop-co .field textarea, .eshop-co .discount input {
  display: block; width: 100%; height: 46px; padding: 0 16px; border: 0; border-radius: var(--radius); outline: 0; background: #fff; box-shadow: none;
  font: 400 14.5px/16px var(--head-font); color: var(--ink); transition: box-shadow .15s;
}
.eshop-co .field textarea { height: 110px; padding: 13px 16px; line-height: 20px; resize: vertical; }
.eshop-co input::placeholder, .eshop-co textarea::placeholder { color: var(--ink); opacity: 1; }
.eshop-co .field input:focus, .eshop-co .field textarea:focus, .eshop-co .discount input:focus { box-shadow: inset 0 0 0 1.5px var(--dark); }
.eshop-co .field.invalid input, .eshop-co .field.invalid textarea { box-shadow: inset 0 0 0 1.5px var(--error); }
.eshop-co .field .err, .eshop-co .block-err { color: var(--error); font-size: 13px; line-height: 1.35; margin-top: 6px; }
.eshop-co .block-err:empty, .eshop-co .field .err:empty { display: none; }
.eshop-co .note .field { margin-top: 20px; }

/* --- doručovací údaje: rozbalovací karta ----------------------------------- */
.eshop-co .acc { padding: 0; }
.eshop-co .acc-head {
  display: flex; align-items: center; justify-content: space-between; width: 100%; height: 72px; padding: 0 38px 0 36px; border: 0; background: none; cursor: pointer;
  font: 600 18px/23px var(--head-font); color: var(--ink); text-align: left; box-shadow: none;
}
.eshop-co .acc-head:hover, .eshop-co .acc-head:focus { background: none; color: var(--ink); }
.eshop-co .acc-head svg { flex: none; color: var(--text); transition: transform .2s; }
.eshop-co .acc.open .acc-head svg { transform: rotate(180deg); }
.eshop-co .acc-body { display: none; padding: 0 38px 34px 36px; }
.eshop-co .acc.open .acc-body { display: block; }
.eshop-co .hint { margin: 0 0 14px; font-size: 13px; line-height: 19px; color: var(--ink); }

/* --- doprava a platba: v návrhu chybí, drží styl výběru varianty produktu --- */
.eshop-co .options { display: grid; gap: 10px; margin-top: 20px; }
.eshop-co .option { display: flex; gap: 12px; align-items: flex-start; min-height: 0; padding: 13px 16px; background: #fff; box-shadow: inset 0 0 0 1.5px transparent; cursor: pointer; transition: box-shadow .15s; }
.eshop-co .option:hover { box-shadow: inset 0 0 0 1.5px var(--line); }
.eshop-co .option.selected { box-shadow: inset 0 0 0 1.5px var(--dark); }
.eshop-co .option input { flex: none; width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--dark); }
.eshop-co .option .body { flex: 1; min-width: 0; }
.eshop-co .option .title-row, .eshop-co .option .body > .title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 0; border: 0; font: 700 14.5px/20px var(--head-font); color: var(--text); }
.eshop-co .option .price { white-space: nowrap; font: 700 14.5px/20px var(--head-font); color: var(--primary); }
.eshop-co .option .price.free { color: var(--ok); }
.eshop-co .option .desc { margin-top: 3px; font: 400 12.5px/17px "Montserrat", var(--head-font); color: rgba(14, 22, 39, .7); }
.eshop-co .option .desc a { color: inherit; }
.eshop-co .pickup-note { margin-top: 8px; padding: 8px 10px; background: #fff6e5; border-left: 3px solid #f5a524; color: #5c3d00; font: 500 13px/18px "Montserrat", var(--head-font); }
.eshop-co .carrier { display: inline-block; margin-right: 8px; padding: 2px 7px; font: 700 11px/16px var(--head-font); letter-spacing: .03em; text-transform: uppercase; vertical-align: 1px; }
.eshop-co .carrier.packeta { background: #c8102e; color: #fff; }
.eshop-co .carrier.ppl { background: #00387b; color: #ffd200; }
.eshop-co .carrier.pickup { background: #374151; color: #fff; }
.eshop-co .opt-group { margin: 8px 0 -2px; font: 600 14px/16px var(--head-font); color: var(--ink); }
.eshop-co .opt-group:first-child { margin-top: 0; }
.eshop-co .point { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 8px; padding: 8px 12px; background: var(--panel); font-size: 13.5px; line-height: 19px; }
.eshop-co .point strong { display: block; }
.eshop-co .point .addr { color: #5b6472; font-size: 13px; }

/* --- tlačítka -------------------------------------------------------------- */
.eshop-co .btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; height: 50px; padding: 0 26px; border: 0; border-radius: var(--radius); cursor: pointer;
  font: 700 15px/16px var(--head-font); text-decoration: none; letter-spacing: 0; text-transform: none; box-shadow: none; transition: background-color .15s, color .15s;
}
.eshop-co .btn:disabled { opacity: .6; cursor: not-allowed; }
.eshop-co .btn-secondary, .eshop-co .btn-primary { background: var(--accent); color: #fff; }
.eshop-co .btn-secondary:hover, .eshop-co .btn-primary:hover { background: var(--dark); color: #fff; }
.eshop-co .btn-ghost { background: #fff; color: var(--primary); }
.eshop-co .btn-small { height: 36px; padding: 0 12px; font-size: 12.5px; }
.eshop-co .btn-white { display: flex; width: 100%; background: #fff; color: var(--primary); }
.eshop-co .btn-white:hover { background: #fff; color: var(--dark); }
.eshop-co .btn-white .arrow { color: var(--text); flex: none; }

/* --- vaše objednávka ------------------------------------------------------- */
.eshop-co .order { padding: 30px 32px 10px 36px; }
.eshop-co .items { list-style: none; margin: 0; padding: 0; }
.eshop-co .item { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 20px; padding: 16px 0; border-bottom: 1.5px solid var(--line); background: none; }
.eshop-co .item:first-child { padding-top: 22px; }
.eshop-co .item:last-child { border-bottom: 0; }
.eshop-co .thumb { display: grid; place-items: center; width: 70px; height: 65px; padding: 6px; background: #fff; }
.eshop-co .thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.eshop-co .info { min-width: 0; padding-top: 5px; }
.eshop-co .name { font: 600 15.5px/20px var(--head-font); color: var(--ink); }
.eshop-co a.name { display: block; text-decoration: none; }
.eshop-co a.name:hover { color: var(--primary); text-decoration: underline; }
.eshop-co .unit { margin-top: 8px; font: 500 13px/14px var(--head-font); color: var(--totals); }
.eshop-co .unit s { color: #6b7280; margin-left: 6px; }
.eshop-co .warn { margin-top: 6px; color: var(--error); font-size: 12px; line-height: 1.3; }
.eshop-co .ctl { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 8px; }
.eshop-co .remove { display: grid; place-items: center; width: 25px; height: 26px; padding: 0; border: 0; border-radius: 0; background: var(--primary); color: #fff; cursor: pointer; box-shadow: none; }
.eshop-co .remove:hover { background: var(--dark); color: #fff; }
.eshop-co .qty { display: flex; align-items: center; justify-content: space-between; width: 62px; height: 34px; padding: 0 7px 0 18px; background: #fff; font: 600 13px/17px var(--head-font); color: var(--ink); }
.eshop-co .arrows { display: grid; gap: 4px; }
.eshop-co .arrows button { display: grid; place-items: center; width: 14px; height: 10px; padding: 0; border: 0; background: none; color: var(--text); cursor: pointer; box-shadow: none; }
.eshop-co .arrows button:hover { background: none; color: var(--primary); }
.eshop-co .arrows button:disabled { opacity: .2; cursor: default; }
.eshop-co .discount { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; margin: 8px 0 24px; }
.eshop-co .discount input { text-transform: uppercase; }
.eshop-co .discount input::placeholder { text-transform: none; }

/* --- souhrn: modrá karta --------------------------------------------------- */
.eshop-co .totals-card { display: flex; flex-direction: column; padding: 28px 34px 30px 36px; border-radius: var(--radius); background: var(--totals); color: #fff; }
.eshop-co .totals .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1.5px solid rgba(255, 255, 255, .1); font: 400 14.5px/22px var(--head-font); }
.eshop-co .totals .row:first-child { padding-top: 0; }
.eshop-co .totals .row span:first-child { font: 600 16.5px/22px var(--head-font); }
.eshop-co .totals .row span:last-child { text-align: right; white-space: nowrap; }
.eshop-co .totals .row.total { border-bottom: 0; }
.eshop-co .totals .row.total { padding-bottom: 0; }
.eshop-co .totals .row.total span { font: 800 18px/24px var(--head-font); }
.eshop-co .discount-msg { font-size: 14px; line-height: 20px; }
.eshop-co .discount-msg:empty { display: none; }
.eshop-co .discount-msg.bad { padding: 8px 12px; background: #fff; color: var(--error); }
.eshop-co .discount-msg.ok { display: none; } /* uplatněný kód je vidět v řádku Sleva */
.eshop-co .freebar { margin-top: 12px; font-size: 14px; line-height: 20px; }
.eshop-co .freebar .bar { height: 6px; margin-top: 6px; overflow: hidden; background: rgba(255, 255, 255, .2); }
.eshop-co .freebar .bar i { display: block; height: 100%; background: #fff; }
.eshop-co .foot { display: grid; gap: 12px; padding-top: 20px; }
.eshop-co .foot .btn-white { width: calc(100% + 18px); margin: 6px -5px 0 -13px; }
.eshop-co .foot a { color: #fff; }
.eshop-co .check { display: flex; gap: 10px; align-items: flex-start; font: 400 13px/19px var(--head-font); cursor: pointer; }
.eshop-co .check input { flex: none; width: 17px; height: 17px; margin: 1px 0 0; accent-color: #fff; }
.eshop-co .check-small { font-size: 12px; line-height: 17px; opacity: .85; }
.eshop-co .check-small input { width: 16px; height: 16px; }
.eshop-co .legal { margin: 0; font-size: 11.5px; line-height: 17px; opacity: .8; }
.eshop-co .totals-card .block-err { margin-top: -8px; padding: 6px 10px; background: #fff; }
.eshop-co .totals-card .block-err:empty { display: none; }

.eshop-co .alert { padding: 12px 14px; font-size: 14px; margin-bottom: 14px; }
.eshop-co .alert.error { background: #fdecec; color: var(--error); }
.eshop-co .alert.info { background: #eef4fd; color: #1e4b8f; }
.eshop-co .alert.ok { background: #e8f6ee; color: #1b7f4b; }

/* --- prázdný košík a stránka objednávky ------------------------------------ */
.eshop-co .center { max-width: 760px; margin: 0 auto; display: grid; gap: 24px; }
.eshop-co .center .card { padding: 40px; }
.eshop-co .center h2 { margin: 0 0 16px; font: 600 20px/25px var(--head-font); color: var(--ink); }
.eshop-co .empty { text-align: center; }
.eshop-co .status-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: #fff; font-size: 28px; }
.eshop-co .status-icon.ok { background: #e8f6ee; color: #1b7f4b; }
.eshop-co .status-icon.wait { background: #fff4d6; color: #a06d00; }
.eshop-co .status-icon.bad { background: #fdecec; color: var(--error); }
.eshop-co .order-head { text-align: center; }
.eshop-co .order-head h1 { margin: 0 0 6px; font: 600 30px/36px var(--head-font); color: var(--ink); }
.eshop-co .order-head p { margin: 0; color: rgba(14, 22, 39, .7); }
.eshop-co .kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; font-size: 14px; margin: 0; }
.eshop-co .kv dt { color: rgba(14, 22, 39, .6); }
.eshop-co .kv dd { margin: 0; }
.eshop-co .center .totals { margin-top: 18px; color: var(--text); }
.eshop-co .center .totals .row { padding: 8px 0; border-bottom: 1.5px solid var(--line); font-size: 14px; }
.eshop-co .center .totals .row span:first-child { font: 400 14px/20px var(--head-font); }
.eshop-co .center .totals .row.total span { font: 800 18px/25px var(--head-font); }

/* --- modální okno mapy PPL -------------------------------------------------- */
.eshop-co .modal { position: fixed; inset: 0; z-index: 99999; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 20, 30, .55); }
.eshop-co .modal.open { display: flex; }
.eshop-co .modal .box { display: flex; flex-direction: column; width: min(1000px, 100%); height: min(720px, 92vh); overflow: hidden; background: #fff; }
.eshop-co .modal .head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 600; }
.eshop-co .modal .close { border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: #6b7280; }
.eshop-co .modal .content { position: relative; flex: 1; overflow: auto; }
.eshop-co #ppl-parcelshop-map { width: 100%; height: 100%; min-height: 500px; }

.eshop-co .loading { display: grid; place-items: center; min-height: 40vh; }
.eshop-co .spinner { display: inline-block; width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: eshop-co-spin .8s linear infinite; }
@keyframes eshop-co-spin { to { transform: rotate(360deg); } }

/* --- menší obrazovky -------------------------------------------------------- */
@media (max-width: 1100px) {
  .eshop-co .layout { grid-template-columns: minmax(0, 1fr); gap: 29px; }
  .eshop-co .summary { gap: 29px; }
  .eshop-co .totals-card { min-height: 0; }
}
@media (max-width: 600px) {
  .eshop-co .card { padding: 24px 18px 26px; }
  .eshop-co .order { padding: 24px 18px 8px; }
  .eshop-co .title { padding-bottom: 16px; }
  .eshop-co .acc { padding: 0; }
  .eshop-co .acc-head { height: 64px; padding: 0 18px; }
  .eshop-co .acc-body { padding: 0 18px 26px; }
  .eshop-co .grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .eshop-co .item { grid-template-columns: 60px minmax(0, 1fr) auto; gap: 12px; padding: 14px 0; }
  .eshop-co .item:first-child { padding-top: 18px; }
  .eshop-co .thumb { width: 60px; height: 56px; }
  .eshop-co .name { font-size: 15px; line-height: 19px; }
  .eshop-co .totals-card { padding: 24px 18px 22px; }
  .eshop-co .totals .row span:first-child, .eshop-co .totals .row.total span { font-size: 16px; }
  .eshop-co .foot .btn-white { width: 100%; margin: 6px 0 0; padding: 0 20px; }
  .eshop-co .option { padding: 12px; }
  .eshop-co .kv { grid-template-columns: 1fr; gap: 2px; }
  .eshop-co .kv dd { margin-bottom: 8px; }
  .eshop-co .center .card { padding: 24px 20px; }
}

/* --- desktop: pravý sloupec zůstává při posouvání vidět ----------------------
   Třídu nastavuje checkout.js podle výšky okna:
   stick-all    – celý sloupec se vejde na výšku, drží se celý,
   stick-totals – drží se jen souhrn s tlačítkem (položky odjedou nahoru),
   bez třídy    – nízký monitor, nic se nedrží (nic se neusekne).
   Odsazení shora: pod pevnou hlavičkou webu (--eshop-header-offset měří plugin na webu)
   + --eshop-sticky-top. */
@media (min-width: 1101px) {
  .eshop-co .layout.stick-all .summary,
  .eshop-co .layout.stick-totals .totals-card { position: sticky; top: calc(max(var(--wp-admin--admin-bar--height, 0px), var(--eshop-header-offset, 0px)) + var(--eshop-sticky-top, 24px)); transition: top .2s ease; }
  .eshop-co .layout.stick-totals .summary { align-self: stretch; }
}
