/* =========================================================
   MIXBUYS CUSTOMER GLOBAL CSS
   Desktop + Laptop + Tablet + Mobile
========================================================= */

:root{
    --primary:#2563eb;
    --primary-dark:#1d4ed8;
    --primary-light:#eff6ff;

    --text:#111827;
    --muted:#64748b;

    --bg:#f7f9fc;
    --white:#ffffff;

    --border:#e5e7eb;

    --success:#16a34a;

    --radius-sm:8px;
    --radius-md:12px;
    --radius-lg:16px;
    --radius-xl:20px;

    --shadow-sm:0 2px 8px rgba(15,23,42,.05);
    --shadow-md:0 8px 25px rgba(15,23,42,.08);
}


/* =========================================================
   RESET
========================================================= */

*,
*::before,
*::after{
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    margin:0;
    padding:0;

    background:var(--bg);

    color:var(--text);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size:14px;

    overflow-x:hidden;
}

img{
    max-width:100%;
}

a{
    -webkit-tap-highlight-color:transparent;
}


/* =========================================================
   GLOBAL CONTAINER
========================================================= */

.customer-container,
.container{
    width:100%;
    max-width:1320px;

    margin-left:auto;
    margin-right:auto;

    padding-left:24px;
    padding-right:24px;
}


/* =========================================================
   HEADER
========================================================= */

.header{
    position:sticky;
    top:0;
    z-index:1000;

    width:100%;

    background:rgba(255,255,255,.97);

    border-bottom:1px solid var(--border);

    backdrop-filter:blur(12px);
}

.header-inner{
    width:100%;
    max-width:1320px;

    min-height:70px;

    margin:auto;

    padding:12px 24px;

    display:flex;
    align-items:center;

    gap:20px;
}


/* =========================================================
   LOGO
========================================================= */

.logo{
    display:flex;
    align-items:center;

    gap:9px;

    flex-shrink:0;

    color:var(--primary);

    text-decoration:none;

    font-size:21px;
    font-weight:800;
}

.logo img{
    width:42px;
    height:42px;

    object-fit:contain;

    border-radius:9px;
}


/* =========================================================
   SEARCH
========================================================= */

.search{
    flex:1;

    width:100%;
    max-width:620px;

    margin:auto;
}

.search input{
    width:100%;
    height:44px;

    padding:0 15px;

    border:1px solid var(--border);

    border-radius:10px;

    outline:none;

    background:#f8fafc;

    color:var(--text);

    font-size:14px;

    transition:.2s ease;
}

.search input:focus{
    border-color:var(--primary);

    background:#fff;

    box-shadow:
        0 0 0 3px rgba(37,99,235,.08);
}


/* =========================================================
   HEADER ACTIONS
========================================================= */

.actions{
    display:flex;

    align-items:center;

    gap:5px;

    margin-left:auto;

    flex-shrink:0;
}

.actions a{
    display:flex;

    align-items:center;

    gap:6px;

    padding:9px 10px;

    border-radius:9px;

    color:var(--text);

    text-decoration:none;

    font-size:13px;

    font-weight:700;

    white-space:nowrap;

    transition:.2s ease;
}

.actions a:hover{
    background:var(--primary-light);

    color:var(--primary);
}


/* =========================================================
   HERO
========================================================= */

.hero{
    width:100%;

    min-height:280px;

    margin-top:20px;

    padding:45px;

    display:flex;

    align-items:center;

    border-radius:var(--radius-xl);

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary-dark)
        );

    color:#fff;

    overflow:hidden;

    box-shadow:var(--shadow-md);
}

.hero h1{
    margin:0 0 12px;

    font-size:38px;

    line-height:1.15;
}

.hero p{
    max-width:620px;

    margin:0 0 20px;

    color:#dbeafe;

    line-height:1.65;

    font-size:15px;
}

.btn{
    display:inline-flex;

    align-items:center;
    justify-content:center;

    min-height:42px;

    padding:0 18px;

    border-radius:9px;

    background:#fff;

    color:var(--primary);

    text-decoration:none;

    font-weight:700;

    font-size:13px;

    transition:.2s ease;
}

.btn:hover{
    transform:translateY(-2px);

    box-shadow:
        0 7px 18px rgba(0,0,0,.12);
}


