/* =========================================================
   BIVACO COMMERCE - CART
   V3C-3.3A UI
   ========================================================= */

#page-cart {
    background: #f8fafb;
}

#page-cart .cart-page {
    padding: 38px 0 64px;
    background: #f8fafb;
    min-height: 600px;
}

#page-cart .cart-page > .ctnr {
    width: min(1180px, calc(100% - 40px));
    max-width: 1180px;
    margin: 0 auto;
}

#page-cart .cart-page__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 370px;
    gap: 24px;
    align-items: start;
}

#page-cart .cart-page__grid.full {
    grid-template-columns: 1fr;
}

#page-cart .cart-page__left,
#page-cart .cart-page__right {
    min-width: 0;
}

/* =========================
   SECTION
   ========================= */

#page-cart .cart-section {
    background: #fff;
    border: 1px solid #e8eaee;
    border-radius: 13px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 3px 15px rgba(15, 23, 42, .025);
}

#page-cart .cart-section__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 18px;
    margin-bottom: 4px;
    border-bottom: 1px solid #eef0f3;
}

#page-cart .cart-section__badge {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 50%;
    background: #365f77;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}

#page-cart .cart-section__title {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 16px !important;
    line-height: 1.35 !important;
    font-weight: 700 !important;
    color: #111827 !important;
}

#page-cart .cart-section__back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 18px;
    color: #4b5563;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: color .2s ease;
}

#page-cart .cart-section__back:hover {
    color: #111827;
}

#page-cart .cart-section__back svg {
    width: 17px !important;
    height: 17px !important;
    flex: 0 0 17px;
}

/* =========================
   CART ITEMS
   ========================= */

#page-cart .cart-items {
    width: 100%;
}

#page-cart .cart-item {
    display: grid;
    grid-template-columns: 105px minmax(0, 1fr);
    gap: 18px;
    padding: 20px 0;
    border-bottom: 1px solid #eef0f3;
}

#page-cart .cart-item:last-child {
    border-bottom: 0;
}

#page-cart .cart-item__img {
    display: block;
    width: 105px !important;
    height: 105px !important;
    max-width: 105px !important;
    object-fit: contain;
    object-position: center;
    padding: 6px;
    border: 1px solid #eceef1;
    border-radius: 10px;
    background: #fff;
}

#page-cart .cart-item__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
}

#page-cart .cart-item__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

#page-cart .cart-item__name {
    margin: 0 !important;
    padding: 0 !important;
    color: #171717 !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
    font-weight: 700 !important;
}

#page-cart .cart-item__variant {
    display: inline-flex;
    width: fit-content;
    margin: 7px 0 0 !important;
    padding: 5px 9px;
    border-radius: 6px;
    background: #f3f4f6;
    color: #4b5563 !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
    font-weight: 600;
}

#page-cart .cart-item__remove {
    appearance: none;
    border: 0;
    background: transparent;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    transition: .2s ease;
}

#page-cart .cart-item__remove:hover {
    color: #dc2626;
    background: #fef2f2;
}

#page-cart .cart-item__remove svg {
    width: 17px !important;
    height: 17px !important;
}

#page-cart .cart-item__footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

#page-cart .cart-item__qty {
    display: inline-grid;
    grid-template-columns: 34px 42px 34px;
    height: 34px;
    border: 1px solid #dfe2e7;
    border-radius: 7px;
    overflow: hidden;
    background: #fff;
}

#page-cart .cart-item__qty-btn {
    appearance: none;
    border: 0;
    background: #f8f9fa;
    color: #333;
    padding: 0;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease;
}

#page-cart .cart-item__qty-btn:hover {
    background: #eef0f2;
}

#page-cart .cart-item__qty-input {
    width: 42px !important;
    min-width: 0 !important;
    height: 32px !important;
    padding: 0 !important;
    border: 0 !important;
    border-left: 1px solid #e4e6e9 !important;
    border-right: 1px solid #e4e6e9 !important;
    outline: none !important;
    background: #fff !important;
    color: #111827 !important;
    text-align: center;
    font-size: 13px !important;
    font-weight: 700;
    box-shadow: none !important;
}

#page-cart .cart-item__price-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

#page-cart .cart-item__price {
    color: #365f77 !important;
    font-size: 16px !important;
    line-height: 1.35 !important;
    font-weight: 700 !important;
}

#page-cart .cart-item__price--old {
    color: #9ca3af !important;
    font-size: 12px !important;
    text-decoration: line-through;
}

/* =========================
   CART TOTAL UNDER ITEMS
   ========================= */

#page-cart .cart-checkout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-top: 17px;
    margin-top: 2px;
    border-top: 1px solid #eef0f3;
}

