:root{

    --bg:#0f172a;
    --bg2:#111827;
    --card:#1e293b;

    --text:#f8fafc;
    --textSoft:#94a3b8;

    --border:rgba(255,255,255,.06);

    --orange:#f97316;
    --orangeHover:#ea580c;

    --green:#16a34a;
    --red:#dc2626;

    --shadow:0 10px 30px rgba(0,0,0,.25);

}

/* ===================================================== */
/* LIGHT THEME */
/* ===================================================== */

html[data-theme="light"]{

    --bg:#f3f4f6;
    --bg2:#ffffff;
    --card:#ffffff;

    --text:#111827;
    --textSoft:#64748b;

    --border:rgba(0,0,0,.08);

    --shadow:0 10px 25px rgba(0,0,0,.08);

}

/* ===================================================== */
/* RESET */
/* ===================================================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{

    font-family:tahoma;
    background:var(--bg);
    color:var(--text);

    overflow-x:hidden;
}

a{
    text-decoration:none;
    color:inherit;
}

button,
input,
select{
    font-family:inherit;
}

/* ===================================================== */
/* TOPBAR */
/* ===================================================== */

.shop-topbar{

    background:#020617;
    border-bottom:1px solid var(--border);

}

.shop-topbar-container{

    max-width:1500px;
    margin:auto;

    padding:10px 20px;

    display:flex;
    align-items:center;
    justify-content:space-between;

}

.topbar-right{

    display:flex;
    align-items:center;
    gap:10px;

    color:#cbd5e1;
    font-size:14px;

}

.theme-toggle{

    width:40px;
    height:40px;

    border:none;
    border-radius:12px;

    background:var(--card);
    color:var(--text);

    cursor:pointer;

    transition:.25s;

}

.theme-toggle:hover{

    background:var(--orange);

}

/* ===================================================== */
/* HEADER */
/* ===================================================== */

.shop-header{

    position:sticky;
    top:0;

    z-index:500;

    backdrop-filter:blur(16px);

}

.shop-header-main{

    background:rgba(15,23,42,.9);

    border-bottom:1px solid var(--border);

}

html[data-theme="light"] .shop-header-main{

    background:rgba(255,255,255,.92);

}

.shop-header-container{

    max-width:1500px;
    margin:auto;

    padding:14px 20px;

    display:flex;
    align-items:center;
    gap:20px;

}

/* ===================================================== */
/* LOGO */
/* ===================================================== */

.shop-logo{

    display:flex;
    align-items:center;
    gap:14px;

    min-width:max-content;

}

.shop-logo img{

    width:52px;
    height:52px;

    object-fit:contain;

}

.shop-logo-text{

    display:flex;
    flex-direction:column;

}

.shop-logo-text strong{

    font-size:20px;
    font-weight:700;

}

.shop-logo-text span{

    font-size:12px;
    color:var(--textSoft);

}

/* ===================================================== */
/* SEARCH */
/* ===================================================== */

.shop-search{

    flex:1;

}

.shop-search-box{

    height:56px;

    display:flex;
    align-items:center;
    gap:12px;

    background:var(--card);

    border:1px solid var(--border);

    border-radius:18px;

    padding:0 18px;

}

.shop-search-box i{

    color:var(--textSoft);

}

.shop-search-box input{

    flex:1;

    border:none;
    outline:none;

    background:none;

    color:var(--text);

    font-size:15px;

}

.shop-search-box button{

    border:none;

    background:var(--orange);

    color:#fff;

    padding:10px 22px;

    border-radius:12px;

    cursor:pointer;

    transition:.25s;

}

.shop-search-box button:hover{

    background:var(--orangeHover);

}

/* ===================================================== */
/* ACTIONS */
/* ===================================================== */

.shop-actions{

    display:flex;
    align-items:center;
    gap:12px;

}

.action-btn,
.cart-btn,
.login-btn{

    height:50px;

    padding:0 18px;

    border-radius:14px;

    border:1px solid var(--border);

    background:var(--card);

    color:var(--text);

    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;

    position:relative;

    transition:.25s;

}

.action-btn:hover,
.cart-btn:hover,
.login-btn:hover{

    background:var(--orange);
    color:#fff;

}

