/* ==========================================================
   CATEGORY.CSS
   YOURSTORE / JUMIA-STYLE CATEGORY PAGE
========================================================== */


/* ==========================================================
   GLOBAL RESET
========================================================== */

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


html{
    scroll-behavior:smooth;
}


body{
    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background:#f5f5f5;

    color:#333;

    min-height:100vh;
}


button,
input,
select{
    font:inherit;
}


a{
    text-decoration:none;
    color:inherit;
}


/* ==========================================================
   NEOSTORE CATEGORY PAGE HEADER
========================================================== */

.category-page-header{

    width:100%;

    background:#fff;

    position:sticky;

    top:0;

    z-index:1000;

}


/* ==========================================================
   TRUST BAR
========================================================== */

.store-trust-bar{

    width:100%;

    min-height:40px;

    background:#101827;

    color:#fff;

    display:flex;

    align-items:center;

    justify-content:space-between;

    padding:
        0 20px;

    font-size:14px;

    font-weight:600;

}


.trust-left,
.trust-right{

    white-space:nowrap;

}


/* ==========================================================
   MAIN HEADER
========================================================== */

.store-main-header{

    width:100%;

    min-height:88px;

    display:flex;

    align-items:center;

    justify-content:space-between;

    padding:
        0 20px;

    background:#fff;

}


/* ==========================================================
   LOGO
========================================================== */

.store-logo{

    text-decoration:none;

    font-size:32px;

    font-weight:900;

    letter-spacing:-1.5px;

    color:#344054;

    white-space:nowrap;

}


.store-logo:hover{

    color:#344054;

}


/* ==========================================================
   HEADER ACTIONS
========================================================== */

.store-header-actions{

    display:flex;

    align-items:center;

    gap:25px;

}


/* ==========================================================
   SIGN IN
========================================================== */

.store-signin{

    display:flex;

    align-items:center;

    gap:7px;

    text-decoration:none;

    color:#344054;

    font-size:17px;

    font-weight:700;

    white-space:nowrap;

}


.store-signin:hover{

    color:#344054;

}


.store-user-icon{

    width:38px;

    height:38px;

    stroke-width:1.8;

}


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

.store-cart{

    position:relative;

    width:43px;

    height:45px;

    display:flex;

    align-items:center;

    justify-content:center;

    text-decoration:none;

    color:#111827;

}


.store-cart-icon{

    width:43px;

    height:43px;

    stroke-width:1.8;

}


.store-cart strong{

    position:absolute;

    top:-7px;

    right:-5px;

    min-width:25px;

    height:25px;

    padding:
        0 6px;

    border-radius:50%;

    background:#f4511e;

    color:#fff;

    display:flex;

    align-items:center;

    justify-content:center;

    font-size:13px;

    font-weight:800;

    line-height:1;

}


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

.store-search-wrapper{

    width:100%;

    padding:
        0 20px
        18px;

    background:#fff;

}


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

.store-search{

    width:100%;

    height:58px;

    background:#f3f3f5;

    border-radius:32px;

    display:flex;

    align-items:center;

    padding:
        0 8px 0 18px;

}


.search-icon{

    flex-shrink:0;

    font-size:23px;

    margin-right:12px;

}


.store-search input{

    flex:1;

    min-width:0;

    height:100%;

    border:0;

    outline:0;

    background:transparent;

    font-size:17px;

    font-weight:600;

    color:#344054;

}


.store-search input::placeholder{

    color:#667085;

    opacity:1;

}


.store-search button{

    display:none;

}


/* ==========================================================
   CATEGORY NAVIGATION
========================================================== */

.store-category-nav{

    width:100%;

    min-height:80px;

    background:#101827;

    display:flex;

    align-items:center;

    gap:8px;

    padding:
        8px 20px;

    overflow-x:auto;

    scrollbar-width:none;

}


.store-category-nav::-webkit-scrollbar{

    display:none;

}


/* ==========================================================
   CATEGORY NAV ITEM
========================================================== */

