html, body {
    margin: 0;
    font-family: 'Lato', sans-serif;
    padding-top: 0;
    background: linear-gradient(180deg, #1a1a1a 0%, #0f0f0f 100%);
}

* {
    font-family: 'Lato', sans-serif;
}

#container
{
    position: relative;
    margin: 0 auto;
    width: 100%;
    max-width: 1280px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    box-sizing: border-box;
    z-index: 1001;
    gap: 20px;
}

/* Full-width background wrapper */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: rgba(26, 26, 26, 0.95);
    border-bottom: 1px solid rgba(42, 42, 42, 0.5);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Adjust header position when banner is visible */
body:has(.flash-sale-banner[style*="display: block"]) header {
    top: 50px;
}

header > section {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

header.scrolled {
    background-color: rgba(26, 26, 26, 0.85);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: rgba(42, 42, 42, 0.6);
}

/* Center the container on larger screens */
@media(min-width: 1201px) {
    #container {
        margin: 0 auto;
    }
}


#shopName 
{
    font-size: 32px; 
    font-family: 'Lato', sans-serif;
    flex-shrink: 0;
    white-space: nowrap;
}
#shopName a
{
    text-decoration: none;
    color: #ffffff;
    transition: color 0.3s;
}
#shopName a:hover
{
    color: rgb(3, 122, 122);
}
#shopName span
{
    color: rgb(3, 122, 122);
}

/* Navigation Links */
#mainNav {
    display: flex;
    align-items: center;
    gap: 25px;
    flex: 1;
    justify-content: center;
    margin: 0 20px;
}

#mainNav a {
    color: #b0b0b0;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s;
    font-family: 'Lato', sans-serif;
    position: relative;
}

#mainNav a:hover {
    color: rgb(3, 122, 122);
}

#mainNav a.active {
    color: rgb(3, 122, 122);
    font-weight: 600;
}

#mainNav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgb(3, 122, 122), transparent);
    border-radius: 1px;
}

/* Hover line removed per user request */

/* Search Icon */
#searchIconContainer {
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    background: transparent;
    border: none;
    width: auto !important;
    max-width: none !important;
    min-width: 40px !important;
    height: auto !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
}

#searchIcon {
    font-size: 20px;
    color: #ffffff;
    transition: color 0.3s;
}

#searchIconContainer:hover #searchIcon {
    color: rgb(3, 122, 122);
    transform: scale(1.1);
}

/* Search Popup */
.search-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    animation: fadeIn 0.3s;
    overflow-y: auto;
}

.search-popup.show {
    display: flex !important;
    align-items: flex-start;
    justify-content: center;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 20px;
    box-sizing: border-box;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.search-popup-content {
    background-color: #1a1a1a;
    width: 90%;
    max-width: 700px;
    min-width: 320px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideDown 0.3s;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid #2a2a2a;
    box-sizing: border-box;
    margin: 10rem;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.search-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #2a2a2a;
    flex-shrink: 0;
}

.search-popup-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    font-family: 'Lato', sans-serif;
}

.close-search {
    background: none;
    border: none;
    font-size: 18px;
    color: #b0b0b0;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    max-width: 28px;
    height: 28px;
    border-radius: 4px;
}

.close-search:hover {
    color: rgb(3, 122, 122);
}

#searchBox {
    position: relative;
    width: 100%;
    padding: 25px;
    flex: 0 0 auto;
    z-index: 1;
    box-sizing: border-box;
    overflow: visible;
}

.search-icon {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 18px;
    pointer-events: none;
    z-index: 2;
}

#globalSearch {
    width: 100%;
    padding: 15px 20px 15px 55px;
    border: 2px solid #2a2a2a;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Lato', sans-serif;
    background-color: #0f0f0f;
    color: #ffffff;
    transition: all 0.3s;
    box-sizing: border-box;
}

#globalSearch:focus {
    outline: none;
    border-color: rgb(3, 122, 122);
    background-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(3, 122, 122, 0.2);
}

