/* =========================================================
   CRUST & FIRE — CART PAGE
   ========================================================= */


/* =========================================================
   VARIABLES
   ========================================================= */

:root {

    --primary: #e63920;
    --primary-dark: #c92d18;

    --accent: #ffb703;

    --dark: #171717;
    --text: #333;
    --text-light: #777;

    --white: #fff;
    --off-white: #fffaf5;
    --cream: #fff5eb;

    --border: rgba(23, 23, 23, 0.09);

    --shadow-sm:
        0 6px 20px rgba(0, 0, 0, 0.06);

    --shadow-md:
        0 15px 40px rgba(0, 0, 0, 0.10);

    --radius-md: 18px;
    --radius-lg: 28px;

    --transition:
        0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


/* =========================================================
   RESET
   ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {

    font-family: "Poppins", sans-serif;

    color: var(--text);

    background: var(--off-white);

    line-height: 1.6;

    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
}

img {
    display: block;
    width: 100%;
}


/* =========================================================
   CONTAINER
   ========================================================= */

.container {

    width: min(92%, 1200px);

    margin: 0 auto;
}


/* =========================================================
   HEADER
   ========================================================= */

.cart-header {

    position: sticky;

    top: 0;

    z-index: 1000;

    background:
        rgba(255, 255, 255, 0.94);

    border-bottom:
        1px solid var(--border);

    backdrop-filter: blur(18px);
}

.cart-header-container {

    width: min(92%, 1200px);

    min-height: 80px;

    margin: 0 auto;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;
}


/* =========================================================
   LOGO
   ========================================================= */

.cart-logo {

    display: inline-flex;

    align-items: center;

    gap: 10px;
}

.cart-logo-icon {

    width: 43px;
    height: 43px;

    display: grid;

    place-items: center;

    color: white;

    background:
        var(--primary);

    border-radius: 13px;

    transform: rotate(-8deg);

    transition:
        transform var(--transition);
}

.cart-logo:hover
.cart-logo-icon {

    transform:
        rotate(0deg)
        scale(1.05);
}

.cart-logo-text {

    color: var(--dark);

    font-size: 1.3rem;

    font-weight: 800;

    letter-spacing: -0.6px;
}

.cart-logo-text span {
    color: var(--primary);
}


/* =========================================================
   BACK TO MENU
   ========================================================= */

.back-menu {

    display: inline-flex;

    align-items: center;

    gap: 9px;

    padding: 10px 17px;

    color: var(--dark);

    background: white;

    border:
        1px solid var(--border);

    border-radius: 100px;

    font-size: 0.75rem;

    font-weight: 600;

    transition:
        color var(--transition),
        background var(--transition),
        transform var(--transition);
}

.back-menu:hover {

    color: white;

    background: var(--primary);

    transform: translateY(-2px);
}


/* =========================================================
   CART HEADING
   ========================================================= */

.cart-heading {

    padding: 75px 0 40px;

    text-align: center;
}

.cart-tag {

    display: inline-flex;

    align-items: center;

    gap: 8px;

    margin-bottom: 12px;

    color: var(--primary);

    font-size: 0.72rem;

    font-weight: 700;

    letter-spacing: 1.2px;

    text-transform: uppercase;
}

.cart-heading h1 {

    color: var(--dark);

    font-size:
        clamp(2.2rem, 5vw, 3.5rem);

    line-height: 1.1;

    margin-bottom: 13px;

    font-weight: 800;
}

.cart-heading h1 span {
    color: var(--primary);
}

.cart-heading p {

    color: var(--text-light);

    font-size: 0.85rem;
}


/* =========================================================
   CART SECTION
   ========================================================= */

.cart-section {

    padding:
        20px 0 80px;
}


/* =========================================================
   CART LAYOUT
   ========================================================= */

.cart-layout {

    display: grid;

    grid-template-columns:
        1fr 390px;

    align-items: start;

    gap: 30px;
}


/* =========================================================
   CART ITEMS AREA
   ========================================================= */

.cart-items-area {

    min-width: 0;
}

.cart-items-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 20px;
}

.cart-items-header h2 {

    color: var(--dark);

    font-size: 1.2rem;

    font-weight: 800;
}

.cart-items-header span {

    display: block;

    margin-top: 3px;

    color: var(--text-light);

    font-size: 0.65rem;
}

.clear-cart-btn {

    display: inline-flex;

    align-items: center;

    gap: 7px;

    color: #a33;

    background: transparent;

    font-size: 0.67rem;

    font-weight: 600;

    transition:
        color var(--transition);
}

.clear-cart-btn:hover {
    color: var(--primary);
}


/* =========================================================
   CART ITEMS
   ========================================================= */

.cart-items {

    display: flex;

    flex-direction: column;

    gap: 15px;
}


