:root {
    font-family: "DM Sans";
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


header {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
    justify-content: center;
    padding-top: 9.7rem;
}

nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3.5rem;
    text-decoration: none;
    width: 100%;
    height: 20vh;
    border-bottom: 1px solid #ececec;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background-color: #ffffff;
}

nav a {
    text-decoration: none;
    color: #6d5c53;
    font-weight: lighter;
}

.nav-main select {
    border: none;
    color: #6d5c53;
    font-weight: lighter;
    cursor: pointer;
    outline: none;
    width: 115px;
}

.nav-main select:hover {
    border-bottom: 1px solid;
}

nav a:hover {
    text-decoration: underline;
}

.nav-main {
    display: flex;
    gap: 1.2rem;
    font-size: 0.9rem;

}

.nav-rgt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    font-size: large;
}

main {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
}

.header {
    font-size: 3rem;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: bolder;
}

.filter-bar {
    display: flex;
    align-self: center;
    justify-content: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    width: 75%;
    padding-left: 1rem;
    padding-right: 1rem;

}

.filter-lft,
.filter-rgt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;

}

.filter-lft select {
    border: none;
    color: #6d5c53;
    font-weight: lighter;
    cursor: pointer;
    outline: none;

}

.filter-rgt select {
    border: none;
    color: #6d5c53;
    font-weight: lighter;
    cursor: pointer;
    outline: none;
    width: 130px;
}

.filter-lft select:hover {
    border-bottom: 1px solid black;
}

.filter-rgt select:hover {
    border-bottom: 1px solid black;
}
.filter-bar span{
    color: #647380;
}

.product-section {
    display: flex;
    margin: auto;
    flex-wrap: wrap;
    width: 99%;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 5rem;
    padding-bottom: 2rem;
}

.product {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    width: 280px;
    gap: 1rem;

}

.product-image {
    overflow: hidden;
    position: relative;
}

.product-2 {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;

}

.product img {
    object-fit: cover;
    width: 100%;
    height: 45vh;
    display: block;
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

.product-image:hover img {
    transform: scale(1.10);
}

.product-image:hover .product-2 {
    opacity: 1;
}

.product-details {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.product-details a {
    font-size: 1rem;
    font-weight: lighter;
    text-decoration: none;
    color: #070707;
}

.product-details span {
    font-size: medium;
    font-weight: 600;
    text-decoration: none;
    color: #070707;
}

.product-details button{
    height: 2.5rem;
    background: transparent;
    border: none;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.product-details button:hover{
    border: 1px solid black;
}

.feature-brand {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    width: 85%;
    margin: auto;
}

.brand-top {
    width: 80vw;
    display: flex;
    justify-content: space-evenly;
}

.brand-bottom {
    width: 80vw;
    display: flex;
    justify-content: space-evenly;
    margin-top: -2rem;
}

.brand {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    width: 10.154375rem;
    height: 10.154375rem;
}

.brand img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

footer {
    background-color: var(--color-black);
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 72vh;
    background-color: #cee050;
    align-items: flex-start;
}

.footer-text {
    font-size: large;
    display: flex;
    flex-wrap: wrap;
    margin-left: 10vw;
    gap: 1rem;
    text-align: left;
    align-items: flex-start;
    justify-content: center;
    gap: 20rem;
    margin-top: 2vh;
}

.footer-title {
    margin-top: 2rem;
    margin-bottom: 2rem;
    color: #424d00;
    font-weight: bold;
    font-size: large;
}

.shop p {
    margin-top: 0.8em;
    color: #424d00;
    font-weight: 600;
    font-size: medium;
}

.shop p:hover {
    text-decoration: underline;
}

.more-info p {
    margin-top: 0.8em;
    color: #424d00;
    font-weight: 600;
    font-size: medium;

}

.more-info p:hover {
    text-decoration: underline;
}

.input-section {
    margin-top: 3vh;
    display: flex;
    align-items: center;
    border: 1px solid #687604;
    justify-content: center;
    width: 25vw;
    height: 6vh;
    justify-content: space-between;
}

.input-section input {
    border: none;
    height: 100%;
    width: 100%;
    background: transparent;
    margin-left: 0.5rem;
    outline: none;
}

.input-section input {
    margin-right: 0.5rem;
}

.input-section:hover {
    border: 2px solid #687604;

}

input::placeholder {
    color: #424d00;
    opacity: 1;
    font-size: large;
}

.footer-text-buttom {
    display: flex;
    width: 100%;
    align-items: flex-start;
    justify-content: center;
    padding-left: 10vw;
    padding-right: 10vw;
    margin-top: 2rem;
    justify-content: space-between;
}

.foot-title {
    margin-top: 2rem;
    font-size: 1.4rem;
    color: #424d00;
}

.footer-rgt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

hr {
    border: 1px solid #bfd044;
    width: 100%;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.footer-end {
    display: flex;
    align-self: center;
    justify-self: end;
    text-align: center;
    color: #536300;
    gap: 0.2rem;
}

#effect:hover {
    text-decoration: underline;
}

#menu-toggle {
    display: none;
}

.hamburger-icon {
    display: none;
    cursor: pointer;
    z-index: 1001;
}


#menu-toggle {
    display: none;
}

.hamburger-icon {
    display: none;
    cursor: pointer;
    z-index: 1001;
}

/* --- NEW: Mobile Filter Toggle Styles (Hidden on Desktop) --- */
.mobile-filter-toggle {
    display: none;
}

#filter-toggle {
    display: none; /* Hide the filter checkbox */
}


