
#sub_nav {
    width: 100%;
    height: 50px;
    position: relative;
}

#subnavli {
    position: relative;
    display: grid;
    grid-auto-flow: column;
    justify-content: center;
    align-items: center;
    gap: 50px;
    height: 40px;
    top: 4px;
}

#subnavli li {
    list-style-type: none;
}

.subcat {
    position: relative;
}

.catdropdown {
    list-style: none;
    position: absolute;
    top: 120%; 
    left: 0;
    width: 250px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    z-index: 10;

    opacity: 0;
    visibility: hidden;
    transform: translateY(10px); 
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.catdropdown::before {
    content: "";
    position: absolute;
    top: -8px; /* just above the box */
    left: 20px; /* adjust horizontally as needed */
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white; /* color matches dropdown background */
    filter: drop-shadow(0 -1px 1px rgba(0,0,0,0.1)); /* subtle shadow for realism */
}

.subcat:hover .catdropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.catdropdown li {
    padding: 10px 10px;
    cursor: pointer;
}

.catdropdown li:hover {
    color: #960ffa;
}

.catpro {
    display: none;
    position: absolute;
}

li a:hover {
    list-style-type: none;
    color: #960ffa;
}

li a {
    text-decoration: none;
    color: black;
}

#banner1 {
    display: grid;
    grid-auto-flow: row;
    color: white;
    font-weight: 150;
    background: linear-gradient(
        to right,
        #32024a 0%,      /* rich purple edge */
        #4b0370 10%,     /* slightly lighter fade */
        #000 40%,        /* solid black center start */
        #000 60%,        /* solid black center end */
        #4b0370 90%,     /* fade back to purple */
        #32024a 100%     /* purple edge */
    );
    justify-items: center;
    height: 400px;
    padding-bottom: 20px;
}

#banner1 h1 {
    margin: 40px 0 10px 0;
    font-size: 4.5rem;
}

#banner1 h5 {
    text-align: center;
    width: 55%;
    margin-top: 0;
    padding: 0;
    font-weight: 250;
    font-size: 2rem;
}

.btn1 {
    background-color: transparent !important;
    padding: 15px 20px !important;
    color: white !important;
    border-color: white !important;
    border-radius: 12px !important;
    border-width: 2px !important;
    margin: 0px 20px;
}

.btn1:hover {
    background-color: #960ffa !important;
    padding: 15px 20px !important;
    border-color: #960ffa !important;
    border-width: 2px !important;
    border-radius: 12px !important;
}

#featpros {
    background-color: rgb(225, 225, 225);
    display: flex;
    align-items: center;
    flex-direction: column;
    color: black;
    padding: 30px 0px;
    margin: 50px 0px;
}

#featpros h2 {
    font-size: 2.5rem;
}

#featpros p {
    font-size: 1.3rem;
}

.product-category {
    font-size: 11px;
    width: fit-content;
    height: fit-content;
    color: #999;
    margin-bottom: 10px;
    padding: 4px;
    border: 0.8px solid rgb(213, 213, 213);
    border-radius: 8px;
    /* Add this line below: */
    transition: color 0.3s, border-color 0.3s; 
}

#pro_cards {
    width: 90%;
}

#table {
    display: grid;
    list-style-type: none;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    column-gap: 20px;
    row-gap: 20px;
    margin-top: 20px;
}

.thumb_cont {
    background-color: white;
    border-radius: 10px;
    width: fit-content;
    box-sizing: border-box;   
    border: 2px solid rgb(225, 225, 225);
    transition: border 0.1s ease, transform 0.3s ease;
    margin-bottom: 10px;
}

.thumb_cont:hover {
    transform: translateY(-5px);
    border: 2px solid #960ffa;
    cursor: pointer;
}

.thumb_cont:has(.thumbs:hover, .thumbpar:hover, .thumbtitle:hover, .product-category:hover) {
    border-color: #960ffa;
    cursor: pointer;
}

.thumb_cont:hover .product-category {
    color: #960ffa;
    border-color: #960ffa;
}

.featdet {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.detact {
    padding-left: 15px;
    padding-bottom: 15px;
}

.thumbtitle {
    font-size: 1em;
}

.thumbprice {
    font-size: 0.8em !important;
}

.thumbs {
    margin-bottom: 20px;
    height: 190px;
    border-radius: 10px 10px 0px 0px;
}

.starn {
    padding: 0;
    margin: 0;
}

.starn i {
    color: gold;
    transition: color 0.3s;
}

.starn span {
    margin: auto 6px;
    font-size: 12px;
    color: #999;
}

.thumb_cont:hover .starn i {
    color: #960ffa;
}

#featven {
    background-color: rgb(225, 225, 225);
    display: flex;
    align-items: center;
    flex-direction: column;
    color: black;
    padding-top: 30px;
    padding-bottom: 30px;
    margin-bottom: 20px;
}

#venstuff {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(370px, 1fr));
    column-gap: 50px;
    margin-top: 20px;
}

#venstuff {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    list-style-type: none;
}

#venstuff > * {
    flex: 1 1 calc(25% - 20px); /* 4 items per row minus gap */
    min-width: 370px;           /* ensures it doesn’t shrink too much */
}

.venthumbcont {
    margin: 0 auto;
}

.venthumbcont a {
    display: flex;
    flex-direction: column;
}

.venthumbs {
    width: 340px;
    background-color: #b4adba;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    border: 2px solid transparent;
    border-radius: 10px;
    margin-bottom: 30px;
    padding: 0 15px;
    transition: border-color 0.3s;
}