/* =========================================================
   SECTION
========================================================= */

.section{
    width:100%;

    margin-top:30px;
}

.section-title{
    margin:0 0 15px;

    color:var(--text);

    font-size:20px;

    line-height:1.3;
}


/* =========================================================
   CATEGORY
========================================================= */

.categories{
    width:100%;

    display:flex;

    gap:12px;

    overflow-x:auto;

    padding-bottom:4px;

    scrollbar-width:none;
}

.categories::-webkit-scrollbar{
    display:none;
}

.category{
    min-width:105px;

    padding:15px 12px;

    background:#fff;

    border:1px solid var(--border);

    border-radius:var(--radius-md);

    text-align:center;

    color:var(--text);

    text-decoration:none;

    box-shadow:var(--shadow-sm);

    transition:.2s ease;
}

.category:hover{
    transform:translateY(-3px);

    border-color:var(--primary);

    box-shadow:var(--shadow-md);
}

.category-icon{
    margin-bottom:7px;

    font-size:27px;
}

.category-name{
    font-size:12px;

    font-weight:700;
}


/* =========================================================
   PRODUCT GRID
========================================================= */

.products{
    width:100%;

    display:grid;

    grid-template-columns:
        repeat(5,minmax(0,1fr));

    gap:16px;
}


/* =========================================================
   PRODUCT CARD
========================================================= */

.product{
    min-width:0;

    position:relative;

    display:block;

    overflow:hidden;

    background:#fff;

    border:1px solid var(--border);

    border-radius:var(--radius-md);

    color:var(--text);

    text-decoration:none;

    box-shadow:var(--shadow-sm);

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}

.product:hover{
    transform:translateY(-4px);

    border-color:#dbeafe;

    box-shadow:var(--shadow-md);
}


/* =========================================================
   PRODUCT IMAGE
========================================================= */

.product-image{
    position:relative;

    width:100%;

    aspect-ratio:1 / 1;

    display:flex;

    align-items:center;
    justify-content:center;

    background:#f8fafc;

    overflow:hidden;
}

.product-image img{
    display:block;

    width:100%;
    height:100%;

    object-fit:cover;

    transition:
        transform .3s ease;
}

.product:hover .product-image img{
    transform:scale(1.03);
}

.no-image{
    font-size:45px;
}


/* =========================================================
   DISCOUNT
========================================================= */

.discount-badge{
    position:absolute;

    top:9px;
    left:9px;

    padding:5px 8px;

    border-radius:6px;

    background:var(--success);

    color:#fff;

    font-size:10px;

    font-weight:800;

    line-height:1;
}


/* =========================================================
   PRODUCT INFO
========================================================= */

.product-info{
    min-width:0;

    padding:12px;
}

.product-name{
    min-height:37px;

    color:var(--text);

    font-size:13px;

    font-weight:600;

    line-height:1.4;

    display:-webkit-box;

    -webkit-box-orient:vertical;

    -webkit-line-clamp:2;

    overflow:hidden;
}

.product-category{
    margin-top:5px;

    color:var(--muted);

    font-size:10px;

    white-space:nowrap;

    overflow:hidden;

    text-overflow:ellipsis;
}


/* =========================================================
   PRICE
========================================================= */

.price-row{
    display:flex;

    align-items:center;

    flex-wrap:wrap;

    gap:6px;

    margin-top:8px;
}

.price{
    color:var(--text);

    font-size:17px;

    font-weight:800;
}

.old-price{
    color:#9ca3af;

    font-size:11px;

    text-decoration:line-through;
}


/* =========================================================
   EMPTY PRODUCTS
========================================================= */

.empty-products{
    grid-column:1 / -1;

    width:100%;

    padding:50px 20px;

    background:#fff;

    border:1px solid var(--border);

    border-radius:var(--radius-md);

    text-align:center;
}

.empty-products-icon{
    font-size:45px;
}

.empty-products h3{
    margin:10px 0 5px;

    font-size:18px;
}

.empty-products p{
    margin:0;

    color:var(--muted);

    font-size:13px;
}


/* =========================================================
   ERROR
========================================================= */