#page-cart .cart-checkout__clear-btn {
    appearance: none;
    border: 0;
    background: transparent;
    color: #6b7280;
    padding: 5px 0;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

#page-cart .cart-checkout__clear-btn:hover {
    color: #dc2626;
}

#page-cart .cart-checkout__summary {
    display: flex;
    align-items: baseline;
    gap: 8px;
    text-align: right;
}

#page-cart .cart-checkout__summary-text {
    color: #6b7280;
    font-size: 12px;
}

#page-cart .cart-checkout__summary-amount {
    color: #365f77;
    font-size: 17px;
    font-weight: 800;
}

/* =========================
   BUYER FORM
   ========================= */

#page-cart .cart-form__row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

#page-cart .cart-form__group {
    margin-top: 17px;
}

#page-cart .cart-form__label {
    display: block;
    margin-bottom: 7px;
    color: #374151;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 700;
}

#page-cart .required {
    color: #dc2626;
}

#page-cart .cart-form__input,
#page-cart .cart-form__textarea {
    display: block;
    width: 100% !important;
    border: 1px solid #dfe2e7 !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: #111827 !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color .2s ease, box-shadow .2s ease;
}

#page-cart .cart-form__input {
    height: 42px !important;
    padding: 0 12px !important;
}

#page-cart .cart-form__textarea {
    min-height: 82px !important;
    padding: 10px 12px !important;
    resize: vertical;
}

#page-cart .cart-form__input:focus,
#page-cart .cart-form__textarea:focus {
    border-color: #9ca3af !important;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, .05) !important;
}

/* =========================
   SUMMARY
   ========================= */

#page-cart .cart-page__right {
    position: relative;
}

#page-cart .cart-summary {
    position: sticky;
    top: 95px;
    background: #fff;
    border: 1px solid #e8eaee;
    border-radius: 13px;
    padding: 22px;
    box-shadow: 0 3px 15px rgba(15, 23, 42, .025);
}

#page-cart .cart-summary__title {
    margin: 0 0 18px !important;
    padding: 0 0 15px !important;
    border-bottom: 1px solid #eef0f3;
    color: #111827 !important;
    font-size: 16px !important;
    line-height: 1.35 !important;
    font-weight: 700 !important;
}

#page-cart .cart-summary__rows {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

#page-cart .cart-summary__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

#page-cart .cart-summary__label,
#page-cart .cart-summary__value {
    color: #6b7280;
    font-size: 12px;
}

#page-cart .cart-summary__value {
    color: #374151;
    font-weight: 700;
}

#page-cart .cart-summary__value--free {
    color: #16a34a;
    font-size: 12px;
    font-weight: 700;
}

#page-cart .cart-summary__total {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    padding: 17px 0;
    margin-top: 16px;
    border-top: 1px solid #eef0f3;
    border-bottom: 1px solid #eef0f3;
}

#page-cart .cart-summary__total-label {
    color: #111827;
    font-size: 13px;
    font-weight: 800;
}

#page-cart .cart-summary__total > div {
    text-align: right;
}

#page-cart .cart-summary__total-price {
    display: block;
    color: #365f77;
    font-size: 21px;
    line-height: 1.25;
    font-weight: 800;
}

#page-cart .cart-summary__vat {
    display: block;
    margin-top: 3px;
    color: #9ca3af;
    font-size: 10px;
}

/* =========================
   PAYMENT
   ========================= */

#page-cart .cart-payment {
    padding-top: 18px;
}

#page-cart .cart-payment__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 11px !important;
    color: #111827 !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    font-weight: 700 !important;
}

#page-cart .cart-payment__title-icon {
    width: 18px !important;
    height: 18px !important;
    color: #6b7280;
}

#page-cart .cart-payment__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#page-cart .cart-payment__option {
    position: relative;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 3px 9px;
    align-items: center;
    padding: 11px 12px;
    margin: 0;
    border: 1px solid #e3e5e8;
    border-radius: 9px;
    background: #fff;
    cursor: pointer;
    transition: .2s ease;
}

#page-cart .cart-payment__option:hover {
    border-color: #c9cdd3;
}

#page-cart .cart-payment__option--active {
    border-color: #111827;
    background: #fafafa;
}

#page-cart .cart-payment__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

#page-cart .cart-payment__radio {
    width: 16px;
    height: 16px;
    border: 1.5px solid #b7bcc4;
    border-radius: 50%;
    position: relative;
}

#page-cart .cart-payment__option--active .cart-payment__radio {
    border-color: #111827;
}

#page-cart .cart-payment__option--active .cart-payment__radio::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    left: 50%;
    top: 50%;
    border-radius: 50%;
    background: #365f77;
    transform: translate(-50%, -50%);
}

