/* =========================================================
   DR PUBLICATIONS
   CART PAGE
========================================================= */

:root {
    --cart-navy: #102946;
    --cart-gold: #b77a08;
    --cart-gold-dark: #976303;
    --cart-border: #eadfce;
    --cart-bg: #fbfaf7;
    --cart-muted: #7c8795;
    --cart-green: #178b45;
}


/* =========================================================
   PAGE
========================================================= */

.cart-page {
    min-height: 65vh;
    padding: 34px 0 80px;
    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            var(--cart-bg) 100%
        );
}

.cart-container {
    width: min(92%, 1240px);
    margin: 0 auto;
}


/* =========================================================
   HEADER
========================================================= */

.cart-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.cart-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 9px;
    color: #747f8e;
    font-size: 13px;
}

.cart-breadcrumb a {
    color: #747f8e;
    text-decoration: none;
}

.cart-breadcrumb a:hover {
    color: var(--cart-gold);
}

.cart-breadcrumb i {
    color: #b1b8c1;
    font-size: 10px;
}

.cart-page-head h1 {
    margin: 0;
    color: var(--cart-navy);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(30px, 4vw, 42px);
}

.cart-page-head p {
    margin: 6px 0 0;
    color: var(--cart-muted);
    font-size: 13px;
}

.clear-cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    height: 42px;
    padding: 0 15px;

    border: 1px solid #e0c9a6;
    border-radius: 9px;

    background: #fff;
    color: #9f6b1c;

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}

.clear-cart-btn:hover {
    background: #fff8ed;
}


/* =========================================================
   ALERT
========================================================= */

.cart-alert {
    display: flex;
    align-items: center;
    gap: 9px;

    margin-bottom: 15px;
    padding: 13px 15px;

    border-radius: 10px;

    font-size: 13px;
}

.cart-alert.success {
    background: #edf9f1;
    border: 1px solid #cbeed7;
    color: #217b42;
}

.cart-alert.warning {
    background: #fff8e8;
    border: 1px solid #f2dfb2;
    color: #926415;
}

.cart-alert.error {
    background: #fff1ef;
    border: 1px solid #f0cbc5;
    color: #a84439;
}


/* =========================================================
   LAYOUT
========================================================= */

.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 365px;
    gap: 24px;
    align-items: start;
}


/* =========================================================
   ITEMS CARD
========================================================= */

.cart-items-card,
.cart-summary-card,
.empty-cart-card {
    background: #fff;
    border: 1px solid var(--cart-border);
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(16, 41, 70, .035);
}

.cart-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    padding: 20px 22px;

    border-bottom: 1px solid #eee9e1;
}

.cart-card-heading h2 {
    margin: 0;
    color: var(--cart-navy);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 23px;
}

.cart-card-heading span {
    padding: 6px 10px;
    border-radius: 20px;
    background: #faf3e6;
    color: #9b6b1d;
    font-size: 11px;
    font-weight: 700;
}

.cart-items {
    padding: 0 22px;
}


/* =========================================================
   CART ITEM
========================================================= */

.cart-item {
    display: grid;
    grid-template-columns: 145px minmax(0, 1fr);
    gap: 20px;

    padding: 22px 0;

    border-bottom: 1px solid #eee9e1;
}

.cart-item:last-child {
    border-bottom: 0;
}

.cart-item-image {
    width: 145px;
    height: 175px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border-radius: 12px;
    background: #f4f5f6;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.cart-item-info {
    min-width: 0;
}

.cart-item-top {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.cart-item-category {
    margin-bottom: 6px;
    color: #a37b3a;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.cart-item-info h3 {
    margin: 0;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 20px;
    line-height: 1.25;
}

.cart-item-info h3 a {
    color: var(--cart-navy);
    text-decoration: none;
}

.cart-item-info h3 a:hover {
    color: var(--cart-gold);
}

.cart-item-author {
    margin: 6px 0 0;
    color: #818b98;
    font-size: 12px;
}

.remove-item-btn {
    width: 36px;
    height: 36px;

    border: 1px solid #e5e6e9;
    border-radius: 8px;

    background: #fff;
    color: #9b6f6a;

    cursor: pointer;
}

.remove-item-btn:hover {
    border-color: #e0b5af;
    background: #fff6f5;
    color: #bb5d50;
}


/* =========================================================
   PRICE
========================================================= */

.cart-item-price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;

    margin-top: 15px;
}