.product-error{
    grid-column:1 / -1;

    padding:18px;

    background:#fef2f2;

    border:1px solid #fecaca;

    border-radius:10px;

    color:#991b1b;

    font-size:13px;
}


/* =========================================================
   CUSTOMER BOTTOM NAV
========================================================= */

.customer-bottom-nav,
.bottom{
    display:none;
}


/* =========================================================
   LAPTOP
   1200px - 1399px
========================================================= */

@media(max-width:1399px){

    .header-inner{
        max-width:1200px;
    }

    .customer-container,
    .container{
        max-width:1200px;
    }

    .products{
        grid-template-columns:
            repeat(5,minmax(0,1fr));

        gap:14px;
    }

    .hero{
        min-height:260px;

        padding:38px;
    }

    .hero h1{
        font-size:34px;
    }
}


/* =========================================================
   TABLET / SMALL LAPTOP
   769px - 1100px
========================================================= */

@media(max-width:1100px){

    .header-inner{
        padding-left:18px;
        padding-right:18px;

        gap:14px;
    }

    .customer-container,
    .container{
        padding-left:18px;
        padding-right:18px;
    }

    .logo{
        font-size:19px;
    }

    .logo img{
        width:40px;
        height:40px;
    }

    .search{
        max-width:450px;
    }

    .actions a{
        padding:8px;
    }

    .actions a span{
        display:none;
    }

    .products{
        grid-template-columns:
            repeat(4,minmax(0,1fr));

        gap:13px;
    }

    .hero{
        min-height:240px;

        padding:32px;
    }

    .hero h1{
        font-size:30px;
    }
}


/* =========================================================
   TABLET PORTRAIT
   769px - 900px
========================================================= */

@media(max-width:900px){

    .header-inner{
        min-height:64px;
    }

    .search{
        max-width:350px;
    }

    .products{
        grid-template-columns:
            repeat(3,minmax(0,1fr));
    }

    .hero{
        min-height:220px;

        padding:28px;
    }

    .hero h1{
        font-size:28px;
    }
}


/* =========================================================
   MOBILE
   <= 768px
========================================================= */

@media(max-width:768px){

    body{
        padding-bottom:76px;
    }

    .header{
        position:sticky;

        top:0;
    }

    .header-inner{
        min-height:60px;

        padding:9px 12px;

        gap:9px;
    }

    .logo span{
        display:none;
    }

    .logo img{
        width:38px;
        height:38px;
    }

    .search{
        display:block;

        flex:1;

        max-width:none;
    }

    .search input{
        height:40px;

        font-size:13px;

        border-radius:9px;

        padding:0 12px;
    }

    .actions{
        margin-left:0;

        gap:2px;
    }

    .actions a{
        padding:7px;

        font-size:18px;

        border-radius:8px;
    }

    .actions a span{
        display:none;
    }

    .actions a:nth-child(2){
        display:none;
    }


    /* CONTAINER */

    .customer-container,
    .container{
        padding-left:12px;
        padding-right:12px;
    }


    /* HERO */

    .hero{
        min-height:210px;

        margin-top:12px;

        padding:25px 20px;

        border-radius:16px;
    }

    .hero h1{
        max-width:300px;

        margin-bottom:9px;

        font-size:25px;

        line-height:1.2;
    }

    .hero p{
        max-width:310px;

        margin-bottom:16px;

        font-size:12px;

        line-height:1.55;
    }

    .btn{
        min-height:39px;

        padding:0 15px;

        font-size:12px;
    }


    /* SECTIONS */

    .section{
        margin-top:22px;
    }

    .section-title{
        margin-bottom:12px;

        font-size:17px;
    }


    /* CATEGORIES */

    .categories{
        gap:9px;
    }

    .category{
        min-width:91px;

        padding:12px 9px;

        border-radius:10px;
    }

    .category-icon{
        font-size:24px;
    }

    .category-name{
        font-size:11px;
    }


    /* PRODUCTS */

    .products{
        grid-template-columns:
            repeat(2,minmax(0,1fr));

        gap:10px;
    }

    .product{
        border-radius:11px;
    }

    .product-info{
        padding:9px;
    }

    .product-name{
        min-height:31px;

        font-size:11px;
    }

    .product-category{
        margin-top:4px;

        font-size:9px;
    }

    .price-row{
        margin-top:6px;

        gap:5px;
    }

    .price{
        font-size:14px;
    }

    .old-price{
        font-size:10px;
    }

    .discount-badge{
        top:7px;
        left:7px;

        padding:4px 5px;

        font-size:9px;
    }


    /* =====================================================
       MOBILE BOTTOM NAV
    ===================================================== */

    .customer-bottom-nav,
    .bottom{
        position:fixed;

        left:0;
        right:0;
        bottom:0;

        z-index:9999;

        height:68px;

        display:flex;

        align-items:center;
        justify-content:space-around;

        padding:
            6px 7px
            env(safe-area-inset-bottom);

        background:
            rgba(255,255,255,.98);

        border-top:1px solid var(--border);

        box-shadow:
            0 -5px 20px rgba(15,23,42,.07);

        backdrop-filter:blur(12px);
    }

    .customer-bottom-nav a,
    .bottom a{
        position:relative;

        min-width:55px;

        height:54px;

        display:flex;

        flex-direction:column;

        align-items:center;
        justify-content:center;

        gap:3px;

        border-radius:11px;

        color:#64748b;

        text-decoration:none;

        font-size:10px;

        font-weight:700;

        transition:.2s ease;
    }

    .customer-bottom-nav a:hover,
    .bottom a:hover{
        color:var(--primary);

        background:var(--primary-light);
    }

    .customer-bottom-nav a.active,
    .bottom a.active{
        color:var(--primary);

        background:var(--primary-light);
    }

    .bottom-icon,
    .customer-bottom-nav .bottom-icon{
        display:flex;

        align-items:center;
        justify-content:center;

        font-size:19px;

        line-height:1;
    }

}


