@import url("https://fonts.googleapis.com/css2?family=Jost:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600&display=swap");

:root {
    --primary: #0F8E53;
    --primary-dark: #0a663b;
    --primary-light: #e6f6ee;
    --accent: #ff6b6b;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --bg-body: #f4f9f6;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --font-heading: 'Jost', sans-serif;
    --font-body: 'Inter', sans-serif;
}

body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-main);
    background: var(--bg-body);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: var(--text-main);
    transition: 0.2s;
}

a:hover {
    color: var(--primary);
}

/* =========================================
   COMPONENTS (Safe to style)
   ========================================= */

/* Header Components */
.logo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    flex-wrap: wrap;
    /* Prevent breaking on smaller desktop */
}

.main-search form {
    display: flex;
    border: 2px solid var(--primary);
    border-radius: 5px;
    overflow: hidden;
    width: 100%;
}

.main-search input {
    border: none;
    padding: 10px 15px;
    width: 100%;
    outline: none;
}

.main-search button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0 20px;
    cursor: pointer;
}

.header-list-items ul {
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.header-list-items li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
}

.header-list-items i {
    font-size: 18px;
    margin-bottom: 5px;
    color: var(--primary);
}

/* Menu Bar */
.menu-area {
    background: var(--primary);
}

.catagory_menu ul {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 30px;
}

.catagory_menu ul li a {
    color: #fff;
    padding: 12px 0;
    display: block;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 14px;
}

/* Card Style (The one user liked) */
.wist_item {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: .3s;
    height: 100%;
    margin-bottom: 20px;
    /* Spacing for grid */
    overflow: hidden;
}

.wist_item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.pro_img {
    position: relative;
    padding: 15px;
    background: #fff;
    aspect-ratio: 1/1;
    /* Enforce square */
    display: flex;
    align-items: center;
    justify-content: center;
}

.pro_img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    /* Perfect fit */
}

.product_item_inner {
    padding: 15px;
}

.sale-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
}

.pro_name a {
    font-size: 15px;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.pro_price {
    color: var(--primary);
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 10px;
}

.pro_price del {
    color: #999;
    font-size: 13px;
    margin-right: 5px;
    font-weight: 400;
}

.addcartbutton {
    display: block;
    width: 100%;
    text-align: center;
    background: #fff;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 8px;
    border-radius: 5px;
    font-weight: 600;
    transition: 0.2s;
}

.addcartbutton:hover {
    background: var(--primary);
    color: #fff;
}

/* Footer (Basic) */
footer {
    background: #222;
    color: #ddd;
    padding-top: 50px;
    margin-top: 50px;
}

.footer-bottom {
    background: #111;
    padding: 20px 0;
    margin-top: 30px;
    text-align: center;
}

/* =========================================
   Mobile Specifics (Minimal Overrides)
   ========================================= */
/* Ensure mobile elements created in HTML are visible if Responsive.css doesn't catch them */
.mobile-logo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
}

.mobile-logo img {
    height: 40px;
}

.menu-bag .margin-shopping {
    color: #333;
    font-size: 20px;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Mobile Fixes for Hot Deals Timer & Search Card */
@media (max-width: 767px) {

    #simple_timer,
    #simple_timer .syotimer-cell {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
    }

    .wist_item .product_item_inner {
        padding: 10px !important;
    }

    .wist_item .pro_name a {
        font-size: 13px !important;
        margin-bottom: 4px !important;
    }

    .wist_item .pro_price {
        font-size: 14px !important;
        margin-bottom: 5px !important;
    }

    .wist_item .addcartbutton {
        padding: 5px !important;
        font-size: 12px !important;
    }
}

/* NUCLEAR Z-INDEX FIX FOR CART DRAWER */
#cart-drawer {
    z-index: 2147483647 !important;
    /* Max Z-Index to beat Header (z-999) */
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    height: 100vh !important;
}

#cart-drawer-overlay {
    z-index: 2147483646 !important;
    /* Just below drawer */
    position: fixed !important;
}

/* Prevent Header Layout Shift when Body Scrollbar is hidden */
body[style*="overflow: hidden"] header,
body[style*="overflow: hidden"] #navbar_top,
body[style*="overflow: hidden"] #m_navbar_top {
    padding-right: 17px;
    /* Compensate for scrollbar width */
}

/* NUCLEAR FIX FOR NESTED MENU HOVER */
/* Forces the third-level menu to show when hovering the second-level 'li' */
li.group:hover>div {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(0) !important;
    display: block !important;
}

/* OVERFLOW FIX FOR CATEGORY MENU */
#category-nav,
#category-nav .container,
#category-nav ul {
    overflow: visible !important;
}