/* =========================================================
   LITTLE HERO
   CART PAGE
   File: /assets/css/cart-page.css
========================================================= */


/* =========================================================
   PAGE
========================================================= */

.cart-page {
    background:
        linear-gradient(180deg,
            #fffdfb 0%,
            #ffffff 42%,
            #fff9f6 100%);
}

.cart-page .container {
    max-width: 1180px;
}


/* =========================================================
   HERO
========================================================= */

.cart-page-hero {
    position: relative;
    overflow: hidden;
    padding-top: 72px !important;
    padding-bottom: 52px !important;
    background:
        radial-gradient(circle at 50% 0%,
            rgba(255, 92, 110, 0.08),
            transparent 38%),
        #ffffff;
}

.cart-page-hero .books-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 18px;
    border-radius: 999px;
    background: #fff1f3;
    border: 1px solid rgba(239, 69, 87, 0.12);
    color: #ef4557;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cart-page-hero .section-title {
    color: #073b5c;
    font-weight: 900;
    font-size: clamp(2.25rem, 4vw, 3.4rem);
    line-height: 1.05;
}

.cart-page-hero .section-subtitle {
    max-width: 760px;
    color: #5e6874;
    font-size: 1.02rem;
    line-height: 1.7;
}

.cart-page-hero .books-divider {
    margin-top: 22px;
}

.cart-page-hero .books-divider span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow:
        0 10px 24px rgba(17, 33, 52, 0.09),
        0 0 0 7px rgba(255, 111, 97, 0.06);
    color: #ff7a45;
    font-size: 1.05rem;
}


/* =========================================================
   MAIN GRID
========================================================= */

.cart-page .row {
    align-items: flex-start;
}


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

.cart-page-items-panel {
    background: #ffffff;
    border: 1px solid #edf1f4;
    border-radius: 24px;
    padding: 30px;
    box-shadow:
        0 16px 40px rgba(20, 41, 64, 0.07);
}

.cart-page-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 20px;
    margin-bottom: 22px;
    border-bottom: 1px solid #eef1f4;
}

.cart-page-section-header h2 {
    margin: 0;
    color: #073b5c;
    font-size: 1.7rem;
    font-weight: 900;
}

.cart-page-section-header span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 7px 13px;
    border-radius: 999px;
    background: #f6f9fb;
    color: #56707f;
    font-size: 0.86rem;
    font-weight: 800;
}


/* =========================================================
   EMPTY STATE
========================================================= */

.cart-page-empty {
    min-height: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 45px 24px;
    border-radius: 20px;
    background:
        linear-gradient(180deg,
            #fbfdfe 0%,
            #fffaf8 100%);
    border: 1px dashed #dce5eb;
}

.cart-page-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    margin-bottom: 22px;
    border-radius: 50%;
    background: #ffffff;
    color: #ef4557;
    font-size: 1.8rem;
    box-shadow:
        0 12px 28px rgba(30, 54, 77, 0.10);
}

.cart-page-empty h3 {
    margin-bottom: 10px;
    color: #073b5c;
    font-size: 1.65rem;
    font-weight: 900;
}

.cart-page-empty p {
    max-width: 520px;
    margin-bottom: 5px;
    color: #697985;
    line-height: 1.65;
}

.cart-page-empty .purchase-btn {
    min-width: 170px;
    margin-top: 20px !important;
}


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

.cart-page-items {
    display: grid;
    gap: 18px;
}


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

.cart-page-summary {
    position: sticky;
    top: 110px;
    background: #ffffff;
    border: 1px solid #edf1f4;
    border-radius: 24px;
    padding: 28px;
    box-shadow:
        0 16px 40px rgba(20, 41, 64, 0.08);
}

.cart-page-summary h2 {
    margin: 0 0 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid #eef1f4;
    color: #073b5c;
    font-size: 1.65rem;
    font-weight: 900;
}

.cart-page-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 0;
    color: #5f6e79;
    font-size: 0.98rem;
}

.cart-page-total-row {
    margin-top: 6px;
    padding-top: 16px;
    border-top: 1px solid #eef1f4;
}

.cart-page-total-row span {
    color: #203747;
    font-weight: 800;
}

.cart-page-total-row strong {
    color: #073b5c;
    font-size: 1.35rem;
    font-weight: 900;
}

