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

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

    margin: 0 auto;

    padding:
        22px
        16px
        140px;
}


/* =========================================================
   HEADER
   ========================================================= */

.cart-header {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 18px;

    margin-bottom: 22px;
}


.cart-header h1 {
    margin: 0;

    color: #241915;

    font-size: 34px;
    font-weight: 900;
    line-height: 1.1;
}


.cart-header p {
    margin:
        6px
        0
        0;

    color: #7b6d64;

    font-size: 15px;
    font-weight: 700;
}


.cart-back {
    display: inline-flex;

    align-items: center;

    color: #7a1f17;

    text-decoration: none;

    font-size: 14px;
    font-weight: 900;

    background: #ffffff;

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

    padding:
        10px
        14px;

    transition:
        background-color .15s ease,
        border-color .15s ease,
        transform .15s ease;
}


.cart-back:hover {
    color: #7a1f17;

    background: #faf7f2;

    border-color: #d9cbbb;
}


.cart-back:active {
    transform: scale(.98);
}


/* =========================================================
   LAYOUT
   ========================================================= */

.cart-layout {
    display: grid;

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

    gap: 24px;
}


.cart-list {
    display: flex;

    flex-direction: column;

    gap: 14px;

    min-width: 0;
}


/* =========================================================
   CART ITEM
   ========================================================= */

.cart-item {
    display: grid;

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

    gap: 16px;

    padding: 14px;

    background: #ffffff;

    border: 1px solid #e4dace;
    border-radius: 24px;

    box-shadow:
        0 10px 26px
        rgba(55, 33, 25, .07);
}


/* =========================================================
   PHOTO
   ========================================================= */

.cart-photo {
    width: 138px;
    height: 118px;

    overflow: hidden;

    border-radius: 18px;

    background:
        radial-gradient(
            circle at 30% 25%,
            rgba(217, 164, 65, .95),
            transparent 28%
        ),
        linear-gradient(
            135deg,
            #8c2c22,
            #3b1712
        );
}


.cart-photo img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}


.cart-photo-placeholder {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    color: #ffffff;

    font-size: 26px;
    font-weight: 900;
}


/* =========================================================
   INFO
   ========================================================= */

.cart-info {
    display: flex;

    flex-direction: column;

    min-width: 0;
}


.cart-item-top {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 14px;
}


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


/* =========================================================
   NAME
   ========================================================= */

.cart-name {
    color: #241915;

    font-size: 20px;
    font-weight: 900;
    line-height: 1.25;
}


/* =========================================================
   VARIANT / WEIGHT
   ========================================================= */

.cart-weight {
    margin-top: 4px;

    color: #7b6d64;

    font-size: 13px;
    font-weight: 800;
}


.cart-variant {
    display: inline-flex;

    align-items: center;

    width: fit-content;

    margin-top: 7px;

    padding:
        5px
        9px;

    color: #7a1f17;

    background: #fff5f2;

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

    font-size: 12px;
    font-weight: 900;
}


/* =========================================================
   UNIT PRICE
   ========================================================= */

.cart-unit-price {
    margin-top: 6px;

    color: #6b5f58;

    font-size: 13px;
    font-weight: 800;
}


/* =========================================================
   LINE TOTAL
   ========================================================= */

.cart-line-price {
    flex-shrink: 0;

    white-space: nowrap;

    color: #7a1f17;

    font-size: 20px;
    font-weight: 900;
}


/* =========================================================
   MODIFIERS
   ========================================================= */

.cart-modifiers {
    margin-top: 6px;

    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}


.cart-modifiers-remove {
    color: #991b1b;
}


.cart-modifiers-add {
    color: #166534;
}


/* =========================================================
   COMBO COMPOSITION
   ========================================================= */

.cart-combo-composition {
    margin-top: 7px;

    color: #6b5f58;

    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}


/* =========================================================
   ACTIONS
   ========================================================= */

.cart-actions {
    display: flex;

    align-items: center;
    flex-wrap: wrap;

    gap: 14px;

    margin-top: auto;

    padding-top: 14px;
}


/* =========================================================
   QUANTITY
   ========================================================= */

.qty-form {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    padding: 6px;

    background: #f8f5ef;

    border: 1px solid #ebe4d8;
    border-radius: 16px;
}


.qty-btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    padding: 0;

    border: none;
    border-radius: 12px;

    background: #ffffff;

    color: #241915;

    font-size: 22px;
    font-weight: 900;
    line-height: 1;

    cursor: pointer;

    transition:
        background-color .15s ease,
        transform .15s ease;
}


.qty-btn:hover {
    background: #f1ece5;
}


.qty-btn:active {
    transform: scale(.94);
}