.vendet {
    color: #000;
    border-radius: 10px;
    transition: color 0.3s;
}

.bi {
    transition: color 0.3s;
}

.venthumbcont a:has(.child:hover) .venthumbs {
    border-color: #960ffa;
    cursor: pointer;
}

.venthumbcont a:has(.child:hover) .vendet {
    color: #960ffa;
    cursor: pointer;
}

.venthumbcont a:has(.child:hover) .bi {
    color: #960ffa;
}

.ratingbtn {
    display: flex;
    flex-direction: row;
}

.starno i {
    color: gold;
}

#bluxhead {
    margin: 50px 0;
    padding: 50px 100px;
    border-radius: 0px 75px 75px 0px;
    font-size: 2.5rem;
    width: fit-content;
    color: #960ffa;
    background-color: black;
}

#brandimgs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    width: 100%;
    height: fit-content;
}

.bluximgs {
    width: 100%;
    height: 100%;
}

#trustlux {
    display: flex;
    flex-direction: column;
    background-color: #F9F3F7;
    padding: 30px 0px;
    align-items: center;
    margin-top: 90px;
}

#trustlux h2 {
    margin: 20px 0;
    font-size: 3rem;
}

#trustlux p {
    font-size: 1.3rem;
    margin-bottom: 70px;
    text-align: center;
}

#services {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    width: 80%;
    justify-items: center;
    align-items: center;
}

.indservice {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.serviceicons {
    width: 60px;
    border-radius: 50%;
    padding: 10px;
    background-color: #EFD8EE;
    margin-bottom: 20px;
}

.indservice p {
    font-size: 1.15rem !important;
    margin-bottom: 40px !important;
    text-align: center;
}


/* Global styling */

.white_a {
    color: white;
    text-decoration: none;
}

.black_a {
    color: #000;
    text-decoration: none;
}


/* RESPONSIVE INDEX ADJUSTMENTS */
@media only screen and (max-width: 900px) {
    
    /* 1. Fix Subnav Spacing */
    #sub_nav {
        overflow-x: auto;
        white-space: nowrap;
        height: auto;
        padding: 10px 10px;
        scrollbar-width: none; /* Firefox */
    }
    
    #sub_nav::-webkit-scrollbar { display: none; } /* Chrome */

    #subnavli {
        display: flex !important; 
        width: max-content;
        padding: 0 15px; /* Add side padding */
        gap: 20px !important; /* Reduced from 50px */
        justify-content: flex-start !important; /* Align left */
    }

    /* 2. Banner Text Fixes */
    #banner1 {
        height: auto;
        padding: 60px 15px; /* Added side padding */
        text-align: center;
    }

    #banner1 h1 {
        font-size: 2.5rem;
        margin-top: 10px;
        line-height: 1.1;
    }

    .hea2 {
        font-size: 2rem;
        margin: auto;
    }

    .feat_p {
        font-size: 1rem;
        text-align: center;
    }

    #banner1 h5 {
        width: 100%;
        font-size: 1.2rem;
        margin-bottom: 30px;
    }

    #purple {
        display: flex;
        flex-direction: column;
        gap: 15px;
        width: 100%;
        align-items: center;
    }

    .btn1 {
        width: 100%;
        max-width: 300px; /* Don't let buttons get too huge */
        margin: 0 !important;
    }

    /* 3. Padding Fix for Containers (Wonky text fix) */
    #featpros, #featven {
        padding: 40px 15px; /* Added 15px side padding! */
        width: 100%;
        box-sizing: border-box; /* Ensures padding doesn't widen element */
        overflow-x: hidden; /* Prevents overflow */
    }

    /* 4. Fix Product Grid */
    #table {
        grid-template-columns: 1fr 1fr; /* 2 columns */
        column-gap: 15px;
        row-gap: 20px;
        width: 100%;
        padding: 0;
    }
    
    .thumb_cont {
        width: 100%; /* Fill the grid cell */
    }
    
    .thumbs {
        width: 100%;
        height: 150px;
        object-fit: cover;
    }

    /* 5. Fix Horizontal Overflow (Vendor Cards) */
    #venstuff {
        display: grid;
        grid-template-columns: 1fr; /* Stack vertically */
        width: 100%;
        padding: 0;
    }
    
    #venstuff > * {
        /* CRITICAL FIX: Removed min-width 370px */
        min-width: 0; 
        width: 100%;
    }
    
    .venthumbcont, .venthumbcont > a {
        width: 100%;
    }
    
    .venthumbs {
        width: 100%; /* Fill container */
        max-width: 100%;
        box-sizing: border-box;
    }

    /* 6. Branded Lux Section */
    #brandedlux {
        display: flex;
        flex-direction: column;
        overflow-x: hidden;
    }

    #bluxhead {
        border-radius: 0 50px 50px 0;
        padding: 20px;
        font-size: 1.5rem;
        width: 90%;
    }

    #brandimgs {
        display: flex;
        flex-direction: column;
        gap: 20px;
        padding: 0 15px;
    }
    
    /* 7. Services Stack */
    #services {
        grid-template-columns: 1fr;
        gap: 40px;
        width: 100%;
        padding: 0 20px;
    }

    #trustlux h2 {
        margin: 20px 0;
        font-size: 2rem;
    }
}

/* Extra tweak for very small phones */
@media only screen and (max-width: 400px) {
    #table {
        grid-template-columns: 1fr; /* 1 column products on tiny screens */
    }
}
