.cart {
    position: sticky;
    width: 500px;
    top: 20px;
    background-color: white;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    margin-left: 15px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    height: 100%;  
}

.cart h1 {
    font-size: 28px;
    padding: 15px;
    display: flex;
    justify-content: center;
}

.add-to-cart {
    background-color: #ff9f00;
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
}

.add-to-cart:hover {
    background-color: #e68a00;
}

.toggle-container {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    padding-left: 20px;
}
  
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}
  
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
  
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}
  
.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
  
input:checked + .slider {
    background-color: #ff9f00;
}
  
input:checked + .slider:before {
    transform: translateX(26px);
}
  
#toggle-text {
    display: inline-block;
    margin-left: 10px;
    font-size: 16px;
    vertical-align: middle;
}

.cart-item {
    display: flex;
    justify-content: end;
    flex-direction: column;
    padding-bottom: 12px;
    border-bottom: 1px solid #ddd; 
}

.cart-item .price {
    text-align: end;
    min-width: 50px; 
}

.cart-item p {
    padding-bottom: 10px;
}

.cartstyle {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

#cart-items {
    flex-grow: 1;  
    max-height: 300px;  
    overflow-y: auto;   
    margin-bottom: 20px;
    padding-left: 20px;
    padding-right:20px;
}

#cart-totals {
    background-color: white;
    padding: 10px 0;
    border-top: 2px solid #ddd; 
    position: relative;
}

.space {
    display: flex;
    justify-content: space-between;
    padding: 5px 20px;
}

.remove-item {
    color: #ff9f00;
    font-weight: bold;
    cursor: pointer;
    font-size: 18px;
    transition: color 0.2s ease-in-out;
    padding-left: 10px;
}

.remove-item:hover {
    color: red;
}

.quantity-btn {
    background-color: #ff9f00;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
}

.quantity-btn:hover {
    background-color: #e68a00;
}

.basketbtn {
    background-color: #ff9f00;
    cursor: pointer;
    border: none;
    max-width: 1440px;
    width: 100%;
    font-size: 20px;
    height: 80px;
}

.basketbtn:hover {
    background-color: #e68a00;
}

.hidden {
    display: none;
}

#basket-text {
    color: white;
}

.fa-shopping-cart {
    color: black;
}

#cart-item-count {
    background-color: #e74c3c;
    color: white;
    padding: 3px 6px;
    border-radius: 50%;
    font-size: 10px;
}

#order-now {
    padding: 10px 20px;
    background-color: #e74c3c;
    color: white;
    border: none;
    font-size: 16px;
    cursor: pointer;
    display: block;
}

#order-now:hover {
    background-color: #c0392b;
}

@media (max-width: 900px) {

    .d_none {
        display: none;
    }

    .cart {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgb(255 255 255);
        overflow-y: auto;
        margin-left: 0;
    }
    
    .hidden {
        display: inline;
        position: sticky;
        bottom: 0;
    }
}

@media (max-width: 600px) {
    
    .cart {
        width: 100%; 
        margin-left: 0; 
        padding: 15px;
    }

    .cart h1 {
        font-size: 24px; 
        text-align: center; 
    }


    .add-to-cart {
        padding: 12px; 
        font-size: 16px; 
        width: 100%;
    }

    .cart-item {
        padding: 15px 8px; 
        font-size: 14px;
    }

    .quantity-btn {
        padding: 6px 12px;
        font-size: 16px;
    }

    #cart-totals .space p,
    #cart-totals h3 {
        font-size: 16px; 
    }

    #toggle-text {
        font-size: 14px; 
    }
}

@media (max-width: 450px) {
   
    .cart h1 {
        font-size: 20px;
    }

    #space p {
        font-size: 13px;
    }
}