*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html, body{
    font-family:'Segoe UI', Arial, sans-serif;
    background:#f8fafc;
    overflow-x:hidden;
    width:100%;
    max-width:100vw;
}

/* ==========================
   BANNER
========================== */

.store-banner{
    position:relative;
    overflow:hidden;
    background:linear-gradient(135deg,#1d4ed8,#2563eb 55%,#3b82f6);
    color:white;
    text-align:center;
    padding:90px 20px;
}

.banner-glow{
    position:absolute;
    top:-60%;
    left:50%;
    width:600px;
    height:600px;
    transform:translateX(-50%);
    background:radial-gradient(circle, rgba(255,255,255,0.18), transparent 65%);
    pointer-events:none;
}

.store-banner h1{
    position:relative;
    font-size:46px;
    font-weight:800;
    letter-spacing:-1px;
    animation:fadeUp .6s ease forwards;
}

.store-banner p{
    position:relative;
    margin-top:10px;
    font-size:16px;
    color:#dbeafe;
    animation:fadeUp .6s ease .1s forwards;
    opacity:0;
}

@keyframes fadeUp{
    from{ opacity:0; transform:translateY(16px); }
    to{ opacity:1; transform:translateY(0); }
}

/* ==========================
   SEARCH
========================== */

.search-section{
    width:100%;
    padding:45px 16px 0;
    text-align:center;
    margin-top:-35px;
    position:relative;
    z-index:10;
    box-sizing:border-box;
}

.search-section.search-active{
    margin-top:0;
    padding:30px 16px 0;
}

.search-form{
    display:flex;
    align-items:center;
    flex-wrap:nowrap;
    gap:8px;
    background:#ffffff;
    padding:6px 6px 6px 16px;
    border-radius:999px;
    box-shadow:0 10px 30px rgba(15,23,42,0.12);
    width:100%;
    max-width:580px;
    margin:0 auto;
    box-sizing:border-box;
    border:1.5px solid transparent;
    overflow:hidden;
    transition:all .2s ease;
}

.search-form:focus-within{
    border-color:#2563eb;
    box-shadow:0 10px 30px rgba(37,99,235,0.18);
}

.search-icon{
    color:#94a3b8;
    flex-shrink:0;
}

.search-section input{
    flex:1 1 0px;
    min-width:0;
    width:0;
    border:none;
    outline:none;
    padding:9px 4px;
    font-size:14.5px;
    background:transparent;
    color:#0f172a;
    font-family:inherit;
    text-overflow:ellipsis;
    overflow:hidden;
    white-space:nowrap;
}

.clear-search-btn{
    background:#f1f5f9;
    color:#64748b;
    border:none;
    width:26px;
    height:26px;
    border-radius:50%;
    cursor:pointer;
    font-size:12px;
    font-weight:700;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    transition:all .2s ease;
    flex-shrink:0;
    padding:0;
    line-height:1;
}

.clear-search-btn:hover{
    background:#e2e8f0;
    color:#0f172a;
    transform:scale(1.08);
}

.search-section button[type="submit"],
.search-section button#searchSubmitBtn{
    background:#2563eb;
    color:white;
    border:none;
    padding:10px 22px;
    border-radius:999px;
    cursor:pointer;
    font-weight:600;
    font-size:14px;
    transition:all .25s ease;
    flex-shrink:0;
    white-space:nowrap;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    line-height:1;
}

.search-section button[type="submit"]:hover,
.search-section button#searchSubmitBtn:hover{
    background:#1d4ed8;
    transform:translateY(-1px);
    box-shadow:0 4px 12px rgba(37,99,235,.25);
}

.search-nav-bar{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:16px;
    flex-wrap:wrap;
    margin-top:16px;
    animation:fadeUp .4s ease forwards;
}

.back-to-store-btn{
    display:inline-flex;
    align-items:center;
    gap:6px;
    background:#ffffff;
    color:#2563eb;
    border:1.5px solid #bfdbfe;
    padding:8px 16px;
    border-radius:999px;
    font-size:13px;
    font-weight:600;
    text-decoration:none;
    box-shadow:0 2px 8px rgba(37,99,235,0.08);
    transition:all .2s ease;
}

.back-to-store-btn:hover{
    background:#eff6ff;
    border-color:#2563eb;
    color:#1d4ed8;
    transform:translateX(-2px);
}

.search-result-count{
    font-size:14px;
    color:#64748b;
    font-weight:500;
}

.search-result-count strong{
    color:#0f172a;
}

/* ==========================
   CATEGORIES
========================== */

.categories{
    padding:10px 5% 10px;
    text-align:center;

}

.categories h2{
    font-size:26px;
    color:#0f172a;
    margin-bottom:10px;
}