/* =========================================================
   CART ITEM
   ========================================================= */

.cart-item {

    display: grid;

    grid-template-columns:
        105px 1fr auto;

    align-items: center;

    gap: 18px;

    padding: 15px;

    background: var(--white);

    border:
        1px solid var(--border);

    border-radius: 20px;

    box-shadow: var(--shadow-sm);

    transition:
        transform var(--transition),
        box-shadow var(--transition);
}

.cart-item:hover {

    transform:
        translateY(-3px);

    box-shadow: var(--shadow-md);
}


/* =========================================================
   CART ITEM IMAGE
   ========================================================= */

.cart-item-image {

    width: 105px;
    height: 105px;

    overflow: hidden;

    background: var(--cream);

    border-radius: 15px;
}

.cart-item-image img {

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 0.5s ease;
}

.cart-item:hover
.cart-item-image img {

    transform: scale(1.07);
}


/* =========================================================
   CART ITEM INFORMATION
   ========================================================= */

.cart-item-info {

    min-width: 0;
}

.cart-item-info h3 {

    margin-bottom: 5px;

    color: var(--dark);

    font-size: 0.95rem;

    font-weight: 800;
}

.cart-item-size {

    display: inline-flex;

    align-items: center;

    gap: 5px;

    margin-bottom: 8px;

    color: var(--primary);

    background: var(--cream);

    padding: 4px 8px;

    border-radius: 7px;

    font-size: 0.58rem;

    font-weight: 700;
}

.cart-item-price {

    display: block;

    color: var(--text-light);

    font-size: 0.65rem;
}


/* =========================================================
   QUANTITY
   ========================================================= */

.quantity-control {

    display: inline-flex;

    align-items: center;

    gap: 0;

    margin-top: 12px;

    border:
        1px solid var(--border);

    border-radius: 9px;

    overflow: hidden;
}

.quantity-btn {

    width: 31px;
    height: 31px;

    display: grid;

    place-items: center;

    color: var(--dark);

    background: #fafafa;

    font-size: 0.65rem;

    transition:
        color var(--transition),
        background var(--transition);
}

.quantity-btn:hover {

    color: white;

    background: var(--primary);
}

.quantity-value {

    min-width: 32px;

    text-align: center;

    color: var(--dark);

    font-size: 0.67rem;

    font-weight: 700;
}


/* =========================================================
   CART ITEM RIGHT
   ========================================================= */

.cart-item-right {

    display: flex;

    flex-direction: column;

    align-items: flex-end;

    gap: 15px;
}

.cart-item-total {

    color: var(--dark);

    font-size: 0.95rem;

    font-weight: 800;

    white-space: nowrap;
}

.remove-item {

    display: inline-flex;

    align-items: center;

    gap: 5px;

    color: #999;

    background: transparent;

    font-size: 0.6rem;

    transition:
        color var(--transition);
}

.remove-item:hover {

    color: var(--primary);
}


/* =========================================================
   ORDER SUMMARY
   ========================================================= */

.order-summary {

    position: sticky;

    top: 105px;

    padding: 28px;

    background: var(--white);

    border:
        1px solid var(--border);

    border-radius: 24px;

    box-shadow: var(--shadow-md);
}

.summary-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 25px;
}

.summary-header h2 {

    color: var(--dark);

    font-size: 1.05rem;

    font-weight: 800;
}

.summary-header > i {

    color: var(--primary);

    font-size: 1.1rem;
}


/* =========================================================
   SUMMARY LINES
   ========================================================= */

.summary-lines {

    display: flex;

    flex-direction: column;

    gap: 15px;
}

.summary-line {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;
}

.summary-line span {

    color: var(--text-light);

    font-size: 0.68rem;
}

.summary-line strong {

    color: var(--dark);

    font-size: 0.7rem;
}


/* =========================================================
   DIVIDER
   ========================================================= */

.summary-divider {

    height: 1px;

    margin: 22px 0;

    background:
        var(--border);
}


/* =========================================================
   TOTAL
   ========================================================= */

.summary-total {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 22px;
}

.summary-total span {

    color: var(--dark);

    font-size: 0.82rem;

    font-weight: 700;
}

.summary-total strong {

    color: var(--primary);

    font-size: 1.35rem;

    font-weight: 800;
}


/* =========================================================
   CHECKOUT BUTTON
   ========================================================= */

.checkout-btn {

    min-height: 54px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 12px;

    width: 100%;

    padding: 0 18px;

    color: white;

    background: var(--primary);

    border-radius: 14px;

    font-size: 0.75rem;

    font-weight: 700;

    box-shadow:
        0 12px 25px
        rgba(230, 57, 32, 0.23);

    transition:
        transform var(--transition),
        background var(--transition),
        box-shadow var(--transition);
}