.category-nav-item{

    flex-shrink:0;

    min-height:62px;

    padding:
        0 25px;

    display:flex;

    align-items:center;

    justify-content:center;

    text-decoration:none;

    color:#fff;

    font-size:16px;

    font-weight:700;

    white-space:nowrap;

    border-radius:9px;

}


.category-nav-item:hover{

    color:#fff;

    background:
        rgba(255,255,255,.08);

}


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

.all-categories{

    min-width:175px;

    background:#fca311;

    color:#111827;

    gap:12px;

    line-height:18px;

    text-align:center;

}


.all-categories:hover{

    background:#fca311;

    color:#111827;

}


.category-menu-icon{

    font-size:21px;

}


/* ==========================================================
   DESKTOP
========================================================== */

@media (min-width:768px){

    .store-search-wrapper{

        padding-left:20px;

        padding-right:20px;

    }

}


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

@media (max-width:767px){

    .store-trust-bar{

        min-height:36px;

        padding:
            0 10px;

        font-size:12px;

        gap:10px;

        overflow:hidden;

    }


    .trust-left,
    .trust-right{

        overflow:hidden;

        text-overflow:ellipsis;

    }


    .store-main-header{

        min-height:60px;

        padding:
            0 10px;

    }


    .store-logo{

        font-size:15px;

    }


    .store-header-actions{

        gap:16px;

    }


    .store-signin{

        font-size:10px;

        gap:4px;

    }


    .store-user-icon{

        width:22px;

        height:32px;

    }


    .store-cart{

        width:22px;

        height:34px;

    }


    .store-cart-icon{

        width:42px;

        height:42px;

    }


    .store-cart strong{

        top:-7px;

        right:-10px;

        min-width:20px;

        height:20px;

        font-size:10px;

    }


    .store-search-wrapper{

        padding:
            0 18px
            10px;

    }


    .store-search{

        height:40px;

    }


    .store-search input{

        font-size:15px;

    }


    .store-category-nav{

        min-height:40px;

        padding:
            8px 20px;

        gap:6px;

    }


    .category-nav-item{

        min-height:12px;

        padding:
            0 10px;

        font-size:12px;

    }


    .all-categories{

        min-width:80px;

    }

}


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

.add-to-cart-button {

    width: 100%;

    min-height: 46px;

    border: none;

    border-radius: 6px;

    background: #f4511e;

    color: #ffffff;

    font-size: 16px;

    font-weight: 700;

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    padding: 12px 16px;

    transition:
        background 0.2s ease,
        transform 0.15s ease,
        box-shadow 0.2s ease;

}


/* ==========================================================
   CART ICON
========================================================== */

.add-to-cart-button::before {

    content: "🛒";

    font-size: 18px;

}


/* ==========================================================
   HOVER
========================================================== */

.add-to-cart-button:hover {

    background: #d84315;

    box-shadow:
        0 4px 10px
        rgba(0, 0, 0, 0.15);

}


/* ==========================================================
   PRESS
========================================================== */

.add-to-cart-button:active {

    transform: scale(0.97);

}


/* ==========================================================
   FOCUS
========================================================== */

.add-to-cart-button:focus-visible {

    outline: 3px solid
        rgba(244, 81, 30, 0.25);

    outline-offset: 2px;

}


/* ==========================================================
   DISABLED
========================================================== */

.add-to-cart-button:disabled {

    background: #bdbdbd;

    cursor: not-allowed;

    box-shadow: none;

    transform: none;

}




/* ==========================================================
   MAIN
========================================================== */

.category-main{

    width:100%;

    max-width:1400px;

    margin:auto;

}


/* ==========================================================
   CATEGORY HERO
========================================================== */

.category-hero{

    margin:
        18px
        20px;

    padding:
        28px
        30px;

    min-height:150px;

    display:flex;

    align-items:center;

    border-radius:6px;

    background:
        linear-gradient(
            135deg,
            #fff,
            #fff8f4
        );

    box-shadow:
        0 2px 8px
        rgba(0,0,0,.06);

}


