/* =========================
   BASE STYLES
========================= */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* =========================
   TOP HEADER
========================= */
.top-header {
    background: #131921;
    padding: 8px 0;
    font-size: 13px;
}

.top-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-social {
    display: flex;
    gap: 18px;
}

.top-social a {
    color: #fff;
    font-size: 14px;
    transition: .3s;
}

.top-social a:hover {
    color: #fcb040;
}

.top-links {
    display: flex;
    align-items: center;
    gap: 25px;
}

.top-links a {
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    transition: .3s;
}

.top-links a:hover {
    color: #fcb040;
}

/* =========================
   MAIN HEADER
========================= */
.main-header {
    padding: 12px 0;
    background-color: #ced5df;
}

.logo img {
    height: 60px;
    width: auto;
    object-fit: contain;
    max-width: 100%;
}

/* =========================
   SEARCH BOX
========================= */
.search-box {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.search-box:focus-within {
    border-color: #febd69;
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.2);
}

.categories-dropdown {
    position: relative;
    flex-shrink: 0;
}

.categories-dropdown-btn {
    background-color: #f3f3f3;
    border: none;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    height: 44px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 0;
    min-width: 120px;
}

.categories-dropdown-btn::after {
    content: "▼";
    font-size: 10px;
    margin-left: 4px;
}

.categories-dropdown-btn:hover {
    background-color: #e5e5e5;
}

.categories-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 220px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    border-radius: 4px;
    padding: 6px 0;
}

.categories-dropdown-content a {
    color: #333;
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    transition: background 0.2s;
}

.categories-dropdown-content a:hover {
    background-color: #f5f5f5;
    color: #e10;
}

.categories-dropdown:hover .categories-dropdown-content {
    display: block;
}

.search-box input {
    flex: 1;
    padding: 10px 16px;
    border: none;
    outline: none;
    height: 44px;
    font-size: 14px;
}

.search-box input::placeholder {
    color: #999;
}

.search-btn {
    background-color: #febd69;
    border: none;
    padding: 0 20px;
    height: 44px;
    color: #333;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background-color: #f3a847;
}

.header-actions {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    align-items: center;
}

.header-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    color: #1d1c1c;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 2px;
    transition: background 0.2s;
    position: relative;
}

.header-action:hover {
    background: rgba(255,255,255,0.1);
}

.header-action i {
    font-size: 24px;
    color: #131212;
}

.header-action span {
    font-size: 12px;
    color: #181818;
}

.header-action .action-label {
    font-size: 11px;
    color: #161616;
    margin-top: 2px;
}

.header-action .action-value {
    font-size: 13px;
    font-weight: 700;
    color: #0e0d0d;
}

/* Cart */
.cart-action {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -8px;
    background: #febd69;
    color: #333;
    font-size: 11px;
    font-weight: 700;
    padding: 0 6px;
    border-radius: 20px;
    min-width: 20px;
    text-align: center;
}

/* =========================
   CATEGORIES NAV
========================= */
.categories-nav {
    background: #232f3e;
    border-bottom: 1px solid #3a4553;
    height: 42px;
    display: flex;
    align-items: center;
}

.categories-nav-wrapper {
    display: flex;
    align-items: center;
    gap: 18px;
    width: 100%;
}

.categories-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 0 10px;
    line-height: 42px;
    transition: .3s;
    border-bottom: 3px solid transparent;
}

.categories-nav a:hover {
    color: #fcb040;
    border-bottom: 3px solid #fcb040;
}

.categories-nav .deal-text {
    color: #febd69;
}

/* =========================
   MOBILE HEADER
========================= */
.mobile-header {
    display: none;
    background: #ced5df;
    border-bottom: 1px solid #bfc6d1;
    padding: 12px 0;
}

.mobile-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
}

.mobile-logo img {
    height: 40px;
    width: auto;
}

.mobile-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.mobile-actions a,
.mobile-actions button {
    color: #fff;
    background: none;
    border: none;
    padding: 0;
    text-decoration: none;
    position: relative;
}

.mobile-actions i {
    color: #232f3e;
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s;
}

.mobile-actions i:hover {
    color: #fcb040;
}

.mobile-cart {
    position: relative;
}

