* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: black;
    overflow-x: hidden;
}

header {
    display: inline-block;  
    width: 100%;              
    padding: 0;              
    margin: 0;
    background-color: black;  
}

header img.image {
    width: 100%;            
    height: auto;             
    display: block;           
}

header .logo {
    display: flex;
    align-items: center;
}

header .logo h1 {
    margin-left: 10px;
}

header nav ul {
    list-style: none;
    display: flex;
    gap: 15px;
}

header nav ul li a {
    color: white;
    text-decoration: none;
}

main {
    background-color: white;
    text-align: center;
    display: flex;
    min-height: 100vh;
}

.container_all {
    justify-content: column;
    margin-left: 8%;
    margin-right: 8%;
}

.title_container {
    padding: 10px;
    text-align: left;
}

h1 {
    color: #333;
    font-size: 36px;
}

.line{
    color: black;
    margin-top: 0;
    margin-bottom: 10px;
    border-top: 1.5px solid #d1cece;
}

.container_shop {
    display: flex;
    justify-content: space-between;
    box-sizing: border-box;
}

.left_side {
    box-sizing: border-box;
    width: 75%;
    min-width: 350px;
    background-color: white;
    display: flex;
    flex-wrap: wrap;    
    gap: 10px;          
    align-self: flex-start; /* Ensure items are aligned at the start */
    align-items: flex-start; /* Align items at the start */
}

.items {
    margin: 2%;
    display: flex; /* Change to flexbox for side-by-side layout */
    gap: 30px;
    width: 100%;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.item {
    flex: 1 1 calc(33.333% - 30px); /* Ensure three items per row */
    max-width: calc(33.333% - 30px); /* Ensure three items per row */
    width: 100%;
    max-width: 300px; /* Set a maximum width for each item */
    aspect-ratio: 3 / 4; /* Maintain a consistent aspect ratio */
    box-sizing: border-box;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.427);
    overflow: hidden;
    transition: background-color 2s;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 10px;
    align-self: flex-start; /* Align items at the start */
}

.item_content {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative; 
}

.img_container {
    width: 100%;
    height: 70%;
    overflow: hidden;
    position: relative;
}

.item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.label_container {
    background-color: #f4f4f4;
    width: 100%;
    padding: 10px;
    text-align: center;
}

.arrow_right, .arrow_left {
    color: black;
    border: none;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.arrow_right {
    right: 10px;
}

.arrow_left {
    left: 10px;
}



.right_side {
    box-sizing: border-box;
    width: 25%;
    min-width: 250px;
    background-color: white;
    align-self: flex-start; /* Ensure cart is aligned at the start */
}

.cart {
    height: 100%;
    margin: 4%;
    padding: 20px;
    border-radius: 10px;
    min-height: 400px; /* Increase the initial size */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Ensure elements are spaced out */
}

.cart h3 {
    margin-bottom: 10px;
}

.cart ul {
    list-style: none;
    margin-bottom: 20px;
    padding-left: 0;
    flex-grow: 1; /* Allow the list to grow and take available space */
}

.cart ul li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    position: relative; /* Add this line */
}

.remove-item {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #000;
    font-weight: bold;
    background-color: #fff;
    border: 1px solid #000;
    border-radius: 50%;
    padding: 2px 6px;
    transition: background-color 0.3s, color 0.3s;
}

.remove-item:hover {
    background-color: #000;
    color: #fff;
}

.cart ul li .item_name {
    flex: 1;
    text-align: left;
    margin-left: 30px; /* Adjust margin to accommodate the remove icon */
}

.cart ul li .item_price {
    flex: 0 0 auto;
    text-align: right;
}

.cart button {
    width: 100%;
    padding: 10px;
    background-color: #000;
    color: white;
    border: none;
    border-radius: 5px;
    margin-bottom: 10px;
    cursor: pointer;
}

.cart button:hover {
    background-color: #333;
}

.cart .subtotal {
    margin-top: 10px;
    font-weight: bold;
    text-align: right;
    margin-bottom: 10px; /* Ensure some space at the bottom */
}

.add_to_cart {
    margin-top: 10px;
    padding: 10px;
    background-color: #000;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.add_to_cart:hover {
    background-color: #333;
}

.cart .subtotal {
    margin-top: 10px;
    font-weight: bold;
}

.customer_info, .overview {
    display: none;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    animation: slideIn 0.5s forwards;
}

.customer_info label, .overview label {
    display: block;
    margin-top: 10px;
}

.customer_info input, .overview input {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.customer_info button, .overview button {
    width: 100%;
    padding: 10px;
    background-color: #000;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.customer_info button:hover, .overview button:hover {
    background-color: #333;
}

footer {
    bottom: 0px;
    text-align: center;
    background-color: #f4f4f4;
    color:  #333;
    padding: 10px;
}

.a{
    color: lightgray;
}

.magnifier {
    color: black;
    border: none;
    cursor: pointer;
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    padding: 5px;
}

.magnified_image {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    border: 2px solid #000;
    background: #fff;
    z-index: 1000;
    cursor: zoom-out;
}

.progress_bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.step {
    flex: 1;
    text-align: center;
    padding: 10px;
    background-color: #f4f4f4;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.step.active {
    background-color: #000;
    color: white;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cart-modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    right: 0;
    top: 0;
    width: 30%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
}

.cart-modal-content {
    background-color: #fff;
    margin: 5% auto; /* Centered with reduced top margin */
    padding: 20px;
    border: 1px solid #888;
    width: 90%; /* Adjust width for better responsiveness */
    max-width: 600px; /* Set a maximum width */
    position: relative;
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    overflow-y: auto; /* Enable vertical scrolling */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Ensure the content is spaced out */
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    transition: color 0.3s; /* Smooth color transition */
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.cart-modal-content h3 {
    margin-top: 0;
    font-size: 24px;
    color: #333;
}

.cart-modal-content p {
    font-size: 16px;
    color: #666;
}

.cart-modal-content button {
    background-color: #000;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
    transition: background-color 0.3s; /* Smooth background color transition */
}

.cart-modal-content button:hover {
    background-color: #333;
}

.w3-bar .fa-shopping-cart {
    font-size: 24px;
    color: white;
}

#cart-sum, #mobile-cart-sum {
    margin-left: 5px;
    font-size: 14px;
    color: #333;
}

.mobile-cart-icon {
    background-color: #000;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
}

.mobile-cart-icon:hover {
    background-color: #333;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .container_shop {
        flex-direction: column;
    }

    .left_side, .right_side {
        width: 100%;
        min-width: 100%;
    }

    .items, .cart {
        width: 100%;
        min-width: 100%;
    }

    .items {
        flex-direction: column;
    }

    .item {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .cart-modal {
        width: 100%; /* Full width */
        height: 100%; /* Full height */
        left: 0; /* Ensure it covers the entire screen */
        top: 0; /* Ensure it covers the entire screen */
        z-index: 2;
        overflow-y: auto; /* Ensure vertical scrolling on mobile view */

    }
    

    .cart-modal-content {
        width: 95%; /* Almost full width */
        height: 95%; /* Almost full height */
        margin: 2.5% auto; /* Centered with small margins */
        max-width: none; /* Remove max-width */
        max-height: none; /* Remove max-height */
        border-radius: 0; /* Remove rounded corners */
        overflow-y: auto; /* Ensure vertical scrolling on mobile view */
        display: flex;
        flex-direction: column;
        justify-content: space-between; /* Ensure the content is spaced out */
    }

    .cart {
        min-height: 300px; /* Reduce the initial size */
        margin: 0;
        overflow-y: auto; /* Ensure vertical scrolling on mobile view */

    }
}