body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8faf9;
    line-height: 1.6;
    color: #2d3748;
    overflow-x: hidden; /* Prevent horizontal scroll on body */
}

*, *::before, *::after {
    box-sizing: border-box;
}

/* Header (Navigation Bar) */
header {
    background: linear-gradient(135deg, #b0302f 0%, #8b2635 100%);
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1500;
    box-shadow: 0 4px 20px rgba(176, 48, 47, 0.15);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    height: 69px;
}

.logo-link {
    display: inline-block;
    line-height: 0;
    transition: opacity 0.3s ease;
}

.logo-link:hover {
    opacity: 0.9;
}

.shop-logo {
    height: 45px;
    width: auto;
    transition: transform 0.3s ease;
    display: block;
}

.shop-logo:hover {
    transform: scale(1.05);
}

.right-icons {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
}

.icons {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    height: 100%;
}

/* Welcome message styling */
.welcome-msg {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    margin-right: 8px;
    font-weight: 500;
    display: none; /* Hidden on mobile by default */
    align-self: center;
    line-height: 1;
}

/* Search form enhancements */
.search-form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 2px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    align-self: center;
}

.search-form:focus-within {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.02);
}

.search-box {
    padding: 10px 16px;
    border: none;
    border-radius: 20px;
    font-size: 0.9rem;
    outline: none;
    background: transparent;
    color: white;
    width: 200px;
    transition: all 0.3s ease;
    line-height: 1;
    height: 38px;
    display: flex;
    align-items: center;
}

.search-box::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-icon {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-icon:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.search-icon img {
    height: 18px;
    width: 18px;
    filter: brightness(0) invert(1);
}

/* Icon styling */
.cart-icon, .orders-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
}

.cart-icon:hover, .orders-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.cart-icon img, .orders-icon img {
    height: 24px;
    width: 24px;
    filter: brightness(0) invert(1);
}

/* Cart/Orders counter notification */
.cart-counter,
.orders-counter {
    position: absolute;
    top: -2px;
    right: -2px;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    border: 2px solid rgba(0,0,0,0.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    animation: cartPulse 2s infinite;
}
/* Specific colors for badges */
.cart-counter {
    background: #ff4444;
    border-color: #b0302f;
    box-shadow: 0 2px 6px rgba(255, 68, 68, 0.3);
}

.orders-counter {
    background: #4a90e2; /* blue for orders */
    border-color: #2b6fb8;
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.3);
}


@keyframes cartPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Profile icon and dropdown */
.profile-icon {
    position: relative;
    display: inline-block;
}

.profile-icon button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-icon button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.profile-icon img {
    height: 24px;
    width: 24px;
    filter: brightness(0) invert(1);
}

.profile-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    min-width: 180px;
    z-index: 1600;
    overflow: hidden;
    border: 1px solid rgba(176, 48, 47, 0.1);
}

.profile-icon:hover .profile-dropdown,
.profile-icon:focus-within .profile-dropdown {
    display: block;
    animation: fadeInUp 0.3s ease;
}

.profile-dropdown a {
    display: block;
    padding: 12px 16px;
    color: #2d3748;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.profile-dropdown a:hover {
    background: #f7fafc;
    color: #b0302f;
    padding-left: 20px;
}

/* Menu icon */
.menu-icon {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1101;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(180deg);
}

.menu-icon img {
    height: 24px;
    width: 24px;
    filter: brightness(0) invert(1);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: linear-gradient(135deg, #b0302f 0%, #8b2635 100%);
    color: white;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 0;
    z-index: 2000;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar.active {
    right: 0;
}

.sidebar ul {
    list-style: none;
    padding: 80px 0 20px 0;
    margin: 0;
}

.sidebar ul li {
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar ul li:last-child {
    border-bottom: none;
}

.sidebar ul li a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 16px 24px;
    display: block;
    transition: all 0.3s ease;
    position: relative;
}

.sidebar ul li a:hover {
    background: rgba(255, 255, 255, 0.1);
    padding-left: 32px;
}

.sidebar ul li a:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: rgba(255, 255, 255, 0.3);
    transition: width 0.3s ease;
}

.sidebar ul li a:hover:before {
    width: 4px;
}

/* Submenu styling */
.submenu {
    display: none;
    list-style: none;
    padding: 0; /* Remove all padding */
    margin: 0;
    background: rgba(0, 0, 0, 0.1);
    margin-top: -1px; /* Pull up slightly to reduce gap */
}

.submenu.show {
    display: block;
    animation: slideDown 0.3s ease;
}

.submenu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin: 0; /* Remove any margin */
}

.submenu li:first-child {
    margin-top: 0; /* Ensure first item has no top margin */
    padding-top: 0; /* Remove any top padding */
}

.submenu li a {
    padding: 6px 24px 6px 40px; /* Further reduced padding from 8px to 6px */
    font-size: 1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    display: block; /* Ensure full width clickable area */
}

.submenu li:first-child a {
    padding-top: 4px; /* Even less top padding for the first item */
}

.submenu li a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    padding-left: 48px;
}

/* Overlay */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1999;
    backdrop-filter: blur(2px);
    transition: all 0.3s ease;
}

