/* =========================================
   PREMIUM ECOMMERCE FRONTEND UI
========================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root{
    --primary: #2563eb;
    --secondary: #7c3aed;
    --dark: #0f172a;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --light: #f8fafc;
    --white: #ffffff;
    --danger: #dc2626;
    --success: #16a34a;
    --shadow: 0 15px 40px rgba(0,0,0,0.08);
    --radius: 20px;
}

/* =========================================
   RESET
========================================= */

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html{
    scroll-behavior: smooth;
}

body{
    font-family: 'Inter', sans-serif;
    background: var(--white);
    color: var(--text);
    overflow-x: hidden;
}

a{
    text-decoration: none;
    color: inherit;
}

ul{
    list-style: none;
    margin: 0;
    padding: 0;
}

img{
    max-width: 100%;
    display: block;
}

.site-wrapper{
    overflow-x: hidden;
}

/* =========================================
   CONTAINER
========================================= */

.container{
    max-width: 1280px;
}

/* =========================================
   TOPBAR
========================================= */

.user-topbar{
    background: var(--dark);
    color: var(--white);
    font-size: 14px;
}

.user-topbar-inner{
    min-height: 42px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar-left span{
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-right{
    display: flex;
    align-items: center;
    gap: 24px;
}

.topbar-right a{
    opacity: 0.8;
    transition: 0.3s ease;
}

.topbar-right a:hover{
    opacity: 1;
}

/* =========================================
   NAVBAR
========================================= */

.user-navbar{
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
}

.user-navbar-inner{
    min-height: 82px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* =========================================
   LOGO
========================================= */

.user-logo{
    font-size: 32px;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -1px;
}

.user-logo span{
    color: var(--primary);
}

/* =========================================
   MENU
========================================= */

.user-menu{
    display: flex;
    align-items: center;
    gap: 36px;
}

.user-menu li a{
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    position: relative;
    transition: 0.3s ease;
}

.user-menu li a:hover{
    color: var(--primary);
}

.user-menu li a::after{
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 0%;
    height: 2px;
    background: var(--primary);
    transition: 0.3s ease;
}

.user-menu li a:hover::after{
    width: 100%;
}

/* =========================================
   NAV ACTIONS
========================================= */

.user-nav-actions{
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-round-btn{
    width: 44px;
    height: 44px;

    border-radius: 50%;
    border: 1px solid var(--border);

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--white);

    font-size: 18px;

    position: relative;

    transition: 0.3s ease;
}

.nav-round-btn:hover{
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}


/*Categories dropdown*/



.user-menu .has-dropdown{
    position: relative;
}

.category-dropdown-btn{
    background: transparent;
    border: none;
    padding: 0;

    font-size: 15px;
    font-weight: 600;
    color: #374151;

    display: flex;
    align-items: center;
    gap: 6px;

    cursor: pointer;
    transition: 0.3s ease;
}

.category-dropdown-btn:hover{
    color: var(--primary);
}

.user-menu .has-dropdown .dropdown-menu{
    position: absolute;
    top: 100%;
    left: -10px;

    min-width: 260px;

    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;

    padding: 8px;

    opacity: 0;
    visibility: hidden;

    transform: translateY(8px);

    box-shadow: 0 18px 40px rgba(15,23,42,.12);

    z-index: 9999;

    transition: .25s ease;

    /* IMPORTANT */
    pointer-events: auto;
}

/* THIS FIXES THE DISAPPEARING ISSUE */
.user-menu .has-dropdown:hover .dropdown-menu,
.user-menu .has-dropdown .dropdown-menu:hover{
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu .has-dropdown .dropdown-menu li{
    list-style: none;
}

.user-menu .has-dropdown .dropdown-menu li a{
    display: block;

    padding: 11px 14px;

    border-radius: 10px;

    font-size: 14px;
    font-weight: 600;

    color: #374151;

    text-decoration: none;

    transition: .2s ease;
}

.user-menu .has-dropdown .dropdown-menu li a:hover{
    background: #f1f5f9;
    color: var(--primary);
}

.dropdown-empty{
    display: block;
    padding: 12px 14px;
    color: #6b7280;
    font-size: 14px;
}



/* =========================================
   CART BADGE
========================================= */

.cart-badge{
    position: absolute;
    top: -4px;
    right: -4px;

    width: 20px;
    height: 20px;

    border-radius: 50%;

    background: var(--danger);
    color: var(--white);

    font-size: 11px;
    font-weight: 700;

    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================================
   LOGIN BUTTON
========================================= */

.login-pill{
    height: 46px;
    padding: 0 22px;

    border-radius: 999px;

    background: linear-gradient(
        135deg,
        var(--primary),
        var(--secondary)
    );

    color: var(--white);

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 14px;
    font-weight: 700;

    transition: 0.3s ease;
}

.login-pill:hover{
    transform: translateY(-2px);
    color: var(--white);

    box-shadow: 0 10px 25px rgba(37,99,235,0.25);
}

/* =========================================
   CUSTOMER MENU
========================================= */

.customer-menu{
    display: flex;
    align-items: center;
    gap: 10px;
}

.customer-pill{
    height: 46px;
    padding: 0 18px;

    border-radius: 999px;

    background: #eff6ff;
    color: var(--primary);

    display: inline-flex;
    align-items: center;
    gap: 8px;

    font-size: 14px;
    font-weight: 700;

    transition: 0.3s ease;
}

.customer-pill:hover{
    background: var(--primary);
    color: var(--white);
}

.logout-pill{
    height: 46px;
    padding: 0 18px;

    border-radius: 999px;

    background: #fee2e2;
    color: #b91c1c;

    display: inline-flex;
    align-items: center;

    font-size: 14px;
    font-weight: 700;

    transition: 0.3s ease;
}

.logout-pill:hover{
    background: #b91c1c;
    color: var(--white);
}

/* =========================================
   MOBILE MENU BUTTON
========================================= */

.mobile-menu-btn{
    display: none;

    width: 46px;
    height: 46px;

    border: none;
    border-radius: 50%;

    background: var(--dark);
    color: var(--white);

    font-size: 22px;
}


/* ===============================
   FRONT NAV CATEGORY MEGA MENU
================================ */

.user-menu li{
    position: relative;
}

.nav-category-parent{
    position: relative;
}

.nav-category-parent > a{
    display: flex;
    align-items: center;
    gap: 6px;
}

.mega-menu{
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(14px);
    width: 720px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 24px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 9999;
    transition: 0.25s ease;
}

.nav-category-parent:hover .mega-menu{
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(8px);
}

.mega-menu-column{
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mega-parent{
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    text-decoration: none;
    margin-bottom: 4px;
}

.mega-child{
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
}

.mega-parent:hover,
.mega-child:hover{
    color: #2563eb;
}

@media(max-width: 991px){
    .mega-menu{
        position: static;
        width: 100%;
        transform: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        box-shadow: none;
        border: 0;
        border-radius: 0;
        padding: 12px 0 0;
        display: none;
        grid-template-columns: 1fr;
    }

    .nav-category-parent:hover .mega-menu{
        display: grid;
        transform: none;
    }
}


/* User Account Dropdown */
.account-dropdown{
    position:relative;
}

.account-trigger{
    border:none;
    background:none;
    display:flex;
    align-items:center;
    gap:8px;
    font-weight:600;
    cursor:pointer;
}

.account-dropdown-menu{
    position:absolute;
    top:100%;
    right:0;
    width:240px;

    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:16px;

    padding:10px;

    opacity:0;
    visibility:hidden;
    transform:translateY(10px);

    transition:.25s ease;

    box-shadow:0 20px 40px rgba(0,0,0,.08);
    z-index:9999;
}

.account-dropdown:hover .account-dropdown-menu{
    opacity:1;
    visibility:visible;
    transform:translateY(0);
}

.account-dropdown-menu a{
    display:block;
    padding:12px 14px;
    border-radius:12px;
    color:#111827;
    font-size:14px;
    font-weight:600;
}

.account-dropdown-menu a:hover{
    background:#f8fafc;
    color:#2563eb;
}

/* =========================================
   FOOTER
========================================= */

.user-footer{
    background: var(--dark);
    color: var(--white);

    padding-top: 90px;
    margin-top: 100px;

    position: relative;
    overflow: hidden;
}

/* =========================================
   GRID
========================================= */

.footer-grid{
    display: flex;
    justify-content: space-between;
    gap: 34px;
    flex-wrap: nowrap;
}

.footer-column{
    flex: 1;
    min-width: 0;
}

/* First column slightly bigger */
.footer-column:first-child{
    flex: 1.7;
}

/* =========================================
   LOGO
========================================= */

.footer-logo{
    font-size: 32px;
    font-weight: 800;
    display: inline-block;
    margin-bottom: 10px;
}

.footer-logo span{
    color: var(--primary);
}

/* =========================================
   ABOUT
========================================= */

.footer-about{
    margin-top: 18px;

    line-height: 1.9;
    opacity: 0.75;

    max-width: 340px;
}

/* =========================================
   SOCIALS
========================================= */

.footer-socials{
    margin-top: 28px;

    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 12px;
}

.footer-socials a{
    width: 44px;
    height: 44px;

    border-radius: 50%;

    background: rgba(255,255,255,0.08);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 18px;

    transition: 0.3s ease;
}

.footer-socials a:hover{
    background: var(--primary);

    transform: translateY(-4px);
}

/* =========================================
   TITLES
========================================= */

.footer-column h4{
    font-size: 20px;
    font-weight: 700;

    margin-bottom: 25px;
}

/* =========================================
   LINKS
========================================= */

.footer-column ul{
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-column ul li a{
    opacity: 0.75;

    transition: 0.3s ease;
}

.footer-column ul li a:hover{
    opacity: 1;

    color: var(--primary);

    padding-left: 4px;
}

/* =========================================
   BOTTOM
========================================= */

.footer-bottom{
    margin-top: 70px;

    border-top: 1px solid rgba(255,255,255,0.08);

    min-height: 80px;

    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;
}

.footer-bottom p{
    opacity: 0.7;
}

/* =========================================
   TABLET
========================================= */
@media(max-width: 992px){

    .footer-grid{
        flex-wrap: wrap;
        gap: 40px;
    }

    .footer-column{
        flex: 1 1 calc(50% - 40px);
        min-width: 260px;
    }
}

/* =========================================
   MOBILE
========================================= */

@media(max-width: 576px){

    .user-footer{
        padding-top: 70px;
    }

    .footer-grid{
        flex-direction: column;
        gap: 35px;
    }

    .footer-column{
        width: 100%;
        min-width: 100%;
    }

    .footer-logo{
        font-size: 28px;
    }

    .footer-column h4{
        margin-bottom: 18px;
    }

    .footer-bottom{
        margin-top: 50px;
        min-height: 70px;
    }

    .footer-bottom p{
        font-size: 14px;
    }
}

/* =========================================
   RESPONSIVE
========================================= */

@media(max-width: 1100px){

    .user-menu{
        display: none;
    }

    .mobile-menu-btn{
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .footer-grid{
        grid-template-columns: 1fr 1fr;
    }
}

@media(max-width: 768px){

    .user-topbar{
        display: none;
    }

    .customer-menu{
        display: none;
    }

    .login-pill{
        display: none;
    }

    .footer-grid{
        grid-template-columns: 1fr;
    }


    .user-logo{
        font-size: 26px;
    }
}

@media(max-width: 576px){

    .container{
        padding-left: 18px;
        padding-right: 18px;
    }

    .user-navbar-inner{
        min-height: 72px;
    }

    .nav-round-btn,
    .mobile-menu-btn{
        width: 42px;
        height: 42px;
    }

    .footer-logo{
        font-size: 26px;
    }
}

.nav-has-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #0f172a;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.nav-dropdown-menu {
    position: absolute;
    top: 120%;
    left: 0;
    min-width: 240px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: .22s ease;
    box-shadow: 0 18px 40px rgba(15,23,42,.08);
    z-index: 99999;
}

.nav-has-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu li {
    list-style: none;
}

.nav-dropdown-menu a,
.nav-dropdown-empty {
    display: block;
    padding: 11px 14px;
    border-radius: 12px;
    text-decoration: none;
    color: #0f172a;
    font-size: 14px;
    font-weight: 600;
}

.nav-dropdown-menu a:hover {
    background: #f1f5f9;
    color: #2563eb;
}