#globalSearch::placeholder {
    color: #666;
}

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: calc(100% + 5px);
    left: 25px;
    right: 25px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 2001;
    width: calc(100% - 50px);
    box-sizing: border-box;
    margin-top: 0;
}

.search-results.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    text-decoration: none;
    color: #b0b0b0;
    border-bottom: 1px solid #2a2a2a;
    transition: background-color 0.2s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #2a2a2a;
    color: #ffffff;
}

.search-result-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result-brand {
    font-size: 12px;
    color: #b0b0b0;
    margin-bottom: 4px;
}

.search-result-price {
    font-size: 14px;
    font-weight: bold;
    color: rgb(3, 122, 122);
}

.search-result-item.no-results {
    justify-content: center;
    padding: 20px;
    color: #b0b0b0;
    flex-direction: column;
    gap: 10px;
}

.search-result-item.no-results i {
    font-size: 24px;
}

/* Badge */
#badge
{
    position: absolute;
    background-color: rgb(255, 30, 30);
    color: white;
    border-radius: 50%;
    padding: 3px 7px;
    font-size: 11px;
    font-weight: bold;
    top: -8px;
    right: -8px;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
}

/* Badge Skeleton Loader */
#badge.skeleton-badge {
    background: linear-gradient(90deg, #ff6b6b 25%, #ff5252 50%, #ff6b6b 75%);
    background-size: 200% 100%;
    animation: badge-shimmer 1.5s infinite;
    min-width: 18px;
    height: 18px;
    display: inline-block;
    border-radius: 50%;
    padding: 0;
}

@keyframes badge-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

#collection
{
    font-weight: bold;
    display: grid;
    grid-template-columns: 1fr 1fr;
}
#collection a
{
    text-decoration: none;
    color: #ffffff;
}

.search
{
    padding: 14px;
    color: #ffffff;
    min-width: 25px;
    text-align: center;
    position: absolute;
}

.addedToCart
{
    font-size: 1.8em;
    color: #ffffff;
    position: relative;
    transition: color 0.3s;
}

.addedToCart:hover {
    color: rgb(3, 122, 122);
}

.cart-link {
    position: relative;
    display: inline-block;
}

#user
{
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
    margin: 0 !important;
    padding: 0 !important;
    width: auto;
    min-width: auto;
}

/* Cart Link - Left Side */
#user .cart-link {
    order: 1;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#user .cart-link i {
    margin: 0;
    padding: 0;
}

/* Auth Section - Right Side */
#user .auth-section {
    display: flex;
    align-items: center;
    gap: 0;
    order: 2;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0;
}

#user .auth-section > * {
    margin: 0;
    padding: 0;
}

#user .auth-section #authUserMenuContainer {
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
}

#user .auth-section #authUserMenuTrigger {
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

#user .auth-section #authUserMenuTrigger .user-avatar,
#user .auth-section #authUserMenuTrigger .user-name,
#user .auth-section #authUserMenuTrigger .user-arrow {
    margin: 0;
    padding: 0;
}

/* Authentication Login Button */
.auth-login-btn {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgb(3, 122, 122);
    color: #ffffff !important;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Lato', sans-serif;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0;
    white-space: nowrap;
}

/* Hide login button when user is logged in */
.auth-login-btn[aria-hidden="true"],
.auth-login-btn[style*="display: none"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

.auth-login-btn:hover {
    transform: translateY(-1px);
}

.auth-login-btn i {
    font-size: 14px;
}

.userIcon
{
    font-size: 2em;
    color: #ffffff;
    transition: color 0.3s;
}

.userIcon:hover {
    color: rgb(3, 122, 122);
}

#user a
{
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: transform 0.2s;
}

#user a:hover {
    transform: scale(1.1);
}

/* ----------------------------- MEDIA QUERY --------------------------- */

/* Tablet Landscape (1024px - 1200px) */
@media(max-width: 1200px) {
   

    #container {
        padding: 15px 20px;
        left: 0;
        right: 0;
        transform: none;
    }
    
    #searchContainer {
        max-width: 450px;
    }
    
    #shopName {
        font-size: 28px;
    }
}

