/* General styles */
html, body {
    height: 100%;
    margin: 0;
    
    /*display: flex;
    flex-direction: column;*/
}

body {
    font-family: Arial, sans-serif;
    background-color: #1e1e1e !important;
}

#about {
    padding: 10px 10%;
    margin-top: 120px;
    white-space: pre-wrap;
}

#about h1 {
    padding: 0px;
    margin: 0px;
    color: #ffffff;
}

#about p {
    padding: 0px;
    margin: 0px;
    color: #ffffff;
    line-height: 36px;
}

#search-section {
    padding: 0px 10%;
    text-align: left;
    margin: 20px 0;
}

#search-section h1 {
    color: #ffffff;
}

#search-bar {
    color: #ffffff;
    width: 40%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    border-color: rgba(0, 0, 0, .4);
    background-color: rgba(0, 0, 0, .4);
}

.search-bar:focus {
    outline: none;
    box-shadow: 0px 0px 5px 2px #ffffff; /* highlight when the input is focused */
}

#products {
    padding: 20px 10%;
    /*background-color: #ffffff;*/
    flex-grow: 1;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.product-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 2px solid #000000;
    border-radius: 10px;
    padding: 10px;
    background-color: rgb(44, 44, 44);
    position: relative;
    height: 300px;
    transition: transform 0.3s ease;
    gap: 10px;
}

.product-item:hover {
    transform: scale(1.05);  /*Slightly enlarge on hover */
    border-color: #ffffff; /* Change border color on hover */
    /*z-index: 2;  /*Bring the hovered item to the front */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); /* Slightly enhance the shadow on hover */
    box-shadow: 0 0 15px #ffffff; /* Glowing effect */
}

.product-item-top {
    /*background-color: rgb(255, 255, 255);*/
    flex: 2;
    display: flex;
    flex-direction: column;
    z-index: 5;
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0);
    overflow: hidden; /* Hide any overflow */
    position: relative;
}

.product-item-top img {
    max-width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: contain; /* Keeps the aspect ratio */
}

.product-item-bottom {
    /*background-color: rgb(255, 255, 255);*/
    flex: 1;

    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 5;
    background-color: rgba(165, 42, 42, 0);
}


.store-button-img {
    margin-right: 10px; /* Adjust the margin as needed */
}


.product-item h2 {
    margin: 0;
    padding-bottom: 10px;
    color: white;
    font-weight: bold;
    opacity: 1;
}

.product-item:hover h2 {
    opacity: 1;
}

.product-item .description {
    margin-bottom: auto;
    min-height: 60px;
    color: rgb(255, 255, 255);
}

.product-item .bundle-tag {
    position: absolute;
    top: -10px;
    left: -20px;
    background-color: red;
    color: white;
    padding: 5px;
    border-radius: 5px;
    font-size: 12px;
    z-index: 10;
}

.product-item .background-image {
    position: absolute;
    object-fit: cover;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Set z-index to a negative value */
    border-radius: 9px;
    filter: blur(5px); /* Adjust the blur radius as needed */
    opacity: 0.2;
    transition: opacity 0.5s ease;
    background-color: rgba(0, 0, 0, 0.5);
    
}

.product-item:hover .background-image {
    opacity: 1;
}

.product-item:hover .store-buttons img {
    opacity: 1;
}

/* Store Buttons */
.store-buttons {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 10px;
}

.store-buttons img {
    opacity: 0.5;
    width: 35px;
    height: 35px;
    /*cursor: pointer;*/
    transition: transform 0.3s ease, opacity 0.3s ease; /* Smooth transition for hover effects */
}

.store-buttons img:hover {
    transform: scale(1.2); /* Scale up the icon */
    opacity: 0.8; /* Reduce opacity to 80% */
    cursor: pointer; /* Show pointer cursor to indicate clickability */
}


#product-section h1 {
    text-align: center;
    font-size: 32px;
    margin: 20px 0;
}

footer {
    background-color: #333;
    color: white;
    padding: 20px;
    text-align: center;
    /*    width: 100%; causes additional width*/
    position: relative;
    bottom: 0;
    flex-shrink: 0;
}
footer a {
    color: white;
    text-decoration: underline;
  }
/* Responsive styles */
@media (max-width: 768px) {
    #about{
        margin-top: 20px;
        /*padding: 120px 20px;*/
    }

    #search-section{
        /*padding: 0px 20px;*/
    }

    #product-section h1 {
        font-size: 24px;
    }

    #search-bar {
        width: 96%;
    }
}

