/* ==========================================================================
   Kostolík Merch — košík, checkout, objednávka (order/*, parts/cart_*)
   Stojí na tokenech z kostolik.css (--kst-*). Selektory drží původní třídy
   z gm_2024 (JS hooky a Angular), vzhled je přepsán na Kostolík Merch.
   Vše scopeováno pod .kst-cart / .kst-thanks / .kst-track, aby to
   nepřebíjelo mini-košík v hlavičce.
   ========================================================================== */

/* ---------- checkout shell ---------- */
body.order-cart { background: var(--kst-lav); }
body.order-cart .kst-footer,
body.order-cart .kst-help-strip { display: none !important; }
body.order-cart .kst-main { min-height: 70vh; }
.kst-cart { overflow: hidden; padding-bottom: 40px; }
.kst-cart .container { max-width: 1180px; width: 100%; }
.kst-cart [ng-cloak], [ng-cloak] { display: none !important; }

/* checkout navbar (order/components/header.php) */
.kst-cartnav.navbar { background: var(--kst-cream) !important; border-bottom: 1px solid var(--kst-line); padding: 10px 0; min-height: 70px; overflow: visible; }
.kst-cartnav .container { display: flex; align-items: center; justify-content: space-between; max-width: 1180px; }
.kst-cartnav__brand { margin: 0 !important; padding: 0; display: inline-flex; align-items: center; }
.kst-cartnav__brand img { width: 140px; height: auto; display: block; }
.kst-cartnav .navbar-collapse { display: flex !important; flex-basis: auto; flex-grow: 0; }
.kst-cartnav .navbar-nav { flex-direction: row; align-items: center; gap: 4px; }
.kst-cartnav .nav-link { color: var(--kst-ink) !important; font-weight: 800; font-size: 13px; padding: 8px 12px; }
.kst-cartnav .dropdown-menu { min-width: 90px; text-align: center; }
.kst-cartnav .lang-img { vertical-align: -1px; }
@media (max-width: 575px) { .kst-cartnav__brand img { width: 110px; } .kst-cartnav .nav-link { padding: 8px 8px; } }

