/* ================================================================== 
STRUCTURE & RESPONSIBILITIES
==================================================================== */
/*
{- cart page start - cart page end
  - cart page titles
  - cart page container
    - cart page items
    - cart page checkout
  - cart page continue shopping
  - cart page breakpoint
}
*/
/* ==================================================================== */



/* cart page start */
.cart-section {
    margin-top: 1rem;
}

.cart-section-flex {
    gap: 5rem;
}

/* cart page titles start */
.cart-page-titles {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.cart-title {
    font-size: 2.3rem;
    font-weight: 500;
    border-bottom: 2px solid black;
    padding-bottom: 3rem;
}

.cart-subtitle {
    font-size: 1.4rem;
    color: #000000;
}

/* cart page titles end */

/* cart page container start */
.cart-page-container {
    display: flex;
    justify-content: space-between;
    gap: 3rem;
    width: 100%;
    padding-top: 2rem;
}

/* cart page items start */
.cart-page-items {
    flex: 4;
    display: flex;
    flex-direction: column;
}

/* cart page items rows */
.cart-page-items-header,
.cart-page-item {
    display: grid;
    grid-template-columns: 3fr 1.3fr 1fr 1fr;
    align-items: center;
    border-bottom: 1px solid #A39999;
    padding: 2.5rem 0;
}

/* cart page header start */
.cart-page-items-header {
    padding: 1rem 0;
    padding-top: 0;
}

.cart-page-items-header-item {
    font-size: 1.5rem;
    font-weight: 600;
    white-space: nowrap;
}

.cart-page-items-header-item-btn {
    background-color: transparent;
    font-size: 1.6rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease-in-out;
}

@media(pointer: fine) {
    .cart-page-items-header-item-btn:hover {
        color: red;
    }
}

@media(pointer: coarse) {
    .cart-page-items-header-item-btn:active {
        color: red;
    }
}

.cart-page-items-header-item-btn span {
    display: flex;
    align-items: center;
    justify-content: center
}

/* cart page header end */

/* cart item start */
.cart-page-item-product {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cart-page-item-image {
    width: 12rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #F5F7FA;
    border-radius: 0.7rem;
}

.cart-page-item-image img {
    width: 100%;
    height: auto;
    border-radius: 0.7rem;
}

.cart-page-item-name-price {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-right: clamp(1rem, calc(20 / 1200 * 100vw), 2rem);
}

.cart-page-item-name {
    font-size: 1.6rem;
    font-weight: 600;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
}

.cart-page-item-price {
    font-size: 1.5rem;
    font-weight: 500;
}

.cart-page-item-price-text {
    display: none;
}

.cart-item-total {
    font-size: 1.6rem;
    font-weight: 500;
}

.cart-item-total-small-device {
    display: none;
}

.cart-item-total-text {
    display: none;
}

.cart-item-remove {
    display: flex;
    justify-content: flex-end;
    padding-right: 1.5rem;
}

.cart-item-remove-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    transition: all 0.3s ease-in-out;
}

@media(pointer: fine) {
    .cart-item-remove-btn:hover {
        color: red;
    }
}

@media(pointer: coarse) {
    .cart-item-remove-btn:active {
        color: red;
    }
}

/* cart quantity start */
.product-count-small-device {
    display: none;
}

.product-counter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: max-content;
    height: 4rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    overflow: hidden;
}

.product-counter button {
    background-color: transparent;
    border: none;
    padding: 0rem 1.3rem;
    height: 100%;
    font-size: 1.4rem;
}

@media (pointer: fine) {
    .product-counter button:hover {
        background-color: #eff0f5;
    }
}

@media (pointer: coarse) {
    .product-counter button:active {
        background-color: #eff0f5;
    }
}

.product-counter .product-count-input {
    width: 3rem;
    height: 100%;
    text-align: center;
    border: none;
    outline: none;
    font-size: 1.2rem;
}

.product-count-input::-webkit-outer-spin-button,
.product-count-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Hide arrows in Firefox */
.product-count-input[type="number"] {
    -moz-appearance: textfield;
}

/* cart quantity end */
/* cart item end */

/* cart page items end */

/* cart page checkout start */
.cart-page-checkout {
    flex: 1.4;
    background-color: rgb(255, 255, 255);
    border: 1px solid #dfdfdf;
    height: fit-content;
    position: sticky;
    top: 10rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    border-radius: 1rem;
}

.cart-page-checkout-title {
    font-size: 1.7rem;
    font-weight: 600;   
    border-bottom: 1px solid #A39999;
    padding-bottom: 2rem;
}

.cart-page-checkout-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.cart-page-checkout-subtotal,
.cart-page-checkout-delivery,
.cart-page-checkout-total {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 600;
}

.cart-page-checkout-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-page-checkout-btn {
    background-color: transparent;
    border: 1px solid black;
    font-size: 1.5rem;
    color: black;
    width: 100%;
    height: 4rem;
    transition: all 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media(pointer: fine) {
    .cart-page-checkout-btn:hover {
        background-color: black;
        color: white;
    }
}

@media(pointer: coarse) {
    .cart-page-checkout-btn:active {
        background-color: black;
        color: white;
    }
}

.cart-page-checkout-border-line {
    border-bottom: 1px solid #A39999;
    width: 100%;
}

/* cart page checkout end */

/* cart page container end */

/* cart page continue shopping start */
.cart-page-continue-shopping-button-con {
    width: 100%;
    display: flex;
    align-items: center;
}

.continue-shopping-btn {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: black;
    font-size: 1.4rem;
}

.continue-shopping-btn span {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* cart page continue shopping end */

/* cart page breakpoint start */
@media(max-width: 1000px) {
    .cart-page-container {
        flex-direction: column;
    }
}

@media(max-width: 768px) {
    .cart-page-item {
        display: flex;
        justify-content: space-between;
        position: relative;
    }

    .cart-page-items-header {
        display: flex;
        justify-content: space-between;
    }

    .cart-page-items-header-item:nth-child(0),
    .cart-page-items-header-item:nth-child(2),
    .cart-page-items-header-item:nth-child(3) {
        display: none;
    }

    .cart-page-item-product {
        gap: 1rem;
    }

    .cart-page-item-image {
        width: 15rem;
    }

    .cart-page-item-name-price {
        gap: 1rem;
        padding: 0;
    }
    
    .cart-page-item-name {
        font-size: 1.5rem;
    }

    .cart-item-total,
    .product-count {
        display: none;
    }

    .cart-page-item-price,
    .cart-page-item-price-text,
    .product-count-small-device,
    .cart-item-total-small-device,
    .cart-item-total-text {
        display: flex;
        gap: 0.7rem;
        align-items: center;
        font-weight: 400;
        font-size: 1.4rem;
    }

    .product-counter {
        height: 3rem;
    }

    .product-counter .product-count-input {
        width: 1rem;
    }

    .product-counter button {
        padding: 0 1rem;
    }

    .cart-item-remove {
        padding: 0;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }
}

@media(max-width: 450px) {
    .cart-page-item-image {
        width: 10rem;
    }

    .cart-item-total-small-device {
        display: none;
    }
}

/* cart page breakpoint end */
/* cart page end */










