/* --- CORE VARIABLES --- */
:root { --primary: #333333; --accent: #ff6600; --border: #e1e1e1; --light-bg: #f4f4f4; --white: #ffffff; --text-gray: #666666; --shadow: 0 5px 30px rgba(0,0,0,0.08); --drawer-width: 360px; --header-height: 80px; }
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }
body { background-color: #f9f9f9; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.main_header_container { max-width: var(--container-max-width, 1320px); margin: 0 auto; padding: 0 15px; position: relative; }
.main_header_flex { display: flex; align-items: center; }

/* Top Bar */
.main_header_top-header { background: #fff; padding: 15px 0; border-bottom: 1px solid var(--border); }
.main_header_logo { font-size: 32px; font-weight: 800; letter-spacing: -1.5px; color: var(--primary); display: flex; align-items: center; margin-right: 40px; }
.main_header_logo i { margin-right: 8px; color: var(--accent); font-size: 34px; }
.main_header_logo span { color: var(--primary); } 

/* --- SEARCH BAR STYLES --- */
.main_header_search-wrapper { flex: 1; max-width: 650px; position: relative; }
.main_header_search-box { 
    border: 2px solid var(--accent); border-radius: 30px; 
    overflow: visible; 
    display: flex; height: 48px; position: relative; 
    z-index: 102; background: white; 
}
.main_header_search-box form { display: flex; width: 100%; border-radius: 30px; overflow: hidden; }
.main_header_search-cat { border: none; padding: 0 20px; border-right: 1px solid var(--border); background: var(--white); font-size: 13px; font-weight: 400; cursor: pointer; outline: none; width: 160px; height: 100%; appearance: none; background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23333%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E"); background-repeat: no-repeat; background-position: right 15px top 50%; background-size: 10px auto; font-family: Arial, Helvetica, sans-serif !important; }
.main_header_search-input { flex: 1; border: none; padding: 0 20px; outline: none; font-size: 14px; color: #333; height: 100%; }
.main_header_search-btn { background: var(--white); border: none; padding: 0 25px; cursor: pointer; font-size: 20px; color: #333; height: 100%; }

.main_header_suggest-box {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: #ffffff; border: 1px solid #e2e8f0; border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.12); z-index: 99999;
    display: none; max-height: 420px; overflow-y: auto;
}
.main_header_suggest-item { display: flex; align-items: center; padding: 10px 15px; border-bottom: 1px solid #f1f5f9; cursor: pointer; transition: background 0.2s; text-decoration: none; }
.main_header_suggest-item:last-child { border-bottom: none; }
.main_header_suggest-item:hover { background: #f8fafc; }
.main_header_suggest-img { width: 44px; height: 44px; object-fit: contain; background: #f8fafc; border-radius: 6px; margin-right: 12px; border: 1px solid #e2e8f0; padding: 2px; flex-shrink: 0; }
.main_header_suggest-info { flex: 1; min-width: 0; }
.main_header_suggest-title { font-size: 13px; font-weight: 600; color: #1e293b; margin-bottom: 3px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main_header_suggest-price { font-size: 13px; font-weight: 700; color: var(--accent); }
.main_header_suggest-old-price { font-size: 11px; text-decoration: line-through; color: #94a3b8; margin-left: 6px; font-weight: 400; }
.main_header_suggest-view-all { padding: 11px 15px; text-align: center; background: #f8fafc; font-size: 13px; font-weight: 600; color: var(--accent); cursor: pointer; border-top: 1px solid #e2e8f0; border-radius: 0 0 12px 12px; transition: background 0.2s; }
.main_header_suggest-view-all:hover { background: #f1f5f9; }
.main_header_suggest-empty { padding: 20px 15px; text-align: center; color: #64748b; font-size: 13px; }

.main_header_popular-searches { display: flex; align-items: center; margin-top: 8px; font-size: 11px; color: #94a3b8; margin-left: 10px; }
.main_header_popular-searches span { margin-right: 6px; font-weight: 600; color: #64748b; }
.main_header_popular-searches a { margin: 0 6px; color: #475569; text-decoration: none; transition: color 0.2s; }
.main_header_popular-searches a:hover { color: var(--accent); text-decoration: underline; }

/* Icons */
.main_header_icons { margin-left: auto; display: flex; gap: 30px; }
.main_header_icon-item { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.main_header_icon-wrap { position: relative; font-size: 26px; color: #FF5400; }
.main_header_badge { position: absolute; top: -5px; right: -8px; background: var(--accent); color: white; font-size: 10px; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.main_header_icon-text { display: flex; flex-direction: column; line-height: 1.2; }
.main_header_icon-text small { font-size: 11px; color: #444; }
.main_header_icon-text strong { font-size: 13px; color: #222; font-weight: 700; }

/* Navigation */
.main_header_nav { background: var(--white); border-bottom: 1px solid var(--border);  position: relative; z-index: 100; }
.main_header_nav.main_header_sticky { position: fixed; top: 0; left: 0; width: 100%; box-shadow: 0 2px 10px rgba(0,0,0,0.1); animation: slideDown 0.4s ease forwards; }
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }

.main_header_browse-cat-wrapper { position: relative; height: 55px; width: 270px; border-right: 1px solid var(--border); display: flex; align-items: center; }
.main_header_browse-cat-btn { width: 100%; height: 100%; padding: 0 10px; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--primary); text-transform: capitalize; }
.main_header_vertical-menu { position: absolute;
    height: 80vh;
    overflow-y: auto;
     top: 100%; left: 0; width: 270px; background: var(--white); border-top: none; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.3s ease; z-index: 200; padding: 10px 0; }
.main_header_browse-cat-wrapper:hover .main_header_vertical-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.main_header_v-item { position: relative; }
.main_header_v-link { display: flex; justify-content: space-between; align-items: center; padding: 11px 20px; font-size: 13px; color: #666; font-weight: 400; }
.main_header_v-link:hover, .main_header_v-item:hover > .main_header_v-link { color: var(--accent); }
.main_header_v-link i { font-size: 10px; color: #ccc; }

.main_header_side-megamenu { position: absolute; top: 0; left: 100%; width: 900px; min-height: 480px; background: var(--white); box-shadow: 5px 5px 20px rgba(0,0,0,0.05); padding: 30px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; opacity: 0; visibility: hidden; transform: translateX(-15px); transition: all 0.3s ease; z-index: 201; }
.main_header_v-item:hover .main_header_side-megamenu { opacity: 1; visibility: visible; transform: translateX(0); }
.main_header_menu-col h4 { font-size: 13px; font-weight: 700; color: #333; text-transform: capitalize; margin-bottom: 15px; border-bottom: 2px solid transparent; display: inline-block; transition: 0.3s; }
.main_header_menu-col:hover h4 { border-color: var(--accent); }
.main_header_menu-col ul li { margin-bottom: 10px; }
.main_header_menu-col ul li a { font-size: 13px; color: #666; }
.main_header_menu-col ul li a:hover { color: var(--accent); }

.main_header_nav-menu { display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; height: 100%; width: 100%; gap: 20px; padding: 15px;}
.main_header_nav-item { padding: 0; height: 100%; display: flex; align-items: center; font-weight: 600; font-size: 13px; text-transform: capitalize; color: var(--primary); cursor: pointer; position: relative; }
.main_header_nav-item a { color: var(--primary); display: flex; align-items: center; gap: 6px; height: 100%; transition: color 0.3s ease; }
.main_header_nav-item:hover > a { color: var(--accent); }
.main_header_nav-item .nav-dropdown-icon { font-size: 10px; margin-left: 4px; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease; opacity: 0.85; }
.main_header_nav-item:hover > a .nav-dropdown-icon { transform: rotate(180deg); color: var(--accent); opacity: 1; }

/* Smooth Dropdown Animation */
.main_header_standard-dropdown { position: absolute; top: calc(100% + 10px); left: 0; width: 240px; background: #fff; box-shadow: 0 10px 40px rgba(0,0,0,0.08); padding: 15px 0; opacity: 0; visibility: hidden; transform: translateY(15px) scale(0.98); transform-origin: top; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); z-index: 150; border-radius: 0 0 8px 8px; border-top: 2px solid var(--accent); }
.main_header_standard-dropdown::before { content: ''; position: absolute; top: -15px; left: 0; width: 100%; height: 15px; }
.main_header_nav-item:hover .main_header_standard-dropdown { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.main_header_standard-dropdown li a { display: block; padding: 10px 20px; font-size: 13px; color: #555; text-transform: capitalize; font-weight: 500; transition: all 0.2s ease; border-left: 2px solid transparent; }
.main_header_standard-dropdown li a:hover { color: var(--accent); background: #fdfdfd; padding-left: 25px; border-left: 2px solid var(--accent); }

.has-sub-dropdown { position: relative; }
.sub-dropdown-menu { position: absolute; top: -2px; left: 100%; width: 240px; background: #fff; box-shadow: 0 10px 40px rgba(0,0,0,0.08); padding: 15px 0; opacity: 0; visibility: hidden; transform: translateX(15px) scale(0.98); transform-origin: left top; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); z-index: 160; border-radius: 8px; border-top: 2px solid var(--accent); }
.has-sub-dropdown:hover > .sub-dropdown-menu { opacity: 1; visibility: visible; transform: translateX(0) scale(1); }

.sub-dropdown-menu li a { display: block; padding: 10px 20px; font-size: 13px; color: #555; text-transform: capitalize; font-weight: 500; transition: all 0.2s ease; border-left: 2px solid transparent; }
.sub-dropdown-menu li a:hover { color: var(--accent); background: #fdfdfd; padding-left: 25px; border-left: 2px solid var(--accent); }
.main_header_nav-right { margin-left: auto; display: flex; gap: 25px; font-size: 13px; font-weight: 600; color: #333; align-items: center; }
.main_header_nav-right i { color: var(--accent); margin-right: 6px; font-size: 16px; }

/* Floating Middle-Right Side Cart (Hidden initially, appears on scroll) */
.main_header_floating_cart {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%) translateX(120%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1500;
    background: #1e1e24;
    color: #ffffff;
    padding: 12px 14px;
    border-radius: 14px 0 0 14px;
    box-shadow: -4px 6px 25px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease, visibility 0.3s ease, background 0.3s ease;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-right: none;
}

.main_header_floating_cart.f_visible {
    transform: translateY(-50%) translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.main_header_floating_cart.f_visible:hover {
    background: var(--accent);
    transform: translateY(-50%) translateX(-4px);
    box-shadow: -6px 8px 30px rgba(255, 102, 0, 0.45);
}

.main_header_floating_cart_icon {
    position: relative;
    font-size: 20px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main_header_floating_cart_badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--accent);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.main_header_floating_cart:hover .main_header_floating_cart_badge {
    background: #1e1e24;
}

.main_header_floating_cart_label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: capitalize;
    letter-spacing: 0.5px;
    color: #ffffff;
    margin-top: 2px;
}

.main_header_floating_cart_price {
    font-size: 11.5px;
    font-weight: 800;
    color: #ffd166;
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 7px;
    border-radius: 6px;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .main_header_floating_cart {
        padding: 8px 8px;
        border-radius: 10px 0 0 10px;
    }
    .main_header_floating_cart_label {
        display: none;
    }
    .main_header_floating_cart_price {
        font-size: 10px;
        padding: 1px 4px;
    }
}

/* Mobile */
.main_header_mobile-header { display: none; background: var(--white); padding: 12px 15px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 999; }
.main_header_mobile-top-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.main_header_mobile-logo { font-size: 20px; font-weight: 800; color: var(--primary); display: flex; align-items: center; letter-spacing: -1px; text-decoration: none; flex-shrink: 0; }
.main_header_mobile-logo img { max-height: 40px; width: auto; }
.main_header_mobile-logo i { color: var(--accent); font-size: 22px; margin-right: 4px; }
.main_header_m-search-form { flex: 1; max-width: 100%; }
.main_header_m-search-wrapper { display: flex; align-items: center; background: #f4f4f4; border-radius: 20px; padding: 0 5px; height: 38px; border: 1px solid var(--border); }
.main_header_m-search-cat { background: transparent; border: none; font-size: 11px; color: #555; padding: 0 5px 0 8px; border-right: 1px solid var(--border); height: 20px; max-width: 60px; outline: none; cursor: pointer; }
.main_header_m-search-input { flex: 1; background: transparent; border: none; padding: 0 8px; font-size: 13px; outline: none; width: 100%; min-width: 0; }
.main_header_m-search-btn { background: transparent; border: none; color: #333; padding: 0 8px; font-size: 14px; cursor: pointer; }
.main_header_m-toggle-btn { font-size: 22px; color: #333; cursor: pointer; padding-left: 5px; flex-shrink: 0; }

/* Mobile Bottom Bar - Updated with Menu and Categories buttons */
.main_header_mobile-bottom-bar { display: none; position: fixed; bottom: 0; left: 0; width: 100%; background: var(--white); border-top: 1px solid var(--border); height: 60px; justify-content: space-around; align-items: center; z-index: 9999; box-shadow: 0 -2px 10px rgba(0,0,0,0.05); }
.main_header_m-nav-item { display: flex; flex-direction: column; align-items: center; font-size: 10px; color: #888; cursor: pointer; }
.main_header_m-nav-item i { font-size: 20px; margin-bottom: 4px; color: #333; }
.main_header_m-nav-item.main_header_active, .main_header_m-nav-item.main_header_active i { color: var(--accent); }

/* Drawers - Updated Cart Drawer Design */
.main_header_drawer-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 2000; opacity: 0; visibility: hidden; transition: 0.3s; }
.main_header_drawer-overlay.main_header_active { opacity: 1; visibility: visible; }
.main_header_drawer { position: fixed; top: 0; bottom: 0; width: var(--drawer-width); background: #fff; z-index: 2001; display: flex; flex-direction: column; transition: transform 0.3s ease-out; box-shadow: 0 0 20px rgba(0,0,0,0.1); }
.main_header_drawer-right { right: 0; transform: translateX(100%); }
.main_header_drawer-left { left: 0; transform: translateX(-100%); }
.main_header_drawer.main_header_active { transform: translateX(0); }
.main_header_drawer-header { padding: 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 16px; text-transform: capitalize; }
.main_header_close-btn { cursor: pointer; font-size: 20px; color: #333; transition: 0.3s; }
.main_header_close-btn:hover { color: var(--accent); transform: rotate(90deg); }
.main_header_drawer-content { padding: 20px; overflow-y: auto; flex: 1; }

/* Buttons & Table - Enhanced Cart Styles */
.main_header_btn { display: block; width: 100%; padding: 12px; border-radius: 3px; font-weight: 600; text-align: center; margin-bottom: 10px; cursor: pointer; transition: 0.3s; border: none; }
.main_header_btn-primary { background: var(--accent); color: white; }
.main_header_btn-primary:hover { background: #e05a00; }
.main_header_btn-outline { background: transparent; border: 2px solid var(--accent); color: var(--accent); }

/* Modern Cart Drawer Styles */
.cart-drawer-item { display: flex; gap: 12px; padding: 15px 0; border-bottom: 1px solid #f0f0f0; position: relative; }
.cart-drawer-img { width: 70px; height: 70px; background: #f5f5f5; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.cart-drawer-details { flex: 1; }
.cart-drawer-title { font-size: 13px; padding-right: 25px; font-weight: 600; color: #333; margin-bottom: 5px; display: block; line-height: 1.3; }
.cart-drawer-price { font-size: 13px; color: var(--accent); font-weight: 700; margin-bottom: 8px; display: block; }
.cart-drawer-quantity { display: flex; align-items: center; gap: 10px; }
.cart-qty-btn { width: 28px; height: 28px; border-radius: 6px; background: #f5f5f5; border: none; cursor: pointer; font-size: 14px; font-weight: 600; transition: 0.2s; }
.cart-qty-btn:hover { background: #e0e0e0; }
.cart-qty-value { font-size: 14px; font-weight: 500; min-width: 20px; text-align: center; }
.cart-drawer-remove { position: absolute; top: 15px; right: 0; color: #ccc; cursor: pointer; font-size: 16px; transition: 0.2s; }
.cart-drawer-remove:hover { color: #ff4444; }
.cart-summary { background: #fafafa; border-radius: 12px; padding: 15px; margin: 15px 0 20px; }
.cart-summary-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 14px; color: #666; }
.cart-summary-row.total { font-size: 18px; font-weight: 700; color: #333; border-top: 1px solid #e0e0e0; padding-top: 12px; margin-top: 8px; }
.cart-summary-row.total span:last-child { color: var(--accent); }
.cart-checkout-btn { background: var(--accent); color: white; padding: 14px; border-radius: 8px; text-align: center; font-weight: 600; font-size: 16px; width: 100%; border: none; cursor: pointer; transition: 0.2s; }
.cart-checkout-btn:hover { background: #e05a00; transform: translateY(-1px); }
.empty-cart-message { text-align: center; padding: 40px 20px; color: #999; }
.empty-cart-message i { font-size: 48px; margin-bottom: 15px; color: #ddd; }

/* Mobile Menu Drawer - Separate Menu and Categories Tabs */
.drawer-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 15px; }
.drawer-tab { flex: 1; text-align: center; padding: 12px; font-size: 14px; font-weight: 600; cursor: pointer; color: #888; transition: 0.2s; background: #fff; border: none; }
.drawer-tab.active { color: var(--accent); border-bottom: 2px solid var(--accent); }
.drawer-panel { display: none; }
.drawer-panel.active { display: block; animation: fadeIn 0.3s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Mobile Menu List Styles */
.main_header_m-menu { list-style: none; }
.main_header_m-link { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; font-weight: 500; font-size: 14px; color: #333; cursor: pointer; border-bottom: 1px solid #f5f5f5; text-decoration: none; }
.main_header_m-link i { font-size: 12px; color: #888; transition: transform 0.3s ease; }
.main_header_m-submenu { display: none; padding-left: 15px; background: #fafafa; border-radius: 8px; margin-top: 5px; margin-bottom: 10px; }
.main_header_m-submenu.main_header_open { display: block; animation: fade 0.3s; }
.main_header_m-submenu li a { font-weight: 400; font-size: 13px; color: #666; display: block; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.main_header_m-submenu li:last-child a { border-bottom: none; }
@keyframes fade { from {opacity:0} to {opacity:1}}

/* User Profile Styles */
.main_header_user_profile { text-align: center; margin-bottom: 20px; }
.main_header_user_img { width: 80px; height: 80px; background: #eee; border-radius: 50%; margin: 0 auto 10px; object-fit: cover; border: 3px solid #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.main_header_user_name { font-size: 16px; font-weight: 700; color: #333; margin-bottom: 2px; }
.main_header_user_email { font-size: 12px; color: #777; }
.main_header_user_address { font-size: 12px; color: #777; margin-top: 5px; padding: 0 10px; }

@media (max-width: 991px) {
    .main_header_top-header, .main_header_nav { display: none; }
    .main_header_mobile-header { display: block; }
    .main_header_mobile-bottom-bar { display: flex; }
}
