.mega-menu-container {
    position: relative;
    display: inline-block;
}

.gift-voucher-container img {
    max-height: 400px;
    width: 100%;
}

.mega-menu-dropdown {
  margin-top:198px;
}

.mega-menu-icon {
    font-size: 30px;
    cursor: pointer;
    padding: 10px;
}

.mega-menu-dropdown {
    display: none;
    position: fixed; /* Position fixed to ensure it spans full screen */
    top: 0;
    left: 0;
    width: 100vw; /* 100% viewport width */
    height: 85vh; /* 85% of the viewport height */
    background: white;
    padding: 5%;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow-y: auto; /* Allows scrolling if content exceeds height */
    box-sizing: border-box; /* Prevents padding from affecting the width */
}

.mega-menu-container:hover .mega-menu-dropdown {
    display: flex;
}

.mega-menu-left {
    width: 50%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-right: 20px; /* Ensure space for the right content */
    box-sizing: border-box; /* Prevents overflow due to padding */
}

.mega-menu-item {
    padding: 10px;
    font-size: 18px;
    cursor: pointer;
    background: #f0f0f0;
    transition: background 0.3s;
}

.mega-menu-item:hover {
    background: #ddd;
}

.mega-menu-right {
    width: 50%;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-sizing: border-box; /* Prevents overflow due to padding */
}

.mega-menu-content {
    display: none;
    width: 100%;
    height: 100%;
}

.mega-menu-content img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Featured Products - Adjusted to fit within the container */
.featured-products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 100%; /* Ensure it doesn't overflow */
    box-sizing: border-box; /* Ensures it doesn't extend beyond container */
}

.featured-products .product {
    text-align: center;
    background-color: #f8f8f8;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
}

.featured-products .product img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 10px;
}

.featured-products .product h4 {
    font-size: 18px;
    margin: 10px 0;
}

.featured-products .product .price {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

/* Latest Blog Post Section */
.latest-post-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 300px;
}

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

.latest-post-link .post-title h3 {
    font-size: 18px;
    margin-top: 10px;
}

/* Contact, Salons, and Brands Sections */
.contact-layout,
.salons-layout,
.brands-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.contact-layout {
    justify-content: space-between;
}

.salons-layout {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.salons-layout .left-image-box, .salons-layout .right-image-box {
    position: relative;
    flex: 1;
}

.salons-layout .left-image-box img, .salons-layout .right-image-box img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.salons-layout .salon-text-box,
.salons-layout .right-image-box .salon-text-box {
    position: absolute;
    top: 20%;
    left: 0;
    width: 100%;
    background: white;
    padding: 30px;
    box-sizing: border-box;
    z-index: 2;
}

.salons-layout .salon-text-box h3 {
    margin-top: 0;
    font-size: 24px;
    font-weight: bold;
}

.salons-layout .salon-text-box p {
    font-size: 16px;
    margin: 10px 0;
}

.salons-layout .salon-icons {
    display: flex;
    gap: 10px;
}

.salons-layout .salon-icons .icon-map-pin, .salons-layout .salon-icons .icon-phone {
    font-size: 20px;
}

.salons-layout .find-out-more {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    border: 2px solid #000;
    border-radius: 25px;
    background-color: transparent;
    color: #000;
    text-transform: uppercase;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.salons-layout .find-out-more:hover {
    background-color: #000;
    color: white;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Keeping the 4-column layout */
    gap: 20px;
    align-items: center; /* Centers images vertically */
}

.brands-grid img {
    width: 100%; /* Ensures images take up the full width of their container */
    height: 100%; /* Ensures images maintain the same height */
    object-fit: cover; /* Ensures images are not distorted, preserves aspect ratio */
    max-width: 200px; /* Optional: Set a maximum width to control size */
    max-height: 200px; /* Optional: Set a maximum height to control size */
}

/* Responsive Design for Smaller Screens */
@media (max-width: 768px) {
    .mega-menu-dropdown {
        flex-direction: column;
        max-width: 100%;
        padding: 15px;
    }

    .mega-menu-left,
    .mega-menu-right {
        width: 100%;
    }

    .featured-products {
        grid-template-columns: 1fr; /* Single column layout on small screens */
    }

    .brands-grid {
        grid-template-columns: repeat(2, 1fr); /* 2-column layout on smaller screens */
    }
}

/* Additional Styling for Other Menu Sections */
.mega-menu-content h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
}

.mega-menu-content .find-out-more {
    background-color: #f1a541;
    padding: 10px 20px;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    text-align: center;
}

.mega-menu-content .find-out-more:hover {
    background-color: #e89738;
}

.gift-voucher-container {
    text-align: center;
}

.gift-voucher-container img {
    max-width: 100%;
    height: auto;
    margin-bottom: 15px;
}

/* Preventing overflow from any images or elements in the mega menu */
.mega-menu-dropdown img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

.featured-products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 100%;
    box-sizing: border-box;
}

.featured-products .product {
    text-align: center;
    background-color: #f8f8f8;
    padding: 10px; /* Reduced padding for smaller cards */
    border-radius: 10px;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
    width: 60%; /* Reduce width to 60% of the original size */
    margin: 0 auto; /* Center the product card */
}

.featured-products .product img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 10px;
}

.featured-products .product h4 {
    font-size: 16px; /* Adjusted font size to match smaller cards */
    margin: 8px 0;
}

.featured-products .product .price {
    font-size: 14px; /* Adjusted price font size */
    font-weight: bold;
    color: #333;
}

/* For smaller screens, further adjust */
@media (max-width: 768px) {
    .featured-products .product {
        width: 80%; /* Increase the width to fit better on smaller screens */
    }
}