.cart-count{

    position:absolute;

    top:-6px;
    left:-6px;

    width:22px;
    height:22px;

    border-radius:50%;

    background:var(--red);

    color:#fff;

    display:flex;
    align-items:center;
    justify-content:center;

    font-size:11px;
    font-weight:700;

}

/* ===================================================== */
/* NAVBAR */
/* ===================================================== */

.shop-navbar{

    background:var(--bg2);

    border-bottom:1px solid var(--border);

}

.shop-navbar .shop-header-container{

    overflow-x:auto;
    scrollbar-width:none;

}

.shop-navbar .shop-header-container::-webkit-scrollbar{
    display:none;
}

.shop-navbar a{

    white-space:nowrap;

    padding:10px 18px;

    border-radius:12px;

    color:var(--textSoft);

    transition:.25s;

}

.shop-navbar a:hover{

    background:var(--orange);
    color:#fff;

}

/* ===================================================== */
/* MAIN */
/* ===================================================== */

.shop-main{

    min-height:100vh;

}

/* ===================================================== */
/* FOOTER */
/* ===================================================== */

.shop-footer{

    margin-top:80px;

    background:#020617;

    border-top:1px solid var(--border);

}

.footer-container{

    max-width:1500px;
    margin:auto;

    padding:60px 20px;

    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(240px,1fr));

    gap:40px;

}

.footer-logo{

    display:flex;
    align-items:center;
    gap:12px;

    margin-bottom:20px;

}

.footer-logo img{

    width:48px;
    height:48px;

}

.footer-box p,
.footer-box span,
.footer-box a{

    color:#cbd5e1;

    line-height:2;

    display:block;

}

.footer-box h3{

    margin-bottom:20px;
    font-size:20px;

}

.footer-bottom{

    padding:20px;

    text-align:center;

    border-top:1px solid var(--border);

    color:#94a3b8;

}

/* ===================================================== */
/* FLOATING */
/* ===================================================== */

.floating-buttons{

    position:fixed;

    left:25px;
    bottom:25px;

    z-index:400;

}

.floating-btn{

    width:54px;
    height:54px;

    border:none;
    border-radius:18px;

    background:var(--orange);

    color:#fff;

    cursor:pointer;

    box-shadow:var(--shadow);

    opacity:0;
    visibility:hidden;

    transition:.25s;

}

.floating-btn.show{

    opacity:1;
    visibility:visible;

}

/* ===================================================== */
/* MOBILE */
/* ===================================================== */

.mobile-menu-btn{

    display:none;

    width:50px;
    height:50px;

    border:none;
    border-radius:14px;

    background:var(--card);

    color:var(--text);

}

.mobile-menu-overlay{

    position:fixed;
    inset:0;

    background:rgba(0,0,0,.5);

    opacity:0;
    visibility:hidden;

    transition:.25s;

    z-index:450;

}

.mobile-menu-overlay.active{

    opacity:1;
    visibility:visible;

}
/* =========================================================
   MINI CART (FULLY RESPONSIVE)
========================================================= */

.cart-dropdown-wrapper{
    position:relative;
}

.mini-cart{

    position:absolute;
    top:70px;
    left:0;

    width:min(420px, calc(100vw - 24px));

    background:var(--card);
    border:1px solid var(--border);
    border-radius:28px;

    overflow:hidden;

    z-index:9999;

    opacity:0;
    visibility:hidden;

    transform:translateY(10px);
    transition:.25s;

    box-shadow:0 20px 60px rgba(0,0,0,.35);
}

.mini-cart.active{
    opacity:1;
    visibility:visible;
    transform:translateY(0);
}

/* HEADER */

.mini-cart-header{

    display:flex;
    justify-content:space-between;
    align-items:center;

    padding:20px 24px;

    border-bottom:1px solid var(--border);
}

.mini-cart-header h3{
    font-size:18px;
    font-weight:800;
}

.mini-cart-header span{
    color:var(--textSoft);
    font-size:14px;
}

/* ITEMS */

.mini-cart-items{

    max-height:420px;
    overflow-y:auto;

    padding:14px;
}

.mini-cart-item{

    display:flex;
    gap:14px;
    align-items:flex-start;

    padding:12px;

    border-radius:18px;

    transition:.2s;

    text-decoration:none;
    color:inherit;
}

