body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

body > footer {
    margin-top: auto;
}

.kosik_page_heading_wrap {
    margin: 56px auto 22px;
    padding: 0 10%;
}

.kosik_intro_heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.kosik_intro_heading img {
    width: 34px;
    height: auto;
}

.kosik_intro_heading h1 {
    margin: 0;
    font-size: 23px;
    font-weight: 700;
    color: #292929;
}

#kosik_empty_content {
    max-width: 820px;
    margin: 34px auto 56px;
    padding: 0 16px;
}

.kosik_empty_box {
    text-align: center;
}

.kosik_empty_status_icon {
    width: 46px;
    height: 46px;
    margin: 0 auto 10px;
    background: #c40d0e;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.kosik_empty_box h1 {
    margin: 0;
    color: #b4000a;
    font-size: 32px;
    font-weight: 700;
}

.kosik_empty_subtitle {
    margin: 2px 0 16px;
    color: #292929;
    font-size: 20px;
    font-weight: 600;
}

.kosik_empty_info {
    background: #cff4fc;
    color: #0f4e5a;
    text-align: left;
    padding: 18px 20px;
}

.kosik_empty_info h2 {
    margin: 0 0 8px;
    font-size: 19px;
    font-weight: 700;
}

.kosik_empty_info p {
    margin: 0;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 600;
}

.kosik_empty_actions {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    gap: 14px;
}

#kosik_content {
    max-width: 1420px;
    margin: 0;
    margin-left: 10%;
    padding: 18px 16px 54px 0;
    overflow-x: auto;
}

#kosik_table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    border: 1px solid #d8d8d8;
}

#kosik_table th,
#kosik_table td {
    border: 1px solid #d8d8d8;
    padding: 11px 14px;
    vertical-align: middle;
}

#kosik_table thead th {
    background: #c40d0e;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border: 0;
}

#kosik_table th:first-child,
#kosik_table td:first-child {
    width: 33%;
}

#kosik_table th:nth-child(2),
#kosik_table td:nth-child(2) {
    width: 24%;
}

#kosik_table th:nth-child(3),
#kosik_table td:nth-child(3) {
    width: 15%;
    text-align: center;
}

#kosik_table th:nth-child(4),
#kosik_table td:nth-child(4) {
    width: 19%;
    text-align: center;
}

#kosik_table th:nth-child(5),
#kosik_table td:nth-child(5) {
    width: 9%;
    text-align: center;
}

#kosik_table tbody td {
    background: #f1f1f1;
    color: #292929;
    font-size: 15px;
}

#kosik_table tbody td:nth-child(2) {
    font-weight: 600;
}

.kosik_product_link {
    color: #7e1e2a;
    text-decoration: underline;
    font-weight: 600;
}

.kosik_variant_col {
    color: #3f3f3f;
}

.kosik_qty_form {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    min-width: 5.3rem;
    height: 2.2rem;
    padding: 0 0.48rem;
    border: 0;
    background: #d6d6d6;
}

.kosik_qty_btn {
    width: 1.25rem;
    height: 1.25rem;
    border: 0;
    background: transparent;
    color: #292929;
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}

.kosik_qty_value {
    min-width: 1ch;
    text-align: center;
    font-weight: 600;
    color: #292929;
    font-size: 1rem;
    line-height: 1;
}

.kosik_price_col {
    font-weight: 700;
}

.kosik_delete_btn {
    border: 0;
    background: transparent;
    color: #c40d0e;
    font-size: 17px;
    cursor: pointer;
}

.auth-alert {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0s linear 0.18s;
}

.auth-alert.is-hidden {
    display: none;
}

.auth-alert.is-visible {
    display: flex;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.18s ease;
}

.auth-alert__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.62);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.auth-alert__panel {
    position: relative;
    z-index: 1;
    width: min(30rem, 92vw);
    background: #ffffff;
    border: 0;
    color: #292929;
    padding: 1.5rem 1.5rem 1.4rem;
    transform: translateY(8px);
    opacity: 0;
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.auth-alert.is-visible .auth-alert__backdrop {
    opacity: 1;
}

.auth-alert.is-visible .auth-alert__panel {
    transform: translateY(0);
    opacity: 1;
}

.auth-alert__close {
    position: absolute;
    top: 1.55rem;
    right: 0.9rem;
    border: 0;
    background: transparent;
    color: #292929;
    font-size: 1.15rem;
    line-height: 1;
}

.auth-alert__panel h3 {
    margin: 0 1.8rem 0.85rem 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #b4000a;
}

.auth-alert__messages {
    margin: 1.2rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.5rem;
}

.auth-alert__messages li {
    background: transparent;
    color: #292929;
    padding: 0.15rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
}

.cart-delete-alert__actions {
    margin-top: 1.45rem;
    display: flex;
    gap: 0.7rem;
}

.cart-delete-alert__cancel {
    border: 1px solid #b4000a;
    width: 100%;
    background: #ffffff;
    color: #b4000a;
    font-weight: 600;
    padding: 0.55rem 0.8rem;
}

.cart-delete-alert__cancel:hover {
    background: #f8f8f8;
}

.auth-alert__action {
    border: 0;
    width: 100%;
    background: #b4000a;
    color: #fff;
    font-weight: 600;
    padding: 0.55rem 0.8rem;
}

.auth-alert__action:hover {
    background: #870007;
}

.kosik_actions {
    margin-top: 20px;
    display: flex;
    gap: 16px;
}

.kosik_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    min-width: 190px;
    padding: 8px 18px;
    text-decoration: none;
    font-size: 17px;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.kosik_empty_actions .kosik_btn {
    min-height: 44px;
    min-width: 250px;
    font-size: 16px;
}

.kosik_btn_secondary {
    border: 2px solid #c40d0e;
    color: #c40d0e;
    background: #fff;
}

.kosik_btn_secondary:hover {
    color: #c40d0e;
    background: #fff;
    border-color: #c40d0e;
    opacity: 0.8;
}

.kosik_btn_primary {
    border: 1px solid #c40d0e;
    color: #fff;
    background: #c40d0e;
}

.kosik_btn_primary:hover {
    background: #870007;
    border-color: #870007;
}

@media only screen and (max-width: 1680px) {
    .kosik_page_heading_wrap {
        padding: 0 5%;
    }

    #kosik_content {
        margin-left: 5%;
    }
}