#page-cart .cart-payment__info {
    min-width: 0;
}

#page-cart .cart-payment__name {
    display: block;
    color: #374151;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 700;
}

#page-cart .cart-payment__desc {
    grid-column: 2;
    color: #6b7280;
    font-size: 11px;
    line-height: 1.45;
}

#page-cart .cart-payment__desc p {
    margin: 3px 0 0;
    font-size: inherit !important;
    line-height: inherit !important;
}

/* =========================
   CHECKOUT BUTTON
   ========================= */

#page-cart .cart-summary__checkout-btn {
    appearance: none;
    width: 100%;
    min-height: 46px;
    margin-top: 18px;
    padding: 11px 16px;
    border: 0;
    border-radius: 8px;
    background: #365f77;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 800;
    cursor: pointer;
    transition: transform .15s ease, opacity .2s ease;
}

#page-cart .cart-summary__checkout-btn:hover {
    opacity: .92;
}

#page-cart .cart-summary__checkout-btn:active {
    transform: translateY(1px);
}

#page-cart .cart-summary__checkout-btn svg {
    width: 17px !important;
    height: 17px !important;
}

/* =========================
   EMPTY CART
   ========================= */

#page-cart .cart-empty {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 38px 16px 32px;
    text-align: center;
}

#page-cart .cart-empty__symbol {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    margin-bottom: 20px;
    border: 1px solid #dce6eb;
    border-radius: 50%;
    background: #f3f7f9;
    color: #365f77;
}

#page-cart .cart-empty__symbol svg {
    display: block;
    width: 42px !important;
    height: 42px !important;
    max-width: 42px;
    flex: none;
}

#page-cart .cart-empty__title {
    margin: 0 0 9px !important;
    padding: 0 !important;
    font-size: 21px !important;
    line-height: 1.35 !important;
    font-weight: 650 !important;
    color: #263944 !important;
}

#page-cart .cart-empty__description {
    max-width: 430px;
    margin: 0 !important;
    color: #71818c !important;
    font-size: 14px !important;
    line-height: 1.65 !important;
}

#page-cart .cart-empty__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    min-height: 46px;
    margin-top: 24px;
    padding: 11px 22px;
    border: 1px solid #365f77;
    border-radius: 9px;
    background: #365f77;
    color: #fff;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
    transition: background .2s ease, border-color .2s ease;
}

#page-cart .cart-empty__action:hover,
#page-cart .cart-empty__action:focus-visible {
    background: #284a60;
    border-color: #284a60;
    color: #fff;
}

#page-cart .cart-empty__action span {
    font-size: 18px;
    line-height: 1;
}

/* =========================
   TABLET
   ========================= */

@media (max-width: 991.98px) {
    #page-cart .cart-page {
        padding: 25px 0 45px;
    }

    #page-cart .cart-page__grid {
        grid-template-columns: 1fr;
    }

    #page-cart .cart-summary {
        position: static;
    }
}

/* =========================
   MOBILE
   ========================= */

@media (max-width: 575.98px) {
    #page-cart .cart-page {
        padding: 14px 0 35px;
    }

    #page-cart .cart-page > .ctnr {
        width: calc(100% - 24px);
    }

    #page-cart .cart-page__grid {
        gap: 12px;
    }

    #page-cart .cart-section,
    #page-cart .cart-summary {
        padding: 16px;
        border-radius: 11px;
    }

    #page-cart .cart-section {
        margin-bottom: 12px;
    }

    #page-cart .cart-section__header {
        padding-bottom: 13px;
    }

    #page-cart .cart-section__badge {
        width: 27px;
        height: 27px;
        flex-basis: 27px;
        font-size: 12px;
    }

    #page-cart .cart-section__title {
        font-size: 16px !important;
    }

    #page-cart .cart-item {
        grid-template-columns: 82px minmax(0, 1fr);
        gap: 12px;
        padding: 16px 0;
    }

    #page-cart .cart-item__img {
        width: 82px !important;
        height: 82px !important;
        max-width: 82px !important;
        padding: 4px;
    }

    #page-cart .cart-item__name {
        font-size: 13px !important;
    }

    #page-cart .cart-item__footer {
        align-items: center;
        flex-wrap: wrap;
    }

    #page-cart .cart-item__price {
        font-size: 14px !important;
    }

    #page-cart .cart-form__row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    #page-cart .cart-checkout {
        align-items: flex-end;
    }

    #page-cart .cart-checkout__summary {
        flex-direction: column;
        align-items: flex-end;
        gap: 2px;
    }

    #page-cart .cart-summary__total-price {
        font-size: 18px;
    }
}