.category-eyebrow{

    display:block;

    margin-bottom:8px;

    color:#f4511e;

    font-size:12px;

    font-weight:800;

    letter-spacing:1.2px;

}


.category-hero h1{

    font-size:30px;

    line-height:1.15;

    margin-bottom:8px;

    color:#222;

}


.category-hero p{

    color:#777;

    font-size:15px;

}


/* ==========================================================
   CONTENT
========================================================== */

.category-content{

    margin:
        0 20px
        30px;

}


/* ==========================================================
   TOOLBAR
========================================================== */

.category-toolbar{

    min-height:62px;

    padding:
        12px
        16px;

    background:#fff;

    border-radius:5px;

    display:flex;

    align-items:center;

    justify-content:space-between;

    gap:15px;

    margin-bottom:15px;

    box-shadow:
        0 2px 7px
        rgba(0,0,0,.06);

}


.category-toolbar strong{

    display:block;

    color:#222;

    font-size:16px;

    margin-bottom:3px;

}


.category-toolbar span{

    color:#888;

    font-size:13px;

}


#sortProducts{

    border:
        1px solid
        #ddd;

    background:#fff;

    border-radius:4px;

    padding:
        9px
        12px;

    outline:none;

    cursor:pointer;

}


/* ==========================================================
   PRODUCT GRID
========================================================== */

.category-product-grid{

    display:grid;

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

    gap:14px;

}


/* ==========================================================
   PRODUCT CARD
========================================================== */

.product-card{

    position:relative;

    background:#fff;

    border-radius:5px;

    overflow:hidden;

    min-width:0;

    box-shadow:
        0 1px 5px
        rgba(0,0,0,.08);

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

}


.product-card:hover{

    transform:
        translateY(-3px);

    box-shadow:
        0 5px 16px
        rgba(0,0,0,.13);

}


/* ==========================================================
   PRODUCT IMAGE AREA
========================================================== */

.product-image{

    position:relative;

    display:block;

    width:100%;

    height:270px;

    overflow:hidden;

    background:#f7f7f7;

}


.product-image img{

    width:100%;

    height:100%;

    display:block;

    object-fit:cover;

    transition:
        transform .3s ease;

}


.product-card:hover
.product-image img{

    transform:scale(1.04);

}


/* ==========================================================
   IMAGE FALLBACK
========================================================== */

.product-image img:not([src]),
.product-image img[src=""]{

    background:#eee;

}


/* ==========================================================
   PRODUCT BADGE
========================================================== */

.product-badge{

    position:absolute;

    top:10px;

    left:10px;

    z-index:5;

    min-height:24px;

    padding:
        4px
        8px;

    border-radius:3px;

    background:#f4511e;

    color:#fff;

    font-size:11px;

    font-weight:700;

}


.product-badge:empty{

    display:none;

}


/* ==========================================================
   PRODUCT INFO
========================================================== */

.product-info{

    padding:
        12px;

}


/* ==========================================================
   PRODUCT NAME
========================================================== */

.product-name{

    min-height:40px;

    color:#333;

    font-size:14px;

    line-height:1.4;

    font-weight:500;

    display:
        -webkit-box;

    -webkit-line-clamp:2;

    -webkit-box-orient:vertical;

    overflow:hidden;

    margin-bottom:8px;

}


/* ==========================================================
   PRICE
========================================================== */

.product-price{

    color:#f4511e;

    font-size:18px;

    font-weight:800;

    margin-bottom:5px;

}


.product-old-price{

    color:#999;

    font-size:12px;

    font-weight:400;

    text-decoration:line-through;

    margin-left:5px;

}


/* ==========================================================
   RATING
========================================================== */

.product-rating{

    color:#f5a623;

    font-size:13px;

    margin-bottom:10px;

}


.product-rating span{

    color:#888;

    margin-left:3px;

}


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

