/* Global Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #FFF;
    color: #333;
    line-height: 1.6;
}

/* Page Header */
.page-header {
    background-image: url('../img/src/loadingTruck.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 8rem 2rem 5rem;
    text-align: center;
    margin-top: 0;
    padding-top: 150px;
    position: relative;
    min-height: 550px;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(46, 95, 63, 0.85) 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
}

.page-header h1, .page-header p {
    position: relative;
    z-index: 2;
    color: #FFFFFF;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #FFF;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}

.page-header p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
    font-family: 'Montserrat', sans-serif;
}

/* Product Sections */
.product-section {
    position: relative;
    padding: 6rem 2rem;
    margin-bottom: 4rem;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.product-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    width: 100%;
    text-align: center;
    color: #F5F5F5;
}

.product-section h2 {
    font-size: 2.8rem;
    margin-bottom: 2rem;
    color: #F5F5F5;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.sub-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.sub-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.sub-item:hover {
    transform: translateY(-5px);
}

.sub-item h3 {
    font-size: 1.3rem;
    color: #F5F5F5;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

/* Background images for each section */
.product-section:nth-child(2) .product-bg {
    background-image: url('../img/src/cannedFood.webp');
}

.product-section:nth-child(3) .product-bg {
    background-image: url('../img/src/rice.webp');
}

.product-section:nth-child(4) .product-bg {
    background-image: url('../img/src/sugar.webp');
}

.product-section:nth-child(5) .product-bg {
    background-image: url('../img/src/indianSpices.webp');
}

.product-section:nth-child(6) .product-bg {
    background-image: url('../img/src/tea.webp');
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-header {
        margin-top: 70px;
        padding: 8rem 1.5rem;
        min-height: 350px;
    }

    .page-header h1 {
        font-size: 2.2rem;
    }

    .page-header p {
        font-size: 1.1rem;
    }

    .product-section {
        padding: 4rem 1.5rem;
        min-height: 300px;
    }

    .product-section h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .sub-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .sub-item {
        padding: 1rem;
    }

    .sub-item h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .page-header {
        margin-top: 60px;
        padding: 6rem 1rem;
        min-height: 300px;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .page-header p {
        font-size: 1rem;
    }

    .product-section {
        padding: 3rem 1rem;
        margin-bottom: 2rem;
    }

    .product-section h2 {
        font-size: 1.6rem;
    }

    .sub-items {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .sub-item {
        padding: 1rem;
    }

    .sub-item h3 {
        font-size: 1rem;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .page-header h1 {
        font-size: 1.5rem;
    }

    .product-section h2 {
        font-size: 1.4rem;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #2E5F3F 0%, #1a3d28 100%);
    color: #FFF;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 10000;
    box-shadow: 0 4px 15px rgba(46, 95, 63, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: linear-gradient(135deg, #D8B66A 0%, #c9a55a 100%);
    color: #2E5F3F;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(216, 182, 106, 0.4);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        left: 20px;
        width: 45px;
        height: 45px;
    }
}