/* Reset some default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: url('images/bck.png') no-repeat center center fixed ;
    color: #333;
    line-height: 1.6;
}

/* Container for the cards */
.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 20px auto;
    max-width: 1200px;
}

/* Card style */
.card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin: 15px;
    overflow: hidden;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    width: calc(33.333% - 30px); /* 3 cards per row with margin */
    max-width: 300px;
    text-align: center;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Image inside the card */
.card img {
    border-bottom: 1px solid #e0e0e0;
    max-height: 200px;
    object-fit: cover;
    width: 100%;
}

/* Card title */
.card-title {
    font-size: 1.2em;
    font-weight: bold;
    margin: 15px 0;
}

/* Card description */
.card-desc {
    color: #666;
    font-size: 0.9em;
    margin: 0 15px 15px;
}

/* Card price */
.card-price {
    background-color: #95a89d2a;
    border-radius: 5px;
    color: #00000096;
    font-size: 1em;
    margin: 15px auto;
    padding: 10px 100px;
}

/* Media queries for responsiveness */
@media (max-width: 992px) {
    .card {
        width: calc(50% - 30px); /* 2 cards per row */
    }
}

@media (max-width: 768px) {
    .card {
        width: calc(100% - 30px); /* 1 card per row */
    }
}

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #f8f9fa;
}

/* Modal Background */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    /* Darkened background for focus */
    overflow: auto;
    transition: opacity 0.3s ease;
    opacity: 0;
    /* For smoother transitions */
}

.modal.active {
    display: block;
    opacity: 1;
}

/* Modal Content */
.modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 20px;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    border-radius: 16px;
    /* Softer rounded corners */
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateY(-20px);
    /* Added subtle entrance effect */
    opacity: 0;
}

.modal.active .modal-content {
    transform: translateY(0);
    opacity: 1;
}

/* Grid for Modal Images */
#modal-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    /* More flexible for small screens */
    gap: 15px;
    justify-items: center;
    align-items: center;
    padding: 10px;
}

/* Image Styles */
#modal-images img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

#modal-images img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Responsive Modal Adjustments */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        padding: 15px;
        max-width: 95%;
    }

    #modal-images {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
}

@media (max-width: 480px) {
    .modal-content {
        margin: 15% auto;
        padding: 10px;
        max-width: 100%;
        max-height: 85%;
        /* Adjusted for smaller screens */
    }

    #modal-images {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 10px;
    }

    #modal-images img {
        border-radius: 8px;
    }
}


/* Cart styles */
.cart {
    position: fixed;
    bottom: 0;
    right: 0;
    background: rgb(9, 199, 21);
    border: 1px solid #ccc;
    padding: 10px;
    max-width: 300px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cart-total {
    font-weight: bold;
    margin-top: 10px;
    text-align: right;
}

.cart-item img {
    width: 50px;
    height: auto;
    margin-right: 10px;
}

.cart-item h4 {
    margin: 0;
    font-size: 14px;
}

.cart-item p {
    margin: 0;
    font-size: 12px;
}

.cart-item .quantity {
    margin-left: 10px;
}

.cart-item .btn {
    cursor: pointer;
    color: rgb(0, 0, 0);
}

/* Card styles */
.card {
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}

.card img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.card-title {
    font-size: 18px;
    margin: 10px 0;
}

.card-desc {
    font-size: 14px;
    margin: 5px 0;
}

.card-price {
    font-size: 16px;
    margin: 5px 0;
    font-weight: bold;
}

.card button {
    padding: 10px 100px;
    border: none;
    background-color: #0cd527;
    color: white;
    border-radius: 5px;
    cursor: pointer;
}

.card button:hover {
    background-color: #e0e0e0;
}