* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --background: #f6f6f6;
    --surface: #ffffff;
    --text: #111111;
    --muted: #737373;
    --border: #e5e5e5;
}

body {
    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background: var(--background);

    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}


/* HEADER */

.cart-header {
    background: white;

    border-bottom: 1px solid var(--border);
}

.cart-nav {
    width: min(
        1200px,
        calc(100% - 40px)
    );

    min-height: 72px;

    margin: auto;

    display: flex;

    justify-content: space-between;

    align-items: center;
}

.logo {
    font-size: 25px;
    font-weight: 800;
}

.logo span {
    font-weight: 400;
}

.continue-shopping {
    font-size: 14px;
    font-weight: 600;
}


/* PAGE */

.cart-page {
    width: min(
        1200px,
        calc(100% - 40px)
    );

    margin: 50px auto 80px;
}

.cart-title {
    display: flex;

    justify-content: space-between;

    align-items: end;

    margin-bottom: 30px;
}

.eyebrow {
    color: #777;

    font-size: 11px;

    letter-spacing: 2px;

    margin-bottom: 7px;
}

.cart-title h1 {
    font-size: 38px;
}

#cartCount {
    color: var(--muted);

    font-size: 14px;
}


/* CART LAYOUT */

.cart-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        360px;

    gap: 25px;

    align-items: start;
}


/* CART ITEMS */

.cart-items-list {
    display: flex;

    flex-direction: column;

    gap: 12px;
}

.cart-item {
    background: white;

    border: 1px solid var(--border);

    border-radius: 10px;

    padding: 18px;

    display: grid;

    grid-template-columns:
        110px
        1fr
        auto;

    gap: 20px;

    align-items: center;
}

.cart-item-image {
    width: 110px;
    height: 110px;

    object-fit: cover;

    border-radius: 8px;

    background: #f4f4f4;
}

.cart-item-info {
    min-width: 0;
}

.cart-item-category {
    color: #888;

    text-transform: uppercase;

    font-size: 10px;

    letter-spacing: 1px;

    margin-bottom: 7px;
}

.cart-item-name {
    font-size: 17px;

    font-weight: 700;

    margin-bottom: 7px;
}

.cart-item-price {
    font-size: 14px;

    color: #555;

    margin-bottom: 14px;
}

.cart-item-controls {
    display: flex;

    align-items: center;

    gap: 12px;
}

.quantity {
    display: flex;

    align-items: center;

    border: 1px solid #ddd;

    border-radius: 6px;

    overflow: hidden;
}

.quantity button {
    width: 34px;
    height: 34px;

    border: none;

    background: white;

    cursor: pointer;

    font-size: 18px;
}

.quantity span {
    width: 35px;

    text-align: center;

    font-size: 14px;
}

.remove-button {
    border: none;

    background: none;

    color: #b3261e;

    cursor: pointer;

    font-size: 12px;

    font-weight: 600;
}

.cart-item-total {
    font-size: 18px;

    font-weight: 800;

    white-space: nowrap;
}


/* SUMMARY */

.cart-summary {
    background: white;

    border: 1px solid var(--border);

    border-radius: 10px;

    padding: 25px;

    position: sticky;

    top: 95px;
}

.cart-summary h2 {
    font-size: 20px;

    margin-bottom: 25px;
}

.summary-row {
    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 17px;

    font-size: 14px;
}

.summary-row span {
    color: var(--muted);
}

.summary-row strong {
    font-weight: 700;
}

.summary-divider {
    height: 1px;

    background: var(--border);

    margin: 20px 0;
}

.summary-total {
    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 25px;

    font-size: 17px;
}

.summary-total strong {
    font-size: 23px;
}

.checkout-button {
    width: 100%;

    min-height: 50px;

    border: none;

    background: #111;

    color: white;

    border-radius: 7px;

    font-size: 14px;

    font-weight: 700;

    cursor: pointer;
}

.checkout-button:hover {
    background: #292929;
}

.secure-note {
    text-align: center;

    color: #888;

    font-size: 11px;

    margin-top: 14px;
}


/* EMPTY */

.empty-cart {
    background: white;

    border: 1px solid var(--border);

    border-radius: 12px;

    text-align: center;

    padding: 80px 20px;
}

.empty-icon {
    font-size: 50px;

    margin-bottom: 20px;
}

.empty-cart h2 {
    font-size: 25px;

    margin-bottom: 10px;
}

.empty-cart p {
    color: var(--muted);

    margin-bottom: 25px;
}

.empty-cart a {
    display: inline-block;

    background: #111;

    color: white;

    padding: 12px 22px;

    border-radius: 6px;

    font-weight: 700;

    font-size: 14px;
}

.hidden {
    display: none !important;
}


/* TABLET */

@media (max-width: 900px) {

    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }

}


/* MOBILE */

@media (max-width: 600px) {

    .cart-nav {
        width: min(
            100% - 24px,
            1200px
        );
    }

    .cart-page {
        width: min(
            100% - 24px,
            1200px
        );

        margin-top: 25px;
    }

    .cart-title {
        align-items: flex-start;

        flex-direction: column;

        gap: 8px;
    }

    .cart-title h1 {
        font-size: 30px;
    }

    .cart-item {
        grid-template-columns:
            80px 1fr;

        gap: 13px;

        padding: 13px;
    }

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

    .cart-item-name {
        font-size: 14px;
    }

    .cart-item-total {
        grid-column: 2;

        font-size: 16px;
    }

    .cart-item-controls {
        flex-wrap: wrap;
    }

}