/* ==========================
   RESET
========================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family:Arial,sans-serif;
    background:#fff;
    color:#222;
    overflow-x:hidden;
}

img{
    width:100%;
    display:block;
}

a{
    text-decoration:none;
    color:inherit;
}

.container{
    width:100%;
    max-width:1400px;
    margin:auto;
    padding:0 20px;
}

/* ==========================
   HERO BANNER (FIXED)
========================== */

.hero{
    position:relative;
    width:100%;
    min-height:300px;
    padding-top:84px; /* Space for fixed desktop header */
    background-color: transparent !important;
    background-image: url('images/banner/products-banner.webp') !important; /* Root path fix */
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
}

/* Subtle overlay so white text remains readable over light/dark banner images */
.hero-overlay{
    position:absolute;
    inset:0;
    background: rgba(0, 0, 0, 0.35); 
    z-index:1;
}

.hero-content{
    position:relative;
    z-index:2;
    text-align:center;
    color:#fff;
    width:90%;
    max-width:800px;
    padding: 20px 0;
}

.hero-content h1{
    font-size:42px;
    margin-bottom:12px;
    font-weight:700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.hero-content p{
    line-height:1.8;
    font-size:16px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* ==========================
   CATEGORY BAR
========================== */

.category-bar{
    position:sticky;
    top:84px;
    z-index:100;
    background:#fff;
    border-bottom:1px solid #eee;
}

.category-scroll{
    display:flex;
    overflow-x:auto;
    white-space:nowrap;
    gap:12px;
    padding:15px 20px;
}

.category-scroll::-webkit-scrollbar{
    display:none;
}

.category-scroll a{
    padding:10px 18px;
    border-radius:50px;
    background:#f5f5f5;
    font-size:17px;
    font-weight:600;
    transition:.3s;
}

.category-scroll a:hover,
.category-scroll a.active{ 
    background:#ff6a00;
    color:#fff;
}

/* ==========================
   MOBILE CATEGORY (DEFAULT HIDE)
========================== */

.mobile-category-bar{
    display:none;
}

.mobile-category-row{
    display:flex;
    gap:10px;
    overflow-x:auto;
    padding:8px 12px;
}

.mobile-category-row::-webkit-scrollbar{
    display:none;
}

.mobile-category{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    min-width:52px;
    height:52px;
    padding:0 16px;
    border-radius:50px;
    background:#f5f5f5;
    color:#444;
    flex-shrink:0;
    transition:.3s;
}

.mobile-category i{
    font-size:20px;
}

.mobile-category span{
    display:none;
    font-size:14px;
    font-weight:600;
    white-space:nowrap;
}

.mobile-category.active{
    width:auto;
    min-width:74px;
    padding:0 14px;
    background:#ff6a00;
    color:#fff;
}

.mobile-category.active span{
    display:block;
}

/* ==========================
   PRODUCTS WRAPPER
========================== */

.products-wrapper{
    width:94%;
    max-width:1600px;
    margin:0 auto;
    padding:30px 0 80px;
}

/* ==========================
   PRODUCT SECTION
========================== */

.product-section{
    margin-bottom:30px;
}

.section-heading{
    margin-bottom:35px;
}

.section-heading h2{
    font-size:28px;
    font-weight:700;
    color:#222;
    margin:0;
    position:relative;
    display:inline-block;
}

.section-heading h2::after{
    content:'';
    position:absolute;
    left:0;
    bottom:-10px;
    width:70px;
    height:4px;
    background:#ff6a00;
    border-radius:10px;
}

/* ==========================
   PRODUCT GRID
========================== */

.product-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:40px;
}

/* ==========================
   PRODUCT CARD
========================== */

.product-card{
    display:block;
    text-decoration:none;
    background:#fff;
    border:1px solid #ececec;
    border-radius:14px;
    overflow:hidden;
    transition:all .3s ease;
}

.product-card:hover{
    transform:translateY(-6px);
    box-shadow:0 12px 30px rgba(0,0,0,.08);
}

.product-image{
    width:100%;
    height:220px;
    background:#f7f7f7;
    border-bottom:1px solid #efefef;
    overflow:hidden;
}

.product-image img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.product-content{
    padding:10px;
}

.product-content h4{
    font-size: 16px;
    font-weight:700;
    color: #ff6a00;
    margin: 0 0 6px;
}

.product-content h3{
    font-size:15px;
    font-weight:500;
    line-height:1.4;
    color:#3a3a3f;
    margin-top:10px;
    min-height:30px;
}

/* ==========================
   TABLET
========================== */

@media (max-width:1024px){
    .products-wrapper{
        width:94%;
    }

    .product-grid{
        grid-template-columns:repeat(3,1fr);
        gap:20px;
    }

    .section-heading h2{
        font-size:32px;
    }
}

/* ==========================
   MOBILE
========================== */

@media (max-width:768px){
    .hero{
        min-height:240px;
        padding-top:60px; /* Space for mobile fixed header */
    }

    .hero-content h1{
        font-size:28px;
    }

    .hero-content p{
        font-size:14px;
    }

    .products-wrapper{
        width:100%;
        padding:20px 10px;
    }

    .product-grid{
        display:grid;
        grid-template-columns:repeat(2,1fr) !important;
        column-gap: 12px;
        row-gap: 18px;
    }

    .product-card{
        width:100%;
    }

    .product-image{
        height:160px;
    }

    .product-content{
        padding:10px 10px 8px;
    }

    .product-content h3{
        font-size:12px;
        line-height:1.4;
        min-height:20px;
        margin-bottom:10px;
    }

    .view-btn{
        font-size:11px;
    }

    .section-heading h2{
        font-size:26px;
    }

    .category-bar{
        display:none;
    }

    .mobile-category-bar{
        display:block;
        position:sticky;
        top:60px;
        z-index:100;
        background:#fff;
        border-top:2px solid #FF6A00;
        border-bottom:2px solid #FF6A00;
        box-shadow:0 2px 8px rgba(0,0,0,.05);
    }

    #all,
    #solar,
    #powered,
    #wifi,
    #ipcamera,
    #hdcamera,
    #nvrdvr{
        scroll-margin-top: 195px;
    }
}

/* CATEGORY SCROLL FIX */

#solar,
#powered,
#wifi,
#ipcamera,
#hdcamera,
#nvrdvr{
    scroll-margin-top:150px;
}