.category-container{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:25px;
    margin-top:35px;
}

.category-card{
    background:#ffffff;
    border-radius:18px;
    padding:25px 20px;
    text-decoration:none;
    color:#222;
    box-shadow:0 5px 18px rgba(0,0,0,.08);
    transition:.3s;
    opacity:0;
    animation:fadeUp .5s ease forwards;
}

.category-card:hover{
    transform:translateY(-8px);
    box-shadow:0 12px 28px rgba(0,0,0,.15);
}

.category-card img{
    width:100px;
    height:100px;
    object-fit:contain;
    margin:auto;
    display:block;
    transition:.3s;
}

.category-card:hover img{
    transform:scale(1.08) rotate(-2deg);
}

.category-card h3{
    margin-top:18px;
    font-size:20px;
    font-weight:600;
}

/* ==========================
   PRODUCTS
========================== */

.products{
    padding:50px 5%;
    background:#f8fafc;
}

.products h2{
    text-align:center;
    margin-bottom:35px;
    font-size:26px;
    color:#0f172a;
}

.product-container{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:25px;
}

.product-link{
    text-decoration:none;
    color:inherit;
}

.product-card{
    background:white;
    border:1px solid #eef2f7;
    border-radius:14px;
    box-shadow:0 2px 10px rgba(0,0,0,0.06);
    padding:16px;
    text-align:left;
    transition:.3s;
    height:100%;
    cursor:pointer;
    opacity:0;
    animation:fadeUp .5s ease forwards;
    display:flex;
    flex-direction:column;
}

.product-card:hover{
    transform:translateY(-6px);
    box-shadow:0 14px 28px rgba(0,0,0,.12);
    border-color:#dbeafe;
}

.product-image-wrap{
    position:relative;
    margin-bottom:14px;
}

.product-card img{
    width:100%;
    height:220px;
    object-fit:contain;
    transition:.35s;
}

.product-card:hover img{
    transform:scale(1.05);
}

.badge{
    position:absolute;
    top:6px;
    left:6px;
    font-size:11px;
    font-weight:700;
    padding:5px 10px;
    border-radius:999px;
    text-transform:uppercase;
    letter-spacing:.3px;
    z-index:2;
}

.badge-low{
    background:#fef3c7;
    color:#b45309;
}

.badge-out{
    background:#fee2e2;
    color:#dc2626;
}

.category-tag{
    display:inline-block;
    font-size:11px;
    font-weight:700;
    color:#2563eb;
    background:#eff6ff;
    padding:4px 10px;
    border-radius:999px;
    text-transform:uppercase;
    letter-spacing:.3px;
    margin-bottom:8px;
    align-self:flex-start;
}

.product-card h3{
    font-size:17px;
    margin-bottom:10px;
    color:#0f172a;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
}

.card-bottom{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-top:auto;
}

.price{
    font-size:22px;
    font-weight:800;
    color:#16a34a;
}

.stock{
    font-size:12px;
    font-weight:700;
    color:#16a34a;
}

.stock-zero{
    color:#dc2626;
}

/* ==========================
   ADD TO CART BUTTON
========================== */

.add-cart-btn{

    width:100%;

    display:flex;

    align-items:center;

    justify-content:center;

    gap:8px;

    background:#ffffff;

    color:#218c1d;

    border:1.5px solid #218c1d;

    padding:11px;

    border-radius:8px;

    cursor:pointer;

    margin-top:14px;

    font-weight:700;

    font-size:15px;

    transition:.25s ease;
    
}


/* Hover */

.add-cart-btn:hover{
    background:#218c1d;
    color:#ffffff;
    transform:translateY(-2px);
    box-shadow:0 6px 16px rgba(33,140,29,.20);
}


/* In Cart (Go to Cart) */
.add-cart-btn.in-cart{
    background:#2563eb;
    color:#ffffff;
    border:1.5px solid #2563eb;
    text-decoration:none;
}

.add-cart-btn.in-cart:hover{
    background:#1d4ed8;
    color:#ffffff;
    border-color:#1d4ed8;
    transform:translateY(-2px);
    box-shadow:0 6px 16px rgba(37,99,235,.25);
}

/* Out of Stock */

.add-cart-btn.disabled,
.add-cart-btn:disabled{

    background:#e5e7eb;

    color:#6b7280;

    border-color:#d1d5db;

    cursor:not-allowed;

    transform:none;

    box-shadow:none;

}

.no-products{
    width:100%;
    text-align:center;
    padding:70px 20px;
    color:#94a3b8;
}

.no-products svg{
    margin-bottom:14px;
    color:#cbd5e1;
}