/* === Medium Screens (Tablets) & Mobile === */
@media (max-width: 768px) {

    /* --- Header and Nav (Same as index.css) --- */
    header {
        padding-top: 10vh; /* Changed from 0vh to 10vh to account for fixed nav */
    }

    nav {
        height: 10vh;
        justify-content: space-between;
        padding: 0 1rem;
        position: fixed; /* Ensure nav is fixed */
        top: 0;
        left: 0;
        background: #fff;
        z-index: 1000;
    }

    .hamburger-icon {
        display: block;
    }

    .nav-lft {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: auto;
    }

    .nav-lft img {
        width: 100px;
        height: auto;
    }

    .nav-main {
        display: flex;
        flex-direction: column;
        position: fixed; /* Changed to fixed to slide over content */
        top: 10vh;
        left: 0;
        width: 100%;
        height: calc(100vh - 10vh); /* Full height minus nav */
        background-color: #ffffff;
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        gap: 0;
        align-items: center;
        padding: 1rem 0;
        z-index: 999; /* Below nav but above content */
    }

    .nav-main a,
    .nav-main select {
        width: 100%;
        padding: 1rem 0;
        text-align: center;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-main select {
        width: 90%;
        text-align: center;
    }

    #menu-toggle:checked~.nav-main {
        transform: translateX(0);
    }


    .nav-rgt {
        gap: 0.8rem;
    }

    .nav-rgt a:first-child {
        display: none;
    }

    /* --- Page Header --- */
    .header {
        font-size: 1.8rem; /* Smaller header text */
        margin-top: 2rem;
        margin-bottom: 1.5rem;
    }

    /* --- NEW: Mobile Filter Styles --- */
    .mobile-filter-toggle {
        display: block; /* Show the filter button */
        width: calc(100% - 2rem);
        margin: 0 auto 1.5rem auto;
    }

    .filter-icon-label {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
        padding: 0.75rem 1rem;
        border: 1px solid #ccc;
        border-radius: 4px;
        font-weight: 600;
        color: #333;
        cursor: pointer;
    }
    .filter-icon-label svg {
        stroke: #333;
    }

    /* Hide desktop filter bar */
    .filter-bar {
        /* Re-style as a dropdown panel */
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem; /* Space out Filter and Sort sections */
        width: calc(100% - 2rem);
        margin: 0 auto;
        
        /* Hide it by default */
        max-height: 0;
        overflow: hidden;
        transition: all 0.4s ease-in-out;
        
        /* Remove desktop-only styles */
        padding: 0;
        border: none;
        margin-bottom: 0;
    }

    .filter-lft,
    .filter-rgt {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 0.75rem; /* Space between selects */
    }

    .filter-bar span {
        font-weight: bold;
        color: #000;
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .filter-lft select,
    .filter-rgt select {
        width: 100%;
        padding: 0.75rem 0.5rem;
        border: 1px solid #eee;
        border-radius: 4px;
        background-color: #f9f9f9;
    }
    
    .filter-rgt span:last-child {
        /* Hide "42 products" text in mobile dropdown */
        display: none;
    }

    /* Show dropdown when checkbox is checked */
    #filter-toggle:checked~.filter-bar {
        max-height: 600px; /* Animate to this height */
        padding: 1.5rem 1rem;
        border: 1px solid #eee;
        margin-bottom: 2rem;
    }

    /* --- Product Grid --- */
    .product-section {
        width: 100%;
        padding: 0 0.5rem; /* Add side padding */
        justify-content: space-between;
    }

    .product {
        width: calc(50% - 1rem); /* 2-column layout */
        margin-bottom: 1rem;
    }

    .product img {
        height: 35vh; /* Adjust image height for smaller cards */
    }
    
    .product-details button {
        margin-bottom: 1rem; /* Reduce bottom margin */
    }

    /* --- Featured Brands (Same as index.css) --- */
    .feature-brand {
        width: 90%;
    }

    .brand-top,
    .brand-bottom {
        flex-direction: column;
        width: 100%;
        align-items: center;
        margin-top: 0;
        gap: 1rem;
    }

    .brand {
        width: 200px;
        height: auto;
    }


    /* --- Footer (Same as index.css) --- */
    footer {
        height: auto;
        padding: 2rem 1rem;
    }

    .footer-text {
        flex-direction: column;
        gap: 2rem;
        margin-left: 0;
        width: 100%;
        text-align: left; /* Keep text left-aligned */
        align-items: flex-start; /* Keep columns left-aligned */
    }

    .footer-text-buttom {
        flex-direction: column;
        gap: 2rem;
        padding-left: 0;
        padding-right: 0;
        align-items: center;
        width: 100%;
    }

    .footer-lft {
        width: 100%;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .input-section {
        width: 100%;
        max-width: 400px;
    }

    .footer-rgt {
        justify-content: center;
        width: 100%;
    }

    .footer-end {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* === Smallest Screens (Phones) === */
@media (max-width: 480px) {
    .product-section {
        padding: 0 0.5rem;
    }
    
    .product {
        width: 100%; /* 1-column layout */
    }

    .product img {
        height: 40vh; /* Give images a bit more height in 1-col */
    }
}