.product-add-cart{

    width:100%;

    min-height:40px;

    border:0;

    border-radius:4px;

    background:#f4511e;

    color:#fff;

    font-size:14px;

    font-weight:700;

    cursor:pointer;

    display:flex;

    align-items:center;

    justify-content:center;

    gap:7px;

    transition:
        background .2s ease,
        transform .15s ease;

}


.product-add-cart:hover{

    background:#e64a19;

}


.product-add-cart:active{

    transform:scale(.97);

}


/* ==========================================================
   EMPTY CATEGORY
========================================================== */

.category-empty{

    background:#fff;

    border-radius:6px;

    padding:
        55px
        20px;

    text-align:center;

    box-shadow:
        0 2px 8px
        rgba(0,0,0,.06);

}


.category-empty[hidden]{

    display:none;

}


.empty-icon{

    font-size:48px;

    margin-bottom:12px;

}


.category-empty h2{

    font-size:21px;

    color:#333;

    margin-bottom:8px;

}


.category-empty p{

    color:#777;

    margin-bottom:20px;

}


.back-home-button{

    display:inline-flex;

    align-items:center;

    justify-content:center;

    min-height:42px;

    padding:
        0 20px;

    border-radius:4px;

    background:#f4511e;

    color:#fff;

    font-weight:700;

}


/* ==========================================================
   FOOTER
========================================================== */

.category-footer{

    margin-top:40px;

    background:#222;

    color:#fff;

}


.footer-content{

    max-width:1400px;

    margin:auto;

    padding:
        40px 25px;

    display:grid;

    grid-template-columns:
        2fr 1fr 1fr;

    gap:40px;

}


.footer-content strong{

    color:#f4511e;

    font-size:22px;

}


.footer-content p{

    color:#bbb;

    line-height:1.6;

    margin-top:10px;

    max-width:400px;

}


.footer-content h3{

    margin-bottom:15px;

    font-size:16px;

}


.footer-content a{

    display:block;

    color:#bbb;

    margin-bottom:10px;

    font-size:14px;

}


.footer-content a:hover{

    color:#f4511e;

}


.footer-bottom{

    border-top:
        1px solid
        #444;

    text-align:center;

    padding:
        18px;

    color:#999;

    font-size:13px;

}


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

@media(
    max-width:1000px
){

    .category-header{

        gap:14px;

        padding:
            10px
            16px;

    }


    .store-logo{

        font-size:23px;

    }


    .category-product-grid{

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

    }


    .product-image{

        height:230px;

    }

}


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

@media(
    max-width:700px
){

    .category-header{

        position:relative;

        display:grid;

        grid-template-columns:
            1fr
            auto;

        gap:10px;

        padding:
            12px
            16px;

    }


    .category-header-left{

        grid-column:1;

        grid-row:1;

    }


    .category-header-actions{

        grid-column:2;

        grid-row:1;

        gap:14px;

        margin:0;

    }


    .category-header-actions
    .header-action span{

        display:none;

    }


    .category-search{

        grid-column:
            1 / -1;

        grid-row:2;

        width:100%;

        max-width:none;

        height:48px;

    }


    .store-logo{

        font-size:24px;

    }


    .category-hero{

        margin:
            12px;

        padding:
            22px
            18px;

        min-height:125px;

    }


    .category-hero h1{

        font-size:25px;

    }


    .category-content{

        margin:
            0 10px
            25px;

    }


    .category-toolbar{

        padding:
            10px;

    }


    .category-product-grid{

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap:9px;

    }


    .product-image{

        height:205px;

    }


    .product-info{

        padding:9px;

    }


    .product-name{

        font-size:13px;

        min-height:37px;

    }


    .product-price{

        font-size:16px;

    }


    .product-old-price{

        font-size:10px;

        margin-left:2px;

    }


    .product-rating{

        font-size:12px;

    }


    .product-add-cart{

        min-height:38px;

        font-size:13px;

    }


    .footer-content{

        grid-template-columns:1fr;

        gap:25px;

        padding:
            30px 20px;

    }

}


/* ==========================================================
   SMALL PHONES
========================================================== */