header {
    display: flex;
    align-items: center; /*Controls the vertical alignment of items within the flex container.*/
    align-content: center; /*Controls the distribution of flex lines within the flex container.*/
    background-color:#333;
    position: fixed;  /*Fixes the header to the top*/ 
    top: 0; /* Position it at the top of the page */
    width: 100%; /* Ensure it spans the full width */
    z-index: 1000; /* Keeps it above other content */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Optional: Add a subtle shadow for depth */
    height: 110px;
    /*border-bottom: 2px solid black;*/
    flex-direction: row;
    transition: opacity 0.3s ease-in-out;
    transition: transform 0.3s ease-in-out; /* Smooth transition for hiding */
}

/* Left Section: Logo and Title */
.left-section {
    display: flex;
    align-items: center;
    flex-grow: 1;
    margin-left: 50px;
    margin-right: 50px;
}

.left-section .logo {
    width: 50px;
    height: auto;
    margin-right: 10px;
}

.left-section h1 {
    font-size: 24px;
    color: #ffffff;
}

/* Middle Section: Subscribe to Newsletter */
.middle-section {
    text-align: center;
    flex-grow: 1;
}

.middle-section p {
    font-size: 18px;
    margin-bottom: 10px;
    color: #ffffff;
}

.newsletter-form {
    display: flex;
    justify-content: center;
    gap: 10px;

    /*
    opacity: 0;
    height: 0;
    margin: 0;
    padding: 0;
    */
}

.newsletter-form.hidden {
    opacity: 0;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Ensures the form doesn't affect layout */
    transition: opacity 0.5s ease, height 0.5s ease;
}

.newsletter-form input[type="email"] {
    color: #ffffff;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    border-color: rgba(0, 0, 0, .4);
    background-color: rgba(0, 0, 0, .4);
}

input::placeholder {
    color: rgb(255, 255, 255);
    opacity: 0.7;
}
  
.newsletter-form input[type="email"]:focus {
    outline: none;
    box-shadow: 0px 0px 5px 2px #ffffff; /* highlight when the input is focused */
}


.newsletter-form button {
    padding: 10px 20px;
    background-color: #ffffff;
    color: rgb(0, 0, 0);
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.newsletter-form button:hover {
    background-color: #e4e4e4;
}

/* Right Section: Social Media Links */
.right-section {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    /*margin-left: auto;  Ensures the section is aligned to the right */
    margin-right: 50px;
    margin-left: 50px;
    flex-grow: 1;
}

.right-section img {
    width: 30px;
    height: 30px;
    /*cursor: pointer;*/
    transition: transform 0.3s ease, opacity 0.3s ease; /* Smooth transition for hover effects */
}

.right-section img:hover {
    transform: scale(1.2); /* Scale up the icon */
    opacity: 0.8; /* Reduce opacity to 80% */
    cursor: pointer; /* Show pointer cursor to indicate clickability */
}

/* Media Queries for Responsive Design */
@media (max-width: 768px) {
    header
    {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 10px;
        height: 280px;
        position: static;
        opacity: 1;
    }

    header.hidden {
        opacity: 0;
        transform: translateY(-100%);
    }

    #about 
    {
        /*margin-top: 280px;*/
    }

    /* Ensure the left section (logo and title) is stacked vertically */
    .left-section
    {
        justify-content: center;
        /*flex-direction: column;*/
        margin: 0;
    }

    .left-section h1 {
        font-size: 20px;
    }

    .middle-section {
        
        justify-content: center;
        margin-top: 0;
        margin-left: 0;
        margin-right: 0;
        margin-bottom: 20px;
    }

    .middle-section p {
        justify-content: center;
    }

    
    /* Stack the social media icons vertically */
    .right-section {
        justify-content: center; /* Center the icons for small screens */
        margin: 0;
    }

    .newsletter-form {
        flex-direction: column;
        gap: 15px;
    }

    .newsletter-form input[type="email"] {
        
        width: 90%; /* Both input and button now take up full width */
        max-width: 300px; /* Optional max width for better control */
    }

    .newsletter-form button {
        
        width: 100%; /* Both input and button now take up full width */
        max-width: 300px; /* Optional max width for better control */
    }
}

@media (max-width: 480px) {
    /* Smaller screen adjustments for very small devices */
    .left-section .logo {
        width: 40px;
    }

    .left-section h1 {
        font-size: 18px;
    }

    .newsletter-form input[type="email"],
    .newsletter-form button {
        font-size: 12px;
    }

    .right-section img {
        width: 25px;
        height: 25px;
    }
}
