@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

@font-face {
    font-family: 'Etna';
    src: url('assets/Etna-Sans-serif.otf') format('Etna');
    font-style: normal;
}

* { 
    box-sizing: border-box; 
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f3f3f3;
    margin: 0; padding: 0;
    display: flex; justify-content: center; align-items: center; flex-direction: column;
}

/* --- KEEPING YOUR EXISTING TOP SECTION STYLES --- */
.top-section {
    background: linear-gradient(to bottom, #58263c, #ac5a7f);
    color: white;
    padding: 150px 15%;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.services-header {
    display: flex; justify-content: space-between; align-items: center; width: 100%; flex-wrap: wrap;
}
.services-text { flex: 1; min-width: 300px; }
.services-text h4 { text-transform: uppercase; font-size: 14px; margin-bottom: 10px; font-weight: 500; }
.services-text h1 { font-size: 36px; margin-bottom: 15px; }
.services-description { flex: 1; max-width: 500px; font-size: 14px; line-height: 1.6; }

/* --- CATEGORY CARDS --- */
.services-container {
    display: flex; justify-content: center; gap: 80px; width: 80%; margin-top: -100px; flex-wrap: wrap; z-index: 10;
}
.bottom-section-2 { margin-top: 60px; margin-bottom: 50px; z-index: 1; }

.service-card {
    background: white; width: 350px; border-radius: 10px; overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); transition: transform 0.3s ease-in-out;
    position: relative; cursor: pointer;
}
.service-card:hover { transform: translateY(-5px); }
.service-card img { width: 100%; height: 350px; object-fit: cover; } /* Fixed this to be responsive */
.service-content { padding: 20px; }
.service-content h3 { font-size: 17px; margin: 0; font-weight: 600; }
.service-content p { font-size: 14px; color: #555; }
.icon-overlay {
    position: absolute; background: #ffffff; color: white; border-radius: 50%;
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    font-size: 20px; left: 10px; top: 10px;
}

/* --- MODAL STYLES --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); display: none; justify-content: center; align-items: center; z-index: 1000;
}
.modal-content {
    background: #f9f9f9; 
    width: 80%;
    height: 80%;
    border-radius: 20px; 
    padding: 10px; 
    display: flex; 
    flex-direction: column;
    position: relative;
    overflow-y: auto;
}
.modal-header {
    padding: 20px; border-bottom: 1px solid #ddd; display: flex; justify-content: space-between;
    position: sticky; top: 0; 
    background: #f9f9f9; 
    border-radius: 20px;
    color: rgb(0, 0, 0);
    border: 2px solid #ffd4e7;
    z-index: 10;
}
.close-btn { font-size: 28px; cursor: pointer; }

/* --- NEW MODAL PRODUCT CARD STYLES --- */
.modal-body {
    display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; padding: 20px;
}
.modal-card {
    background: white; width: 240px;
    border: 2px solid #ffd4e7;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); overflow: hidden;
}

/* 1. Image Wrapper & Border Fix */
.product-img-wrapper {
    position: relative;
    padding: 10px; /* Space for the border to breathe */
}

.product-img {
    width: 100%;
    height: 100%;      /* Fixed height makes them all even */
    object-fit: cover;  /* Ensures image fits inside the box neatly */
    border-radius: 8px;
    display: block;
}

/* 2. Allergen Emoji Badge */
.allergen-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    border: 2px solid #ff4d4d; /* Red warning border */
    border-radius: 50%;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    cursor: help;
    z-index: 5;
}

.modal-card-content { padding: 12px; text-align: center; }

.modal-card-content h3 {
    font-size: 16px; margin: 10px 0 5px 0; min-height: 40px;
    display: flex; align-items: center; justify-content: center;
}

.price-tag {
    font-weight: 700; color: #58263c; font-size: 16px;
    margin: 0 0 8px 0;
}

.status-badge {
    font-size: 10px; padding: 3px 8px; border-radius: 20px; text-transform: uppercase;
}
.available { background: #d4edda; color: #155724; }
.unavailable { background: #f8d7da; color: #721c24; }

.loader {
    border: 5px solid #f3f3f3; border-top: 5px solid #58263c;
    border-radius: 50%; width: 40px; height: 40px;
    animation: spin 1s linear infinite; margin: 50px auto;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

@media (max-width: 1024px) {
    .services-container, .bottom-section-2 { width: 95%; }
}