.overlay.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Secondary Navigation Bar */
.secondary-nav {
    background: white;
    border-bottom: 1px solid rgba(176, 48, 47, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 69px; /* Height of main header */
    left: 0;
    width: 100%;
    z-index: 1001 !important; /* Higher than main content */
    transition: all 0.3s ease;
    overflow: visible !important; /* Make sure dropdown can show */
    height: auto !important; /* Don't constrain height */
}

.nav-container {
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 8px;
    overflow: visible !important; /* Allow dropdowns to show outside */
    position: static !important; /* Don't constrain positioning */
    flex-wrap: nowrap;
    min-height: 50px;
}

.nav-container::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.nav-item {
    position: relative !important;
    flex-shrink: 0;
    flex-grow: 0;
    white-space: nowrap;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: none;
    border: none;
    color: #2d3748;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    white-space: nowrap;
}

.nav-btn:hover {
    background: rgba(176, 48, 47, 0.1);
    color: #b0302f;
    transform: translateY(-1px);
}

/* Active state for secondary nav buttons */
.nav-btn.active {
    background: rgba(176, 48, 47, 0.15);
    color: #b0302f;
    font-weight: 600;
    box-shadow: inset 0 0 0 2px rgba(176, 48, 47, 0.2);
}

/* Dropdown button styling */
.dropdown-btn {
    background: rgba(176, 48, 47, 0.1);
    color: #b0302f;
}

.dropdown-btn:hover {
    background: rgba(176, 48, 47, 0.15);
}

.dropdown-arrow {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.dropdown[aria-expanded="true"] .dropdown-arrow,
.dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Content - Allow flyouts to extend outside */
.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid rgba(176, 48, 47, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    max-width: 350px;
    /* Remove height restrictions */
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
    display: block;
    overflow: visible !important; /* Force visible overflow for flyouts */
}

.dropdown:hover .dropdown-content,
.dropdown[aria-expanded="true"] .dropdown-content,
.dropdown .dropdown-btn[aria-expanded="true"] + .dropdown-content,
.dropdown.active .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Categories Menu Container - No scroll, full expansion */
.categories-menu {
    padding: 8px 0;
    /* Remove height restrictions and scrollbars */
    overflow: visible; /* Allow full expansion */
    position: relative;
}

/* Category Item - Allow flyouts to extend */
.category-item {
    position: relative;
    transition: all 0.2s ease;
    overflow: visible; /* Critical: allow flyouts to extend outside */
}

.category-item:hover {
    background: rgba(176, 48, 47, 0.05);
}

/* Category Link */
.category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    color: #2d3748;
    transition: color 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.category-link:hover {
    color: #b0302f;
}

.category-item:last-child > .category-link {
    border-bottom: none;
}

/* Arrow indicator for categories with children */
.has-children-arrow {
    color: #666;
    font-size: 0.8rem;
    margin-left: 8px;
    transition: transform 0.2s ease;
}

.category-item:hover .has-children-arrow {
    transform: translateX(2px);
    color: #b0302f;
}

/* Horizontal Flyout Subcategories */
.subcategories-flyout {
    position: absolute;
    top: 0;
    left: 100%;
    background: white;
    border: 1px solid rgba(176, 48, 47, 0.1);
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    min-width: 250px;
    max-width: 300px;
    /* Remove height restrictions and scrollbars */
    overflow: visible; /* Allow full expansion */
    z-index: 100000; /* Higher than parent */
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.2s ease;
    pointer-events: none;
    margin-left: 5px;
}

/* Nested flyout positioning */
.subcategories-flyout .category-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.subcategories-flyout .category-item:last-child {
    border-bottom: none;
}

/* Removed .subcategories-flyout .category-header - no longer needed */

.subcategories-flyout .category-link {
    font-size: 0.85rem;
    color: #4a5568;
}

.subcategories-flyout .category-link:hover {
    color: #b0302f;
}

/* Multi-level flyouts - Fixed positioning */
.subcategories-flyout .subcategories-flyout {
    min-width: 220px;
    max-width: 250px; /* Prevent from being too wide */
    z-index: 100001;
    /* Remove display: none to allow CSS hover to work */
    position: absolute; /* Ensure absolute positioning */
    top: 0;
    left: 100%;
    margin-left: 5px;
}

.subcategories-flyout .subcategories-flyout .category-link {
    font-size: 0.8rem;
    color: #718096;
}

/* Level 3 and beyond - Even smaller */
.subcategories-flyout .subcategories-flyout .subcategories-flyout {
    min-width: 200px;
    max-width: 220px; /* Even smaller to prevent overflow */
    z-index: 100002;
    /* Remove display: none to allow CSS hover to work */
}

.subcategories-flyout .subcategories-flyout .subcategories-flyout .category-link {
    font-size: 0.75rem;
    color: #a0aec0;
}

/* Hover behavior for direct children only - no cascading */
.category-item:hover > .subcategories-flyout {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(0) !important;
    pointer-events: auto !important;
}

/* Keep flyouts open when hovering over them */
.subcategories-flyout:hover {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(0) !important;
    pointer-events: auto !important;
}
.subcategories-flyout:hover {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(0) !important;
    pointer-events: auto !important;
}

/* Smart positioning for flyouts */
.subcategories-flyout.position-left {
    left: auto;
    right: 100%;
    margin-left: 0;
    margin-right: 5px;
    transform: translateX(10px);
}

.category-item:hover > .subcategories-flyout.position-left {
    transform: translateX(0);
}

/* No categories message */
.no-categories {
    padding: 30px 20px;
    text-align: center;
    color: #a0aec0;
    font-style: italic;
}

.no-categories p {
    margin: 0;
    font-size: 0.9rem;
}

/* Mobile Responsive Flyout System */
@media (max-width: 768px) {
    .dropdown-content {
        min-width: 280px;
        max-width: 95vw;
        left: -20px;
    }
    
    /* On mobile, convert flyouts to expandable sections */
    .subcategories-flyout {
        position: static !important;
        left: auto !important;
        right: auto !important;
        margin: 0 !important;
        background: rgba(248, 249, 250, 0.8) !important;
        border: none !important;
        border-left: 3px solid rgba(176, 48, 47, 0.2) !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transform: none !important;
        max-height: 0 !important;
        overflow: hidden !important;
        transition: all 0.3s ease !important;
    }
    
    /* Mobile expand behavior - removed mobile-expanded class logic */
    /* Mobile behavior now handled by main hover system */
    
    /* Show expand indicator on mobile */
    .has-children-arrow {
        transform: rotate(0deg);
        transition: transform 0.3s ease;
    }
    
    /* Removed .category-item.mobile-expanded .has-children-arrow - no longer needed */
    
    /* Removed .category-header - no longer exists in HTML structure */
    
    /* Adjust text sizes for mobile */
    .category-link {
        font-size: 0.85rem;
    }
    
    .subcategories-flyout .category-link {
        font-size: 0.8rem;
        padding-left: 16px;
    }
    
    /* Removed deeper nesting styles - no longer needed with simplified structure */
}

@media (max-width: 480px) {
    .dropdown-content {
        min-width: 260px;
        left: -30px;
    }
    
    .category-header {
        padding: 10px 12px;
    }
    
    .category-link {
        font-size: 0.8rem;
    }
}

/* Main content */
main {
    padding: 180px 20px 40px; /* Increased top padding to account for secondary nav */
    min-height: 100vh;
    background: linear-gradient(135deg, #f8faf9 0%, #f1f5f9 100%);
}

.latest {
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(176, 48, 47, 0.05);
}

/* Products header */
.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 32px;
    gap: 16px;
}

.products-header h2 {
    margin: 0;
    color: #2d3748;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #b0302f 0%, #8b2635 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sort-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f7fafc;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.sort-container label {
    font-weight: 600;
    color: #4a5568;
    font-size: 0.9rem;
}

.sort-container select {
    padding: 8px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    background: white;
    color: #2d3748;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.sort-container select:focus {
    border-color: #b0302f;
    box-shadow: 0 0 0 3px rgba(176, 48, 47, 0.1);
}

/* Product container grid */
.product-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

/* Product cards */
.product {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 20px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(176, 48, 47, 0.05);
    height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.product:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(176, 48, 47, 0.15);
    border-color: rgba(176, 48, 47, 0.2);
}

.product:hover::before {
    left: 100%;
}

.product:focus-within {
    outline: 3px solid rgba(176, 48, 47, 0.3);
    outline-offset: 2px;
}

.product-img-link {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 16px;
    background: #f7fafc;
    flex-shrink: 0;
}

.product-img-link img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: all 0.4s ease;
    border-radius: 12px;
}

.product:hover .product-img-link img {
    transform: scale(1.05);
}

.product-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #2d3748;
    margin: 12px 0 8px 0;
    line-height: 1.1;
    transition: color 0.3s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    flex-grow: 1;
}
/* Fallback for browsers that don't support -webkit-line-clamp causing hidden text */
@supports not (-webkit-line-clamp: 2) {
    .product-name {
        display: block;
        white-space: nowrap;
        -webkit-line-clamp: initial;
        line-clamp: initial;
    }
}

.product:hover .product-name {
    color: #b0302f;
}

.product-price {
    color: #b0302f;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 6px;
    text-shadow: 0 1px 2px rgba(176, 48, 47, 0.1);
    flex-shrink: 0;
}

.product-stock {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 0;
    font-weight: 500;
    flex-shrink: 0;
}

/* Product link styling */
.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.3s ease;
}

.product-link:hover {
    text-decoration: none;
    color: inherit;
}

.product-link:visited {
    color: inherit;
}

.product-link:focus {
    text-decoration: none;
    color: inherit;
    outline: none;
}

.product-link:active {
    color: inherit;
}