.cart-page-checkout-note {
    margin: 18px 0 22px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #f8fafb;
    color: #6a7884;
    font-size: 0.88rem;
    line-height: 1.55;
}


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

#cartPageCheckout {
    width: 100%;
    min-height: 54px;
    border: 0;
    border-radius: 999px;
    font-weight: 900;
    letter-spacing: 0.01em;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

#cartPageCheckout:not(:disabled):hover {
    transform: translateY(-2px);
}

#cartPageCheckout:disabled {
    opacity: 0.46;
    cursor: not-allowed;
    filter: grayscale(0.15);
    box-shadow: none;
}

.cart-page-summary>a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 999px;
    border: 1px solid #dce4e9;
    color: #36556b;
    font-weight: 800;
    text-decoration: none;
    background: #ffffff;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.cart-page-summary>a:hover {
    background: #f8fafb;
    border-color: #cbd8df;
    transform: translateY(-1px);
}


/* =========================================================
   FUTURE CART ROWS
========================================================= */

.cart-page-item {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 20px;
    padding: 20px;
    border: 1px solid #e9eef2;
    border-radius: 18px;
    background: #ffffff;
}

.cart-page-item-image {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 14px;
    background: #f5f7f8;
}

.cart-page-item-details {
    min-width: 0;
}

.cart-page-item-name {
    display: block;
    margin-bottom: 6px;
    color: #073b5c;
    font-size: 1.08rem;
    font-weight: 900;
}

.cart-page-item-meta {
    color: #667784;
    font-size: 0.92rem;
    line-height: 1.55;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 991.98px) {

    .cart-page-summary {
        position: static;
        margin-top: 4px;
    }

}


@media (max-width: 767.98px) {

    .cart-page-hero {
        padding-top: 52px !important;
        padding-bottom: 38px !important;
    }

    .cart-page-items-panel,
    .cart-page-summary {
        padding: 22px;
        border-radius: 20px;
    }

    .cart-page-empty {
        min-height: 300px;
        padding: 34px 18px;
    }

    .cart-page-section-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

}


@media (max-width: 575.98px) {

    .cart-page {
        padding-top: 28px !important;
        padding-bottom: 38px !important;
    }

    .cart-page-items-panel,
    .cart-page-summary {
        padding: 18px;
        border-radius: 18px;
    }

    .cart-page-empty {
        min-height: 275px;
    }

    .cart-page-empty-icon {
        width: 68px;
        height: 68px;
        font-size: 1.5rem;
    }

    .cart-page-empty h3 {
        font-size: 1.4rem;
    }

    .cart-page-item {
        grid-template-columns: 86px minmax(0, 1fr);
        gap: 14px;
        padding: 14px;
    }

    .cart-page-item-image {
        width: 86px;
        height: 86px;
    }

}

/* =========================================================
   CART PAGE BACK LINK
   Match product-page navigation
========================================================= */

.cart-page-back {
    margin-bottom: 1.5rem;
}

.cart-page-back a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;

    color: #123f5d;
    text-decoration: none;

    font-size: 0.95rem;
    font-weight: 700;

    background: transparent;
    border: 0;
    padding: 0;
}

.cart-page-back a:hover {
    color: #123f5d;
    text-decoration: underline;
}

.cart-page-back a i {
    font-size: 0.9rem;
}

/* ==================================================
   SAVE CART
   Account-save action
================================================== */

.cart-page-save-button {
    width: 100%;
    min-height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    margin-top: 12px;

    border: 1px solid #e5a51c;
    border-radius: 999px;

    background:
        linear-gradient(180deg,
            #ffc94d 0%,
            #f5a623 48%,
            #dc8c08 100%);

    color: #173b55;

    font-weight: 800;

    box-shadow:
        0 9px 20px rgba(245, 166, 35, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.65);

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.cart-page-save-button:hover,
.cart-page-save-button:focus-visible {
    color: #173b55;

    transform: translateY(-1px);

    box-shadow:
        0 12px 24px rgba(245, 166, 35, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);

    filter: brightness(1.03);
}

.cart-page-save-button:active {
    transform: translateY(0);
}

.cart-page-save-button i {
    font-size: 0.95rem;
}

.cart-page-save-button:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
}