/* ==========================================================================
   Shop Garage – košík (F5-07), sdílené prvky košíku, pokladny a děkovací stránky.
   Vše pod .esh (nebo vlastní třída esh-kosik-mini na body), nic globálního.
   Proměnné a písmo z eshop/assets/eshop.css (.esh { --esh-* }).
   ========================================================================== */

/* ---------- kroky objednávky ---------- */
.esh .esh-kosik-kroky {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin: 22px 0 6px;
    padding: 0;
    list-style: none;
    color: var(--esh-muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.esh .esh-kosik-kroky li { display: inline-flex; align-items: center; gap: 8px; }
.esh .esh-kosik-kroky a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.esh .esh-kosik-kroky span {
    display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
    border: 1px solid var(--esh-line-strong); font-size: 12px;
}
.esh .esh-kosik-kroky .is-aktivni { color: var(--esh-ink); }
.esh .esh-kosik-kroky .is-aktivni span { background: var(--esh-red); border-color: var(--esh-red); color: #fff; }
.esh .esh-kosik-kroky .is-hotovo span { background: var(--esh-ink); border-color: var(--esh-ink); color: #fff; }

.esh h1.esh-kosik-titulek {
    margin: 10px 0 24px;
    font-size: clamp(30px, 3.4vw, 52px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.02em;
}

.esh .esh-kosik-upozorneni,
.esh .esh-pokladna-hlaseni {
    margin: 0 0 16px;
    padding: 12px 16px;
    border-left: 4px solid var(--esh-amber);
    background: #fff6e6;
    font-weight: 600;
}
.esh .esh-pokladna-hlaseni { border-left-color: var(--esh-red); background: #fdeceb; }

/* ---------- prázdný košík ---------- */
.esh .esh-kosik-prazdny {
    max-width: 640px;
    margin: 10px 0 40px;
    padding: 40px 32px;
    border: 1px dashed var(--esh-line-strong);
    border-radius: 6px;
    background: var(--esh-paper);
}
.esh .esh-kosik-prazdny[hidden] { display: none; }
.esh .esh-kosik-prazdny p { margin: 0 0 16px; }
.esh .esh-kosik-prazdny__text { font-size: 22px; font-weight: 800; }

/* ---------- rozložení: položky + souhrn ---------- */
.esh .esh-kosik-obsah,
.esh .esh-pokladna-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}
@media (min-width: 1024px) {
    .esh .esh-kosik-obsah,
    .esh .esh-pokladna-form { grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); gap: 40px; }
    .esh .esh-kosik-souhrn { position: sticky; top: calc(var(--esh-nav) + 20px); }
}

.esh .esh-kosik-polozky { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--esh-line); }
.esh .esh-kosik-polozka {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) auto;
    grid-template-areas: "foto info odebrat" "foto mnozstvi celkem";
    gap: 10px 16px;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid var(--esh-line);
    transition: opacity .2s;
}
.esh .esh-kosik-polozka.is-odchazi { opacity: .35; }
@media (min-width: 768px) {
    .esh .esh-kosik-polozka {
        grid-template-columns: 110px minmax(0, 1fr) 150px 130px 44px;
        grid-template-areas: "foto info mnozstvi celkem odebrat";
        gap: 20px;
    }
}
.esh .esh-kosik-polozka__foto { grid-area: foto; display: block; aspect-ratio: 4 / 5; background: var(--esh-foto); border-radius: 4px; overflow: hidden; }
.esh .esh-kosik-polozka__foto img { width: 100%; height: 100%; object-fit: cover; }
.esh .esh-kosik-polozka__info { grid-area: info; min-width: 0; }
.esh a.esh-kosik-polozka__nazev { display: block; color: var(--esh-ink); font-weight: 800; line-height: 1.3; text-decoration: none; }
@media (hover: hover) { .esh a.esh-kosik-polozka__nazev:hover { color: var(--esh-red); } }
.esh .esh-kosik-polozka__meta,
.esh .esh-kosik-polozka__jedn { margin: 4px 0 0; color: var(--esh-muted); font-size: 13px; }
.esh .esh-kosik-polozka__jedn del { margin-left: 6px; }
.esh .esh-kosik-dostupnost--skladem { color: var(--esh-green); font-weight: 700; }
.esh .esh-kosik-polozka__mnozstvi { grid-area: mnozstvi; }
.esh .esh-kosik-polozka__celkem { grid-area: celkem; margin: 0; font-size: 17px; font-weight: 800; text-align: right; white-space: nowrap; }
.esh .esh-kosik-polozka__odebrat {
    grid-area: odebrat; justify-self: end; display: inline-grid; place-items: center; width: 40px; height: 40px;
    border: 0; border-radius: 50%; background: transparent; color: var(--esh-muted); cursor: pointer;
}
@media (hover: hover) { .esh .esh-kosik-polozka__odebrat:hover { background: #f1e3e2; color: var(--esh-red); } }

.esh .esh-kosik-ks { display: inline-flex; align-items: stretch; border: 1px solid var(--esh-line-strong); border-radius: 4px; overflow: hidden; background: #fff; }
.esh .esh-kosik-ks__krok { width: 38px; min-height: 42px; border: 0; background: transparent; font-size: 18px; font-weight: 700; cursor: pointer; }
@media (hover: hover) { .esh .esh-kosik-ks__krok:hover { background: var(--esh-paper); } }
.esh .esh-kosik-ks__pole { width: 56px; min-height: 42px; border: 0; border-inline: 1px solid var(--esh-line); text-align: center; font-size: 16px; font-weight: 700; -moz-appearance: textfield; }
.esh .esh-kosik-ks__pole::-webkit-outer-spin-button,
.esh .esh-kosik-ks__pole::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.esh .esh-kosik-seznam__akce { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; }
.esh a.esh-kosik-zpet { color: var(--esh-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) { .esh a.esh-kosik-zpet:hover { color: var(--esh-red); } }
.esh .esh-kosik-prepocitat[hidden] { display: none; }

/* ---------- souhrn ---------- */
.esh .esh-kosik-souhrn {
    padding: 26px 24px;
    border-radius: 6px;
    background: var(--esh-paper);
}
.esh h2.esh-kosik-souhrn__titulek { margin: 0 0 16px; font-size: 20px; font-weight: 800; }
.esh .esh-kosik-souhrn__radky { margin: 0; }
.esh .esh-kosik-souhrn__radky > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.esh .esh-kosik-souhrn__radky > div[hidden] { display: none; }
.esh .esh-kosik-souhrn__radky dt { margin: 0; font-weight: 600; }
.esh .esh-kosik-souhrn__radky dd { margin: 0; font-weight: 700; white-space: nowrap; }
.esh .esh-kosik-souhrn__maly { color: var(--esh-muted); font-size: 13px; }
.esh .esh-kosik-souhrn__maly dt, .esh .esh-kosik-souhrn__maly dd { font-weight: 500 !important; }
.esh .esh-kosik-souhrn__uspora { color: var(--esh-green); }
.esh .esh-kosik-souhrn__pozn dd { color: var(--esh-muted); font-weight: 500 !important; }
.esh .esh-kosik-souhrn__celkem {
    display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    margin: 12px 0 8px; padding-top: 14px; border-top: 2px solid var(--esh-ink);
    font-weight: 800;
}
.esh .esh-kosik-souhrn__celkem strong { font-size: clamp(24px, 2.2vw, 32px); white-space: nowrap; }
.esh .esh-kosik-souhrn .esh-tlacitko { width: 100%; margin-top: 14px; min-height: 54px; font-size: 15px; }
.esh .esh-kosik-souhrn__info { margin: 12px 0 0; color: var(--esh-muted); font-size: 13px; }
.esh .esh-kosik-souhrn .esh-kosik-zpet { display: inline-block; margin-top: 14px; }

/* ---------- minikošík vlevo dole (mimo .esh, proto vlastní proměnné) ---------- */
.esh-kosik-mini {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 900;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px 10px 12px;
    border-radius: 999px;
    background: #111214;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
    font-family: Manrope, "Inter", Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.2;
    text-decoration: none;
    transition: transform .2s, bottom .25s;
}
.esh-kosik-mini[hidden] { display: none; }
@media (hover: hover) { .esh-kosik-mini:hover { color: #fff; transform: translateY(-2px); } }
.esh-kosik-mini:focus-visible { outline: 3px solid #e26438; outline-offset: 3px; }
.esh-kosik-mini__ikona { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #c92d26; }
.esh-kosik-mini__pocet {
    position: absolute; top: -5px; right: -7px; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 11px;
    background: #fff; color: #111214; font-size: 12px; font-weight: 800; line-height: 21px; text-align: center;
}
.esh-kosik-mini__text { display: flex; flex-direction: column; }
.esh-kosik-mini__popis { color: rgba(255, 255, 255, .7); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.esh-kosik-mini strong { font-size: 16px; font-weight: 800; white-space: nowrap; }
.esh-kosik-mini.is-bump .esh-kosik-mini__ikona { animation: esh-kosik-bump .45s ease; }
body.esh-ma-porovnani .esh-kosik-mini { bottom: 96px; }
@keyframes esh-kosik-bump { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
@media (max-width: 640px) {
    .esh-kosik-mini { left: 12px; bottom: 12px; padding: 8px 14px 8px 8px; }
    .esh-kosik-mini__popis { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .esh-kosik-mini, .esh-kosik-mini.is-bump .esh-kosik-mini__ikona { animation: none; transition: none; }
}

/* tlačítko do košíku: stav načítání */
.esh [data-esh-do-kosiku].is-nacitani { opacity: .6; cursor: progress; }

/* ---------- slevy dokladu a kupón (F6-03, R-030); bez modulu Slevy se nic z toho nevykreslí ---------- */
.esh .esh-kosik-souhrn__sleva dd { color: var(--esh-green); font-weight: 800; }
.esh .esh-kosik-souhrn__sleva dt { min-width: 0; overflow-wrap: anywhere; }
.esh .esh-kupon { margin: 14px 0 4px; padding: 12px 0 0; border-top: 1px dashed var(--esh-line-strong); }
.esh .esh-kupon__popisek { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--esh-muted); }
.esh .esh-kupon__radek { display: flex; gap: 8px; }
.esh input.esh-kupon__pole {
    flex: 1 1 auto; min-width: 0; height: 46px; padding: 0 12px; border: 1px solid var(--esh-line-strong); border-radius: 6px;
    background: #fff; font: inherit; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.esh input.esh-kupon__pole:focus { outline: 0; border-color: var(--esh-ink); box-shadow: 0 0 0 2px rgba(0, 0, 0, .08); }
.esh input.esh-kupon__pole[aria-invalid="true"] { border-color: var(--esh-red); }
.esh .esh-kupon__pouzit, .esh .esh-kupon__odebrat {
    flex: 0 0 auto; min-height: 46px; padding: 0 16px; border: 1px solid var(--esh-ink); border-radius: 6px;
    background: var(--esh-ink); color: #fff; font: inherit; font-weight: 800; cursor: pointer; transition: transform .15s, background-color .15s;
}
@media (hover: hover) { .esh .esh-kupon__pouzit:hover { background: var(--esh-red); border-color: var(--esh-red); } }
.esh .esh-kupon__pouzit:active { transform: scale(.97); }
.esh .esh-kupon__odebrat { min-height: 36px; margin-top: 6px; background: transparent; color: var(--esh-ink); font-size: 13px; }
@media (hover: hover) { .esh .esh-kupon__odebrat:hover { color: var(--esh-red); border-color: var(--esh-red); } }
.esh .esh-kupon__stav { margin: 6px 0 0; font-size: 13px; font-weight: 700; }
.esh .esh-kupon__stav--ok { color: var(--esh-green); animation: esh-kupon-ok .5s ease; }
.esh .esh-kupon__stav--chyba { color: var(--esh-red); }
@keyframes esh-kupon-ok { 0% { opacity: 0; transform: translateY(-4px); } 100% { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .esh .esh-kupon__stav--ok { animation: none; } }

/* R-031: dotykové cíle ≥ 44 px jen pro dotyk (pointer: coarse); na myši beze změny.
   Odkazy v textu dostanou neviditelnou plochu přes ::after, řádky se neposouvají. */
@media (pointer: coarse) {
    .esh .esh-kosik-ks__krok { width: 44px; min-height: 44px; }
    .esh .esh-kosik-ks__pole { min-height: 44px; }
    .esh .esh-kosik-polozka__odebrat { width: 44px; height: 44px; }
    .esh .esh-kupon__odebrat { min-height: 44px; }
    .esh a.esh-kosik-polozka__nazev,
    .esh a.esh-kosik-zpet { position: relative; }
    .esh a.esh-kosik-polozka__nazev::after { content: ""; position: absolute; inset: -3px 0; }
    .esh a.esh-kosik-zpet::after { content: ""; position: absolute; inset: -10px -4px; }
}