@media(
    max-width:400px
){

    .category-product-grid{

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap:7px;

    }


    .product-image{

        height:180px;

    }


    .product-info{

        padding:8px;

    }


    .product-price{

        font-size:15px;

    }


    .product-add-cart{

        font-size:12px;

        min-height:36px;

    }


    .category-hero{

        margin:
            10px;

    }

}


/* ==========================================================
   CART COUNT ANIMATION
========================================================== */

.cart-action.cart-updated
.cart-icon{

    animation:
        cartBounce .35s ease;

}


@keyframes cartBounce{

    0%{
        transform:scale(1);
    }

    50%{
        transform:scale(1.25);
    }

    100%{
        transform:scale(1);
    }

}


/* ==========================================================
   LOADING PRODUCT CARD
========================================================== */

.product-card.loading{

    pointer-events:none;

}


.product-card.loading
.product-image{

    background:
        linear-gradient(
            90deg,
            #f1f1f1 25%,
            #fafafa 50%,
            #f1f1f1 75%
        );

    background-size:
        200% 100%;

    animation:
        productLoading 1.2s infinite;

}


@keyframes productLoading{

    from{
        background-position:
            200% 0;
    }

    to{
        background-position:
            -200% 0;
    }

}


/* ==========================================================
   MARKETPLACE RESPONSIVE RECTANGLE AD
========================================================== */

.marketplace-ad-section {

    width: 100%;

    max-width: 100%;

    margin: 24px auto;

    padding: 0;

    box-sizing: border-box;

    overflow: hidden;

}


/* ==========================================================
   AD LABEL
========================================================== */

.marketplace-ad-label {

    width: 100%;

    margin-bottom: 6px;

    text-align: center;

    font-size: 10px;

    line-height: 1.3;

    color: #9ca3af;

    font-weight: 500;

    letter-spacing: 0.5px;

    text-transform: uppercase;

}


/* ==========================================================
   AD BOX
========================================================== */

.marketplace-ad-box {

    width: 100%;

    max-width: 728px;

    min-height: 90px;

    margin: 0 auto;

    padding: 0;

    box-sizing: border-box;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;

    background: #f8fafc;

    border: 1px solid #e5e7eb;

    border-radius: 10px;

}


/* ==========================================================
   PLACEHOLDER
========================================================== */

.marketplace-ad-placeholder {

    font-size: 12px;

    color: #9ca3af;

}


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

@media (max-width: 600px) {

    .marketplace-ad-section {

        width: 100%;

        margin: 18px auto;

        padding: 0 10px;

    }


    .marketplace-ad-box {

        width: 100%;

        max-width: 100%;

        min-height: 70px;

        border-radius: 8px;

    }


    .marketplace-ad-label {

        font-size: 9px;

        margin-bottom: 5px;

    }

}


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

@media (min-width: 601px) and (max-width: 1024px) {

    .marketplace-ad-section {

        padding: 0 20px;

    }


    .marketplace-ad-box {

        max-width: 600px;

        min-height: 90px;

    }

}


/* ==========================================================
   DESKTOP
========================================================== */

@media (min-width: 1025px) {

    .marketplace-ad-section {

        margin-top: 30px;

        margin-bottom: 30px;

    }


    .marketplace-ad-box {

        min-height: 90px;

    }

}


/* ==========================================================
   PREVENT AD FROM CAUSING PAGE OVERFLOW
========================================================== */

.marketplace-ad-section,
.marketplace-ad-box {

    max-width: 100%;

}


/* ==========================================================
   AD CONTENT SAFETY
========================================================== */

.marketplace-ad-box iframe,
.marketplace-ad-box img,
.marketplace-ad-box video {

    display: block;

    max-width: 100%;

}


/* ==========================================================
   DARK MODE
========================================================== */

@media (prefers-color-scheme: dark) {

    .marketplace-ad-box {

        background: #111827;

        border-color: #1f2937;

    }


    .marketplace-ad-label,
    .marketplace-ad-placeholder {

        color: #6b7280;

    }

}

