:root {
    --primary-color: #BE1D2C;
    --secondary-color: #DDDDDD;
    --background-color: #f4f4f4;
    --text-color: #333;
}

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

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.top-bar {
    background-color: #8b0000;
    padding: 5px 0;
    text-align: center;
    font-size: 0.9em;
}

.logo {
    max-width: 200px;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    padding: 5px 10px;
    border-radius: 5px;
}

nav ul li a:hover {
    color: var(--secondary-color);
    background-color: rgba(255, 255, 255, 0.1);
}

.hero {
    background-image: url('img/banner.jpg');
    background-size: cover;
    background-position: center 20%; /* Adjust this value */
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-bottom: 40px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 1;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
}

.hero h1 {
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.2em;
    margin-bottom: 20px;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, outline 0.3s ease;
    outline: 2px solid rgba(255, 255, 255, 0.3); /* Add this line */
}

.cta-button:hover {
    background-color: #9e1724;
    outline: 2px solid white; /* Update this line */
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
    font-size: 2.5em;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 10px auto;
}

.featured-deals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.deal-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.deal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.deal-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.deal-card-content {
    padding: 20px;
}

.deal-card h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: 1.4em;
}

.deal-card p {
    font-weight: bold;
    color: #666;
    font-size: 1.2em;
}

.departments {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.department-card {
    position: relative;
    height: 250px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.department-card:hover {
    transform: scale(1.05);
}

.department-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.department-card:hover img {
    transform: scale(1.1);
}

.department-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 20px;
    text-align: center;
    transition: background-color 0.3s ease;
}

.department-card:hover .department-card-content {
    background-color: rgba(190, 29, 44, 0.9);
}

.department-card h3 {
    margin-bottom: 10px;
    font-size: 1.6em;
}

.department-card a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

.department-card a:hover {
    color: white;
}

footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 40px 0;
    margin-top: 60px;
}

footer p {
    margin-bottom: 20px;
}

footer a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

footer a:hover {
    color: white;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background-color: #fefefe;
    margin: 2% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 1200px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

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

.modal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.modal-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px;
    text-align: center;
}

.modal-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.modal-item h3 {
    font-size: 1.2em;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.modal-item p {
    font-weight: bold;
    color: #666;
}

.modal-item .description {
    font-size: 0.9em;
    color: #777;
    margin-top: 10px;
}

@media (max-width: 1024px) {
    .modal-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
    }

    nav ul {
        margin-top: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul li {
        margin: 5px 10px;
    }

    .hero {
        height: 400px;
    }

    .hero h1 {
        font-size: 2.5em;
    }

    .hero p {
        font-size: 1em;
    }

    .section-title {
        font-size: 2em;
    }

    .modal-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
        /* Additional styles for the admin panel */
        #adminPanel {
            padding: 20px;
            background-color: #f0f0f0;
            border-radius: 5px;
        }
        #productList {
            margin-bottom: 20px;
        }
        #productList div {
            margin-bottom: 10px;
            padding: 10px;
            background-color: #fff;
            border-radius: 3px;
        }
        #addProductForm input, #addProductForm select, #addProductForm textarea {
            display: block;
            width: 100%;
            margin-bottom: 10px;
            padding: 5px;
        }
        #addProductForm button {
            background-color: #4CAF50;
            color: white;
            padding: 10px 15px;
            border: none;
            border-radius: 3px;
            cursor: pointer;
        }
@media (max-width: 480px) {
    .modal-grid {
        grid-template-columns: 1fr;
    }
}