.current-price {
    color: var(--cart-gold);
    font-size: 19px;
    font-weight: 800;
}

.old-price {
    color: #999;
    font-size: 12px;
    text-decoration: line-through;
}


/* =========================================================
   BOTTOM ROW
========================================================= */

.cart-item-bottom {
    display: flex;
    align-items: center;
    gap: 18px;

    margin-top: 20px;
}

.item-stock {
    margin-right: auto;
    color: var(--cart-green);
    font-size: 11px;
    font-weight: 700;
}

.item-stock i {
    margin-right: 4px;
}

.cart-quantity-form {
    margin: 0;
}

.cart-quantity {
    display: grid;
    grid-template-columns: 36px 48px 36px;

    height: 42px;

    overflow: hidden;

    border: 1px solid #dfe2e6;
    border-radius: 8px;

    background: #fff;
}

.cart-quantity button {
    border: 0;
    background: #f7f7f6;
    color: #526071;
    cursor: pointer;
}

.cart-quantity button:hover {
    background: #f0eee9;
    color: var(--cart-gold);
}

.cart-quantity-input {
    width: 100%;
    border: 0;
    outline: 0;

    text-align: center;
    color: #2d3b4e;
    font-size: 13px;
}

.line-total {
    min-width: 95px;

    color: var(--cart-navy);

    font-size: 15px;
    font-weight: 800;

    text-align: right;
}


/* =========================================================
   CONTINUE
========================================================= */

.continue-shopping {
    padding: 18px 22px;
    border-top: 1px solid #eee9e1;
}

.continue-shopping a {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    color: var(--cart-gold);

    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.continue-shopping a:hover {
    color: var(--cart-gold-dark);
}


/* =========================================================
   SUMMARY
========================================================= */

.cart-summary-card {
    position: sticky;
    top: 20px;
    padding: 23px;
}

.cart-summary-card h2 {
    margin: 0 0 18px;
    color: var(--cart-navy);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 24px;
}

.summary-rows {
    display: grid;
    gap: 13px;

    padding-bottom: 17px;

    border-bottom: 1px solid #eee9e1;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;

    color: #718093;
    font-size: 13px;
}

.summary-row strong {
    color: #334156;
    font-size: 13px;
}

.summary-row .saving-text {
    color: #1e8741;
}


/* =========================================================
   SHIPPING PROGRESS
========================================================= */

.shipping-progress {
    margin: 17px 0;

    padding: 13px;

    border-radius: 10px;

    background: #fffaf1;
    border: 1px solid #f0e3cf;
}

.shipping-progress-text {
    display: flex;
    justify-content: space-between;
    gap: 10px;

    color: #8d6a34;

    font-size: 11px;
    line-height: 1.4;
}

.shipping-progress-text i {
    color: var(--cart-gold);
    font-size: 15px;
}

.shipping-progress-bar {
    height: 6px;
    margin-top: 9px;

    overflow: hidden;

    border-radius: 10px;

    background: #eadfce;
}

.shipping-progress-bar span {
    display: block;
    height: 100%;

    border-radius: inherit;

    background: var(--cart-gold);

    transition: width .3s ease;
}

.free-delivery-note {
    display: flex;
    align-items: center;
    gap: 8px;

    margin: 17px 0;

    padding: 12px;

    border-radius: 9px;

    background: #edf9f1;
    color: #267941;

    font-size: 12px;
    font-weight: 600;
}

.free-delivery-note i {
    color: #159447;
}


/* =========================================================
   TOTAL
========================================================= */

.summary-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    padding: 18px 0 19px;
}

.summary-total span {
    color: #3e4c60;
    font-size: 15px;
    font-weight: 700;
}

.summary-total strong {
    color: var(--cart-gold);
    font-size: 25px;
    font-weight: 800;
}


/* =========================================================
   CHECKOUT
========================================================= */