/* Tablet Portrait (768px - 1023px) */
@media(max-width: 1023px) {
    html, body {
        padding-top: 0;
    }
    
    header > section {
        padding: 0 20px;
    }

    header > section {
        padding: 0 20px;
    }
    
    #container {
        padding: 12px 0;
        gap: 15px;
    }
    
    #shopName {
        font-size: 24px;
    }
    
    #searchContainer {
        max-width: 350px;
        margin: 0 15px;
    }
    
    #globalSearch {
        padding: 10px 12px 10px 40px;
        font-size: 13px;
    }
    
    .search-icon {
        font-size: 14px;
        left: 35px;
    }
    
    .addedToCart {
        font-size: 1.5em;
    }
    
    .userIcon {
        font-size: 1.8em;
    }
}

/* Mobile Menu Icon */
.mobile-menu-icon {
    display: none;
    cursor: pointer;
    padding: 8px;
    margin-right: 10px;
    transition: all 0.3s;
    background: transparent;
    border: transparent;
}

.mobile-menu-icon i {
    font-size: 22px;
    color: #ffffff;
    transition: color 0.3s;
}

.mobile-menu-icon:hover i {
    color: rgb(3, 122, 122);
}

/* Mobile Drawer */
.mobile-drawer {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    width: 100dvw !important; /* Dynamic viewport width for mobile */
    max-width: 100vw !important;
    max-width: 100dvw !important;
    height: 100vh !important;
    height: 100dvh !important; /* Dynamic viewport height for mobile - accounts for browser UI */
    height: calc(var(--vh, 1vh) * 100) !important; /* Fallback for browsers that don't support dvh */
    z-index: 3000;
    pointer-events: none;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.mobile-drawer.open {
    pointer-events: all;
}

.drawer-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    width: 100dvw !important;
    max-width: 100vw !important;
    max-width: 100dvw !important;
    height: 100vh !important;
    height: 100dvh !important; /* Dynamic viewport height for mobile browsers */
    background-color: rgba(0, 0, 0, 0.7) !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 3001 !important;
    pointer-events: none;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.mobile-drawer.open .drawer-overlay {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: all !important;
}

.drawer-content {
    position: fixed;
    top: 0 !important;
    left: 0;
    width: 280px;
    max-width: 85vw !important; /* Use vw instead of % to prevent overflow */
    max-width: 85dvw !important; /* Dynamic viewport width */
    height: 100vh !important;
    height: 100dvh !important; /* Dynamic viewport height for mobile browsers */
    background-color: #1a1a1a;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.8);
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden !important;
    z-index: 3002;
    pointer-events: all;
    /* Edge to edge - no safe area insets */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    box-sizing: border-box !important;
}

.mobile-drawer.open .drawer-content {
    transform: translateX(0);
}

/* Prevent all horizontal overflow in drawer */
.mobile-drawer,
.mobile-drawer *,
.mobile-drawer *::before,
.mobile-drawer *::after {
    max-width: 100%;
    box-sizing: border-box;
}

.mobile-drawer,
.mobile-drawer .drawer-content,
.mobile-drawer .drawer-header,
.mobile-drawer .drawer-nav,
.mobile-drawer .drawer-link,
.mobile-drawer .drawer-link span,
.mobile-drawer .deals-drawer-section,
.mobile-drawer .deals-drawer-products,
.mobile-drawer .deals-drawer-product-card,
.mobile-drawer .deals-drawer-product-info,
.mobile-drawer .deals-drawer-product-title,
.mobile-drawer .drawer-footer {
    overflow-x: hidden !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Prevent body scrolling and override banner padding when menu drawer is open */
html:has(.mobile-drawer.open),
body:has(.mobile-drawer.open) {
    overflow: hidden !important;
    overflow-x: hidden !important;
    padding-top: 0 !important; /* Override banner padding when drawer is open (including inline styles from banner JS) */
    position: fixed !important;
    width: 100% !important;
    max-width: 100vw !important;
    max-width: 100dvw !important;
    left: 0 !important;
    right: 0 !important;
}

body:has(.mobile-drawer.open) header {
    position: fixed !important; /* Keep header fixed in place */
    top: 0 !important; /* Keep at top (banner height will be overridden by JS if banner is visible) */
    left: 0 !important;
    right: 0 !important;
    z-index: 3000 !important; /* Just below overlay (3001) but above everything else */
    display: flex !important; /* Ensure header is displayed */
    visibility: visible !important; /* Ensure header is visible */
    opacity: 1 !important; /* Ensure header is fully opaque */
    transform: none !important; /* Prevent any transforms */
    pointer-events: auto !important; /* Allow pointer events */
}

/* Ensure hero section and other sections don't interfere with menu drawer overlay */
body:has(.mobile-drawer.open) .hero-section,
body:has(.mobile-drawer.open) section {
    position: relative;
    z-index: 1 !important; /* Below overlay (3001) and drawer (3002) */
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #2a2a2a;
    background-color: #0f0f0f;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    flex-shrink: 0;
}

.drawer-logo {
    margin: 0;
    font-size: 24px;
    font-weight: 900;
    font-family: 'Lato', sans-serif;
}

.drawer-logo a {
    text-decoration: none;
    color: white;
}

.drawer-logo span {
    color: rgb(3, 122, 122);
}

.drawer-close {
    background: none;
    border: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drawer-close:hover {
    transform: rotate(90deg);
}

.drawer-nav {
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.drawer-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: #b0b0b0;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    font-family: 'Lato', sans-serif;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.drawer-link:hover {
    background-color: #2a2a2a;
    border-left-color: rgb(3, 122, 122);
    color: rgb(3, 122, 122);
    padding-left: 25px;
}

.drawer-link.active {
    background-color: rgba(3, 122, 122, 0.15);
    border-left-color: rgb(3, 122, 122);
    color: rgb(3, 122, 122);
    font-weight: 600;
}

.drawer-link.active:hover {
    background-color: rgba(3, 122, 122, 0.2);
}

.drawer-link i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.drawer-link span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Deals Drawer Link */
.deals-drawer-link {
    position: relative;
}

.deals-drawer-toggle {
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: auto;
    width: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Deals Drawer Section */
.deals-drawer-section {
    background: #0f0f0f;
    border-top: 1px solid #2a2a2a;
    border-bottom: 1px solid #2a2a2a;
    max-height: 0;
    overflow: hidden;
    overflow-x: hidden !important;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.deals-drawer-section.show {
    max-height: 2000px;
}

.deals-drawer-products {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.deals-drawer-product-card {
    background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
    border: 1px solid rgba(42, 42, 42, 0.8);
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.deals-drawer-product-card:hover {
    background: linear-gradient(135deg, #333333 0%, #282828 100%);
    border-color: rgb(3, 122, 122);
}

.deals-drawer-product-image {
    width: 55px;
    min-width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #1a1a1a, #0f0f0f);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    flex-shrink: 0;
}

.deals-drawer-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.deals-drawer-product-image i {
    font-size: 24px;
}

.deals-drawer-product-info {
    padding: 8px 0;
    flex: 1;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.deals-drawer-arrow-right {
    padding: 0 8px;
    color: rgb(3, 122, 122);
    font-size: 12px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    min-width: 24px;
    max-width: 24px;
    overflow: hidden;
}

.deals-drawer-product-card:hover .deals-drawer-arrow-right {
    transform: translateX(5px);
}

.deals-drawer-product-title {
    font-size: 11px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
    max-width: 100%;
    word-wrap: break-word;
    color: #ffffff;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    min-height: 28px;
}

.deals-drawer-product-price {
    display: none !important;
}

.deals-drawer-product-price-old {
    display: none !important;
}

.deals-drawer-product-price-new {
    display: none !important;
}

.deals-drawer-product-discount {
    display: none !important;
}


/* Drawer Footer (Fixed at bottom) */
.drawer-footer {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
    box-sizing: border-box;
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid #2a2a2a;
    background-color: #1a1a1a;
    flex-shrink: 0;
}

/* Drawer Login Button */
.drawer-login-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 15px 20px;
    width: 100%;
    color: #ffffff;
    background: linear-gradient(135deg, rgb(3, 122, 122), rgb(3, 94, 94));
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Lato', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(3, 122, 122, 0.3);
    text-align: left;
}

.drawer-login-btn:hover {
    background: linear-gradient(135deg, rgb(3, 94, 94), rgb(3, 122, 122));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(3, 122, 122, 0.4);
}

.drawer-login-btn:active {
    transform: translateY(0);
}

.drawer-login-btn i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.drawer-login-btn span {
    flex: 1;
    text-align: left;
}

/* Mobile Landscape (600px - 767px) */
@media(max-width: 767px) {
    /* Keep drawer in layout on mobile so overlay + slide can transition smoothly */
    .mobile-drawer {
        display: block !important;
    }
    
    .mobile-menu-icon {
        display: block;
    }
    
    #mainNav {
        display: none;
    }
    
    #shopName {
        display: none;
    }
    
    #searchIconContainer {
        margin-right: 0;
        padding: 8px;
        min-width: 40px;
    }
    
    .search-popup.show {
        padding-left: 15px;
        padding-right: 15px;
        padding-bottom: 15px;
        align-items: flex-start;
    }
    
    .search-popup-content {
        width: 95%;
        max-width: 600px;
        min-width: 600px;
        max-height: 85vh;
    }
    
    #searchBox {
        padding: 20px;
    }
    
    .search-results {
        left: 20px;
        right: 20px;
        width: calc(100% - 40px);
        max-height: 350px;
    }
    
    #container {
        flex-wrap: nowrap;
        padding: 12px 15px;
        gap: 10px;
        justify-content: space-between;
        align-items: center;
    }
    
    /* Burger menu - Left side */
    .mobile-menu-icon {
        order: 1;
        margin-right: auto;
        margin-left: 0;
        padding: 10px;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    /* Search icon - Right side */
    #searchIconContainer {
        order: 3;
        margin-right: 0;
        margin-left: auto;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    /* User section - Right side */
    #user {
        order: 4;
        flex: 0 0 auto;
        gap: 8px;
        margin: 0;
        padding: 0;
        align-items: center;
        display: flex;
        flex-shrink: 0;
        justify-content: flex-end;
    }
    
    #user .auth-section {
        margin: 0;
        padding: 0;
        gap: 0;
    }
    
    #user .cart-link {
        margin: 0;
        padding: 0;
    }
    
    .addedToCart {
        font-size: 1.4em;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .auth-login-btn {
        padding: 10px 14px;
        font-size: 13px;
        min-height: 44px;
    }
    
    .auth-login-btn span {
        display: none;
    }
    
    .auth-login-btn i {
        margin: 0;
    }
    
    #authUserMenuTrigger {
        padding: 6px 10px;
        min-height: 44px;
    }
    
    .search-results {
        max-height: 350px;
    }
}

/* Mobile Portrait (480px - 599px) */
@media(max-width: 599px) {
    .mobile-menu-icon {
        display: block;
    }
    
    #mainNav {
        display: none;
    }
    
    header > section {
        padding: 0px;
    }

    #container {
        flex-wrap: nowrap;
        padding: 10px 0;
        gap: 8px;
        justify-content: space-between;
        align-items: center;
    }
    
    #shopName {
        display: none;
    }
    
    /* Burger menu - Left side */
    .mobile-menu-icon {
        order: 1;
        margin-right: auto;
        margin-left: 0;
        padding: 10px;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    /* Search icon - Right side */
    #searchIconContainer {
        order: 3;
        margin-right: 0;
        margin-left: auto;
        padding: 8px;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    /* User section - Right side */
    #user {
        order: 4;
        flex: 0 0 auto;
        gap: 8px;
        margin: 0;
        padding: 0;
        align-items: center;
        display: flex;
        flex-shrink: 0;
        justify-content: flex-end;
    }
    
    #user .auth-section {
        margin: 0;
        padding: 0;
        gap: 0;
    }
    
    #user .cart-link {
        margin: 0;
        padding: 0;
    }
    
    .drawer-content {
        width: 280px;
        max-width: 85vw !important;
        max-width: 85dvw !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    .drawer-nav {
        overflow-x: hidden !important;
        max-width: 100%;
    }
    
    .drawer-link {
        max-width: 100%;
        overflow: hidden;
    }
    
    .deals-drawer-products {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .deals-drawer-product-card {
        max-width: 100%;
        overflow: hidden;
    }
    
    .drawer-logo {
        font-size: 22px;
    }
    
    #searchContainer {
        flex: 1;
        min-width: 0;
        max-width: none;
        margin: 0;
    }
    
    #globalSearch {
        padding: 10px 12px 10px 35px;
        font-size: 14px;
    }
    
    #globalSearch::placeholder {
        font-size: 14px;
    }
    
    .search-icon {
        font-size: 16px;
        left: 12px;
    }
    
    .search-popup.show {
        padding-left: 10px;
        padding-right: 10px;
        padding-bottom: 10px;
        align-items: flex-start;
    }
    
    .search-popup-content {
        width: 95%;
        max-width: 500px;
        min-width: 260px;
        max-height: 80vh;
    }
    
    #searchBox {
        padding: 15px;
    }
    
    .search-results {
        left: 15px;
        right: 15px;
        width: calc(100% - 30px);
        max-height: 300px;
    }
    
    .search-result-item {
        padding: 12px 15px;
        gap: 12px;
    }
    
    .search-result-item img {
        width: 45px;
        height: 45px;
    }
    
    .search-result-name {
        font-size: 14px;
    }
    
    .search-result-brand,
    .search-result-price {
        font-size: 12px;
    }
    
    .addedToCart {
        font-size: 1.3em;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .auth-login-btn {
        padding: 10px 12px;
        font-size: 12px;
        min-height: 44px;
    }
    
    .auth-login-btn span {
        display: none;
    }
    
    .auth-login-btn i {
        margin: 0;
    }
    
    #authUserMenuTrigger {
        padding: 6px 8px;
        min-height: 44px;
    }
    
    #authUserMenuTrigger .user-avatar {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .userIcon {
        font-size: 1.4em;
    }
}