.no-products h2{
    color:#ef4444;
    margin-bottom:10px;
    font-size:20px;
}

.no-products p{
    color:#64748b;
    font-size:14px;
}

/* ==========================
   FLOATING CART
========================== */

.floating-cart{

    position:fixed;

    right:20px;
    bottom:90px;

    width:58px;
    height:58px;

    background:#2563eb;

    color:#ffffff;

    border-radius:50%;

    display:flex;

    align-items:center;
    justify-content:center;

    cursor:grab;

    z-index:9998;

    box-shadow:
        0 8px 25px rgba(37,99,235,.35);

    user-select:none;

    touch-action:none;

    transition:
        transform .2s ease,
        box-shadow .2s ease;

}


/* Hover */

.floating-cart:hover{
    transform:scale(1.08);
    box-shadow:
        0 12px 30px rgba(37,99,235,.45);

}


/* While dragging */

.floating-cart.dragging{

    cursor:grabbing;

    transform:scale(1.08);

    box-shadow:
        0 15px 35px rgba(37,99,235,.50);

}


/* Cart Icon */

.floating-cart-icon{

    font-size:25px;

    line-height:1;

}


/* Cart Count */

.floating-cart-count{

    position:absolute;

    top:-5px;
    right:-5px;

    min-width:22px;
    height:22px;

    padding:0 5px;

    display:flex;

    align-items:center;
    justify-content:center;

    background:#dc2626;

    color:#ffffff;

    border:2px solid #ffffff;

    border-radius:50%;

    font-size:11px;

    font-weight:800;

    line-height:1;

}


/* ==========================
   FLOATING CART MOBILE
========================== */

@media(max-width:768px){

    .floating-cart{

        width:52px;
        height:52px;

        right:14px;
        bottom:75px;

    }

    .floating-cart-icon{

        font-size:22px;

    }

    .floating-cart-count{
        min-width:20px;
        height:20px;
        font-size:10px;
        top:-4px;
        right:-4px;

    }

}

/* ==========================
   MOBILE VIEW
========================== */

@media(max-width:768px){
    .store-banner{
        padding:54px 16px 36px;
        margin-top:0;
    }
    .store-banner h1{
        font-size:28px;
    }
    .store-banner p{
        font-size:13.5px;
        margin-top:6px;
    }

    .search-section{
        padding:18px 12px 0;
        margin-top:0;
    }

    .search-section.search-active{
        padding:16px 12px 0;
        margin-top:0;
    }

    .search-form{
        width:82%;
        max-width:350px;
        min-height:58px;
        padding:5px 6px 5px 15px;
        gap:6px;
    }

    .search-icon{
        width:17px;
        height:17px;
    }

    .search-section input{
        font-size:13.5px;
        padding:8px 3px;
    }

    .search-section button[type="submit"],
    .search-section button#searchSubmitBtn{
        padding:9px 16px;
        font-size:13px;
        min-height:44px;
    }

    .search-nav-bar{
        gap:10px;
        margin-top:12px;
    }

    .back-to-store-btn{
        font-size:12px;
        padding:7px 14px;
    }

    .search-result-count{
        font-size:12px;
    }

    .categories{
        padding:35px 5% 10px;
    }

    .category-container{
        grid-template-columns:repeat(2,1fr);
        gap:15px;
        margin-top:25px;
    }

    .category-card{
        padding:18px 12px;
    }

    .category-card img{
        width:70px;
        height:70px;
    }

    .category-card h3{
        font-size:16px;
        margin-top:12px;
    }

    .products{
        padding:35px 10px;
    }

    .product-container{
        grid-template-columns:repeat(2,1fr);
        gap:10px;
    }

    .product-card{
        padding:10px;
        border-radius:10px;
    }

    .product-card img{
        height:130px;
    }

    .product-card h3{
        font-size:13px;
        min-height:34px;
    }

    .price{
        font-size:16px;
    }

    .stock{
        font-size:11px;
    }

    .add-cart-btn{
        font-size:12px;
        padding:9px;

    }

}


/* ==========================================
   CATEGORIES PAGE
========================================== */

.categories {
    width: 100%;
    min-height: auto;
    padding: 10px 5% 10px;
    background: #f7f9fc;
    box-sizing: border-box;
}


/* ==========================================
   PAGE TITLE
========================================== */

.categories > h2 {
    text-align: center;
    margin: 0 0 40px;

    font-size: 36px;
    font-weight: 800;

    color: #111827;
}


/* ==========================================
   CATEGORY CONTAINER
========================================== */

.category-container {
    max-width: 1200px;
    margin: 0 auto;

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 25px;
}


/* ==========================================
   CATEGORY CARD
========================================== */

