/* ---------------------------------------------------------
   Pokladna (admin-only redizajn): karty, kroky, volby, mobil.
   Meni iba vzhlad, formular a jeho spravanie ostavaju rovnake.
   --------------------------------------------------------- */
body.sf-redesign #shop.page-checkout {
    background: #f5f6f5;
    padding-bottom: 90px;
    display: flow-root;
}

/* Hlavicka pokladne */
body.sf-redesign #header-2.checkout-header {
    background: #fff;
    border-bottom: 1px solid var(--sf-line);
    margin: 0;
    padding: 14px 0 0;
}
body.sf-redesign #header-2.checkout-header .logo img { height: 52px; width: auto; }
body.sf-redesign #header-2.checkout-header .back-to-cart {
    color: var(--sf-dark);
    font-weight: 700;
    text-decoration: none;
}
body.sf-redesign #header-2.checkout-header .back-to-cart:hover { color: var(--sf-gd); }

/* Kroky */
body.sf-redesign .checkout-steps-wrapper {
    border-top: 0;
    margin-top: 6px;
    padding: 14px 0 16px;
}
body.sf-redesign .checkout-steps {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}
body.sf-redesign .checkout-steps .checkout-step {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    height: auto;
    opacity: 1;
    color: #8a8a8a;
    font-weight: 700;
    font-size: 15px;
}
body.sf-redesign .checkout-steps .checkout-step span {
    position: static;
    width: 30px;
    height: 30px;
    line-height: 30px;
    border-radius: 50%;
    background: #e4e4e4;
    color: #6b6b6b;
    text-align: center;
    flex: 0 0 30px;
}
body.sf-redesign .checkout-steps .checkout-step + .checkout-step::before {
    content: "";
    width: 44px;
    height: 2px;
    margin: 0 14px 0 4px;
    background: #d9d9d9;
}
body.sf-redesign .checkout-steps .checkout-step.previous,
body.sf-redesign .checkout-steps .checkout-step.current { color: var(--sf-dark); }
body.sf-redesign .checkout-steps .checkout-step.previous span { background: var(--sf-g); color: #fff; }
body.sf-redesign .checkout-steps .checkout-step.current span { background: var(--sf-dark); color: #fff; }
body.sf-redesign .checkout-steps .checkout-step.previous + .checkout-step::before { background: var(--sf-g); }
body.sf-redesign .checkout-steps u { text-decoration: none; }

/* Nadpis */
body.sf-redesign .page-checkout h1 {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -.01em;
    margin: 34px 0 22px;
    color: var(--sf-dark);
}

/* Karty: hlavne bloky pokladne */
body.sf-redesign .page-checkout #order-information-wrapper fieldset.checkout-pane,
body.sf-redesign .page-checkout .checkout-pane-review > fieldset,
body.sf-redesign .page-checkout .review-info-row > .checkout-pane > fieldset,
body.sf-redesign .page-checkout [class*="checkout-pane-order-fields"] {
    background: #fff;
    border: 1px solid var(--sf-line);
    border-radius: 0;
    padding: 24px 26px;
    margin: 0 0 22px;
}
body.sf-redesign .page-checkout legend {
    float: left;
    width: 100%;
    padding: 0;
    margin: 0 0 16px;
    border: 0;
    font-size: 19px;
    font-weight: 800;
    color: var(--sf-dark);
}
body.sf-redesign .page-checkout legend + * { clear: both; }
body.sf-redesign .page-checkout legend .fieldset-legend { font-size: inherit; font-weight: inherit; }
body.sf-redesign .page-checkout .form-required::after { color: #d92d20; }

/* Vnorene skupiny (doprava, sposob platby) */
body.sf-redesign .page-checkout #order-information-wrapper fieldset.fieldgroup {
    border: 0;
    border-top: 1px solid var(--sf-line);
    border-radius: 0;
    padding: 22px 0 0;
    margin: 24px 0 0;
    background: transparent;
}

body.sf-redesign .page-checkout #edit-payment-information fieldset.fieldgroup {
    border-top: 0;
    margin-top: 0;
    padding-top: 0;
}

/* Rozlozenie: viac miesta pre adresu a dopravu */
@media (min-width: 992px) {
    body.sf-redesign #address-info { flex: 0 0 58.3333%; max-width: 58.3333%; }
    body.sf-redesign #payment-shipping-info { flex: 0 0 41.6667%; max-width: 41.6667%; }
}
body.sf-redesign .page-checkout #address-info,
body.sf-redesign .page-checkout #payment-shipping-info { padding-bottom: 0; }

/* Polia */
body.sf-redesign .page-checkout select,
body.sf-redesign .page-checkout input[type="text"],
body.sf-redesign .page-checkout input[type="email"],
body.sf-redesign .page-checkout input[type="tel"],
body.sf-redesign .page-checkout textarea {
    border: 1px solid #d6d6d6;
    border-radius: 0;
    min-height: 46px;
    padding: 8px 14px;
    background-color: #fff;
    max-width: 100%;
}
body.sf-redesign .page-checkout textarea { min-height: 96px; width: 100%; max-width: 680px; }
body.sf-redesign .page-checkout select:focus,
body.sf-redesign .page-checkout input:focus,
body.sf-redesign .page-checkout textarea:focus {
    outline: 0;
    border-color: var(--sf-g);
    box-shadow: 0 0 0 2px rgba(0, 195, 70, .25);
}
body.sf-redesign .page-checkout label { font-weight: 600; color: var(--sf-dark); }

/* Volby (doprava, platba): karta je .form-item, popis ostava v toku pod nazvom */
body.sf-redesign .page-checkout .form-radios:not(#disabled-shipping) { display: grid; gap: 10px; }
body.sf-redesign .page-checkout .form-radios:not(#disabled-shipping) .form-item {
    margin: 0 !important;
    padding: 13px 14px !important;
    border: 1px solid #dcdcdc !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
body.sf-redesign .page-checkout .form-radios:not(#disabled-shipping) .form-item:hover { border-color: #9aa39d !important; }
body.sf-redesign .page-checkout .form-radios:not(#disabled-shipping) .form-item:has(input:checked) {
    border-color: var(--sf-g) !important;
    background: var(--sf-gl) !important;
    box-shadow: 0 0 0 1px var(--sf-g) inset !important;
}
body.sf-redesign .page-checkout .form-radios:not(#disabled-shipping) label.option {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 0 0 30px !important;
    min-height: 24px;
    line-height: 1.35;
    font-weight: 700;
    color: var(--sf-dark);
    cursor: pointer;
}
body.sf-redesign .page-checkout .form-radios:not(#disabled-shipping) label.option::before { left: 0 !important; top: 1px !important; }
body.sf-redesign .page-checkout .form-radios:not(#disabled-shipping) label.option::after { left: 7px !important; top: 5px !important; }
body.sf-redesign .page-checkout .form-radios:not(#disabled-shipping) .description {
    position: static !important;
    width: auto !important;
    max-width: none !important;
    padding: 4px 0 0 30px !important;
    margin: 0 !important;
    color: var(--sf-muted);
    font-size: 13px;
    font-weight: 400;
}
body.sf-redesign .page-checkout input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--sf-g);
    vertical-align: -3px;
    margin-right: 6px;
}

/* Upozornenie na dopravu zdarma */
body.sf-redesign .page-checkout .freeShippingAlert { margin: 0 0 20px; }
/* V sekcii dopravy zostava iba horny pas (bez duplicity) */
body.sf-redesign .page-checkout .field--name-shipping-method .freeShippingAlert { display: none; }

/* Overenie veku */
body.sf-redesign .page-checkout .info-shipping-verification {
    background: var(--sf-gl);
    border: 1px solid #b9ecca;
    border-radius: 0;
    padding: 16px 20px;
    margin: 0 0 22px;
}
body.sf-redesign .page-checkout #disabled-shipping .form-item { border-radius: 0; }

/* Tlacidla */
body.sf-redesign .page-checkout .button,
body.sf-redesign .page-checkout .form-submit,
body.sf-redesign .page-checkout input[type="submit"] {
    border-radius: 0;
    font-weight: 700;
    min-height: 46px;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease, transform .1s ease;
}
body.sf-redesign .page-checkout .button:not(.button-purple) {
    background: #fff;
    border: 2px solid var(--sf-dark);
    color: var(--sf-dark);
    text-decoration: none;
}
body.sf-redesign .page-checkout .button:not(.button-purple):hover { background: var(--sf-dark); color: #fff; }
body.sf-redesign .page-checkout .button:active,
body.sf-redesign .page-checkout .form-submit:active { transform: scale(.98); }
body.sf-redesign .page-checkout #edit-actions-next {
    background: var(--sf-g);
    border: 2px solid var(--sf-g);
    color: #fff;
    padding: 0 34px;
    font-size: 17px;
    min-height: 54px;
}
body.sf-redesign .page-checkout #edit-actions-next:hover { background: var(--sf-gd); border-color: var(--sf-gd); }
body.sf-redesign .page-checkout .checkout-cancel,
body.sf-redesign .page-checkout .checkout-back,
body.sf-redesign .page-checkout #edit-actions .link--previous {
    color: var(--sf-dark);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Kontrola objednavky: suhrn */
body.sf-redesign .page-checkout .summary-table {
    background: #fff;
    border: 1px solid var(--sf-line);
    border-radius: 0;
    padding: 8px 22px;
}
body.sf-redesign .page-checkout .summary-table table.views-table tbody td { border-bottom: 1px solid #eee; background: transparent; }
body.sf-redesign .page-checkout .summary-table .order-total-line__total { font-size: 20px; font-weight: 800; }
body.sf-redesign .page-checkout .checkout-pane-review > fieldset legend a,
body.sf-redesign .page-checkout .checkout-pane-review > fieldset legend span a {
    background: var(--sf-dark);
    color: #fff;
    border-radius: 0;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    text-decoration: none;
}
body.sf-redesign .page-checkout .checkout-pane-review > fieldset legend a:hover { background: var(--sf-gd); }

/* Kontrola objednavky: tri bloky vedla seba, rovnako vysoke */
body.sf-redesign .page-checkout .checkout-pane-review,
body.sf-redesign .page-checkout .review-info-row > .checkout-pane {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin: 0 0 22px !important;
}
body.sf-redesign .page-checkout .checkout-pane-review > fieldset,
body.sf-redesign .page-checkout .review-info-row > .checkout-pane > fieldset {
    width: 100% !important;
    max-width: none !important;
    float: none !important;
    margin: 0 !important;
    padding: 20px 22px !important;
}
body.sf-redesign .page-checkout .checkout-pane-review .fieldset-wrapper,
body.sf-redesign .page-checkout .checkout-pane-review .profile {
    border: 0 !important;
    border-radius: 0;
    box-shadow: none;
    background: none;
    padding: 0 !important;
}
@media (max-width: 991px) {
    body.sf-redesign .page-checkout .checkout-pane-review,
    body.sf-redesign .page-checkout .review-info-row > .checkout-pane { grid-template-columns: 1fr; gap: 16px; }
}

/* Suhlasy */
body.sf-redesign .page-checkout .review-sidebar,
body.sf-redesign .page-checkout .order-information-sidebar { padding-bottom: 8px; }
body.sf-redesign .page-checkout .form-type-checkbox { margin: 0 0 12px; }
body.sf-redesign .page-checkout .notice-age {
    color: var(--sf-muted);
    font-size: 13px;
    line-height: 1.6;
    max-width: 880px;
}

body.sf-redesign .page-checkout #edit-payment-information .form-type-checkbox { margin-top: 18px; }

/* Mobil */
@media (max-width: 767px) {
    body.sf-redesign .page-checkout h1 { font-size: 26px; margin: 22px 0 16px; }
    body.sf-redesign .page-checkout #order-information-wrapper fieldset.checkout-pane,
    body.sf-redesign .page-checkout .checkout-pane-review > fieldset,
    body.sf-redesign .page-checkout [class*="checkout-pane-order-fields"] { padding: 18px 16px; }
    body.sf-redesign .checkout-steps .checkout-step + .checkout-step::before { width: 22px; margin: 0 8px 0 0; }
    body.sf-redesign .checkout-steps .checkout-step u { display: none; }
    body.sf-redesign .checkout-steps .checkout-step.current u { display: inline; }
    body.sf-redesign .checkout-steps .checkout-step { gap: 7px; font-size: 14px; }
    body.sf-redesign .page-checkout #edit-actions-next { width: 100%; white-space: normal; font-size: 16px; line-height: 1.25; padding: 12px 16px; height: auto; }
    body.sf-redesign .page-checkout .form-actions { display: flex; flex-direction: column; gap: 12px; align-items: stretch; text-align: center; }
    body.sf-redesign #header-2.checkout-header .logo img { height: 42px; }
}

/* =========================================================
   Uprava v2: zelena hlavicka, oble rohy, kontrast tlacidiel
   ========================================================= */
body.sf-redesign #header-2.checkout-header {
    background: var(--sf-g);
    border-bottom: 0;
    padding: 12px 0 0;
}
body.sf-redesign #header-2.checkout-header .back-to-cart { color: #fff; }
body.sf-redesign #header-2.checkout-header .back-to-cart:hover { color: #fff; text-decoration: underline; }
body.sf-redesign .checkout-steps-wrapper { background: transparent; margin-top: 0; padding: 12px 0 20px; }
body.sf-redesign .checkout-steps .checkout-step { color: rgba(255, 255, 255, .85); }
body.sf-redesign .checkout-steps .checkout-step span { background: rgba(255, 255, 255, .28); color: #fff; }
body.sf-redesign .checkout-steps .checkout-step + .checkout-step::before { background: rgba(255, 255, 255, .45); }
body.sf-redesign .checkout-steps .checkout-step.previous,
body.sf-redesign .checkout-steps .checkout-step.current { color: #fff; }
body.sf-redesign .checkout-steps .checkout-step.previous span { background: #fff; color: var(--sf-gd); }
body.sf-redesign .checkout-steps .checkout-step.current span { background: var(--sf-dark); color: #fff; }
body.sf-redesign .checkout-steps .checkout-step.previous + .checkout-step::before { background: #fff; }
body.sf-redesign .checkout-steps a { color: inherit; text-decoration: none; }

/* Oble rohy ako na zvysku webu */
body.sf-redesign .page-checkout #order-information-wrapper fieldset.checkout-pane,
body.sf-redesign .page-checkout .checkout-pane-review > fieldset,
body.sf-redesign .page-checkout .review-info-row > .checkout-pane > fieldset,
body.sf-redesign .page-checkout [class*="checkout-pane-order-fields"],
body.sf-redesign .page-checkout .summary-table,
body.sf-redesign .page-checkout .info-shipping-verification {
    border-radius: 14px !important;
    box-shadow: 0 6px 20px rgba(20, 40, 28, .05);
}
body.sf-redesign .page-checkout select,
body.sf-redesign .page-checkout input[type="text"],
body.sf-redesign .page-checkout input[type="email"],
body.sf-redesign .page-checkout input[type="tel"],
body.sf-redesign .page-checkout textarea { border-radius: 10px; }
body.sf-redesign .page-checkout .form-radios:not(#disabled-shipping) .form-item,
body.sf-redesign .page-checkout #disabled-shipping .form-item { border-radius: 12px !important; }
body.sf-redesign .page-checkout .button,
body.sf-redesign .page-checkout .form-submit,
body.sf-redesign .page-checkout input[type="submit"] { border-radius: 12px; }
body.sf-redesign .page-checkout .checkout-pane-review > fieldset legend a,
body.sf-redesign .page-checkout .checkout-pane-review > fieldset legend span a { border-radius: 999px; padding: 4px 12px; }
body.sf-redesign .page-checkout .checkout-pane-review .profile { border-radius: 0; }

/* Kontrast: svetle tlacidla maju tmavy text a okraj */
body.sf-redesign .page-checkout .button:not(.button-purple),
body.sf-redesign .page-checkout input.form-submit.button:not(.button--primary),
body.sf-redesign .page-checkout input[type="submit"].address-book-edit-button {
    background: #fff !important;
    color: var(--sf-dark) !important;
    border: 2px solid var(--sf-dark) !important;
}
body.sf-redesign .page-checkout .button:not(.button-purple):hover,
body.sf-redesign .page-checkout input.form-submit.button:not(.button--primary):hover,
body.sf-redesign .page-checkout input[type="submit"].address-book-edit-button:hover {
    background: var(--sf-dark) !important;
    color: #fff !important;
}
body.sf-redesign .page-checkout #edit-actions-next,
body.sf-redesign .page-checkout .button.button--primary {
    background: var(--sf-gd) !important;
    border: 2px solid var(--sf-gd) !important;
    color: #fff !important;
}
body.sf-redesign .page-checkout #edit-actions-next:hover { background: #006b2f !important; border-color: #006b2f !important; }
body.sf-redesign .page-checkout .btn-packeta { background: var(--sf-dark) !important; color: #fff !important; border-radius: 12px; }
body.sf-redesign .page-checkout .button-purple { color: #fff; border-radius: 12px; }

/* =========================================================
   Uprava v3: kroky ako karta, kompaktny pas dopravy zdarma,
   opravene volby dopravy a platby
   ========================================================= */
body.sf-redesign #header-2.checkout-header { position: relative; z-index: 5; padding: 14px 0 34px; }
body.sf-redesign .checkout-steps-wrapper {
    position: relative;
    z-index: 6;
    margin: 0 0 -62px;
    padding: 18px 0 0;
    background: transparent;
}
body.sf-redesign .checkout-steps-wrapper .container { padding: 0; }
body.sf-redesign .checkout-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(780px, calc(100% - 32px));
    margin: 0 auto;
    padding: 16px 28px;
    background: #fff;
    border: 1px solid var(--sf-line);
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(20, 40, 28, .14);
}
body.sf-redesign .checkout-steps .checkout-step {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    height: auto;
    padding: 0;
    opacity: 1;
    color: #7a817d;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}
body.sf-redesign .checkout-steps .checkout-step + .checkout-step { flex: 1 1 0; }
body.sf-redesign .checkout-steps .checkout-step + .checkout-step::before {
    content: "";
    flex: 1 1 auto;
    height: 3px;
    min-width: 16px;
    margin: 0 14px;
    border-radius: 3px;
    background: #e1e6e3;
}
body.sf-redesign .checkout-steps .checkout-step.previous + .checkout-step::before,
body.sf-redesign .checkout-steps .checkout-step.current::before { background: var(--sf-g); }
body.sf-redesign .checkout-steps .checkout-step .sf-step-num {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    line-height: 1;
    border-radius: 50%;
    background: #e8ece9 !important;
    color: #5f6762 !important;
    font-size: 15px;
    font-weight: 800;
}
body.sf-redesign .checkout-steps .checkout-step.previous .sf-step-num { background: var(--sf-g) !important; color: #fff !important; font-size: 0; }
body.sf-redesign .checkout-steps .checkout-step.previous .sf-step-num::after { content: "✓"; font-size: 17px; }
body.sf-redesign .checkout-steps .checkout-step.current { color: var(--sf-dark); }
body.sf-redesign .checkout-steps .checkout-step.current .sf-step-num {
    background: var(--sf-gd) !important;
    color: #fff !important;
    box-shadow: 0 0 0 4px var(--sf-gl);
}
body.sf-redesign .checkout-steps .checkout-step.previous { color: var(--sf-dark); }
body.sf-redesign .checkout-steps .checkout-step u { text-decoration: none; }
body.sf-redesign #shop.page-checkout > .container { padding-top: 84px; }

/* Nadpis a pas dopravy zdarma */
body.sf-redesign .page-checkout h1,
body.sf-redesign .page-checkout h1.pt-5 { margin: 6px 0 18px; padding: 0 !important; font-size: 30px; }
body.sf-redesign #shop.page-checkout > .container > .freeShippingAlert {
    position: sticky;
    top: 12px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 18px;
    padding: 9px 16px;
    border-width: 1px;
    border-radius: 12px;
    font-size: 14px;
    box-shadow: 0 6px 18px rgba(20, 40, 28, .08);
}
body.sf-redesign #shop.page-checkout > .container > .freeShippingAlert i { width: 28px; height: 28px; font-size: 13px; }
body.sf-redesign #shop.page-checkout > .container > .freeShippingAlert .sf-fs-text { flex: 0 1 auto; }
body.sf-redesign #shop.page-checkout > .container > .freeShippingAlert .sf-fs-text strong { font-size: 15px; }
body.sf-redesign #shop.page-checkout > .container > .freeShippingAlert .sf-fs-bar { flex: 1 1 120px; grid-column: auto; height: 6px; }

/* Volby dopravy a platby: karty v mriezke na celu sirku (predtym sirka 0) */
body.sf-redesign .page-checkout .form-radios:not(#disabled-shipping) {
    display: grid !important;
    width: 100% !important;
    max-width: none !important;
    float: none !important;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}
body.sf-redesign .page-checkout .form-radios:not(#disabled-shipping) .form-item { width: auto !important; max-width: none !important; float: none !important; }
body.sf-redesign .page-checkout fieldset[id*="shipping-information-shipments"] > legend { margin-bottom: 14px; }

@media (max-width: 640px) {
    body.sf-redesign .checkout-steps { padding: 12px 14px; }
    body.sf-redesign .checkout-steps .checkout-step:not(.current) u { display: none; }
    body.sf-redesign .checkout-steps .checkout-step + .checkout-step::before { margin: 0 8px; }
    body.sf-redesign .checkout-steps .checkout-step { font-size: 14px; }
    body.sf-redesign #shop.page-checkout > .container > .freeShippingAlert { flex-wrap: wrap; row-gap: 6px; }
    body.sf-redesign #shop.page-checkout > .container > .freeShippingAlert .sf-fs-bar { flex-basis: 100%; }
}
