/* ===============================
   GLOBAL RESET
=================================*/
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html,body{
    height:100%;
    font-family:'Poppins',sans-serif;
    background:#f5f5f5;
}

/* ===============================
   PAGE LAYOUT (Sticky Footer Setup)
=================================*/
.page-wrapper{
    min-height:100vh;
    display:flex;
    flex-direction:column;
}

/* Push footer down */
.category-page{
    flex:1;
    display:flex;
    padding:20px 5%;
    gap:20px;
}

/* =========================
   HEADER
========================= */

.header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:12px 5%;
    background:#ffffff;
    box-shadow:0 2px 8px rgba(0,0,0,0.05);
    position:sticky;
    top:0;
    z-index:1000;
}

.logo-section{
    display:flex;
    align-items:center;
    gap:15px;
}

.track-link{
    font-size:13px;
    color:#ff6b00;
    text-decoration:none;
    font-weight:600;
}

.search-box input{
    padding:8px 12px;
    width:400px;
    border-radius:6px;
    border:1px solid #ddd;
}

/* ===============================
   CART ICON
=================================*/
.cart-icon{
    position:relative;
    display:inline-block;
    font-size:22px;
    cursor:pointer;
    color:#111;
}

.cart-icon:hover{
    color:#ff6f00;
}

.cart-count{
    position:absolute;
    top:-6px;
    right:-8px;
    background:#97DE2C;
    color:#fff;
    font-size:11px;
    font-weight:600;
    min-width:18px;
    height:18px;
    padding:0 5px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
}

.cart-count:empty{
    display:none;
}

/* ===============================
   STICKY TOP CATEGORIES BAR
=================================*/
.categories{
    position:sticky;
    top:64px; /* adjust to header height */
    z-index:998;
    background:#fff;
    display:flex;
    gap:20px;
    padding:10px 5%;
    overflow-x:auto;
    scroll-behavior:smooth;
    border-bottom:1px solid #eee;
}

/* Hide scrollbar but keep scroll */
.categories::-webkit-scrollbar{
    height:4px;
}
.categories::-webkit-scrollbar-thumb{
    background:#ddd;
    border-radius:10px;
}

/* Category links */
.categories a{
    text-decoration:none;
    color:#333;
    /*font-weight:500; */
    white-space:nowrap;
    padding:6px 14px;
    border-radius:20px;
    transition:0.2s;
	font-size:14px;
}

/* Hover */
.categories a:hover{
    background:#ff6f00;
    color:#fff;
}

/* ACTIVE ITEM */
.categories a.active{
    background:#ff6f00;
    color:#fff;
}

@media(max-width:768px){

    .categories{
        gap:12px;
        padding:10px 4%;
        -webkit-overflow-scrolling:touch;
    }

}


/* =========================
   BANNER SLIDER
========================= */

.banner-slider{
    margin:20px 5%;
    height:150px;
    border-radius:15px;
    overflow:hidden;
    position:relative;
}

.slides{
    height:100%;
    position:relative;
}

.slide{
    position:absolute;
    width:100%;
    height:100%;
    background:linear-gradient(135deg,#ff6b00,#ff9f43);
    color:#fff;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    opacity:0;
    transition:opacity 0.8s ease-in-out;
    text-align:center;
    padding:20px;
}

.slide h2{
    font-size:22px;
    margin-bottom:8px;
}

.slide p{
    font-size:14px;
}

.slide.active{
    opacity:1;
}

/* =========================
   CATEGORY ICON GRID
========================= */

.category-icons{
    padding:30px 5%;
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(110px,1fr));
    gap:25px 20px;
    text-align:center;
}

.cat-item{
    text-decoration:none;
    color:#222;
    transition:0.3s;
}

.cat-item:hover{
    transform:translateY(-4px);
}

.cat-img{
    background:#eef2f7;
    border-radius:18px;
    padding:18px;
    display:flex;
    align-items:center;
    justify-content:center;
    height:110px;
    margin-bottom:10px;
    transition:0.3s;
}

.cat-item:hover .cat-img{
    background:#ffe8da;
}

.cat-img img{
    max-width:70px;
    max-height:70px;
    object-fit:contain;
}

.cat-item p{
    font-size:13px;
    font-weight:600;
    line-height:1.3;
}

/* =========================
   FOOTER
========================= */

.footer{
    background:#222;
    color:#fff;
    text-align:center;
    padding:15px;
    font-size:13px;
    margin-top:auto;
}

/* =========================
   RESPONSIVE
========================= */

@media(max-width:768px){

    .header{
        flex-wrap:wrap;
        gap:10px;
    }

    .search-box{
        order:3;
        width:100%;
        margin:0;
    }

    .banner-slider{
        height:150px;
    }

    .slide h2{
        font-size:18px;
    }

    .category-icons{
        grid-template-columns:repeat(auto-fill,minmax(90px,1fr));
    }

    .cat-img{
        height:90px;
    }

    .cat-img img{
        max-width:55px;
        max-height:55px;
    }
}


.login-link{
    text-decoration:none;
    color:#0f766e;
    font-weight:600;
}

.login-link:hover{
    color:#0d9488;
}

.user-dropdown{
    position:relative;
}

.user-name{
    cursor:pointer;
    color:#0f766e;
    font-weight:600;
    display:flex;
    align-items:center;
    gap:6px;
}

.dropdown-menu{
    display:none;
    position:absolute;
    top:35px;
    right:0;
    width:180px;
    background:#fff;
    border-radius:10px;
    box-shadow:0 10px 25px rgba(0,0,0,.12);
    z-index:9999;
    overflow:hidden;
}

.dropdown-menu a{
    display:block;
    padding:12px 16px;
    color:#333;
    text-decoration:none;
    font-size:14px;
}

.dropdown-menu a:hover{
    background:#f4f4f4;
}

.user-dropdown:hover .dropdown-menu{
    display:block;
}