.checkout-btn:hover {

    background:
        var(--primary-dark);

    transform:
        translateY(-3px);

    box-shadow:
        0 18px 35px
        rgba(230, 57, 32, 0.30);
}

.checkout-btn i {

    transition:
        transform var(--transition);
}

.checkout-btn:hover i {

    transform:
        translateX(4px);
}


/* =========================================================
   SECURE NOTE
   ========================================================= */

.secure-note {

    display: flex;

    align-items: flex-start;

    gap: 8px;

    margin-top: 17px;

    color: var(--text-light);

    font-size: 0.56rem;

    line-height: 1.5;
}

.secure-note i {

    color: #329d54;

    margin-top: 2px;
}


/* =========================================================
   EMPTY CART
   ========================================================= */

.empty-cart {

    display: none;

    max-width: 550px;

    margin: 0 auto;

    padding: 65px 30px;

    text-align: center;

    background: white;

    border:
        1px solid var(--border);

    border-radius: 25px;

    box-shadow: var(--shadow-sm);
}

.empty-cart.show {
    display: block;
}

.empty-cart-icon {

    width: 80px;
    height: 80px;

    display: grid;

    place-items: center;

    margin: 0 auto 20px;

    color: var(--primary);

    background: var(--cream);

    border-radius: 25px;

    font-size: 1.7rem;
}

.empty-cart h2 {

    margin-bottom: 8px;

    color: var(--dark);

    font-size: 1.4rem;
}

.empty-cart p {

    max-width: 400px;

    margin: 0 auto 25px;

    color: var(--text-light);

    font-size: 0.72rem;
}


/* =========================================================
   BUTTON
   ========================================================= */

.btn {

    min-height: 48px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 9px;

    padding: 0 22px;

    border-radius: 100px;

    font-size: 0.7rem;

    font-weight: 700;

    transition:
        transform var(--transition),
        background var(--transition),
        box-shadow var(--transition);
}

.btn-primary {

    color: white;

    background: var(--primary);

    box-shadow:
        0 10px 25px
        rgba(230, 57, 32, 0.20);
}

.btn-primary:hover {

    background:
        var(--primary-dark);

    transform:
        translateY(-3px);
}


/* =========================================================
   CART BENEFITS
   ========================================================= */

.cart-benefits {

    padding: 30px 0 80px;
}

.benefits-grid {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 18px;
}

.benefit {

    display: flex;

    align-items: center;

    gap: 13px;

    padding: 20px;

    background: white;

    border:
        1px solid var(--border);

    border-radius: 17px;
}

.benefit-icon {

    width: 42px;
    height: 42px;

    flex-shrink: 0;

    display: grid;

    place-items: center;

    color: var(--primary);

    background: var(--cream);

    border-radius: 12px;
}

.benefit div:last-child {

    display: flex;

    flex-direction: column;
}

.benefit strong {

    color: var(--dark);

    font-size: 0.7rem;
}

.benefit span {

    color: var(--text-light);

    font-size: 0.55rem;
}


/* =========================================================
   FOOTER
   ========================================================= */

.cart-footer {

    padding: 25px 0;

    background: #171717;
}

.cart-footer .container {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;
}

.cart-footer p,
.cart-footer a {

    color:
        rgba(255, 255, 255, 0.45);

    font-size: 0.6rem;
}

.cart-footer a:hover {
    color: white;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 950px) {

    .cart-layout {

        grid-template-columns: 1fr;

    }

    .order-summary {

        position: static;

    }

    .benefits-grid {

        grid-template-columns:
            1fr;

    }

}


@media (max-width: 600px) {

    .cart-header-container {

        min-height: 70px;

    }

    .cart-logo-text {

        font-size: 1.1rem;

    }

    .cart-logo-icon {

        width: 39px;
        height: 39px;

    }

    .back-menu span {

        display: none;

    }

    .back-menu {

        width: 40px;
        height: 40px;

        padding: 0;

        justify-content: center;

    }

    .cart-heading {

        padding:
            55px 0 30px;

    }

    .cart-heading h1 {

        font-size: 2.2rem;

    }

    .cart-item {

        grid-template-columns:
            80px 1fr;

        gap: 13px;

    }

    .cart-item-image {

        width: 80px;
        height: 80px;

    }

    .cart-item-right {

        grid-column: 2;

        align-items: flex-start;

        flex-direction: row;

        justify-content: space-between;

    }

    .cart-items-header {

        align-items: flex-start;

    }

    .clear-cart-btn {

        font-size: 0;

    }

    .clear-cart-btn i {

        font-size: 0.75rem;

    }

    .order-summary {

        padding: 22px;

    }

    .cart-footer .container {

        flex-direction: column;

        justify-content: center;

        text-align: center;

    }

}