.mini-cart-item:hover{
    background:var(--bgSoft);
}

.mini-cart-item img{

    width:80px;
    height:80px;

    object-fit:cover;

    border-radius:18px;

    background:#fff;

    flex-shrink:0;
}

.mini-cart-body{
    flex:1;
    min-width:0;
}

.mini-cart-body h4{

    font-size:14px;
    line-height:1.9;

    height:50px;
    overflow:hidden;

    margin-bottom:8px;
}

.mini-cart-meta{

    display:flex;
    justify-content:space-between;
    align-items:center;

    gap:10px;
}

.mini-cart-price{

    color:#f59e0b;

    font-weight:800;
    font-size:15px;
}

.mini-cart-qty{

    color:var(--textSoft);

    font-size:13px;
}

/* FOOTER */

.mini-cart-footer{

    padding:18px;

    border-top:1px solid var(--border);
}

.mini-cart-btn{

    width:100%;
    height:54px;

    border-radius:18px;

    background:var(--orange);
    color:#fff;

    text-decoration:none;

    display:flex;
    align-items:center;
    justify-content:center;

    font-weight:800;

    transition:.25s;
}

.mini-cart-btn:hover{
    background:var(--orangeHover);
}

.mini-cart-empty{

    text-align:center;

    padding:50px 20px;

    color:var(--textSoft);
}

/* REMOVE BUTTON */

.mini-cart-title{
    color:inherit;
    text-decoration:none;
}

.mini-remove-btn{

    margin-top:10px;

    height:36px;
    padding:0 14px;

    border:none;

    border-radius:12px;

    background:rgba(239,68,68,.15);
    color:#ef4444;

    font-size:13px;
    font-weight:700;

    cursor:pointer;

    transition:.2s;
}

.mini-remove-btn:hover{
    background:rgba(239,68,68,.25);
}

/* MINI CART RESPONSIVE FIX */

/* Mobile: below 768px */
@media(max-width:768px){

    .mini-cart{
        position: fixed;
        left: 8px;
        right: 8px;
        bottom: 8px;
        top: auto;
        width: calc(100% - 16px);
        max-height: 90vh; /* slightly higher */
        display: flex;
        flex-direction: column;
        border-radius: 20px;
        background: var(--ui-surface);
        box-shadow: 0 8px 28px rgba(0,0,0,0.35);
        overflow: hidden; /* clip anything overflowing */
        z-index: 9999;
    }

    .mini-cart-header{
        padding: 12px 16px;
        font-size: 16px;
        font-weight: 700;
        border-bottom: 1px solid var(--ui-border);
        flex-shrink: 0;
    }

    .mini-cart-items{
        overflow-y: auto;
        flex: 1 1 auto; /* grow and shrink */
        padding: 8px 16px;
        max-height: calc(90vh - 70px); /* reserve space for header + footer */
    }

    .mini-cart-footer{
        padding: 12px 16px;
        flex-shrink: 0;
        border-top: 1px solid var(--ui-border);
        background: var(--ui-surface-soft);
    }
}

/* Very small phones: below 420px */
@media(max-width:420px){
    .mini-cart-item img{
        width: 56px;
        height: 56px;
    }

    .mini-cart-body h4{
        font-size: 12px;
        line-height: 1.2;
    }

    .mini-cart-price{
        font-size: 13px;
    }
}

/* ===================================================== */
/* RESPONSIVE */
/* ===================================================== */

@media(max-width:1000px){

    .shop-search{
        display:none;
    }

}

@media(max-width:768px){
    .action-btn{
        display: none;
    }
    .mobile-menu-btn{
        display:flex;
        align-items:center;
        justify-content:center;
    }

    .shop-navbar{

        position:fixed;

        top:0;
        right:-300px;

        width:280px;
        height:100vh;

        z-index:500;

        transition:.3s;

        padding-top:90px;

    }

    .shop-navbar.active{

        right:0;

    }

    .shop-navbar .shop-header-container{

        flex-direction:column;
        align-items:flex-start;

    }

    .shop-navbar a{

        width:100%;

    }

    .shop-logo-text span{
        display:none;
    }

    .shop-actions{

        margin-right:auto;

    }

}