.qty-btn:disabled {
    cursor: not-allowed;

    opacity: .45;
}


.qty {
    width: 54px;

    padding: 0;

    border: none;

    background: transparent;

    color: #241915;

    text-align: center;

    font-size: 16px;
    font-weight: 900;

    outline: none;

    appearance: textfield;
}


.qty::-webkit-inner-spin-button,
.qty::-webkit-outer-spin-button {
    margin: 0;

    -webkit-appearance: none;
}


/* =========================================================
   REMOVE
   ========================================================= */

.cart-remove {
    color: #b42318;

    text-decoration: none;

    font-size: 13px;
    font-weight: 900;
}


.cart-remove:hover {
    color: #8f1c14;

    text-decoration: underline;
}


/* =========================================================
   STOCK
   ========================================================= */

.stock-hint {
    margin-top: 12px;

    padding:
        9px
        12px;

    color: #166534;

    background: #dcfce7;

    border-radius: 14px;

    font-size: 13px;
    font-weight: 900;
}


.stock-hint-warning {
    color: #92400e;

    background: #fffbeb;
}


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

.cart-summary {
    align-self: start;
}


.cart-summary-box {
    position: sticky;

    top: 92px;

    padding: 18px;

    background: #ffffff;

    border: 1px solid #e4dace;
    border-radius: 24px;

    box-shadow:
        0 12px 32px
        rgba(55, 33, 25, .09);
}


.cart-summary-title {
    margin-bottom: 16px;

    color: #241915;

    font-size: 22px;
    font-weight: 900;
}


.cart-summary-row {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 16px;

    margin-bottom: 16px;

    color: #241915;

    font-size: 18px;
    font-weight: 900;
}


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

.checkout {
    display: block;

    width: 100%;

    padding:
        15px
        16px;

    border: none;
    border-radius: 18px;

    background: #1e1e1e;

    color: #ffffff;

    text-align: center;
    text-decoration: none;

    font-size: 15px;
    font-weight: 900;

    transition:
        background-color .15s ease,
        transform .15s ease;
}


.checkout:hover {
    color: #ffffff;

    background: #000000;
}


.checkout:active {
    transform: scale(.99);
}


.continue-link {
    display: block;

    margin-top: 12px;

    color: #7a1f17;

    text-align: center;
    text-decoration: none;

    font-size: 14px;
    font-weight: 900;
}


.continue-link:hover {
    color: #5f1812;

    text-decoration: underline;
}


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

.cart-empty {
    max-width: 520px;

    margin:
        70px
        auto;

    padding:
        34px
        22px;

    background: #ffffff;

    border: 1px solid #e4dace;
    border-radius: 28px;

    text-align: center;

    box-shadow:
        0 12px 34px
        rgba(55, 33, 25, .08);
}


.cart-empty-icon {
    margin-bottom: 10px;

    font-size: 48px;
}


.cart-empty h2 {
    margin: 0;

    color: #241915;

    font-size: 28px;
    font-weight: 900;
}


.cart-empty p {
    margin:
        8px
        0
        20px;

    color: #7b6d64;

    font-size: 15px;
    font-weight: 700;
}


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

@media (max-width: 860px) {

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

    .cart-summary-box {
        position: static;
    }

    .cart-header {
        display: block;
    }

    .cart-back {
        margin-bottom: 14px;
    }

}


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

@media (max-width: 560px) {

    .cart-page {
        padding:
            16px
            12px
            130px;
    }


    .cart-header h1 {
        font-size: 28px;
    }


    .cart-item {
        grid-template-columns:
            96px
            minmax(0, 1fr);

        gap: 12px;

        padding: 12px;

        border-radius: 20px;
    }


    .cart-photo {
        width: 96px;
        height: 96px;

        border-radius: 16px;
    }


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


    .cart-line-price {
        font-size: 17px;
    }


    .cart-actions {
        gap: 10px;
    }


    .qty-btn {
        width: 32px;
        height: 32px;
    }


    .qty {
        width: 42px;
    }


    .cart-item-top {
        gap: 8px;
    }


    .cart-unit-price {
        font-size: 12px;
    }


    .cart-variant {
        padding:
            4px
            8px;

        font-size: 11px;
    }


    .stock-hint {
        font-size: 12px;
    }

}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 390px) {

    .cart-item {
        grid-template-columns:
            82px
            minmax(0, 1fr);
    }


    .cart-photo {
        width: 82px;
        height: 82px;
    }


    .cart-name {
        font-size: 16px;
    }


    .cart-line-price {
        font-size: 15px;
    }


    .qty-form {
        gap: 5px;

        padding: 5px;
    }


    .qty-btn {
        width: 30px;
        height: 30px;
    }


    .qty {
        width: 36px;
    }

}