/* Small Mobile (320px - 479px) */
@media(max-width: 479px) {
    #container {
        flex-wrap: nowrap;
        padding: 10px 15px;
        gap: 6px;
        justify-content: space-between;
        align-items: center;
        left: 0;
        right: 0;
        transform: none;
    }
    
    #shopName {
        display: none;
    }
    
    /* Burger menu - Left side */
    .mobile-menu-icon {
        order: 1;
        margin-right: auto;
        margin-left: 0;
        padding: 10px;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    /* Search icon - Right side */
    #searchIconContainer {
        order: 3;
        margin-right: 0;
        margin-left: auto;
        padding: 8px;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    /* User section - Right side */
    #user {
        order: 4;
        margin: 0;
        padding: 0;
        flex: 0 0 auto;
        gap: 6px;
        align-items: center;
        display: flex;
        flex-shrink: 0;
        justify-content: flex-end;
    }
    
    #user .auth-section {
        margin: 0;
        padding: 0;
        gap: 0;
    }
    
    #user .cart-link {
        margin: 0;
        padding: 0;
    }
    
    #searchContainer {
        flex: 1;
        min-width: 0;
        max-width: none;
        margin: 0;
    }
    
    #globalSearch {
        padding: 10px 10px 10px 35px;
        font-size: 14px;
    }
    
    #globalSearch::placeholder {
        font-size: 14px;
    }
    
    .search-icon {
        font-size: 16px;
        left: 24px;
    }
    
    .search-popup.show {
        padding-left: 8px;
        padding-right: 8px;
        padding-bottom: 8px;
        align-items: flex-start;
    }
    
    .search-popup-content {
        width: 95%;
        max-width: 100%;
        min-width: 100%;
        max-height: 75vh;
    }
    
    #searchBox {
        padding: 12px;
    }
    
    .search-results {
        left: 12px;
        right: 12px;
        width: calc(100% - 24px);
        max-height: 250px;
    }
    
    .search-result-item {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .search-result-item img {
        width: 40px;
        height: 40px;
    }
    
    .search-result-name {
        font-size: 13px;
    }
    
    .search-result-brand,
    .search-result-price {
        font-size: 11px;
    }
    
    .addedToCart {
        font-size: 1.2em;
     
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .auth-login-btn {
        padding: 10px;
        font-size: 12px;
        min-height: 44px;
        min-width: 44px;
    }
    
    .auth-login-btn span {
        display: none;
    }
    
    .auth-login-btn i {
        margin: 0;
        font-size: 16px;
    }
    
    #authUserMenuTrigger {
        padding: 6px;
        min-height: 44px;
    }
    
    #authUserMenuTrigger .user-avatar {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }
    
    .userIcon {
        font-size: 1.3em;
    }
    
    #badge {
        font-size: 10px;
        padding: 2px 5px;
        min-width: 16px;
        top: -6px;
        right: -6px;
    }
}