.checkout-btn {
    min-height: 54px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    border-radius: 10px;

    background: linear-gradient(
        180deg,
        #c88b16,
        #b57806
    );

    color: #fff;

    text-decoration: none;

    font-size: 14px;
    font-weight: 700;

    box-shadow:
        0 8px 18px rgba(183,122,8,.15);
}

.checkout-btn:hover {
    background: linear-gradient(
        180deg,
        #b97c09,
        #9d6500
    );
}


/* =========================================================
   SECURITY
========================================================= */

.checkout-security {
    display: grid;
    gap: 8px;

    margin-top: 15px;
    padding-top: 14px;

    border-top: 1px solid #eee9e1;
}

.checkout-security div {
    display: flex;
    align-items: center;
    gap: 8px;

    color: #7d8795;
    font-size: 11px;
}

.checkout-security i {
    color: var(--cart-gold);
    width: 14px;
    text-align: center;
}


/* =========================================================
   EMPTY CART
========================================================= */

.empty-cart-card {
    padding: 70px 30px;
    text-align: center;
}

.empty-cart-icon {
    width: 80px;
    height: 80px;

    margin: 0 auto 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #f7ead1;
    color: var(--cart-gold);

    font-size: 30px;
}

.empty-cart-card h2 {
    margin: 0 0 9px;

    color: var(--cart-navy);

    font-family: "Playfair Display", Georgia, serif;
    font-size: 30px;
}

.empty-cart-card p {
    max-width: 560px;
    margin: 0 auto 25px;

    color: #7a8491;

    font-size: 13px;
    line-height: 1.7;
}

.shop-books-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 46px;
    padding: 0 20px;

    border-radius: 24px;

    background: var(--cart-gold);
    color: #fff;

    text-decoration: none;

    font-size: 13px;
    font-weight: 700;
}

.shop-books-btn:hover {
    background: var(--cart-gold-dark);
}


/* =========================================================
   RESPONSIVE 1050
========================================================= */

@media (max-width: 1050px) {

    .cart-layout {
        grid-template-columns: minmax(0, 1fr) 320px;
    }

    .cart-item {
        grid-template-columns: 125px minmax(0, 1fr);
    }

    .cart-item-image {
        width: 125px;
        height: 155px;
    }

    .line-total {
        min-width: 80px;
    }

}


/* =========================================================
   RESPONSIVE 850
========================================================= */

@media (max-width: 850px) {

    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary-card {
        position: static;
    }

}


/* =========================================================
   RESPONSIVE 650
========================================================= */

@media (max-width: 650px) {

    .cart-page {
        padding: 22px 0 55px;
    }

    .cart-page-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .clear-cart-btn {
        align-self: stretch;
        justify-content: center;
    }

    .cart-items {
        padding: 0 15px;
    }

    .cart-card-heading {
        padding: 17px 15px;
    }

    .cart-item {
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 14px;
        padding: 17px 0;
    }

    .cart-item-image {
        width: 96px;
        height: 126px;
        border-radius: 9px;
    }

    .cart-item-info h3 {
        font-size: 17px;
    }

    .cart-item-author {
        font-size: 11px;
    }

    .cart-item-bottom {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 10px;
    }

    .item-stock {
        width: 100%;
        margin-right: 0;
    }

    .line-total {
        margin-left: auto;
        min-width: 75px;
    }

    .continue-shopping {
        padding: 15px;
    }

    .cart-summary-card {
        padding: 19px;
    }

}


/* =========================================================
   RESPONSIVE 470
========================================================= */

@media (max-width: 470px) {

    .cart-container {
        width: 94%;
    }

    .cart-item {
        grid-template-columns: 78px minmax(0, 1fr);
        gap: 11px;
    }

    .cart-item-image {
        width: 78px;
        height: 105px;
    }

    .cart-item-info h3 {
        font-size: 15px;
    }

    .cart-item-price {
        margin-top: 10px;
    }

    .current-price {
        font-size: 16px;
    }

    .cart-item-bottom {
        margin-top: 13px;
    }

    .cart-quantity {
        grid-template-columns: 30px 40px 30px;
        height: 38px;
    }

    .line-total {
        width: 100%;
        margin-left: 0;
        text-align: left;
    }

    .secondary-actions {
        grid-template-columns: 1fr;
    }

    .empty-cart-card {
        padding: 55px 20px;
    }

}