/* ---------- kroky ---------- */
.kst-steps__wrap { max-width: 760px !important; }
.kst-steps { position: relative; display: block; color: var(--kst-muted); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .03em; line-height: 1.2; cursor: pointer; }
.kst-steps .row { margin-left: 0; margin-right: 0; }
.kst-steps .row > div { padding: 0 4px; }
.kst-steps__bubble {
  width: 38px; height: 38px; margin: 0 auto 8px; display: grid; place-items: center;
  border-radius: 50%; background: var(--kst-lav-soft); color: var(--kst-ink);
  border: 1.5px solid var(--kst-line); font-family: var(--kst-font-head); font-size: 16px; font-weight: 800; line-height: 1;
  transition: background .15s, border-color .15s;
}
.kst-steps .active, .kst-steps .done { color: var(--kst-ink); }
.kst-steps .active .kst-steps__bubble { background: var(--kst-yellow); border-color: var(--kst-line); box-shadow: none; }
.kst-steps .done .kst-steps__bubble { background: var(--kst-purple); border-color: var(--kst-line); color: #0e1010; }
/* starší varianta kroků (parts/cart_steps.php) */
.kst-steps--line:before { content: ''; background: var(--kst-line); height: 2px; position: absolute; left: 13%; top: 10px; width: 74%; }
.kst-steps--line .line { top: 10px; position: absolute; height: 2px; left: 13%; background: var(--kst-purple); }
.kst-steps .circle { width: 22px; height: 22px; background: var(--kst-lav); margin: 0 auto 10px; border: 1.5px solid var(--kst-line); border-radius: 50%; position: relative; }
.kst-steps .active .circle { border-color: var(--kst-line); background: var(--kst-yellow); }
.kst-steps .done .circle { background: var(--kst-purple); border-color: var(--kst-line); }

/* ---------- rozložení košíku ---------- */
.kst-cart .row.position-relative { align-items: flex-start; }
.kst-cart__left, .new-cart_left_box.kst-cart__left, .new_carrier_box.kst-cart__left {
  background: var(--kst-cream); border: 1px solid var(--kst-line); border-radius: 0; box-shadow: none;
}
.kst-cart__side.Gm-products_new {
  background: var(--kst-lav); border: 1px solid var(--kst-line); border-radius: 0; box-shadow: none;
  padding: 28px 24px !important; right: 0 !important; top: 0 !important;
}
.kst-cart__box.gm-cart_box { background: transparent; padding: 15px 0; }
.kst-cart__box.gm-cart_box.d-md-none { background: var(--kst-cream); border-top: 1px solid var(--kst-line); border-radius: 22px 22px 0 0; margin-top: 10px; }
.kst-cart .gm-cart_box__shipping { background: none !important; }
.kst-cart #address .gm-cart_box { background: var(--kst-cream); border: 1px solid var(--kst-line); border-radius: 0; padding: 24px 0; }
.kst-cart .gm-cart_box .row, .gm-cart_inputs .row, .kst-cart .gm-cart_products .row { margin-left: -8px; margin-right: -8px; }
.kst-cart .gm-cart_box .row > div, .gm-cart_inputs .row > div, .kst-cart .gm-cart_products .row > div { padding-left: 8px; padding-right: 8px; position: relative; }
.kst-cart__title, .new-cart_title.kst-cart__title {
  margin: 0 0 14px !important; font-family: var(--kst-font-head); font-weight: 800; font-size: 28px; line-height: 1.05; letter-spacing: -.02em; color: var(--kst-ink);
}
.kst-cart__subtitle, .gm-cart_subtitle {
  font-family: var(--kst-font-head); font-weight: 800; font-size: 21px; line-height: 1.15; letter-spacing: -.01em; color: var(--kst-ink); text-decoration: none; margin-bottom: 12px;
}
.kst-hr, .kst-cart hr { border: 0; border-top: 1.5px dashed var(--kst-line); margin: 14px 0; width: 100%; }
@media (max-width: 767px) {
  .kst-cart__title, .new-cart_title.kst-cart__title { font-size: 22px; }
  .kst-cart__left.p-5 { padding: 22px 16px !important; }
  .kst-cart #address .gm-cart_box { border-radius: 0; border-left: 0; border-right: 0; }
}

/* ---------- položky košíku ---------- */
.kst-cart .cart_products_box, .kst-cartitem {
  background: var(--kst-cream); border: 1.5px solid var(--kst-line); border-radius: 0; padding: 12px; margin-left: 0 !important; margin-right: 0 !important;
}
.kst-cart .Gm-products_new .cart_products_box { background: var(--kst-cream); }
.kst-cartitem__img, .kst-cart .cart_products_box img { border-radius: 0; background: var(--kst-lav); border: 1px solid var(--kst-line); object-fit: contain; max-width: 100%; }
.kst-cart .cart_products_box h4 { font-family: var(--kst-font-body); font-size: 14px; font-weight: 900; line-height: 1.35; letter-spacing: 0; margin: 0 0 4px; }
.kst-cart .cart_products_box h4 a { color: var(--kst-ink); }
.kst-cart .product_price { font-weight: 900; font-size: 15px; color: var(--kst-ink); }
.kst-cart .product_price.text-danger { color: var(--kst-danger) !important; }
.kst-cart .params_bubble { border: 1px solid var(--kst-line); background: var(--kst-lav); padding: 6px 11px; font-size: 12px; font-weight: 800; border-radius: 0; margin: 0 4px 4px 0; }
.kst-cart a.params_bubble { color: var(--kst-ink); border-color: var(--kst-line); background: var(--kst-yellow); }
.kst-cart a.params_bubble:hover { background: var(--kst-yellow-soft); }
.kst-cart small.params_bubble { background: none; border: 0; padding: 0; }
.kst-cart small.params_bubble a.remove { color: var(--kst-muted); }
.kst-cart small.params_bubble a.remove:hover { color: var(--kst-danger); }
.kst-cart .gm-cart_products .edit-quantity { max-width: none !important; gap: 6px; }
.kst-cart .gm-cart_products .edit-quantity a { padding: 7px 11px; }
.kst-cart .gm-cart_products .image { height: 60px; background-color: var(--kst-lav); border-radius: 0; border: 1px solid var(--kst-line); background-size: contain; background-position: center; background-repeat: no-repeat; position: relative; }
.kst-cart .gm-cart_products .quantity, .kst-products .quantity, .kst-thanks .quantity { position: absolute; top: -6px; right: -4px; width: 21px; height: 21px; line-height: 21px; text-align: center; border-radius: 50%; background: var(--kst-purple); color: #0e1010; font-size: 11px; font-weight: 900; }
.kst-products .image, .kst-thanks .gm-cart_products .image { height: 60px; background-color: var(--kst-lav); border-radius: 0; border: 1px solid var(--kst-line); background-size: contain; background-position: center; background-repeat: no-repeat; position: relative; }
.kst-products .name, .kst-thanks .gm-cart_products .name { font-weight: 900; font-size: 13px; line-height: 1.3; }
.kst-products .params, .kst-thanks .gm-cart_products .params { color: var(--kst-muted); font-size: 12px; line-height: 1.2; }
.kst-products .price, .kst-thanks .gm-cart_products .price { font-weight: 900; }
.kst-products .gm-cart_newinsurance .name { white-space: normal; }
.kst-cart .badge-success, .kst-cart .badge-danger { font-size: 10px; }
.kst-cart .gm-cart_upselling .badge { background: var(--kst-pink); color: var(--kst-ink); border-color: var(--kst-line); position: relative; top: -2px; }

/* pojištění */
.gmNew-cart_newinsurance, .kst-insurance { background: var(--kst-yellow-soft); border: 1px solid var(--kst-line); border-radius: 0; padding: 12px 14px; margin: 6px 0 !important; }
.gmNew-cart_newinsurance .name { font-weight: 900; font-size: 13px; line-height: 1.3; }
.gmNew-cart_newinsurance .price { font-weight: 900; font-size: 14px; }
.gmNew-cart_newinsurance a { cursor: pointer; }

/* upselling */
.kst-upsell { background: var(--kst-lav-soft); border-radius: 0; padding: 10px 8px; font-size: 13px; margin-left: 0 !important; margin-right: 0 !important; }
.gm-cart_upselling .strike { text-decoration: line-through; opacity: .7; }
.gm-cart_upselling a:not(.btn) { color: var(--kst-ink); font-weight: 800; }
.kst-upsell__price { color: var(--kst-danger) !important; font-weight: 900; }

/* ---------- souhrn cen ---------- */
.kst-cart .gm-cart_summary { font-size: 14px; font-weight: 700; align-items: center; }
.kst-cart .gm-cart_summary .col-8 { text-transform: none; }
.kst-cart .gm-cart_summary strong { font-weight: 900; }
.kst-cart .gm-cart_summary .total, .kst-cart .total_price_title { font-family: var(--kst-font-head); font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.kst-cart .gm-cart_summary .price { font-family: var(--kst-font-head); font-size: 30px; font-weight: 800; line-height: 1.1; color: var(--kst-ink); }
.kst-cart .gm-cart_summary .price_mobile, .kst-cart .total_price_sum { font-family: var(--kst-font-head); font-size: 22px; font-weight: 800; color: var(--kst-ink); }
.kst-summary { margin-top: 10px; }
.kst-cart .text-success { color: var(--kst-green-ink) !important; }
@media (max-width: 575px) { .kst-cart .gm-cart_summary .total, .kst-cart .total_price_title { font-size: 18px; } }

/* ---------- tlačítka (CTA) ---------- */
.kst-cta, .btn-new_continue.kst-cta { width: 100%; padding: 18px 24px; font-size: 16px; text-align: center; }
.kst-cta--auto { width: auto !important; padding: 16px 32px; }
.kst-cta--back, .btn-new_back_to_shop.kst-btn { width: 100%; padding: 14px 24px; margin-top: 10px; font-size: 14px; }
.btn-new_continue svg { margin-left: 8px; }
.btn-new_continue[disabled] { opacity: .45; box-shadow: none; }
.kst-cart .alert { margin-top: 14px; }

/* ---------- formulář ---------- */
.kst-form .gm-cart_subtitle { margin-bottom: 10px; }
.kst-form .form-group { margin-bottom: 14px; position: relative; }
.kst-label, .new_custom_label { font-size: 12px; font-weight: 800; color: var(--kst-ink-soft); opacity: 1; margin-bottom: 5px; display: inline-block; }
.kst-cart .form-control { background: var(--kst-lav); border: 1.5px solid var(--kst-line) !important; border-radius: 0; }
.kst-cart .form-control:focus { border-color: var(--kst-purple) !important; }
.kst-cart .form-control.has-error, .form-control.has-error { border-color: var(--kst-danger) !important; background: #2b1a17; }
.gm-cart_error, .checkout-error { display: block; padding: 5px 0 0 4px; font-size: 12px; font-weight: 700; color: var(--kst-danger); line-height: 1.25; }
.label-error, .label-error a { color: var(--kst-danger) !important; font-weight: 800; }
.kst-agree { gap: 10px; margin: 10px 0 0; font-size: 13px; font-weight: 700; line-height: 1.4; cursor: pointer; }
.kst-agree span { flex: 1; }
.gmNew-checbkox, .kst-check { width: 22px !important; height: 22px; min-height: 0; flex: 0 0 22px; accent-color: var(--kst-purple); border-radius: 0; margin: 0; }
.extra-steps_text { font-size: 13px; font-weight: 700; }
.gm-form_box { border: 1.5px solid var(--kst-line); border-radius: 0; background: var(--kst-lav); font-size: 12px; position: relative; }
.gm-form_box .item { padding: 8px 10px; }
.gm-form_box .switch { margin-right: 6px; }
.gm-form_box .name { font-weight: 800; font-size: 14px; }
.kst-cart textarea.form-control.gm-cart_note, .kst-note-field { height: 100px; resize: vertical; }
.kst-cart select.form-control { padding-right: 30px; }
.js-icoLoader { color: var(--kst-purple); }
.gm-cart_addresses { font-size: 14px; }

/* ---------- doprava, platba, charita: volitelné karty ---------- */
.kst-option, .gm-new_box { background: var(--kst-lav); border: 1.5px solid var(--kst-line); border-radius: 0; padding: 12px 14px; font-size: 13px; transition: border-color .15s, box-shadow .15s; }
.kst-cart .kst-option .row { margin-left: -6px; margin-right: -6px; }
.kst-cart .kst-option .row > div { padding-left: 6px; padding-right: 6px; }
.kst-option.clickable, .kst-option .clickable, .clickable { cursor: pointer; }
.kst-option.clickable:hover { border-color: var(--kst-purple); box-shadow: none; }
.kst-option--static { background: var(--kst-cream); }
.kst-option .name { font-size: 14px; font-weight: 900; line-height: 1.3; color: var(--kst-ink); }
.kst-option .price { font-weight: 900; font-size: 14px; color: var(--kst-ink); }
.kst-option small { display: block; color: var(--kst-muted); font-weight: 700; margin-top: 3px; line-height: 1.25; }
.kst-option small.text-success { color: var(--kst-green-ink) !important; }
.kst-option .switch { font-size: 20px; }
.kst-option img { border-radius: 0; }
.fa-check-circle { color: var(--kst-purple) !important; }
.fa-circle-o, .kst-option .fa-circle { color: var(--kst-line); }
.packeta-selector-branch-name { color: var(--kst-ink) !important; font-weight: 800; }
.macky-control, .tringelt-control { background: var(--kst-lav) !important; }
.input-group-text { background: var(--kst-lav-soft); border: 1.5px solid var(--kst-line); font-weight: 800; color: var(--kst-ink); }

/* ---------- kupón ---------- */
.kst-couponwrap { margin: 16px 0 6px; }
.kst-coupon__toggle { cursor: pointer; background: var(--kst-lav-soft); border-radius: 0; padding: 6px 0; margin: 0 0 8px !important; }
.discount_title { font-family: var(--kst-font-body); font-size: 14px; font-weight: 900; margin: 0; letter-spacing: 0; }
.discount_subtitle { font-size: 12px; font-weight: 800; color: var(--kst-ink-soft); opacity: 1; }
.kst-coupon .discount-box { padding: 6px 0 0; margin: 0 !important; max-width: none; }
.discount-use_btn { height: auto; padding: 13px 20px; }
div[data-toggle="collapse"] h3.plus { font-family: var(--kst-font-head); font-size: 28px; line-height: 1; margin: 0; color: var(--kst-purple); }
div[data-toggle="collapse"] h3.plus:before { content: '+'; }
div[data-toggle="collapse"][aria-expanded="true"] h3.plus:before { content: '\2212'; }

/* ---------- loader košíku (overlay při načtení) ---------- */
.gm-cart_loader { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 2000; background-color: var(--kst-cream); color: var(--kst-purple); }
.gm-cart_loader .fa { position: absolute; font-size: 40px; top: 50%; left: 50%; margin: -20px 0 0 -20px; }

/* prázdný košík */
.kst-cart .empty { padding: 60px 0 40px; }
.kst-cart .empty svg { fill: var(--kst-purple); }
.kst-cart .empty .new-cart_title { font-family: var(--kst-font-head); font-size: 30px; }

/* modaly košíku */
#detail .modal-content, #insurance_info .modal-content, #insurance_2022 .modal-content, #return_insurance .modal-content,
#coffee_info .modal-content, #packing .modal-content, #rounding_info .modal-content, #rounding_info2 .modal-content,
#info_dobierka .modal-content, #balikovna_branches .modal-content { background: var(--kst-cream); }
.modal .close { opacity: 1; color: var(--kst-ink); }
.modal .close svg { fill: var(--kst-ink); }

/* ---------- děkovná stránka / detail objednávky (order/show.php) ---------- */
.kst-thanks { position: relative; padding: 20px 0 10px; }
.kst-thanks .container { max-width: 1180px; }
.kst-thanks h2 { font-size: clamp(28px, 4vw, 40px); margin: 0; }
.kst-thanks h2:after { content: ''; display: block; margin: 16px auto 0; max-width: 70px; height: 4px; border-radius: 0; background: var(--kst-pink); }
.kst-thanks h3 { font-size: 24px; text-transform: none; }
.kst-thanks__main { background: var(--kst-cream); border: 1px solid var(--kst-line); border-radius: 0; box-shadow: none; padding: 12px 28px 28px; margin-bottom: 24px; }
.kst-thanks__side { padding-top: 0; }
.kst-thanks .gm-thanks_sidebar h3, .kst-thanks__side h3 { font-weight: 800; }
.kst-thanks .btn-lg { min-width: 200px; }
.kst-thanks .btn.reference { user-select: text; -moz-user-select: text; -ms-user-select: text; letter-spacing: .08em; background: var(--kst-yellow-soft); }
.kst-thanks .text-light { color: var(--kst-muted) !important; }
.kst-note-box, .box-outline { background: var(--kst-yellow-soft); border: 1px solid var(--kst-line); border-radius: 0; padding: 16px; text-align: left; }
.kst-addresses { text-align: left; font-size: 14px; }
.dummy-row { background-color: var(--kst-lav-soft); height: 15px; border-radius: 0; display: inline-block; }
.gm-thanks_code { font-weight: 900; letter-spacing: 3px; background-color: var(--kst-yellow-soft); border: 1px dashed var(--kst-line); border-radius: 0; padding: 10px; font-size: 22px; text-align: center; }
.gm-thanks_status { color: var(--kst-ink-soft); background: var(--kst-cream); border: 1.5px solid var(--kst-line); border-radius: 0; padding: 14px 10px; margin-bottom: 10px; }
.gm-thanks_status .title { font-weight: 900; font-size: 14px; text-transform: none; color: var(--kst-ink); }
.gm-thanks_status.active { border-color: var(--kst-line); box-shadow: none; color: var(--kst-ink); }
@media (max-width: 767px) { .kst-thanks__main { padding: 8px 16px 22px; border-radius: 0; } }

/* ---------- sledování objednávky ---------- */
.kst-track { padding-bottom: 40px; }
.kst-track .container { max-width: none; padding: 0; }
.kst-track form { gap: 14px; }
.kst-track__title { font-size: clamp(26px, 4vw, 38px); margin: 0 0 4px; }
.kst-track .help-block, .error-block { color: var(--kst-danger); font-weight: 700; margin-top: 10px; }
.kst-track .gap-3 > * + * { margin-top: 14px; }

/* ---------- doplnění produktů (order/addproducts.php) ---------- */
.kst-addproducts { max-width: 820px; }
.kst-addproducts .table { background: var(--kst-lav); border-radius: 0; overflow: hidden; }
.ui-autocomplete { background: var(--kst-cream); border: 1px solid var(--kst-line); border-radius: 0; padding: 6px; z-index: 2000; font-size: 13px; font-weight: 700; }

/* "Zpět" tlačítka v košíku — nenápadný outline */
.btn-new_back_to_shop.kst-btn.kst-cta--back {
  background: transparent; box-shadow: none; transform: none;
  border: 1px solid var(--kst-line); color: var(--kst-muted) !important;
  font-weight: 700; font-size: 13px; padding: 11px 20px;
}
.btn-new_back_to_shop.kst-btn.kst-cta--back:hover { background: transparent; border-color: var(--kst-line); color: var(--kst-ink) !important; box-shadow: none; transform: none; }

/* pojištění objednávky: tmavá ikonka ze sdílené šablony → světlá; checkbox a otazník v barvách návrhu */
.kst-insurance img, .gmNew-cart_newinsurance img { filter: invert(1); }
.kst-insurance .fa-question-circle { color: var(--kst-purple) !important; }
.kst-insurance svg { vertical-align: middle; }
