.cart-drawer-close {
    font-size: 24px;
    cursor: pointer;
}

.cart-drawer-close:hover {
    
    color: black;
    
   

}


.cart-drawer-title {
    font-size: 20px;
    font-weight: bolder;
    color: #333;
}


/* .cart-drawer {
    position: fixed;
    right: -100%;
    top: 0;
    width: 350px;
    height: 100%;
    background-color: lightgreen;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease-in-out;
    z-index: 1000;
} */

.cart-drawer.open {
    right: 0;
}

.cart-drawer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.cart-drawer-header {
    padding: 15px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-drawer-body {
    padding: 15px;
    overflow-y: auto;
    max-height: calc(100% - 120px);
}

.cart-drawer-footer {
    padding: 15px;
    border-top: 1px solid #ddd;
}

.btn-primary,
.btn-success {
    padding: 10px 15px;
    color: white;
    border-radius: 5px;
    text-decoration: none;
}

.btn-primary{
    background-color: white;
    color: black;
    border: 2px solid green;
    font-weight: bolder;
}
.btn-success{
    background-color: var(--green);
    color: white;
    border: 2px solid rgb(49, 180, 49);
    font-weight: bolder;
}
.btn-primary:hover {
    background-color: green;
    border: #155724;
}

.btn-success:hover {
    background-color: green;
    border: #155724;
}






@media (max-width: 768px) {
    .cart-drawer {
        width: 100%; /* Full width on mobile */
        right: -100%; /* Off-screen by default */
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1); /* Add shadow like desktop */
        transition: right 0.3s ease-in-out; /* Smooth transition */
    }

    .cart-drawer.open {
        right: 0; /* Slide in when open */
        /* box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2); Keep shadow consistent */
    }

    .cart-drawer-header {
        padding: 15px;
        font-size: 18px;
        border-bottom: 1px solid #ddd;
    }

    .cart-drawer-body {
        padding: 15px;
        max-height: calc(100% - 120px);
        overflow-y: auto;
    }

    .cart-drawer-footer {
        padding: 15px;
        border-top: 1px solid #ddd;
    }

    .cart-drawer-overlay {
        display: block; /* Ensure overlay covers the screen */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5); /* Slightly dark overlay */
        z-index: 999; /* Ensure it's below the drawer */
    }

    .btn-primary,
    .btn-success,
    .btn-danger-green {
        font-size: 14px; /* Adjust button font size */
        padding: 10px 15px;
    }
}

@media (max-width: 480px) {
    .cart-drawer {
        box-shadow: none; /* Stronger shadow for smaller screens */
    }

    .cart-drawer-header {
        flex-direction: column;
        text-align: center;
    }

    .cart-drawer-title {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .cart-drawer-close {
        font-size: 20px;
    }
}





/* General Cart Drawer Styling */
.cart-drawer-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Slightly dark overlay */
    z-index: 999; /* Layer below the cart drawer */
}

/* When Cart Drawer is Open */
.cart-drawer.open + .cart-drawer-overlay {
    display: block; /* Show overlay when the drawer is open */
}

/* Mobile View Adjustments */
@media (max-width: 768px) {
    .cart-drawer {
        width: 100%; /* Full width for mobile view */
        right: -100%; /* Initially hidden off-screen */
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1); /* Subtle shadow */
        transition: right 0.3s ease-in-out; /* Smooth open/close animation */
    }

    .cart-drawer.open {
        right: 0; /* Slide into view */
        /* box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2); Stronger shadow when open */
    }

    .cart-drawer-overlay {
        background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    }
}