/* Deals Mega Menu */
.deals-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

.deals-arrow {
    font-size: 12px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    margin-left: 4px;
}

.deals-nav-link.active .deals-arrow {
    transform: rotate(180deg);
}

.deals-mega-menu {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    background: linear-gradient(180deg, #1a1a1a 0%, #0f0f0f 100%);
    border-top: 1px solid rgba(42, 42, 42, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 998;
    max-height: 0;
    overflow: hidden;
    pointer-events: none;
    padding-top: 0;
    margin-top: 0;
}

.deals-mega-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    max-height: 800px;
    pointer-events: auto;
}

.deals-mega-menu-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 30px 20px;
}

.deals-urgency-banner {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.2), rgba(192, 57, 43, 0.2));
    border: 2px solid rgba(231, 76, 60, 0.5);
    border-radius: 12px;
    padding: 15px 25px;
    margin-bottom: 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: pulse 2s infinite;
}

.deals-urgency-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.deals-urgency-icon {
    font-size: 28px;
    color: #e74c3c;
    animation: bounce 1s infinite;
}

.deals-urgency-text {
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
}

.deals-urgency-text .highlight {
    color: #e74c3c;
    font-size: 22px;
}

.deals-urgency-text .discount {
    background: #e74c3c;
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 20px;
    margin: 0 6px;
}