@media only screen and (max-width: 1314px) {
    .kosik_page_heading_wrap {
        padding: 0 2%;
    }

    #kosik_content {
        margin-left: 2%;
    }
}

@media only screen and (max-width: 1199px) {
    .kosik_page_heading_wrap {
        padding: 0 calc(clamp(0.8rem, 4vw, 1.5rem) - 0.12rem);
    }

    #kosik_content {
        margin-left: 0;
        margin-right: 0;
        padding-left: calc(clamp(0.8rem, 4vw, 1.5rem) - 0.12rem);
        padding-right: calc(clamp(0.8rem, 4vw, 1.5rem) - 0.12rem);
    }
}

@media (max-width: 700px) {
    #kosik_content {
        overflow-x: visible;
        padding-top: 10px;
        padding-bottom: 30px;
    }

    #kosik_table {
        min-width: 0;
        border: 0;
    }

    #kosik_table thead {
        display: none;
    }

    #kosik_table tbody {
        display: grid;
        gap: 14px;
    }

    #kosik_table tbody tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(7.2rem, auto);
        gap: 10px 14px;
        background: #f1f1f1;
        border: 1px solid #d8d8d8;
        padding: 13px 14px;
    }

    #kosik_table tbody td {
        border: 0;
        padding: 0;
        background: transparent;
        width: auto !important;
        max-width: none;
    }

    #kosik_table th:first-child,
    #kosik_table td:first-child,
    #kosik_table th:nth-child(2),
    #kosik_table td:nth-child(2),
    #kosik_table th:nth-child(3),
    #kosik_table td:nth-child(3),
    #kosik_table th:nth-child(4),
    #kosik_table td:nth-child(4),
    #kosik_table th:nth-child(5),
    #kosik_table td:nth-child(5) {
        width: auto;
    }

    #kosik_table tbody td:first-child,
    #kosik_table tbody td:nth-child(2),
    #kosik_table tbody td:nth-child(5) {
        grid-column: 1 / -1;
    }

    #kosik_table tbody td:nth-child(3) {
        grid-column: 1 / 2;
        text-align: left;
        justify-self: start;
    }

    #kosik_table tbody td:nth-child(4) {
        grid-column: 2 / 3;
        text-align: right;
        align-self: end;
    }

    #kosik_table tbody td:nth-child(2)::before,
    #kosik_table tbody td:nth-child(3)::before,
    #kosik_table tbody td:nth-child(4)::before {
        display: block;
        margin-bottom: 3px;
        color: #7a7a7a;
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.02em;
    }

    #kosik_table tbody td:nth-child(2)::before {
        content: "Varianta";
    }

    #kosik_table tbody td:nth-child(3)::before {
        content: none;
        display: none;
    }

    #kosik_table tbody td:nth-child(4)::before {
        content: "Cena";
        text-align: right;
    }

    #kosik_table tbody td:nth-child(5) {
        display: flex;
        justify-content: flex-end;
        margin-top: -2px;
    }

    .kosik_product_link {
        font-size: 17px;
        line-height: 1.28;
    }

    .kosik_variant_col {
        font-size: 16px;
        font-weight: 600;
        line-height: 1.3;
    }

    .kosik_qty_form {
        min-width: 5.5rem;
        height: 2.1rem;
        padding: 0 0.44rem;
        background: #dcdcdc;
    }

    .kosik_price_col {
        font-size: 19px;
        line-height: 1.1;
    }

    #kosik_empty_content {
        margin-top: 28px;
    }

    .kosik_empty_box h1 {
        font-size: 24px;
    }

    .kosik_empty_subtitle {
        font-size: 16px;
    }

    .kosik_empty_info {
        padding: 16px;
    }

    .kosik_empty_info h2,
    .kosik_empty_info p {
        font-size: 14px;
    }

    .kosik_empty_actions {
        flex-direction: column;
    }

    .kosik_btn {
        width: 100%;
        min-width: 0;
        font-size: 16px;
    }

    .kosik_actions {
        flex-direction: column;
        gap: 10px;
    }

    .kosik_page_heading_wrap {
        margin-top: 30px;
        margin-bottom: 16px;
    }

    .kosik_intro_heading h1 {
        font-size: 20px;
    }
}
