﻿/* General banner styles stay the same */
.banner-image {
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin: 20px 0;
}

    .banner-image img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

/* Product Loading Styles */
.product-loading, .products-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 30px 0;
    text-align: center;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-radius: 50%;
    border-top: 4px solid #000;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.product-loading p, .products-loading p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* Error and No Products Styles */
.error {
    background-color: #fee2e2;
    color: #b91c1c;
    padding: 15px;
    border-radius: 5px;
    margin: 20px auto;
    max-width: 80%;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.no-products {
    color: #6b7280;
    text-align: center;
    padding: 20px;
    font-style: italic;
}

.no-image {
    background-color: #f3f4f6;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    font-style: italic;
}

/* End Product Loading Styles */

/* Scoped transition styles for slider only */
.slider-banner a {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9; /* Or any aspect ratio you prefer */
}


.slider-banner img {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

    .slider-banner img.active {
        opacity: 1;
        z-index: 1;
    }



/* second row grid 4 images */
.second-row-grid {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    overflow-x: auto; /* Allows horizontal scrolling on mobile */
    width: 100%;
}

    /* For desktop */
    .second-row-grid img {
        width: calc(25% - 10px); /* Adjusts each image width to fit 4 in a row */
        height: auto; /* Keeps the aspect ratio of images */
        object-fit: cover; /* Ensures images fit in their containers */
    }

/* For mobile */
@media (max-width: 768px) {
    .second-row-grid img {
        width: calc(55% - 20px); /* Adjusts each image width on mobile and adds margin space */
        margin-right: 10px; /* Adds margin between images */
    }

        .second-row-grid img:last-child {
            margin-right: 0; /* Removes margin from the last image */
        }
}

/* fifth row grid 3 images */
.fifth-row-grid {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    overflow-x: auto; /* Allows horizontal scrolling on mobile */
    width: 100%;
    margin: 20px 0;
}

    .fifth-row-grid img {
        width: calc(33.33% - 10px); /* Adjusts each image width to fit 4 in a row */
        height: auto; /* Keeps the aspect ratio of images */
        object-fit: cover; /* Ensures images fit in their containers */
    }

/* For mobile */
@media (max-width: 768px) {
    .fifth-row-grid img {
        width: calc(55% - 20px); /* Adjusts each image width on mobile and adds margin space */
        margin-right: 10px; /* Adds margin between images */
    }

        .fifth-row-grid img:last-child {
            margin-right: 0; /* Removes margin from the last image */
        }
}


/* our favourite container  */
.ourfavourite-container {
    text-align: center;
    padding: 20px;
    margin: 20px 0;
    background-color: #fff;
}

    .ourfavourite-container h4 {
        font-size: 24px;
        font-weight: bold;
        margin-bottom: 20px;
        color: #333;
    }

.seventh-row-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 0 auto;
    max-width: 1200px;
}

.child-item {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

    .child-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
    }

    .child-item a {
        text-decoration: none;
        color: inherit;
        display: block;
    }

    .child-item img {
        width: 100%;
        height: auto;
    }

.child-item-para {
    padding: 10px;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

.btn-child-item {
    background-color: #000;
    color: #fff !important;
    text-align: center;
    font-weight: bold;
    padding: 10px;
    font-size: 14px;
    border-radius: 5px;
    margin: 10px;
    transition: background-color 0.3s;
}

    .btn-child-item:hover {
        background-color: #444;
    }

@media (max-width: 992px) {
    .seventh-row-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .seventh-row-grid {
        grid-template-columns: 1fr;
    }
}