.deals-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.deals-product-card {
    background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
    border: 1px solid rgba(42, 42, 42, 0.8);
    border-radius: 12px;
    padding: 0;
    text-align: left;
    transition: all 0.3s ease;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.deals-product-card > a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.deals-product-card:hover {
    transform: translateY(-5px);
    border-color: rgb(3, 122, 122);
    box-shadow: 0 8px 24px rgba(3, 122, 122, 0.3);
}

.deals-product-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #1a1a1a, #0f0f0f);
    border-radius: 12px 12px 0 0;
    margin: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.deals-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.deals-product-image i {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.3);
}

.deals-product-title {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    margin: 12px 15px 8px 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    min-height: 42px;
}

.deals-product-price {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin: 8px 15px 12px 15px;
    flex-wrap: wrap;
}

.deals-product-price-old {
    color: #666;
    text-decoration: line-through;
    font-size: 13px;
}

.deals-product-price-new {
    color: #e74c3c;
    font-size: 17px;
    font-weight: 700;
}

.deals-product-discount {
    background: #e74c3c;
    color: #ffffff;
    padding: 3px 7px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 4px;
}

.deals-deal-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
}

.deals-shop-now-btn {
    margin: 0 15px 15px 15px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-family: 'Lato', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.deals-shop-now-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.5);
    background: linear-gradient(135deg, #c0392b, #a93226);
}

.deals-shop-now-btn:active {
    transform: translateY(0);
}

.deals-shop-now-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

@media(max-width: 1024px) {
    .deals-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width: 767px) {
    .deals-mega-menu {
        display: none;
    }
    
    .deals-products-grid {
        grid-template-columns: 1fr;
    }
}