*{
    font-family: "Poppins", sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    /* FIX: Changed align-items to flex-start and min-height to prevent cutting off the top */
    align-items: flex-start; 
    justify-content: space-between;
    width: 100vw;
    min-height: 100vh;
    background-color: #fff;
}

.left {
    width: 60%; /* Adjusted slightly for better spacing at 100% zoom */
    padding: 1.7rem;
}

.right {
    width: 40%; /* Adjusted for better spacing */
    padding: 5.5rem 1.7rem;
    background-color: rgb(44, 44, 44);
    color: #fff;
    /* FIX: ensures the dark background stretches to the bottom of the page */
    align-self: stretch; 
    min-height: 100vh;
}

.left .title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
}

/* shopDeets */

.shopDet .subTitle,
.shopDet .subTitle .sideTitle,
.shopDet .productsNdDeets .card,
.shopDet .productsNdDeets .card .otherDeet {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
}

.shopDet .productsNdDeets {
    /* Kept your height but changed to vh for better screen scaling */
    height: 60vh; 
    overflow-y: auto;
}

.shopDet .subTitle .sideTitle {
    width: 24rem;
    font-size: 1.3em;
}

.shopDet .productsNdDeets .card .imgNdInfo {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 40%;
}

.shopDet .productsNdDeets .card .imgNdInfo img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.shopDet .productsNdDeets .card .imgNdInfo .text p:nth-child(1) {
    font-weight: 700;
    font-size: 1.7em;
}

.shopDet .productsNdDeets .card .otherDeet {
    width: 25.5rem;
}

.shopDet .productsNdDeets .card .otherDeet .quantity {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.shopDet .productsNdDeets .card .otherDeet .quantity input {
    width: 2.5rem;
    text-align: center;
}

.shopDet .productsNdDeets .card .otherDeet .quantity button {
    padding: 7px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 24px;
}

.remove {
    cursor: pointer;
}

.shopDet .productsNdDeets .card .otherDeet .remove,
.shopDet .productsNdDeets .card .otherDeet .total {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.shopDet .productsNdDeets .card .otherDeet .price {
    transform: translateX(-5px);
}

.shopDet .productsNdDeets .card .otherDeet .remove img {
    width: 20px;
}

/* back btn */

.goBack {
    padding: 3.5rem 1rem;
    font-size: 1.5em;
}

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

/* right section components */

.right h1 {
    padding: 20px;
}

.right .itemdeetPrice,
.right .promoCode .text,
.right .totalCost {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
}

.right #shipSelect {
    width: calc(100% - 40px);
    margin: 20px;
    padding: 1rem;
    outline: none;
    border: none;
    color: black;
    cursor: pointer;
}

.right .promoCode .text input {
    width: 70%;
    padding: 1rem;
}

.right .promoCode .text button {
    width: 25%;
    padding: 1rem;
    font-weight: 900;
    border-radius: 7px;
    outline: none;
    border: none;
    cursor: pointer;
}

.right .totalCost p:nth-child(1) {
    font-size: 1.5em;
}

.right .totalCost p:nth-child(2) {
    font-weight: 700;
    font-size: 1.2em;
}

/* FIX: CHECKOUT BUTTON BACKGROUND */
.checkout {
    display: block; /* Ensures background stretches */
    width: calc(100% - 40px); /* Stretches to container width minus margins */
    margin: 20px;
    padding: 20px;
    font-weight: bolder;
    border-radius: 7px;
    outline: none;
    border: none;
    cursor: pointer;
    background-color: #fff; /* Original implied color, or set to your primary */
    color: #000;
    text-align: center;
}

/* btn hovers */
button {
    transition: .3s ease-in-out;
}

button:hover {
    background-color: #535353c4;
    color: #fff;
}

.shopDet .productsNdDeets .card .otherDeet .quantity button:hover {
    color: #1701be;
}

/* MEDIA QUERIES */

@media screen and (max-width:1280px) {
    .right .promoCode .text input {
        width: 60%;
    }
    .left { width: 55%; }
    .right { width: 45%; }
}

@media screen and (max-width:1024px) {
    body {
        flex-direction: column;
        height: auto;
    }
    .left, .right {
        width: 100%;
        padding: 1.5rem;
    }
    .right {
        height: auto;
        min-height: auto;
    }
}

@media screen and (max-width:600px) {
    .left { padding: 1rem; }

    .shopDet .subTitle .sideTitle {
        display: none; /* Hide headers for space on mobile */
    }

    .shopDet .productsNdDeets .card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .shopDet .productsNdDeets .card .imgNdInfo {
        width: 100%;
    }

    .shopDet .productsNdDeets .card .otherDeet {
        width: 100%;
        padding: 5px;
        justify-content: space-between;
    }

    .right .promoCode .text {
        flex-direction: column;
        align-items: stretch;
    }
    
    .right .promoCode .text input,
    .right .promoCode .text button {
        width: 100%;
        margin-top: 10px;
    }
}