.category-card {
    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    min-height: 220px;

    padding: 25px 20px;

    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 18px;

    text-decoration: none;

    color: #111827;

    box-shadow:
        0 8px 25px
        rgba(15, 23, 42, 0.07);

    box-sizing: border-box;

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}


.category-card:hover {
    transform: translateY(-7px);

    border-color: #2563eb;

    box-shadow:
        0 16px 35px
        rgba(15, 23, 42, 0.13);
}


/* ==========================================
   CATEGORY IMAGE
========================================== */

.category-card img {
    width: 120px;
    
    height: 120px;

    object-fit: contain;

    margin-bottom: 18px;

    border-radius: 12px;

    transition:
        transform 0.3s ease;
}


.category-card:hover img {
    transform: scale(1.06);
}


/* ==========================================
   CATEGORY NAME
========================================== */

.category-card h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    color: #1f2937;
    line-height: 1.4;
}


/* ==========================================
   NO CATEGORY MESSAGE
========================================== */

.category-container > p {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #6b7280;
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
}


/* ==========================================
   TABLET
========================================== */

@media (max-width: 992px) {
    .category-container {
        grid-template-columns:
            repeat(3, 1fr);
        gap: 20px;
    }

}


/* ==========================================
   MOBILE
========================================== */

@media (max-width: 768px) {
    .categories {
        padding:
            25px 18px 10px;
    }


    .categories > h2 {
        font-size: 30px;
        margin-bottom: 30px;
    }


    .category-container {
        grid-template-columns:
            repeat(2, 1fr);
        gap: 16px;
    }


    .category-card {
        min-height: 180px;
        padding: 18px 12px;
        border-radius: 15px;
    }


    .category-card img {
        width: 90px;
        height: 90px;
        margin-bottom: 14px;
    }


    .category-card h3 {
        font-size: 15px;
    }

}


/* ==========================================
   SMALL MOBILE
========================================== */

@media (max-width: 480px) {

    .store-banner{
        padding:55px 14px 45px;
    }

    .store-banner h1{
        font-size:26px;
    }

    .store-banner p{
        font-size:13.5px;
    }

    .search-section{
        padding:16px 12px 0;
        margin-top:0;
    }

    .search-section.search-active{
        padding:14px 12px 0;
        margin-top:0;
    }

    .search-form{
        width:82%;
        max-width:330px;
        min-height:60px;
        padding:4px 5px 4px 14px;
        gap:6px;
    }

    .search-icon{
        width:16px;
        height:16px;
    }

    .search-section input{
        font-size:13px;
        padding:8px 3px;
    }

    .search-section button[type="submit"],
    .search-section button#searchSubmitBtn{
        padding:8px 15px;
        font-size:12.5px;
        min-height:45px;
    }

    .clear-search-btn{
        width:22px;
        height:22px;
        font-size:10px;
    }

    .categories {
        padding:
            20px 12px 10px;
    }

    .categories > h2 {
        font-size: 26px;
        margin-bottom: 25px;
    }

    .category-container {
        grid-template-columns:
            repeat(2, 1fr);
        gap: 12px;
    }

    .category-card {
        min-height: 160px;
        padding: 15px 8px;
    }

    .category-card img {
        width: 105px;
        height: 105px;
        margin-bottom: 12px;
    }

    .category-card h3 {
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    .search-section{
        padding:14px 8px 0;
        margin-top:0;
    }

    .search-form{
        width:86%;
        max-width:300px;
        min-height:44px;
        padding:4px 4px 4px 12px;
        gap:5px;
        border-radius:999px;
        overflow:hidden;
    }

    .search-icon{
        width:15px;
        height:15px;
    }

    .search-section input{
        font-size:12.5px;
        padding:7px 2px;
    }

    .search-section button[type="submit"],
    .search-section button#searchSubmitBtn{
        padding:7px 13px;
        font-size:12px;
        min-height:33px;
    }

    .clear-search-btn{
        width:20px;
        height:20px;
        font-size:10px;
    }
}

@media (max-width: 320px) {
    .search-section{
        padding:12px 6px 0;
        margin-top:0;
    }

    .search-form{
        width:90%;
        max-width:275px;
        min-height:42px;
        padding:3px 3px 3px 10px;
        gap:3px;
        border-radius:999px;
        overflow:hidden;
    }

    .search-icon{
        width:13px;
        height:13px;
    }

    .search-section input{
        font-size:11.5px;
        padding:6px 2px;
    }

    .search-section button[type="submit"],
    .search-section button#searchSubmitBtn{
        padding:6px 10px;
        font-size:11px;
        min-height:31px;
    }

    .clear-search-btn{
        width:18px;
        height:18px;
        font-size:9px;
    }
}