.mobile-cart .cart-count {
    top: -6px;
    right: -8px;
    font-size: 10px;
    min-width: 16px;
    padding: 0 4px;
    background: #febd69;
    color: #333;
    position: absolute;
    font-weight: 700;
    border-radius: 20px;
    text-align: center;
}

.mobile-search {
    padding: 10px 15px;
    display: none;
    background-color: #ced5df;
}

.mobile-search.active {
    display: block;
}

.mobile-search-input {
    width: 100%;
    height: 44px;
    padding: 0 15px;
    background: #fff;
    color: #333;
    border: 2px solid #ddd;
    border-radius: 8px;
}

.mobile-search-input:focus {
    border-color: #febd69;
}

.hamburger {
    background: none;
    border: none;
    padding: 0;
    width: 28px;
    height: 20px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger i {
    color: #fff;
    font-size: 24px;
}

/* =========================
   MOBILE MENU
========================= */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 350px;
    height: 100vh;
    background-color: #131921;
    z-index: 1000;
    padding: 20px;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #2a2a2a;
    margin-bottom: 10px;
}

.mobile-menu-header h5 {
    color: #febd69;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.mobile-menu-header button {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
}

.mobile-menu-content a {
    display: block;
    color: #ccc;
    padding: 12px 0;
    border-bottom: 1px solid #2a2a2a;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.2s;
}

.mobile-menu-content a:hover {
    color: #fff;
}

.mobile-menu-content a i {
    margin-right: 12px;
    width: 22px;
    text-align: center;
    color: #febd69;
}

.mobile-menu-content .menu-header {
    color: #febd69;
    font-weight: 700;
    font-size: 16px;
    margin-top: 10px;
}

.mobile-categories {
    display: none;
    background-color: #232f3e;
    padding: 8px 15px;
    overflow-x: auto;
    white-space: nowrap;
}

.mobile-categories a {
    display: inline-block;
    margin-right: 20px;
    color: #ccc;
    text-decoration: none;
    font-size: 13px;
    padding: 6px 0;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    z-index: 999;
    display: none;
}

.overlay.active {
    display: block;
}

/* =========================
   MEDIA QUERIES (Optimized)
========================= */

/* Tablet & Below - Show Mobile */
@media (max-width: 991px) {
    .top-header,
    .main-header,
    .categories-nav {
        display: none;
    }
    
    .mobile-header {
        display: block;
    }
    
    .mobile-categories {
        display: block;
    }
    
    .mobile-search.active {
        display: block;
    }
}

/* Desktop - Show Desktop Header */
@media (min-width: 992px) {
    .mobile-header,
    .mobile-categories {
        display: none !important;
    }
}

/* Small Laptops & Tablets - Adjust Search */
@media (max-width: 1199px) and (min-width: 992px) {
    .logo img {
        height: 52px;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .categories-dropdown-btn {
        min-width: 90px;
        padding: 0 10px;
        font-size: 12px;
    }
    
    .search-btn {
        width: 48px;
        padding: 0;
    }
    
    .header-actions {
        gap: 10px;
    }
    
    .header-action i {
        font-size: 20px;
    }
    
    .action-label {
        display: none;
    }
    
    .action-value {
        font-size: 11px;
    }
    
    .categories-nav-wrapper {
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        scrollbar-width: none;
    }
    
    .categories-nav-wrapper::-webkit-scrollbar {
        display: none;
    }
    
    .categories-nav a {
        flex-shrink: 0;
        font-size: 13px;
        padding: 0 8px;
    }
}

/* Large Desktop - Show Labels */
@media (min-width: 1200px) {
    .action-label {
        display: block;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .mobile-logo img {
        height: 32px;
    }
    
    .mobile-actions {
        gap: 12px;
    }
    
    .mobile-actions i {
        font-size: 18px;
    }
    
    .hamburger {
        width: 24px;
        height: 18px;
    }
    
    .hamburger i {
        font-size: 20px;
    }
    
    .mobile-search-input {
        font-size: 13px;
        padding: 8px 12px;
    }
    
    .mobile-menu {
        width: 90%;
        max-width: 300px;
    }
}

/* Extra Small Devices */
@media (max-width: 360px) {
    .mobile-actions {
        gap: 8px;
    }
    
    .mobile-actions i {
        font-size: 16px;
    }
}