/* =========================================================
   SMALL MOBILE
   <= 480px
========================================================= */

@media(max-width:480px){

    .header-inner{
        padding-left:10px;
        padding-right:10px;
    }

    .logo img{
        width:36px;
        height:36px;
    }

    .search input{
        height:38px;
    }

    .actions a{
        font-size:17px;

        padding:6px;
    }

    .hero{
        min-height:195px;

        padding:22px 17px;
    }

    .hero h1{
        font-size:23px;
    }

    .hero p{
        font-size:11px;
    }

    .products{
        gap:8px;
    }

    .product-info{
        padding:8px;
    }

    .product-name{
        font-size:10.5px;
    }

    .price{
        font-size:13px;
    }

    .old-price{
        font-size:9px;
    }

    .category{
        min-width:86px;
    }
}


/* =========================================================
   VERY SMALL MOBILE
   <= 380px
========================================================= */

@media(max-width:380px){

    .header-inner{
        gap:6px;
    }

    .logo img{
        width:34px;
        height:34px;
    }

    .search input{
        font-size:12px;

        padding-left:10px;
        padding-right:10px;
    }

    .actions a{
        padding:5px;

        font-size:16px;
    }

    .hero{
        min-height:185px;
    }

    .hero h1{
        font-size:21px;
    }

    .products{
        gap:7px;
    }

    .product-name{
        font-size:10px;
    }

    .price{
        font-size:12px;
    }

    .customer-bottom-nav a,
    .bottom a{
        min-width:50px;
    }

}


/* =========================================================
   LANDSCAPE MOBILE
========================================================= */

@media(max-width:768px) and (orientation:landscape){

    .hero{
        min-height:180px;
    }

    .products{
        grid-template-columns:
            repeat(3,minmax(0,1fr));
    }

    .customer-bottom-nav,
    .bottom{
        height:60px;
    }
}


/* =========================================================
   TOUCH DEVICES
========================================================= */

@media(hover:none){

    .product:hover,
    .category:hover,
    .btn:hover{
        transform:none;

        box-shadow:none;
    }
}


/* =========================================================
   ACCESSIBILITY
========================================================= */

button,
a,
input{
    -webkit-tap-highlight-color:transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible{
    outline:
        3px solid rgba(37,99,235,.25);

    outline-offset:2px;
}


/* =========================================================
   PREVENT HORIZONTAL BREAK
========================================================= */

html,
body{
    max-width:100%;

    overflow-x:hidden;
}

main,
section,
header,
nav,
div{
    max-width:100%;
}