/* Small Screen Adjustments */
@media (max-width: 480px) {
    .cart-drawer {
        box-shadow: -2px 0 15px rgba(0, 0, 0, 0.3); /* Stronger shadow for better contrast */
    }

    .cart-drawer-header {
        flex-direction: column; /* Stack header elements */
        text-align: center;
    }

    .cart-drawer-title {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .cart-drawer-close {
        font-size: 20px;
    }
}
















/* .cart-drawer.open {
    right: 0;
} */

.cart-drawer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.cart-drawer-header {
    padding: 15px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0; /* Prevent shrinking */
}

.cart-drawer-body {
    padding: 15px;
    overflow-y: auto; /* Enable scrolling for cart items */
    flex-grow: 1; /* Allow body to take available space */
}

.cart-drawer-footer {
    padding: 15px;
    border-top: 1px solid #ddd;
    flex-shrink: 0; /* Prevent shrinking */
    background-color: whitesmoke; /* Light gray background for contrast */
    box-shadow: -2px -2px 5px rgba(0, 0, 0, 0.1);
}

.btn-primary,
.btn-success {
    padding: 10px 15px;
    color: white;
    border-radius: 20px;
    text-decoration: none;
    width: 150px;

}


.btn-primary {
    background-color: white;
    color: black;
    border: 2px solid#3A975C;
    font-weight: bolder;
}
.btn-success {
    background-color:#3A975C;
    color: white;
    border: 2px solid green;
    font-weight: bolder;
}
.btn-primary:hover {
    background-color:#3A975C;
    border: #155724;
}

.btn-success:hover {
    background-color:#3A975C;
    border: #155724;
}



/* Mobile Cart Drawer */
@media (max-width: 768px) {
    .cart-drawer {
        width: 100%; /* Full-screen width for mobile */
        right: -100%; /* Initially hidden */
        transition: right 0.3s ease-in-out;
    }

    .cart-drawer.open {
        right: 0; /* Slide into view */
    }

    .cart-drawer-overlay {
        display: none; /* Hidden by default */
        background-color: rgba(0, 0, 0, 0.5); /* Dimmed overlay */
        z-index: 999;
    }

    .cart-drawer.open + .cart-drawer-overlay {
        display: block; /* Show overlay when drawer is open */
    }

    .cart-drawer-header {
        display: flex;
        justify-content: space-between;
        padding: 15px;
        border-bottom: 1px solid #ddd;
    }

    .cart-drawer-body {
        padding: 15px;
        overflow-y: auto;
        max-height: calc(100% - 120px);
    }

    .cart-drawer-footer {
        padding: 15px;
        border-top: 1px solid #ddd;
        background-color: #f9f9f9;
    }

 
}

@media (max-width: 380px) {
    .btn-primary,
    .btn-success {
       
        width: 120px;
    
    }
}




/* Drawer Cart Animations */
.cart-drawer {
    position: fixed;
    right: -100%;
    top: 0;
    width: 400px;
    height: 100%;
    background-color: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    transition:0.5s ease-in-out;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
}

.cart-drawer.open {
    transform: translateX(0);
    /* box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3); */
}

.cart-drawer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

/* .quantity-button{
    margin-right: 7px;
    background-color: #3A975C;
    color: white;
}
.quantity-button:hover{
   
    background-color:#155724;
    color: white;
} */
 /* Arrow styles */
/* Arrow styles */
.arrow {
    display: block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
   
}

.arrow.up {
    border-bottom: 6px solid#3A975C; /* Up arrow */
    
}

.arrow.down {
    border-top: 6px solid #3A975C; /* Down arrow */
}

/* Style the buttons to be vertically aligned */
.quantity-button {
    padding: 0!important;
    margin: 0!important;
    /* display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    padding: 3px 3px;
    background-color: #f1f1f1;
    border: 1px solid #3A975C;
    cursor: pointer;
    height: 20px; Set a fixed height */
    /* margin: 5px; */
}

.quantity-button .increment{
    margin-right: 15px;
}

.quantity-button:hover {
    color: var(--green);
}

.quantity-button:focus {
    outline: none;
}

.quantity-button .arrow {
    margin: 0; /* Remove any margin to ensure the arrows are aligned correctly */
}

/* Ensure proper alignment of the quantity text */
.quantity-button + span {
    padding: 0 10px;
}


@media (max-width: 374px) {
    .quantity-button{
        margin-right: 0px;
       
    }
   
}

/* Cart Drawer Header */
.cart-drawer-header {
    padding: 15px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    animation: fadeIn 0.4s ease-in-out;
}

/* Buttons and Footer Animation */
.cart-drawer-footer {
    padding: 15px;
    border-top: 1px solid #ddd;
    flex-shrink: 0;
    background-color: whitesmoke;
    animation: slideUp 0.5s ease-in-out;
}

.cart-drawer-body {
    padding: 15px;
    overflow-y: auto;
    flex-grow: 1;
    animation: fadeIn 0.5s ease-in-out;
}

/* Button Animations */
.btn-primary,
.btn-success {
    transition: transform 0.3s ease, background-color 0.3s ease;
}


.btn-danger-green {
    /* background-color:#3A975C; */
    /* border: 2px solid green; */
    transition: transform 0.3s ease, background-color 0.3s ease;
    color: rgb(240, 4, 4);
}

.btn-danger-green:hover {
    background-color:rgb(240, 4, 4);
    /* transform: scale(1.1); */
    color: white;
}

.btn-primary:hover,
.btn-success:hover {
    transform: scale(1.1);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .cart-drawer {
        width: 100%;
        right: -100%;
        transform: translateX(100%);
    }

    .cart-drawer.open {
        transform: translateX(0);
    }

    .cart-drawer-footer {
        animation: slideUp 0.5s ease-in-out;
    }
}







/* Close Button */
.cart-drawer-close {
    font-size: 24px;
    cursor: pointer;
    display: inline-block;
    transition: transform 0.4s ease-in-out; /* Smooth rotation */
}

.cart-drawer-close:hover {
    
    font-weight: bolder;
  
}

/* Rotating Animation for Close Button */
.cart-drawer-close.rotate {
    transform: rotate(360deg);
    transition: transform 0.4s ease-in-out;
}