.add-to-cart-btn {
    background: linear-gradient(135deg, #b0302f 0%, #8b2635 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.add-to-cart-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(176, 48, 47, 0.3);
}

.add-to-cart-btn:hover::before {
    left: 100%;
}

.add-to-cart-btn:active {
    transform: translateY(0);
}

.add-to-cart-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* No products message */
.no-products {
    width: 100%;
    text-align: center;
    color: #718096;
    font-size: 1.3rem;
    margin: 60px 0;
    font-weight: 500;
    background: #f7fafc;
    padding: 40px;
    border-radius: 12px;
    border: 2px dashed #cbd5e0;
/* Chat popup styling */
.chat-popup {
    display: none;
    position: fixed;
    bottom: 100px;
    right: 32px;
    width: 350px;
    max-width: 90vw;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(176, 48, 47, 0.1);
    animation: slideInUp 0.3s ease;
}

.chat-popup.show {
    display: flex;
}

.chat-header {
    background: linear-gradient(135deg, #b0302f 0%, #8b2635 100%);
    color: white;
    padding: 16px 20px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-chat:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat-messages {
    background: #f8faf9;
    padding: 16px;
    height: 280px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    background: white;
    border-radius: 12px;
    padding: 10px 16px;
    max-width: 80%;
    word-break: break-word;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    animation: fadeInUp 0.3s ease;
}

.chat-message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #b0302f 0%, #8b2635 100%);
    color: white;
}

.chat-message.admin {
    align-self: flex-start;
    background: white;
    color: #2d3748;
    border: 1px solid #e2e8f0;
}

#chat-form {
    display: flex;
    border-top: 1px solid #e2e8f0;
    background: white;
}

#chat-input {
    flex: 1;
    border: none;
    padding: 16px;
    outline: none;
    font-size: 1rem;
    background: transparent;
}

#chat-form button {
    background: linear-gradient(135deg, #b0302f 0%, #8b2635 100%);
    color: white;
    border: none;
    padding: 16px 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#chat-form button:hover {
    background: linear-gradient(135deg, #8b2635 0%, #6d1e2a 100%);
}

/* Help button */
.help-btn {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: linear-gradient(135deg, #b0302f 0%, #8b2635 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 1.5rem;
    box-shadow: 0 8px 25px rgba(176, 48, 47, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1200;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-btn img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

.help-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 12px 35px rgba(176, 48, 47, 0.4);
}

/* Responsive design */
@media (max-width: 1200px) {
    .product-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .product {
        height: 360px;
    }
    
    .product-img-link img {
        height: 180px;
    }
}

@media (max-width: 900px) {
    .welcome-msg {
        display: none;
    }
    
    .search-box {
        width: 150px;
    }
    
    .product-container {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 16px;
    }
    
    .product {
        height: 340px;
        padding: 16px;
    }
    
    .product-img-link img {
        height: 160px;
    }
    
    .product-name {
        font-size: 1rem;
        margin: 10px 0 6px 0;
    }
    
    .product-price {
        font-size: 1.2rem;
    }
    
    .products-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .products-header h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 600px) {
    /* Mobile-specific 2-column product grid using mathematical approach */
    .latest .product-container {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 12px !important;
        padding: 0 8px !important;
        justify-content: flex-start !important;
        grid-template-columns: none !important; /* Override any grid columns */
        flex-direction: row !important; /* Ensure row direction */
        align-items: stretch !important;
    }
    
    /* Ensure product links don't interfere with the layout */
    .latest .product-link {
        /* Calculate exact width: (100% - gap) / 2 */
        width: calc(50% - 6px) !important; /* 50% minus half the gap (12px/2 = 6px) */
        flex-shrink: 0 !important;
        text-decoration: none !important;
        color: inherit !important;
        display: block !important;
        box-sizing: border-box !important;
        max-width: calc(50% - 6px) !important;
        min-width: calc(50% - 6px) !important;
    }
    
    .latest .product {
        width: 100% !important; /* Full width of the link container */
        height: auto !important;
        min-height: 280px !important;
        padding: 12px !important;
        border-radius: 12px !important;
        transition: transform 0.2s ease, box-shadow 0.2s ease !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
        box-sizing: border-box !important;
        margin: 0 !important; /* Remove any default margins */
        max-width: none !important; /* Override any max-width */
    }
    
    .latest .product:active {
        transform: scale(0.98) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    }
    
    .latest .product img {
        height: 130px !important;
        width: 100% !important;
        object-fit: cover !important;
        border-radius: 8px !important;
    }
    
    .latest .product-name {
        font-size: 0.9rem !important;
        margin: 8px 0 4px 0 !important;
        line-height: 1.3 !important;
        font-weight: 500 !important;
        /* Truncate long product names */
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        height: 2.4em !important;
    }
    
    .latest .product-price {
        font-size: 1.1rem !important;
        margin-bottom: 4px !important;
        font-weight: 600 !important;
        color: #b0302f !important;
    }
    
    .latest .product-stock {
        font-size: 0.75rem !important;
        color: #666;
        margin-top: auto;
    }
}

@media (max-width: 600px) {
    /* Mobile header improvements */
    header {
        padding: 8px 16px;
        min-height: 60px;
    }
    
    .shop-logo {
        height: 40px;
    }
    
    .icons {
        gap: 10px;
    }
    
    .search-form {
        order: 3;
        width: 100%;
        margin-top: 10px;
    }
    
    .search-box {
        width: 100%;
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 8px 12px;
    }
    
    /* Mobile content spacing */
    main {
        padding: 130px 12px 20px;
    }
    
    .latest {
        padding: 16px;
        border-radius: 12px;
        margin: 0 4px;
    }
    
    .products-header {
        margin-bottom: 16px;
        padding: 0 4px;
    }
    
    .products-header h2 {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }
    
    /* Mobile floating buttons */
    .help-btn {
        bottom: 20px;
        right: 20px;
        width: 52px;
        height: 52px;
        padding: 0;
        font-size: 1.4rem;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(176, 48, 47, 0.3);
    }
    
    .help-btn img {
        width: 22px;
        height: 22px;
    }
    
    .image-search-btn {
        bottom: 85px;
        right: 20px;
        width: 52px;
        height: 52px;
        padding: 0;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(176, 48, 47, 0.3);
    }
    
    .image-search-btn img {
        width: 22px;
        height: 22px;
    }
    
    .image-search-btn span {
        display: none;
    }
    
    /* Mobile chat popup */
    .chat-popup {
        bottom: 80px;
        right: 20px;
        width: calc(100vw - 40px);
        max-width: 320px;
        border-radius: 16px;
    }
    
    /* Better mobile touch targets */
    .cart-icon, .orders-icon, .profile-icon button {
        min-width: 44px;
        min-height: 44px;
        padding: 8px;
        border-radius: 8px;
    }
    
    .profile-dropdown {
        right: 0;
        min-width: 160px;
        border-radius: 12px;
    }
    
    .profile-dropdown a {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
}

/* Additional mobile enhancements for very small screens */
@media (max-width: 480px) {
    .latest .product-container {
        gap: 8px !important;
        padding: 0 4px !important;
    }
    
    .latest .product-link {
        /* Recalculate for smaller gap: (100% - 8px gap) / 2 */
        width: calc(50% - 4px) !important; /* 50% minus half the gap (8px/2 = 4px) */
        max-width: calc(50% - 4px) !important;
        min-width: calc(50% - 4px) !important;
    }
    
    .latest .product {
        min-height: 260px !important;
        padding: 8px !important;
    }
    
    .latest .product img {
        height: 110px !important;
    }
    
    .latest .product-name {
        font-size: 0.85rem !important;
        height: 2.2em !important;
    }
    
    .latest .product-price {
        font-size: 1rem !important;
    }
    
    .latest .product-stock {
        font-size: 0.7rem !important;
    }
    
    main {
        padding: 120px 8px 20px !important;
    }
    
    .latest {
        padding: 12px !important;
        margin: 0 2px !important;
    }
    
    .products-header h2 {
        font-size: 1.2rem !important;
    }
}

/* Mobile-specific visual improvements */
@media (max-width: 768px) {
    /* Better visual hierarchy on mobile */
    .products-header {
        background: rgba(176, 48, 47, 0.02);
        padding: 16px;
        border-radius: 12px;
        margin-bottom: 20px;
    }
    
    .products-header h2 {
        color: #b0302f;
        font-weight: 600;
    }
    
    /* Add subtle animations for better UX */
    .product {
        transition: all 0.2s ease;
    }
    
    .product:active {
        transition: all 0.1s ease;
    }
    
    /* Better loading states */
    .product img {
        background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
        background-size: 200% 100%;
        animation: loading 1.5s infinite;
    }
    
    .product img[src] {
        background: none;
        animation: none;
    }
    
    @keyframes loading {
        0% { background-position: 200% 0; }
        100% { background-position: -200% 0; }
    }
    
    /* Mobile-friendly scrollbar for navigation */
    .nav-container::-webkit-scrollbar {
        height: 3px;
    }
    
    .nav-container::-webkit-scrollbar-track {
        background: rgba(176, 48, 47, 0.1);
        border-radius: 3px;
    }
    
    .nav-container::-webkit-scrollbar-thumb {
        background: rgba(176, 48, 47, 0.5);
        border-radius: 3px;
    }
}

/* Specific improvements for the 2-column mobile grid */
@media (hover: none) and (pointer: coarse) {
    .product:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .product:active {
        transform: scale(0.98);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    /* Better tap targets for touch devices */
    .nav-btn {
        min-height: 44px;
        padding: 12px 16px;
    }
    
    .dropdown-btn {
        min-height: 44px;
    }
    
    /* Improve touch feedback */
    .cart-icon:active, .orders-icon:active, .profile-icon button:active {
        transform: scale(0.95);
    }
}
    
    .sidebar {
        width: 100vw;
        right: -100vw;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #b0302f;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Live Search Styles */
.search-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #666;
    animation: fadeIn 0.3s ease;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #b0302f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.search-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #e53e3e;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.retry-btn {
    background: #b0302f;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.3s ease;
}

.retry-btn:hover {
    background: #8b2635;
}

.no-products {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #666;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.no-products p {
    margin: 5px 0;
    font-size: 1rem;
}

.no-products p:first-child {
    font-weight: 600;
    color: #333;
}

/* Search box enhancements for live search */
.search-box.searching {
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Smooth transitions for product container */
.product-container {
    transition: opacity 0.3s ease;
}

.product-container.loading {
    opacity: 0.7;
}

/* Search results header */
.search-results-header {
    padding: 10px 0;
    margin-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
    width: 100%;
}

.search-results-header p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Focus styles for better accessibility */
.search-box:focus,
.add-to-cart-btn:focus,
#chat-input:focus,
.sidebar a:focus {
    outline: 2px solid #b0302f;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .product {
        border: 2px solid #b0302f;
    }
    
    .add-to-cart-btn {
        border: 2px solid #fff;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin: 15px 0;
}

.sidebar ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    transition: text-decoration 0.2s;
}

.sidebar ul li a:hover {
    text-decoration: underline;
}

.submenu {
    display: none;
    list-style: none;
    padding-left: 15px;
}

.submenu.show {
    display: block;
}

/* Sidebar active state */
.sidebar.active {
    right: 0; 
}

.menu-icon {
    font-size: 24px;
    cursor: pointer;
    /* Removed fixed positioning to align with other icons */
    /* position: fixed; */
    /* top: 15px; */
    /* right: 15px; */
    z-index: 1102; /* Above the sidebar */
    background: transparent;
    border: none;
    padding: 0 10px 0 0; /* Add right padding for spacing */
    margin-left: 10px; /* Space from other icons */
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1999; /* Below the sidebar but above other content */
}

.overlay.active {
    display: block;
}

/* Media query for small devices */
@media (max-width: 600px) {
    header {
        flex-wrap: wrap;
        justify-content: center;
        padding: 10px;
        gap: 10px;
    }
    .icons {
        justify-content: center;
        gap: 10px;
        width: 100%;
        order: 2;
    }
    .menu-icon {
        position: fixed;
        top: 10px;
        right: 10px;
        z-index: 1102;
    }
}

/* Ensure proper alignment of icons */
.icons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box {
    padding: 7px 12px;
    border-radius: 5px;
    
    font-size: 1rem;
    outline: none;
    transition: border 0.2s;
}

.search-box:focus {
    border-color: #b0302f;
    box-shadow: 0 0 0 2px rgba(176, 48, 47, 0.2);
}

.search-icon {
    background: #b0302f;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 7px 10px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.2s;
}

search-icon:hover {
    background: #912323;
}

.cart-icon, .orders-icon, .profile-icon button, .menu-icon {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    margin: 0 5px;
    transition: color 0.2s;
}

.cart-icon:hover, .orders-icon:hover, .profile-icon button:hover, .menu-icon:hover {
    color: #912323;
}

/* Add padding to the main content to avoid overlap with the fixed header */
main {
    padding: 110px 20px 20px;
    min-height: 100vh;
    background: #f8f8f8;
}

.latest {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
}

.latest h2, .filters {
    display: inline-block;
    margin-right: 20px;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.sort-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.product-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.product {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 18px 12px 14px 12px;
    width: 220px;
    text-align: center;
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
}

.product:hover, .product:focus-within {
    box-shadow: 0 6px 18px rgba(232,139,155,0.18);
    transform: translateY(-4px) scale(1.03);
    z-index: 2;
}

.product-img-link img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #f0f0f0;
}

.product-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin: 8px 0 4px 0;
}

.product-price {
    color: #b0302f;
    font-size: 1.15rem;
    margin-bottom: 4px;
}

.product-stock {
    font-size: 0.95rem;
    color: #888;
    margin-bottom: 10px;
}

.add-to-cart-btn {
    background: #b0302f;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 8px 18px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 5px;
}

.add-to-cart-btn:hover, .add-to-cart-btn:focus {
    background: #912323;
    transform: scale(1.05);
}

.no-products {
    width: 100%;
    text-align: center;
    color: #888;
    font-size: 1.2rem;
    margin: 40px 0;
}

.image-search-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: linear-gradient(135deg, #b0302f 0%, #8b2635 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(176, 48, 47, 0.3);
    transition: all 0.3s ease;
    z-index: 999;
    width: 60px;
    height: 60px;
}

.image-search-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 12px 35px rgba(176, 48, 47, 0.4);
    text-decoration: none;
    color: white;
}

.image-search-btn img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

.image-search-btn span {
    display: none;
}

/* Help Button */
.help-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: linear-gradient(135deg, #b0302f 0%, #8b2635 100%);
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 1.5rem;
    box-shadow: 0 8px 25px rgba(176, 48, 47, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1200;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 12px 35px rgba(176, 48, 47, 0.4);
}

@media (max-width: 600px) {
    .help-btn {
        right: 12px;
        bottom: 12px;
        padding: 14px;
        font-size: 1.2rem;
    }
}

/* Para sa items */
.product-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.product {
    background-color: white;
    width: 220px; 
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.product img {
    width: 100%;
    height: 200px;
    object-fit: cover; 
    border-radius: 5px;
}

.product-name {
    font-weight: bold;
    margin: 10px 0 5px;
}

.product-price {
    color: #b0302f;
    font-size: 1.2em;
}

/* Media query for small devices */
@media (max-width: 600px) {
    .product {
        width: 45%;
    }
}

/*para sa profile icon*/

.profile-icon {
    position: relative;
    display: inline-block;
}

.profile-icon button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.profile-dropdown {
    display: none;
    position: absolute;
    top: 35px;
    right: 0;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    border-radius: 6px;
    min-width: 120px;
    z-index: 1600;
}

.profile-icon:hover .profile-dropdown,
.profile-icon:focus-within .profile-dropdown {
    display: block;
}

.profile-dropdown a {
    display: block;
    padding: 8px 16px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
}

.profile-dropdown a:hover {
    background: #f0f0f0;
}

/* Back Button */
button, .btn, .add-to-cart, .logout-button, .back-button {
    background-color: #b0302f; /* Pink color */
    border: none;
    color: white;
    cursor: pointer;
    font-size: 18px;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    margin-right: 15px;
}

button:hover, .btn:hover, .add-to-cart:hover, .logout-button:hover, .back-button:hover {
    background-color: #912323; /* Slightly darker pink for hover */
    text-decoration: none;
}

/* Adjust the layout for product details */
.product-details {
    display: flex;
    flex-direction: row; /* Place items side by side */
    gap: 20px; /* Add spacing between the image and description */
    align-items: flex-start; /* Align items at the top */
    justify-content: center;      /* Center horizontally */
    width: 100%;
    max-width: 900px;             /* Optional: limit width for large screens */
    margin: 0 auto;               /* Center the container itself */
}

.left-side {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.left-side img {
    width: 35vw;
    height: auto;
    border-radius: 5px; /* Optional: Add rounded corners to the image */
}

.product-description {
    margin: 0;
    padding: 10px;
    background-color: #ffffff; /* Optional: Add a background color */
    border-radius: 5px; /* Optional: Add rounded corners */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Optional: Add a subtle shadow */
}

.right-side {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 10px;
}

.btn {
    padding: 5px 10px;
    text-decoration: none;
    background-color: #b0302f;
    color: white;
    border-radius: 3px;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #912323;
}

select {
    padding: 4px;
}

/* Fix select dropdown width and prevent overflow */
section form select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #b0302f;
    font-size: 1rem;
    background: #fff;
    appearance: none;
    outline: none;
}

section form select:focus {
    border-color: #912323;
    box-shadow: 0 0 0 2px #f7d3db;
}

/* Optional: Make sure label doesn't wrap awkwardly */
section form label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .product-container {
        gap: 12px;
    }
    .product {
        width: 46vw;
        min-width: 170px;
        max-width: 260px;
    }
}
@media (max-width: 600px) {
    header {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    .products-header {
        flex-direction: column;
        gap: 10px;
    }
    /* Removed conflicting product-container and product rules that were overriding our 2-column layout */
    
    .image-search-btn {
        left: 12px;
        bottom: 12px;
        padding: 10px 16px;
        font-size: 13px;
    }
    .image-search-btn span {
        display: none; /* Hide text on mobile, show only icon */
    }
}

/* Shop Title */
.shop-title {
    font-size: 2rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.welcome-msg {
    font-size: 1rem;
    color: #fff;
    margin-right: 10px;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Size Selector */
.size-selector {
    display: flex;
    gap: 10px;
    margin: 8px 0 16px 0;
}

.size-selector input[type="radio"] {
    display: none;
}

.size-btn {
    display: inline-block;
    padding: 8px 18px;
    border: 2px solid #b0302f;
    border-radius: 5px;
    background: #fff;
    color: #b0302f;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    font-size: 1rem;
    user-select: none;
}

.size-selector input[type="radio"]:checked + .size-btn {
    background: #b0302f;
    color: #fff;
    border-color: #b0302f;
}

.size-btn:hover {
    background: #f7d3db;
    color: #912323;
    border-color: #912323;
}

/* Messenger-style chat popup */
.chat-popup {
    display: none;
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 320px;
    max-width: 95vw;
    background: #fff;
    border-radius: 12px 12px 8px 8px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    z-index: 9999;
    flex-direction: column;
    overflow: hidden;
    border: 1.5px solid #b0302f;
    animation: fadeInUp 0.2s;
}
@keyframes fadeInUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.chat-popup.show {
    display: flex !important;
}

.chat-header {
    background: #b0302f;
    color: #fff;
    padding: 12px 16px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.close-chat {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}
.chat-messages {
    background: #f7d3db;
    padding: 12px;
    height: 260px;
    overflow-y: auto;
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.chat-message {
    background: #fff;
    border-radius: 8px;
    padding: 7px 12px;
    margin-bottom: 2px;
    max-width: 80%;
    word-break: break-word;
    box-shadow: 0 1px 3px rgba(232,139,155,0.07);
}
.chat-message.user {
    align-self: flex-end;
    background: #b0302f;
    color: #fff;
}
.chat-message.admin {
    align-self: flex-start;
    background: #fff;
    color: #333;
}
#chat-form {
    display: flex;
    border-top: 1px solid #eee;
    background: #fff;
}
#chat-input {
    flex: 1;
    border: none;
    padding: 12px;
    font-size: 1rem;
    border-radius: 0 0 0 8px;
    outline: none;
}
#chat-form button {
    background: #b0302f;
    color: #fff;
    border: none;
    padding: 0 18px;
    font-size: 1rem;
    border-radius: 0 0 8px 0;
    cursor: pointer;
    transition: background 0.2s;
}
#chat-form button:hover { background: #912323; }

/* Orders List */
.orders-list {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 700px;
}
.orders-list li {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(232,139,155,0.10);
    margin-bottom: 24px;
    padding: 24px 28px 18px 28px;
    transition: box-shadow 0.2s;
    position: relative;
}
.orders-list li:hover {
    box-shadow: 0 4px 18px rgba(232,139,155,0.18);
}
.orders-list h3 {
    color: #b0302f;
    margin-top: 0;
    margin-bottom: 10px;
}
.orders-list p {
    margin: 4px 0 0 0;
    font-size: 1.05em;
}
.orders-list .btn {
    margin-top: 14px;
    display: inline-block;
    background: #b0302f;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 8px 18px;
    font-size: 1em;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}
.orders-list .btn:hover {
    background: #912323;
}
.orders-list strong {
    color: #b0302f;
}

/* --- START: styles1.css unique rules merged --- */

/* Image Search Button (updated from camera-btn) */
.image-search-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: linear-gradient(135deg, #b0302f 0%, #8b2635 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 20px;
    cursor: pointer;
}

/* If you want the .menu-icon to be fixed for mobile, keep this: */
@media (max-width: 600px) {
    .menu-icon {
        position: fixed;
        top: 15px;
        right: 15px;
        z-index: 1001;
    }
}

/* If you want .latest h2 and .filters inline (already in styles.css, but this is more specific): */
.latest h2, .filters {
    display: inline-block;
    margin-right: 20px;
}

/* If you want .sort-container centered (already in styles.css, but this is more specific): */
.sort-container {
    margin-bottom: 20px;
    text-align: center;
}

/* Image Search Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    visibility: visible;
    opacity: 1;
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden; /* Remove scrollbar for cleaner look */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #b0302f 0%, #8b2635 100%);
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.modal-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.modal-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 25px;
    max-height: calc(90vh - 100px);
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.modal-body::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.modal-body p {
    margin-top: 0;
    margin-bottom: 20px;
    color: #666;
    font-size: 16px;
}

.image-upload-area {
    border: 3px dashed #ddd;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 20px 0;
    background: #fafafa;
}

.image-upload-area:hover {
    border-color: #b0302f;
    background-color: #f8f9fa;
}

.image-upload-area.dragover {
    border-color: #b0302f;
    background-color: #fee;
}

.upload-icon {
    font-size: 48px;
    color: #b0302f;
    margin-bottom: 15px;
}

.upload-text {
    font-size: 18px;
    color: #666;
    margin-bottom: 10px;
    font-weight: 500;
}

.upload-note {
    font-size: 14px;
    color: #999;
}

.image-preview-container {
    margin: 20px 0;
    text-align: center;
}

.image-preview {
    max-width: 300px;
    max-height: 300px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 2px solid #eee;
}

.search-submit-btn {
    background: linear-gradient(135deg, #b0302f 0%, #8b2635 100%);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    font-weight: 500;
    margin: 10px 5px;
    transition: all 0.3s ease;
}

.search-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(176, 48, 47, 0.3);
}

.search-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.search-results-container {
    margin-top: 30px;
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.search-result-card {
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.search-result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.search-result-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.search-result-card h3 {
    margin: 10px 0 5px 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

.search-result-card p {
    margin: 5px 0;
    color: #b0302f;
    font-weight: 600;
    font-size: 16px;
}

.similarity-score {
    background: linear-gradient(135deg, #b0302f 0%, #8b2635 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    display: inline-block;
    margin-bottom: 8px;
    font-weight: 500;
}

.search-loading {
    text-align: center;
    padding: 20px;
    font-size: 18px;
    color: #666;
}

.search-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid #f5c6cb;
}

.view-product-btn {
    background: linear-gradient(135deg, #b0302f 0%, #8b2635 100%);
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 15px;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    margin-top: 8px;
    transition: transform 0.3s ease;
}

.view-product-btn:hover {
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

/* Responsive adjustments for modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .image-upload-area {
        padding: 30px 20px;
    }
    
    .upload-icon {
        font-size: 36px;
    }
    
    .upload-text {
        font-size: 16px;
    }
    
    .search-results-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #b0302f 0%, #8b2635 100%);
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close-modal:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 25px;
}

.modal-body p {
    margin-top: 0;
    margin-bottom: 20px;
    color: #666;
    font-size: 16px;
}

.upload-area {
    border: 3px dashed #ddd;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 20px 0;
    background: #fafafa;
}

.upload-area:hover {
    border-color: #b0302f;
    background-color: #f8f9fa;
}

.upload-area.dragover {
    border-color: #b0302f;
    background-color: #fee;
}

.upload-icon {
    font-size: 48px;
    color: #b0302f;
    margin-bottom: 15px;
}

.upload-text {
    font-size: 18px;
    color: #666;
    margin-bottom: 10px;
    font-weight: 500;
}

.upload-note {
    font-size: 14px;
    color: #999;
}

.preview-container {
    margin: 20px 0;
    text-align: center;
}

.preview-image {
    max-width: 300px;
    max-height: 300px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 2px solid #eee;
}

.search-btn {
    background: linear-gradient(135deg, #b0302f 0%, #8b2635 100%);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    margin: 10px 5px;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(176, 48, 47, 0.3);
}

.search-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.results-container {
    margin-top: 30px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.result-card {
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.result-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.result-card h3 {
    margin: 10px 0 5px 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

.result-card p {
    margin: 5px 0;
    color: #b0302f;
    font-weight: 600;
    font-size: 16px;
}

.similarity-score {
    background: linear-gradient(135deg, #b0302f 0%, #8b2635 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    display: inline-block;
    margin-bottom: 8px;
    font-weight: 500;
}

.loading {
    text-align: center;
    padding: 20px;
    font-size: 18px;
    color: #666;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid #f5c6cb;
}

/* Responsive adjustments for modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .upload-area {
        padding: 30px 20px;
    }
    
    .upload-icon {
        font-size: 36px;
    }
    
    .upload-text {
        font-size: 16px;
    }
    
    .results-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }
}

/* Image Search Results Styles */
.image-search-result {
    position: relative;
}

.similarity-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #b0302f 0%, #8b2635 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.search-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.back-to-browse {
    background: linear-gradient(135deg, #b0302f 0%, #8b2635 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.back-to-browse:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(176, 48, 47, 0.3);
    color: white;
    text-decoration: none;
}

.clear-search {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.clear-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
    color: white;
    text-decoration: none;
}

/* --- END: styles1.css unique rules merged --- */

/* Secondary Navigation Responsive Styles */
@media (max-width: 768px) {
    .secondary-nav {
        top: 65px; /* Adjust for smaller header */
    }
    
    .nav-container {
        padding: 0 15px;
        gap: 4px;
    }
    
    .nav-btn {
        padding: 10px 15px;
        font-size: 0.85rem;
    }
    
    .dropdown-content {
        min-width: 300px;
        max-width: 90vw;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
    }
    
    .dropdown:hover .dropdown-content,
    .dropdown[aria-expanded="true"] .dropdown-content,
    .dropdown.active .dropdown-content {
        transform: translateX(-50%) translateY(0);
    }
    
    .categories-menu {
        padding: 8px 0;
    }
    
    .parent-category-header {
        padding: 10px 12px;
    }
    
    .parent-category-link {
        font-size: 0.9rem;
    }
    
    .subcategory-link {
        padding: 6px 24px;
        font-size: 0.85rem;
    }
    
    .subcategory-link:hover {
        padding-left: 28px;
    }
    
    main {
        padding-top: 160px; /* Adjust for mobile */
    }
}

@media (max-width: 600px) {
    .secondary-nav {
        top: 60px;
    }
    
    .nav-container {
        padding: 0 10px;
        gap: 2px;
    }
    
    .nav-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .dropdown-content {
        min-width: 280px;
        max-height: 300px;
    }
    
    .parent-category-header {
        padding: 8px 10px;
    }
    
    .parent-category-link {
        font-size: 0.85rem;
    }
    
    .subcategory-link {
        padding: 5px 20px;
        font-size: 0.8rem;
    }
    
    .subcategory-link:hover {
        padding-left: 24px;
    }
    
    main {
        padding-top: 150px;
    }
}

/* Hover states for touch devices */
@media (hover: none) and (pointer: coarse) {
    .dropdown-content {
        opacity: 0;
        visibility: hidden;
    }
    
    .dropdown[aria-expanded="true"] .dropdown-content,
    .dropdown.active .dropdown-content {
        opacity: 1;
        visibility: visible;
    }
}

/* Orders Page Styles */
.orders-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.orders-header {
    text-align: center;
    margin-bottom: 40px;
}

.orders-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #b0302f 0%, #8b2635 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.orders-subtitle {
    font-size: 1.1rem;
    color: #718096;
    margin: 0;
}

/* Orders Controls */
.orders-controls {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(176, 48, 47, 0.05);
}

.filter-form {
    display: flex;
    gap: 20px;
    align-items: end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 180px;
}

.filter-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2d3748;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group select {
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2d3748;
    background: white;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.filter-group select:focus {
    outline: none;
    border-color: #b0302f;
    box-shadow: 0 0 0 3px rgba(176, 48, 47, 0.1);
}

/* Orders Summary */
.orders-summary {
    margin-bottom: 20px;
}

.orders-count {
    font-size: 1rem;
    color: #4a5568;
    font-weight: 500;
    margin: 0;
}

/* Alert Styles */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Orders Grid */
.orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* Order Card */
.order-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(176, 48, 47, 0.05);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
    display: flex;
    flex-direction: column;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.order-card:nth-child(1) { animation-delay: 0.1s; }
.order-card:nth-child(2) { animation-delay: 0.2s; }
.order-card:nth-child(3) { animation-delay: 0.3s; }
.order-card:nth-child(4) { animation-delay: 0.4s; }
.order-card:nth-child(5) { animation-delay: 0.5s; }
.order-card:nth-child(6) { animation-delay: 0.6s; }

.order-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(176, 48, 47, 0.12);
    border-color: rgba(176, 48, 47, 0.15);
}

.order-card-header {
    background: linear-gradient(135deg, #b0302f 0%, #8b2635 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-id {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.order-label {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 500;
}

.order-number {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.order-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
}

/* Order Placed - Yellow/Amber */
.status-order-placed {
    background: rgba(251, 191, 36, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

/* Payment Submitted - Cyan */
.status-payment-submitted {
    background: rgba(6, 182, 212, 0.2);
    color: #06b6d4;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

/* Payment Approved - Green */
.status-payment-approved {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* Packing Order - Purple */
.status-packing-order {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Shipped - Blue */
.status-shipped {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Delivered - Bright Green */
.status-delivered {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Failed to Receive - Orange */
.status-failed-to-receive {
    background: rgba(249, 115, 22, 0.2);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.3);
}

/* Failed to Deliver - Red */
.status-failed-to-deliver {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Cancelled - Gray */
.status-cancelled {
    background: rgba(107, 114, 128, 0.2);
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.3);
}

/* Legacy statuses for backward compatibility */
.status-pending {
    background: rgba(251, 191, 36, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.status-processing {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.order-card-body {
    padding: 20px;
    flex: 1;
}

.order-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.order-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-info-item.full-width {
    grid-column: 1 / -1;
}

.info-label {
    font-size: 0.85rem;
    color: #718096;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-weight: 600;
    color: #2d3748;
}

.info-value.price {
    color: #b0302f;
    font-size: 1.2rem;
    font-weight: 700;
}

.info-value.date {
    color: #4a5568;
}

.info-value.tracking {
    color: #3b82f6;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.order-card-footer {
    padding: 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    margin-top: auto;
}

.order-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.delete-form {
    display: inline-block;
    margin: 0;
}

/* Button Styles for Orders */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #b0302f 0%, #8b2635 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(176, 48, 47, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #912323 0%, #7a1f2a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(176, 48, 47, 0.3);
    color: white;
    text-decoration: none;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Empty Orders State */
.empty-orders {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(176, 48, 47, 0.05);
}

.empty-icon {
    margin-bottom: 20px;
}

.empty-orders-icon {
    width: 80px;
    height: 80px;
    opacity: 0.3;
    filter: grayscale(100%);
}

.empty-orders h3 {
    font-size: 1.8rem;
    color: #2d3748;
    margin-bottom: 10px;
    font-weight: 600;
}

.empty-orders p {
    color: #718096;
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .orders-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .orders-header h1 {
        font-size: 2rem;
    }

    .filter-form {
        flex-direction: column;
        gap: 15px;
    }

    .filter-group {
        min-width: auto;
        width: 100%;
    }

    .order-card-header {
        padding: 15px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .order-info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .order-actions {
        flex-direction: column;
        gap: 8px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .orders-container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .orders-header h1 {
        font-size: 1.8rem;
    }

    .order-card-header {
        padding: 12px;
    }

    .order-card-body,
    .order-card-footer {
        padding: 15px;
    }

    .order-number {
        font-size: 1.1rem;
    }

    .info-value.price {
        font-size: 1.1rem;
    }
}

/* MOBILE PRODUCT GRID OVERRIDE - FINAL PRIORITY */
@media screen and (max-width: 600px) {
    .product-container {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
        padding: 0 5px !important;
    }
    
    .product-link {
        width: calc(50% - 5px) !important;
        flex: 0 0 calc(50% - 5px) !important;
        box-sizing: border-box !important;
    }
    
    .product {
        width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
}

@media screen and (max-width: 480px) {
    .product-container {
        gap: 8px !important;
        padding: 0 4px !important;
    }
    
    .product-link {
        width: calc(50% - 4px) !important;
        flex: 0 0 calc(50% - 4px) !important;
    }
}

/* MOBILE RESPONSIVE ENHANCEMENTS */
@media (max-width: 768px) {
    /* Mobile Header Improvements */
    header {
        padding: 10px 15px !important;
        height: auto !important;
        min-height: 50px !important;
    }
    
    .shop-logo {
        height: 35px !important;
    }
    
    .right-icons {
        gap: 8px !important;
    }
    
    .welcome-msg {
        display: none !important;
    }
    
    /* Mobile Search - Show only icon */
    .search-form {
        position: relative !important;
    }
    
    .search-box {
        display: none !important;
    }
    
    .search-icon {
        display: flex !important;
        background: rgba(255, 255, 255, 0.2) !important;
        border: none !important;
        border-radius: 50% !important;
        padding: 8px !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
    }
    
    .search-icon:hover {
        background: rgba(255, 255, 255, 0.3) !important;
        transform: scale(1.1) !important;
    }
    
    /* Mobile Cart and Orders Icons */
    .cart-icon, .orders-icon {
        padding: 6px !important;
        border-radius: 8px !important;
        background: rgba(255, 255, 255, 0.1) !important;
    }
    
    .cart-icon img, .orders-icon img {
        height: 20px !important;
        width: 20px !important;
    }
    
    /* Mobile Cart Counter */
    .cart-counter {
        width: 18px !important;
        height: 18px !important;
        font-size: 10px !important;
        top: -1px !important;
        right: -1px !important;
    }
    
    /* Profile Icon Mobile */
    .profile-icon button {
        padding: 6px !important;
        border-radius: 8px !important;
        background: rgba(255, 255, 255, 0.1) !important;
    }
    
    .profile-icon img {
        height: 20px !important;
        width: 20px !important;
    }
    
    .profile-dropdown {
        min-width: 150px !important;
        right: 0 !important;
        top: calc(100% + 5px) !important;
    }
}

/* HIDE Mobile Search Modal on Desktop */
@media screen and (min-width: 769px) {
    .mobile-search-modal {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    
    .mobile-search-modal.show {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}

/* Mobile Search Modal */
@media (max-width: 768px) {
    .mobile-search-modal {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: rgba(0, 0, 0, 0.8) !important;
        z-index: 9999 !important;
        display: none !important;
        justify-content: center !important;
        align-items: flex-start !important;
        padding-top: 60px !important;
        backdrop-filter: blur(5px) !important;
    }
    
    .mobile-search-modal.show {
        display: flex !important;
        animation: fadeIn 0.3s ease !important;
    }
    
    .mobile-search-content {
        background: white !important;
        width: 90% !important;
        max-width: 500px !important;
        border-radius: 16px !important;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3) !important;
        overflow: hidden !important;
        animation: slideInDown 0.3s ease !important;
    }
    
    .mobile-search-header {
        background: linear-gradient(135deg, #b0302f 0%, #8b2635 100%) !important;
        color: white !important;
        padding: 16px 20px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .mobile-search-header h3 {
        margin: 0 !important;
        font-size: 1.2rem !important;
        font-weight: 600 !important;
    }
    
    .mobile-search-close {
        background: none !important;
        border: none !important;
        color: white !important;
        font-size: 24px !important;
        cursor: pointer !important;
        padding: 0 !important;
        width: 32px !important;
        height: 32px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 50% !important;
        transition: background-color 0.3s ease !important;
    }
    
    .mobile-search-close:hover {
        background-color: rgba(255, 255, 255, 0.2) !important;
    }
    
    .mobile-search-form {
        padding: 20px !important;
        display: flex !important;
        gap: 10px !important;
    }
    
    .mobile-search-input {
        flex: 1 !important;
        padding: 12px 16px !important;
        border: 2px solid #e2e8f0 !important;
        border-radius: 25px !important;
        font-size: 16px !important;
        outline: none !important;
        transition: border-color 0.3s ease !important;
    }
    
    .mobile-search-input:focus {
        border-color: #b0302f !important;
        box-shadow: 0 0 0 3px rgba(176, 48, 47, 0.1) !important;
    }
    
    .mobile-search-submit {
        background: linear-gradient(135deg, #b0302f 0%, #8b2635 100%) !important;
        color: white !important;
        border: none !important;
        padding: 12px 20px !important;
        border-radius: 25px !important;
        cursor: pointer !important;
        font-weight: 600 !important;
        transition: all 0.3s ease !important;
    }
    
    .mobile-search-submit:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 6px 16px rgba(176, 48, 47, 0.3) !important;
    }
    
    @keyframes slideInDown {
        from {
            transform: translateY(-50px) !important;
            opacity: 0 !important;
        }
        to {
            transform: translateY(0) !important;
            opacity: 1 !important;
        }
    }
}

/* Secondary Navigation Mobile Optimization */
@media (max-width: 768px) {
    .secondary-nav {
        position: fixed !important;
        top: 80px !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 1001 !important;
        background: white !important;
        border-bottom: 1px solid rgba(176, 48, 47, 0.1) !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        overflow: visible !important;
    }
    
    .nav-container {
        display: flex !important;
        align-items: center !important;
        padding: 0 15px !important;
        gap: 5px !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        scrollbar-width: thin !important;
        scrollbar-color: rgba(176, 48, 47, 0.2) transparent !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .nav-container::-webkit-scrollbar {
        height: 3px !important;
    }
    
    .nav-container::-webkit-scrollbar-track {
        background: rgba(176, 48, 47, 0.1) !important;
    }
    
    .nav-container::-webkit-scrollbar-thumb {
        background: rgba(176, 48, 47, 0.3) !important;
        border-radius: 3px !important;
    }
    
    .nav-item {
        flex-shrink: 0 !important;
        position: relative !important;
    }
    
    .nav-btn {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        padding: 10px 14px !important;
        background: none !important;
        border: none !important;
        color: #2d3748 !important;
        text-decoration: none !important;
        font-weight: 500 !important;
        font-size: 0.85rem !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        border-radius: 6px !important;
        white-space: nowrap !important;
        min-height: 40px !important;
    }
    
    .nav-btn:hover {
        background: rgba(176, 48, 47, 0.1) !important;
        color: #b0302f !important;
    }
    
    .dropdown-arrow {
        width: 14px !important;
        height: 14px !important;
    }
}

@media (max-width: 600px) {
    .secondary-nav {
        top: 60px !important;
    }
    
    .nav-container {
        padding: 0 10px !important;
        gap: 3px !important;
    }
    
    .nav-btn {
        padding: 8px 12px !important;
        font-size: 0.8rem !important;
        min-height: 36px !important;
    }
    
    main {
        padding-top: 155px !important;
    }
}

@media (max-width: 480px) {
    .secondary-nav {
        top: 55px !important;
    }
    
    .nav-container {
        padding: 0 8px !important;
    }
    
    .nav-btn {
        padding: 6px 10px !important;
        font-size: 0.75rem !important;
        min-height: 32px !important;
    }
    
    main {
        padding-top: 145px !important;
    }
}

@media (max-width: 360px) {
    .secondary-nav {
        top: 50px !important;
    }
    
    main {
        padding-top: 135px !important;
    }
}

@media (max-width: 320px) {
    .secondary-nav {
        top: 50px !important;
    }
    
    main {
        padding-top: 130px !important;
    }
}

/* Sort Filter Mobile Scaling */
@media (max-width: 768px) {
    .products-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        margin-bottom: 20px !important;
    }
    
    .products-header h2 {
        text-align: center !important;
        margin-bottom: 0 !important;
        font-size: 1.5rem !important;
    }
    
    .sort-container {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        background: #f7fafc !important;
        padding: 10px 12px !important;
        border-radius: 10px !important;
        border: 1px solid #e2e8f0 !important;
    }
    
    .sort-container label {
        font-weight: 600 !important;
        color: #4a5568 !important;
        font-size: 0.85rem !important;
    }
    
    .sort-container select {
        padding: 6px 10px !important;
        border: 1px solid #cbd5e0 !important;
        border-radius: 6px !important;
        background: white !important;
        color: #2d3748 !important;
        font-size: 0.85rem !important;
        font-weight: 500 !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        outline: none !important;
        min-width: 120px !important;
    }
    
    .sort-container select:focus {
        border-color: #b0302f !important;
        box-shadow: 0 0 0 2px rgba(176, 48, 47, 0.1) !important;
    }
}

@media (max-width: 480px) {
    .products-header h2 {
        font-size: 1.3rem !important;
    }
    
    .sort-container {
        padding: 8px 10px !important;
        gap: 6px !important;
    }
    
    .sort-container label {
        font-size: 0.8rem !important;
    }
    
    .sort-container select {
        padding: 5px 8px !important;
        font-size: 0.8rem !important;
        min-width: 100px !important;
    }
}

/* Main Content Mobile Spacing */
@media (max-width: 768px) {
    main {
        padding: 160px 15px 30px !important;
    }
    
    .latest {
        padding: 20px 16px !important;
        margin: 0 !important;
        border-radius: 12px !important;
    }
}

@media (max-width: 600px) {
    main {
        padding: 155px 12px 25px !important;
    }
    
    .latest {
        padding: 16px 12px !important;
    }
}

@media (max-width: 480px) {
    main {
        padding: 145px 10px 20px !important;
    }
    
    .latest {
        padding: 14px 10px !important;
    }
}

@media (max-width: 360px) {
    main {
        padding: 135px 8px 20px !important;
    }
    
    .latest {
        padding: 12px 8px !important;
    }
}

@media (max-width: 320px) {
    main {
        padding: 130px 6px 20px !important;
    }
    
    .latest {
        padding: 10px 6px !important;
    }
}

/* Mobile Search Icon Styles */
.search-icon-mobile {
    display: none !important; /* Hidden by default on desktop */
    background: rgba(255, 255, 255, 0.2) !important;
    border: none !important;
    border-radius: 50% !important;
    padding: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.search-icon-mobile:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.1) !important;
}

.search-icon-mobile img {
    height: 18px !important;
    width: 18px !important;
    filter: brightness(0) invert(1) !important;
}

/* Desktop: Show search form, hide mobile icon */
@media (min-width: 769px) {
    .search-form {
        display: flex !important;
    }
    
    .search-icon-mobile {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* Ensure icons container shows desktop search properly */
    .icons .search-icon-mobile {
        display: none !important;
        visibility: hidden !important;
    }
}

/* Mobile: Hide search form, show mobile icon */
@media (max-width: 768px) {
    .search-form {
        display: none !important;
    }
    
    .search-icon-mobile {
        display: flex !important;
    }
}

/* Payment status badges */
.status-verified {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-rejected {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-pending {
    background: rgba(251, 191, 36, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

/* CLEAN MOBILE SEARCH RULES - FINAL VERSION */
/* Show mobile search icon ONLY on screens 768px and smaller */
@media screen and (max-width: 768px) {
    .search-icon-mobile {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .search-form {
        display: none !important;
    }
}

/* Ensure mobile search icon stays hidden on larger screens */
@media screen and (min-width: 769px) {
    .search-icon-mobile {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    .search-form {
        display: flex !important;
    }
}

/* Password visibility toggle (global) */
/* Hide Edge/IE built-in password reveal to avoid duplicate eye */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

.password-input-wrap { position: relative; display: block; }
.password-input-wrap > input[type="password"],
.password-input-wrap > input[type="text"] {
    padding-right: 48px; /* space for eye button */
}
/* Prevent vertical nudge on focus so the eye stays centered */
.password-input-wrap > input:focus {
    transform: none !important;
}
.password-input-wrap > .password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.password-input-wrap > .password-toggle:hover { color: #374151; background: #f1f5f9; }
.password-input-wrap > .password-toggle:focus { outline: none; box-shadow: 0 0 0 3px rgba(176, 48, 47, 0.15); }
.password-input-wrap > .password-toggle svg { width: 20px; height: 20px; display: block; }
.password-input-wrap > .password-toggle .icon-eye-off { display: none; }
.password-input-wrap > .password-toggle.revealed .icon-eye { display: none; }
.password-input-wrap > .password-toggle.revealed .icon-eye-off { display: block; }
/* -------------------------------------------------- */
/* Consolidated Product Name Visibility + Clamp Override
   Base rule: sets typography + WebKit box model so clamp works where supported.
   @supports (-webkit-line-clamp): activates multi-line clamp.
   @supports not (-webkit-line-clamp): falls back to block with normal wrapping & max-height.
   Notes: Earlier duplicate .product-name declarations may still exist; this block
          sits last to ensure consistent visual behavior regardless of prior rules. */
.product-name {
    color: #2d3748 !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    -webkit-box-orient: vertical !important;
    display: -webkit-box !important; /* Use flex box model for clamp where supported */
    max-height: 2.5em !important;    /* ~2 lines (line-height * 2) */
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 2 !important;
}
@supports (-webkit-line-clamp: 2) {
    .product-name {
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
    }
}
@supports not (-webkit-line-clamp: 2) {
    .product-name {
        display: block !important;      /* Fallback to block */
        white-space: normal !important; /* Allow wrapping */
        max-height: 2.5em !important;   /* Still cap approximate height */
    }
}
/* -------------------------------------------------- */
    .product-name {
        white-space: normal !important;
    }

/* -------------------------------------------------- */