/* --- Global Layout Fix --- */
html {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    min-width: 320px;
}

/* Prevent horizontal scroll from any element */
* {
    box-sizing: border-box;
}

/* --- Ensure Tailwind Container Works Properly --- */
.container {
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* --- Responsive Grid System Fixes --- */
/* Homepage product cards grid */
.grid.grid-cols-1.sm\:grid-cols-2.lg\:grid-cols-3.gap-8.auto-rows-fr {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 2rem;
    grid-auto-rows: 1fr;
}

@media (min-width: 640px) {
    .grid.grid-cols-1.sm\:grid-cols-2.lg\:grid-cols-3.gap-8.auto-rows-fr {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .grid.grid-cols-1.sm\:grid-cols-2.lg\:grid-cols-3.gap-8.auto-rows-fr {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Category page grid */
.grid.grid-cols-1.sm\:grid-cols-2.lg\:grid-cols-4.gap-8.mb-16 {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

@media (min-width: 640px) {
    .grid.grid-cols-1.sm\:grid-cols-2.lg\:grid-cols-4.gap-8.mb-16 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .grid.grid-cols-1.sm\:grid-cols-2.lg\:grid-cols-4.gap-8.mb-16 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Subcategory page grid - same as category page */
.grid.grid-cols-1.sm\:grid-cols-2.lg\:grid-cols-4.gap-8 {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 2rem;
}

@media (min-width: 640px) {
    .grid.grid-cols-1.sm\:grid-cols-2.lg\:grid-cols-4.gap-8 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .grid.grid-cols-1.sm\:grid-cols-2.lg\:grid-cols-4.gap-8 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Blog grid */
.grid.grid-cols-1.md\:grid-cols-3.gap-8.blog-grid-container {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 2rem;
    align-items: stretch;
}

@media (min-width: 768px) {
    .grid.grid-cols-1.md\:grid-cols-3.gap-8.blog-grid-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Mobile-specific optimizations */
@media (max-width: 768px) {
    .card-hover-effect {
        min-height: 400px !important;
        max-height: none !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .card-description {
        -webkit-line-clamp: unset !important;
        height: auto !important;
        max-height: none !important;
        margin-top: 12px !important;
        overflow: visible !important;
        display: block !important;
        line-height: 1.3 !important;
        text-overflow: unset !important;
        word-break: break-word !important;
        hyphens: auto !important;
    }
    
    .product-card-content {
        flex-grow: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        min-height: auto !important;
    }
    
    .card-title {
        -webkit-line-clamp: none !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        display: block !important;
        word-break: break-word !important;
        hyphens: auto !important;
    }
}

/* --- Mobile-Specific Optimizations --- */
@media (max-width: 768px) {
    .card-hover-effect {
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    .card-hover-effect:active {
        transform: scale(0.98);
    }
    .feature-card-glow:active {
        transform: scale(0.98);
    }
}

/* --- Touch-Friendly Buttons --- */
@media (pointer: coarse) {
    button, .btn, a[role="button"] {
        min-height: 44px;
        min-width: 44px;
    }
}
/* --- General Body & Font Styling --- */
body {
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    background-color: #f8f9fa;
}

/* PRODUCT CATALOG / MEGA MENU CONSISTENCY FIXES */
/* Product card container - fixed dimensions to prevent layout shift */
.category-item {
    /* WHY: Ensure consistent card dimensions across browsers */
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    height: auto !important; /* Allow flexible height for responsive behavior */
    min-height: auto !important; /* Remove fixed minimum height */
    max-height: none !important; /* Remove fixed maximum height */
    overflow: visible !important;
    position: relative !important;
    box-sizing: border-box !important;
    padding: 0.75rem !important; /* WHY: Reduce overall padding */
    margin: 0 !important;
}

/* Product image wrapper - reserves space with aspect ratio */
.category-image {
    /* WHY: Reserve space before image loads to prevent layout shift */
    width: 100% !important;
    aspect-ratio: 4 / 3 !important; /* WHY: Maintain 4:3 aspect ratio as per design spec */
    height: auto !important;
    max-height: none !important; /* WHY: Allow flexible height - will be constrained by media queries */
    min-height: 80px !important; /* WHY: Ensure minimum visible height */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #f8f9fa !important; /* WHY: Provide consistent background */
    overflow: visible !important; /* WHY: Allow images to display fully without clipping */
    border-radius: 0.5rem !important;
    margin-bottom: 0 !important; /* WHY: No gap between image and text */
}

/* Product image - scales inside reserved space */
.category-image img {
    /* WHY: Scale image inside reserved space without cropping */
    object-fit: contain !important; /* WHY: Prevents image cropping */
    object-position: center !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important; /* WHY: Prevent overflow on smaller screens */
    max-height: 100% !important; /* WHY: Prevent overflow on smaller screens */
    padding: 0.25rem !important; /* WHY: Small padding to prevent touching edges */
    transition: transform 0.3s ease !important;
}

/* Product title - clamped to 2 lines max */
.category-title {
    /* WHY: Prevent title length from changing card height */
    display: block !important;
    margin: 0 !important; /* WHY: Remove all margins for minimal spacing */
    padding: 0 !important; /* WHY: Remove padding */
    font-weight: 600 !important;
    font-size: 0.875rem !important; /* WHY: Consistent font size */
    color: #111827 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important; /* WHY: Clamp to 2 lines max */
    -webkit-box-orient: vertical !important;
    line-height: 1.2 !important; /* WHY: Reduce line height for ultra-compact spacing */
    min-height: auto; /* Allow flexible height based on content */
    max-height: none; /* Remove fixed max height */
}

/* Ensure h3 elements inside category items have no spacing */
.category-item h3 {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}

/* Ensure direct children of category item have no spacing between them */
.category-item > * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Subcategory container - consistent layout */
.subcategory-container {
    /* WHY: Fixed zone for subcategories to maintain layout */
    flex: 1 !important; /* WHY: Take remaining space */
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    min-height: auto !important;
    overflow: hidden !important;
    padding-top: 0 !important; /* WHY: No padding to eliminate spacing */
    margin-top: 0 !important; /* WHY: No margin to eliminate spacing */
    border-top: none !important; /* WHY: Remove border to eliminate spacing */
}

/* Ensure no spacing between category header and applications link */
.category-header {
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

/* Ensure no spacing between elements inside category item */
.category-item > div {
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure no spacing between category header and applications link when they are siblings */
.category-header + .applications-link {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Subcategory links - consistent sizing */
.subcategory-container a {
    /* WHY: Consistent subcategory link styling */
    font-size: 0.75rem !important;
    color: #374151 !important;
    padding: 0.125rem 0.25rem !important;
    display: block !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* Applications link - consistent styling */
.applications-link {
    /* WHY: Fixed zone for applications link with minimal spacing */
    margin-top: 0 !important; /* WHY: No gap between title and applications link */
    margin-bottom: 0 !important; /* WHY: Remove bottom margin */
    padding-top: 0 !important; /* WHY: Remove padding to minimize white space */
    padding-bottom: 0 !important; /* WHY: Remove bottom padding */
    border-top: none !important; /* WHY: Remove border to save space */
    line-height: 1 !important; /* WHY: Minimize line height */
    margin: 0 !important; /* Override any other margins */
    font-size: 0.75rem !important; /* Smaller font to reduce vertical space */
}

/* Additional fix for gap between category title and applications link */
.category-item .category-title {
    margin-bottom: 0.125rem !important; /* Minimal gap after title */
}

.category-item .applications-link {
    margin-top: 0.125rem !important; /* Minimal gap before applications link */
}

/* Specific fix for laptop screens */
@media (min-width: 1024px) and (max-width: 1366px) {
    .category-item .category-title {
        margin-bottom: 0.0625rem !important; /* Even smaller gap on laptop screens */
    }
    
    .category-item .applications-link {
        margin-top: 0.0625rem !important; /* Even smaller gap on laptop screens */
        font-size: 0.7rem !important; /* Slightly smaller font on laptop screens */
    }
    
    /* Ensure minimal spacing between category header and applications */
    .category-header + .applications-link {
        margin-top: 0.0625rem !important;
        padding-top: 0 !important;
    }
}

/* Updated laptop screen range with reduced gap */
@media (min-width: 1024px) and (max-width: 1599px) {
    /* Higher specificity to override other rules */
    body.menu-is-open #fullscreen-menu .category-item .category-title,
    body.menu-is-open #submenu-container .category-item .category-title {
        min-height: 1rem !important; /* Changed from 3rem to 1rem as requested */
        display: flex !important;
        align-items: flex-start !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .category-item .category-title {
        min-height: 1rem !important; /* Changed from 3rem to 1rem as requested */
        display: flex !important;
        align-items: flex-start !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Additional adjustments to reduce gap between category names and common applications */
    .category-header {
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1 !important;
    }
    
    .applications-link {
        margin: 0 !important;
        margin-top: 0 !important;
        padding: 0 !important;
        padding-top: 0 !important;
        line-height: 1 !important;
    }
    
    /* Reduce gap specifically in hamburger menu */
    body.menu-is-open #fullscreen-menu .category-item .category-header,
    body.menu-is-open #submenu-container .category-item .category-header {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    
    body.menu-is-open #fullscreen-menu .category-item .applications-link,
    body.menu-is-open #submenu-container .category-item .applications-link {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    /* Ensure zero gap between category header and applications link */
    body.menu-is-open #fullscreen-menu .category-header + .applications-link,
    body.menu-is-open #submenu-container .category-header + .applications-link {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}

/* Grid layout for consistent card alignment */
.menu-columns {
    /* WHY: Fixed grid layout to align cards */
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 1rem !important;
    align-items: stretch !important; /* WHY: Stretch items to same height */
    align-content: start !important;
}

/* Ensure hover effects don't cause layout shift */
.category-item:hover {
    /* WHY: Prevent scale transformations that cause layout shift */
    transform: none !important; /* WHY: Disable scale on hover */
    transition: border-color 0.3s ease !important; /* WHY: Only change border on hover */
}

.category-image img:hover {
    /* WHY: Subtle hover effect without layout shift */
    transform: scale(1.02) !important; /* WHY: Small scale that stays within bounds */
}

/* --- Header - no scrollbar --- */
header {
    overflow: visible !important;
}

header * {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

header *::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* --- FAQ Accordion Rotation --- */
.rotate-180 {
    transform: rotate(180deg);
}

.transition-transform {
    transition: transform 0.3s ease;
}

/* --- Navigation Link Underline Effect --- */
.nav-link {
    position: relative;
    transition: color 0.3s;
}
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #f97316; /* Orange Accent Color */
    transition: width 0.3s;
}
.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* --- Translation/Language Icon Always Orange --- */
button#open-language-modal,
button#open-language-modal-mobile,
#open-language-modal,
#open-language-modal-mobile {
    color: #f97316 !important; /* Always orange */
}

button#open-language-modal:hover,
button#open-language-modal-mobile:hover,
#open-language-modal:hover,
#open-language-modal-mobile:hover {
    color: #ea580c !important; /* Darker orange on hover */
}

/* Target the icon specifically */
button#open-language-modal i,
button#open-language-modal-mobile i,
#open-language-modal i,
#open-language-modal-mobile i {
    color: #f97316 !important;
}

button#open-language-modal:hover i,
button#open-language-modal-mobile:hover i,
#open-language-modal:hover i,
#open-language-modal-mobile:hover i {
    color: #ea580c !important;
}

/* SPECIFIC LANGUAGE ICON ORANGE STYLING */
/* Target only the language selector buttons */
header button#open-language-modal,
header button#open-language-modal-mobile,
header #open-language-modal,
header #open-language-modal-mobile {
    color: #f97316 !important;
}

/* Target the globe icons specifically */
header button#open-language-modal i[data-lucide="globe"],
header button#open-language-modal-mobile i[data-lucide="globe"],
header #open-language-modal i[data-lucide="globe"],
header #open-language-modal-mobile i[data-lucide="globe"] {
    color: #f97316 !important;
    stroke: #f97316 !important;
    fill: none !important; /* Ensure no fill conflicts with stroke */
}

/* EDGE BROWSER FIX: Ensure all navigation icons are visible */
header i[data-lucide] {
    color: #374151 !important; /* Default icon color */
    stroke: #374151 !important; /* Ensure stroke is set for Edge */
    fill: none !important; /* Prevent fill from overriding stroke */
    display: inline-block !important; /* Ensure proper display in Edge */
    vertical-align: middle !important; /* Align properly in flex containers */
}

/* Specific icon colors when in header */
header .main-menu-toggle i[data-lucide="menu"],
header .main-menu-toggle i[data-lucide="x"] {
    color: #374151 !important;
    stroke: #374151 !important;
    stroke-width: 2 !important; /* Ensure visible stroke width in Edge */
}

/* Cart icon styling */
header a[aria-label="Shopping Cart"] i[data-lucide="shopping-cart"] {
    color: #374151 !important;
    stroke: #374151 !important;
    stroke-width: 2 !important;
}

/* Language icon styling */
header button[aria-label="Change language"] i[data-lucide="globe"] {
    color: #374151 !important;
    stroke: #374151 !important;
    stroke-width: 2 !important;
}

/* Ensure icons are visible on hover */
header .main-menu-toggle:hover i,
header a[aria-label="Shopping Cart"]:hover i,
header button[aria-label="Change language"]:hover i {
    color: #f97316 !important;
    stroke: #f97316 !important;
}

/* EDGE BROWSER SPECIFIC FIXES */
@supports (-ms-high-contrast: none) or (-ms-high-contrast: active) {
    /* IE specific styles - though not applicable to Edge, included for completeness */
}

/* Microsoft Edge specific fixes */
@supports (-webkit-appearance: none) and (stroke: color) {
    /* These styles target WebKit-based browsers including Edge */
    header i[data-lucide] {
        color: #374151 !important;
        stroke: #374151 !important;
        stroke-width: 2 !important;
        fill: none !important;
    }
}

/* Force SVG display for icons in Edge */
i[data-lucide] svg {
    display: inline-block !important;
    vertical-align: middle;
    stroke: currentColor !important;
    fill: none !important;
}

/* EDGE BROWSER PASSWORD FIELD FIXES */
/* Disable Edge's built-in password reveal button */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none !important;
}

input[type="text"]::-ms-reveal,
input[type="text"]::-ms-clear {
    display: none !important;
}

/* Password field container styling for proper button positioning */
.password-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

/* Password toggle button positioning */
.password-toggle-btn {
    position: absolute !important;
    right: 0.75rem !important; /* 12px - matches the pr-3 class */
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    z-index: 10 !important;
    padding: 0.25rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: auto !important; /* Ensure the button receives click events */
}

/* Ensure password field container has proper positioning */
.password-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

/* Ensure button is clickable and properly layered */
.password-container button {
    z-index: 20 !important; /* Higher than other elements */
}

/* Ensure proper positioning context for password fields */
#password,
input[name="password"] {
    position: relative;
}

/* Edge-specific password field fixes */
@supports (-webkit-appearance: none) {
    #password,
    input[name="password"] {
        padding-right: 2.5rem !important; /* Ensure space for the toggle button */
    }
    
    .password-toggle-btn {
        height: 100% !important;
        margin: 0 !important;
        min-height: auto !important;
    }
}

/* Additional Edge compatibility for login form */
#login-form .password-container,
#register-form .password-container {
    width: 100% !important;
    position: relative !important;
}

#login-form input[type="password"]:not(.chatbot-password-mode),
#register-form input[type="password"]:not(.chatbot-password-mode) {
    padding-right: 3rem !important; /* Extra space to accommodate the toggle button */
    box-sizing: border-box !important;
}

/* Ensure icons are visible even after DOM updates (like login) */
header .p-2.text-gray-700 i[data-lucide],
header .relative.p-2.text-gray-700 i[data-lucide] {
    color: #374151 !important;
    stroke: #374151 !important;
    stroke-width: 2 !important;
}

/* Additional fix for logged-in state icons */
header .flex.items-center.space-x-2 i[data-lucide] {
    color: #374151 !important;
    stroke: #374151 !important;
    stroke-width: 2 !important;
    min-width: 20px; /* Ensure minimum size */
    min-height: 20px; /* Ensure minimum size */
}

/* --- Video Hero Section --- */
.video-hero-section {
    position: relative;
    overflow: hidden;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.video-hero-section h1 {
    text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.9);
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.video-hero-section p {
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
    color: #f9fafb;
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

@media (min-width: 768px) {
    .video-hero-section p {
        font-size: 1.25rem;
    }
}

.video-hero-section .container {
    position: relative;
    z-index: 20;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -1;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover; /* This is key for responsiveness */
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Consistent black overlay with 50% opacity */
    z-index: 10;
}

/* --- Media Container for Hero Videos/Images --- */
.media-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.media-item {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.media-item.video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Consistent Hero Image Overlay --- */
.hero-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Consistent black overlay with 50% opacity */
    z-index: 10;
}

/* --- Hero Fallback Background --- */
.hero-fallback-orange {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    position: relative;
}

.hero-fallback-orange::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5); /* Consistent black overlay with 50% opacity */
    z-index: 10;
}

.hero-fallback-orange .container {
    position: relative;
    z-index: 20;
}

/* COMPLETE REDESIGN - Homepage product card styling */
.card-hover-effect {
    cursor: pointer;
    border: 2px solid #f97316;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.2);
    will-change: transform;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%; /* Let grid control height */
    background: #ffffff;
    border-radius: 0.75rem;
}

/* Fixed card text truncation classes following memory specifications */
.card-title {
    display: block !important;
    line-height: 1.4; /* Increased line height for better readability */
    min-height: 2.6rem;
    margin-bottom: 0.5rem; /* Increased gap for visibility */
    word-break: break-word;
    hyphens: auto;
    font-weight: 600;
    font-size: 1.25rem;
    color: #111827 !important;
    visibility: visible !important;
    text-align: center;
}

/* CATEGORY/SUBCATEGORY CARD DESCRIPTION - Show full description */
.card-description {
    display: block !important;
    overflow: visible !important;
    text-overflow: unset !important;
    word-break: break-word !important;
    hyphens: auto !important;
    line-height: 1.4 !important; /* Increased line height for better readability */
    height: auto !important;
    margin-top: 12px !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    flex-grow: 1 !important;
    visibility: visible !important;
    opacity: 1 !important;
    text-align: left !important;
    color: #374151 !important;
    font-size: 0.9rem !important;
}

/* Remove mobile text clamp restrictions - Show full text */
@media (max-width: 768px) {
    .card-description {
        -webkit-line-clamp: unset !important;
        min-height: auto !important;
        max-height: none !important;
        height: auto !important;
        overflow: visible !important;
        display: block !important;
        line-height: 1.4 !important; /* Increased line height for better readability */
        text-overflow: unset !important;
        word-break: break-word !important;
        hyphens: auto !important;
    }
}

/* Enhanced responsive image containers with flexible heights */
.product-card-image-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 50%; /* Reduced from 75% to 50% for more text space */
    overflow: hidden;
    background: #f8f9fa;
    border-radius: 0.5rem 0.5rem 0 0;
    flex-shrink: 0;
}

.product-card-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 0.75rem; /* Increased gap for better readability */
    min-height: auto; /* Allow flexible height */
}

/* Grid system for homepage cards - prevents collisions */
.auto-rows-fr {
    grid-auto-rows: 1fr;
}

/* Responsive card heights - Allow flexible heights on all viewports */
@media (min-width: 768px) {
    .card-hover-effect {
        min-height: 450px; /* Increased to allow more space for text */
        height: auto !important;
        max-height: none !important;
    }
}

@media (min-width: 1024px) {
    .card-hover-effect {
        min-height: 480px; /* Increased to allow more space for text */
        height: auto !important;
        max-height: none !important;
    }
}

@media (min-width: 1280px) {
    .card-hover-effect {
        min-height: 500px; /* Increased to allow more space for text */
        height: auto !important;
        max-height: none !important;
    }
}

/* Hover effects for enhanced interaction */
.card-hover-effect:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(249, 115, 22, 0.3);
    border-color: #ea580c;
}

/* Enhanced hover effects for product cards */
.card-hover-effect {
    transition: all 0.3s ease;
    border: 2px solid #f97316 !important;
}

.card-hover-effect:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 20px 40px rgba(249, 115, 22, 0.4), 0 0 20px rgba(249, 115, 22, 0.3) !important;
    border-color: #ea580c !important;
}

.card-hover-effect .card-title {
    transition: color 0.3s ease;
}

/* Enhanced homepage product card descriptions - Show full description */
.card-hover-effect .card-description {
    transition: color 0.3s ease;
    display: block !important;
    overflow: visible !important;
    text-overflow: unset !important;
    word-break: break-word !important;
    color: #374151 !important;
    font-size: 0.9rem !important;
    margin: 0.5rem 0 0 0 !important;
    padding: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    line-height: 1.4 !important; /* Increased line height for better readability */
    height: auto !important;
    hyphens: auto !important;
}

/* Fixed category page card titles and descriptions */
.card-hover-effect .card-title {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    display: block !important;
    overflow: hidden !important;
    word-break: break-word !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
}

/* Category page card content containers - Allow flexible height */
.card-hover-effect div[style*="padding: 1.5rem"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important; /* Increased gap for better readability */
    min-height: auto !important;
    height: auto !important;
    max-height: none !important;
    padding: 1.5rem !important;
    overflow: visible !important;
}

/* Category page card descriptions - Show full description */
.card-hover-effect div[style*="padding: 1.5rem"] p.card-description {
    display: block !important;
    overflow: visible !important;
    text-overflow: unset !important;
    word-break: break-word !important;
    margin: 0.5rem 0 0 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important; /* Increased line height for better readability */
    height: auto !important;
    hyphens: auto !important;
    flex-shrink: 0 !important;
}

/* Override webkit display for full text display */
.card-description {
    display: block !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    overflow: visible !important;
    text-overflow: unset !important;
    line-height: 1.4 !important; /* Increased line height for better readability */
    height: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Homepage card titles - ensure visibility */
.card-title {
    display: block !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 !important;
    margin-bottom: 0.125rem !important;
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important; /* Increased line height for better readability */
    word-break: break-word !important;
    min-height: 2.6rem !important;
}

/* Homepage cards - ensure adequate height for content */
.card-hover-effect[style*="min-height: 500px"] {
    min-height: 600px !important;
}

.card-hover-effect:hover .card-title {
    color: #ea580c !important;
}

.card-hover-effect:hover .card-description {
    color: #374151 !important;
}

/* Image hover effect */
.card-hover-effect img {
    transition: transform 0.3s ease;
}

.card-hover-effect:hover img {
    transform: scale(1.05);
}

/* Product cards should have orange borders */
.product-card.card-hover-effect {
    border: 2px solid #f97316;
}

a.product-card.card-hover-effect {
    border: 2px solid #f97316;
}

/* Override any orange border classes with neutral styling - ONLY for card elements */
a.card-hover-effect,
.card-hover-effect,
a.product-card,
.product-card {
    border: 2px solid #f97316;
    border-color: #f97316;
}

/* Remove orange borders from category and product links ONLY when they are cards */
a[href*="/category/"].card-hover-effect,
a[href*="/products/"].card-hover-effect {
    border: 2px solid #f97316; /* Orange border for product/category cards */
}

/* Remove orange borders from specific product card patterns */
a[href*="/category/"].card-hover-effect,
a[href*="/products/"].card-hover-effect,
a.product-card.card-hover-effect {
    border: 2px solid #f97316;
    border-color: #f97316;
}

/* Override any Tailwind orange border classes globally */
.border-orange-500,
.border-orange-600,
[class*="border-orange"] {
    border-color: #f97316 !important; /* Keep orange for intended elements */
}

/* Remove orange borders from any cards with these specific classes */
.border-2.border-orange-500,
.border-2.border-orange-600 {
    border: 2px solid #f97316 !important;
}

/* Additional overrides for any remaining orange borders */
*[class*="border-orange"] {
    border-color: #d1d5db !important;
}

/* Override specific border thickness for orange borders */
.border-2[class*="orange"],
.border-3[class*="orange"] {
    border-width: 1px !important;
    border-color: #e5e7eb !important;
}

/* FORCE orange borders on homepage and product cards */
.product-card.card-hover-effect.border-2.border-orange-500,
a.product-card.card-hover-effect.border-2.border-orange-500,
.card-hover-effect.border-2.border-orange-500,
a.card-hover-effect.border-2.border-orange-500 {
    border: 2px solid #f97316 !important;
    border-color: #f97316 !important;
}

/* Specific override for homepage product cards */
a[href*="/category/"].product-card.card-hover-effect.border-2.border-orange-500 {
    border: 2px solid #f97316 !important;
    border-color: #f97316 !important;
}

/* Ensure footer links have NO borders */
footer a,
footer .space-y-2 a,
footer ul a {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Remove focus borders from footer links */
footer a:focus,
footer .space-y-2 a:focus,
footer ul a:focus {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Remove any inadvertent borders from text links */
a:not(.card-hover-effect):not(.product-card):not(.btn):not([class*="border"]) {
    border: none !important;
}

/* Comprehensive reset for any unwanted borders */
.space-y-2 > li > a,
ul > li > a:not(.card-hover-effect),
nav a:not(.card-hover-effect),
.text-gray-400 a {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Reset any global link styling that might add borders */
a[href]:not(.card-hover-effect):not(.product-card):not(.btn):not([class*="bg-"]):not([class*="border"]) {
    border: none !important;
    text-decoration: none;
}

.card-hover-effect:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(249, 115, 22, 0.4), 0 0 40px rgba(249, 115, 22, 0.3);
    border-color: #ea580c;
}

.card-hover-effect img {
    transition: transform 0.3s ease;
}

.card-hover-effect:hover img {
    transform: scale(1.05);
}

/* Zoom functionality for product detail page */
#zoom-preview-box {
    border: 2px solid #e5e7eb;
    background-color: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 10;
    transition: opacity 0.2s ease;
}

#zoom-preview-box.hidden {
    display: none !important;
}

#main-image-container {
    position: relative;
}

#main-image-container:hover #main-product-image {
    cursor: crosshair;
}

/* Ensure the zoom preview has proper visibility */
.zoom-active #zoom-preview-box {
    display: block !important;
    opacity: 1;
}

/* Debug styles for zoom box */
#zoom-preview-box:not(.hidden) {
    background-color: #f8f9fa;
    /* Removed dashed border that was causing diagonal dotted lines in footer */
    border: 2px solid #e5e7eb;
    min-height: 200px;
}

#zoom-preview-box:not(.hidden)::before {
    content: 'Zoom Preview Area';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #6b7280;
    font-size: 0.875rem;
    pointer-events: none;
    z-index: -1;
}

/* Enhanced responsive image containers */
.responsive-img-container {
    position: relative;
    overflow: hidden;
}

.responsive-img-container img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Image loading states */
.img-loading {
    background-color: #f0f0f0;
    min-height: 200px;
}

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

/* --- Secret Password Input Styling --- */
.chatbot-password-mode {
    font-family: 'Courier New', monospace !important;
    letter-spacing: 2px !important;
    background: linear-gradient(45deg, #0a0a0a, #1a1a1a) !important;
    color: #00ff00 !important;
    border: 2px solid #333 !important;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.4), inset 0 0 10px rgba(0, 255, 0, 0.1) !important;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5) !important;
    animation: secretGlow 2s infinite alternate;
}

@keyframes secretGlow {
    0% { 
        box-shadow: 0 0 15px rgba(0, 255, 0, 0.4), inset 0 0 10px rgba(0, 255, 0, 0.1);
    }
    100% { 
        box-shadow: 0 0 25px rgba(0, 255, 0, 0.6), inset 0 0 15px rgba(0, 255, 0, 0.2);
    }
}

.chatbot-password-mode::placeholder {
    color: #00aa00 !important;
    opacity: 0.7;
}

.chatbot-password-mode:focus {
    outline: none !important;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.7), inset 0 0 15px rgba(0, 255, 0, 0.2) !important;
}

/* Password toggle button animations */
#password-toggle {
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 5px rgba(0, 255, 0, 0.3));
}

#password-toggle:hover {
    transform: translateY(-50%) scale(1.2);
    filter: drop-shadow(0 0 10px rgba(0, 255, 0, 0.6));
}

/* Secret typing effect */
@keyframes typeSecretChar {
    0% { 
        opacity: 1;
        transform: scale(1.2);
        color: #ffffff;
    }
    50% { 
        opacity: 0.8;
        transform: scale(1.1);
        color: #ffff00;
    }
    100% { 
        opacity: 1;
        transform: scale(1);
        color: #00ff00;
    }
}

.secret-char-animation {
    animation: typeSecretChar 0.5s ease-out;
}

/* Secret transmission animation */
@keyframes secretTransmit {
    0% { 
        background-position: 200% 0;
        box-shadow: 0 0 20px rgba(0, 255, 255, 0.7);
    }
    50% {
        background-position: 0% 0;
        box-shadow: 0 0 30px rgba(0, 255, 255, 1);
    }
    100% { 
        background-position: -200% 0;
        box-shadow: 0 0 20px rgba(0, 255, 0, 0.7);
    }
}

/* Error state styling */
.img-fallback {
    background-color: #f3f4f6;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    text-align: center;
    padding: 1rem;
    min-height: 200px;
}

/* Remove any text truncation globally for cards - Show full text */
.line-clamp-2,
.line-clamp-3,
.line-clamp-4 {
    display: block !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    overflow: visible !important;
    text-overflow: unset !important;
    word-wrap: break-word;
    hyphens: auto;
    max-height: none !important;
    height: auto !important;
    line-height: 1.3 !important;
}

/* Product card text utilities */
/* IMPROVED FIX: Responsive card height and full text display */
.card-hover-effect {
    min-height: 400px !important;
    height: auto !important;
    max-height: none !important;
    display: flex !important;
    flex-direction: column !important;
}

.card-description {
    display: block !important;
    overflow: visible !important;
    text-overflow: unset !important;
    word-break: break-word !important;
    hyphens: auto !important;
    line-height: 1.3 !important;
    height: auto !important;
    max-height: 3.9rem !important;
    margin-top: 12px !important;
    word-break: break-word !important;
}

.card-title {
    margin-bottom: 0 !important;
    height: 2.5rem !important;
    line-height: 1.25 !important;
}

/* Fallback for browsers without -webkit-line-clamp support - Show full description */
@supports not (-webkit-line-clamp: 3) {
    .card-description {
        display: block !important;
        max-height: none !important;
        height: auto !important;
        overflow: visible !important;
        text-overflow: unset !important;
        white-space: normal;
        margin-top: 12px !important;
        word-break: break-word !important;
        hyphens: auto !important;
        line-height: 1.4 !important; /* Increased line height for better readability */
    }
}

.card-title {
    display: block !important;
    -webkit-line-clamp: none !important;
    -webkit-box-orient: unset !important;
    overflow: visible !important;
    word-wrap: break-word;
    hyphens: auto;
    line-height: 1.25;
    min-height: auto !important;
    height: auto !important;
    max-height: none !important;
    margin-bottom: 0.5rem !important;
    margin-top: 0 !important;
    padding-bottom: 0 !important;
    text-overflow: unset !important;
    word-break: break-word !important;
}

/* Fallback for browsers without -webkit-line-clamp support - Show full title */
@supports not (-webkit-line-clamp: 2) {
    .card-title {
        display: block !important;
        max-height: none !important;
        height: auto !important;
        overflow: visible !important;
        text-overflow: unset !important;
        white-space: normal;
        word-break: break-word !important;
        hyphens: auto !important;
    }
}

/* Additional rules to ensure no gaps between title and description */
.card-hover-effect h3.card-title,
.card-hover-effect .card-title {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    padding-bottom: 0 !important;
}

.card-hover-effect p.card-description,
.card-hover-effect .card-description {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Override any Tailwind default margins on card elements */
.card-hover-effect .p-6 h3 {
    margin-bottom: 0 !important; /* Zero margin as per specification */
    margin-top: 0 !important;
}

.card-hover-effect .p-6 p {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Target specific Tailwind text classes to override their default margins */
h3.font-semibold.text-lg.card-title {
    margin-top: 0 !important;
    margin-bottom: 0 !important; /* Zero margin as per specification */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

p.text-sm.text-gray-600.card-description {
    margin-top: 0.5rem !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Additional override for any remaining text spacing */
.card-hover-effect .p-6 .card-title + .card-description {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* NUCLEAR SOLUTION: Most specific selectors possible to override everything */
a.card-hover-effect .p-6.text-center h3.font-semibold.text-lg.card-title {
    margin: 0 !important;
    padding: 0 !important;
    margin-bottom: 0.125rem !important; /* Exactly 2px gap */
}

a.card-hover-effect .p-6.text-center p.text-sm.text-gray-600.card-description {
    margin: 0.5rem 0 0 0 !important;
    padding: 0 !important;
    display: block !important;
    overflow: visible !important;
    text-overflow: unset !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    height: auto !important;
    max-height: none !important;
    word-break: break-word !important;
    hyphens: auto !important;
    line-height: 1.4 !important;
    color: #374151 !important;
    font-size: 0.9rem !important;
    visibility: visible !important;
    opacity: 1 !important;
    text-align: left !important;
}

/* Force override with highest specificity */
a.bg-white.rounded-lg.overflow-hidden.card-hover-effect.block.border-2.border-orange-500 .p-6.text-center {
    padding: 1.5rem 1.5rem 1.5rem 1.5rem !important;
    display: block !important;
}

a.bg-white.rounded-lg.overflow-hidden.card-hover-effect.block.border-2.border-orange-500 .p-6.text-center h3 {
    margin: 0 !important;
    padding: 0 !important;
    margin-bottom: 0.125rem !important;
}

a.bg-white.rounded-lg.overflow-hidden.card-hover-effect.block.border-2.border-orange-500 .p-6.text-center p {
    margin: 0 !important;
    padding: 0 !important;
}

/* Alternative approach: inline style override */
.card-spacing-fix {
    margin-bottom: 0.125rem !important;
    margin-top: 0 !important;
    padding: 0 !important;
}

.card-spacing-fix-desc {
    margin: 0 !important;
    padding: 0 !important;
}

/* Override Tailwind's text size classes */
.text-lg {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.text-sm {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* NUCLEAR CARD DESCRIPTION OVERRIDE - Show full description for all card types */
.card-hover-effect p,
.card-hover-effect .card-description,
.card-hover-effect p.card-description,
p.card-description,
a.card-hover-effect p,
a.card-hover-effect .card-description,
a.card-hover-effect p.card-description,
.product-card p,
.product-card .card-description,
.product-card p.card-description {
    display: block !important;
    overflow: visible !important;
    text-overflow: unset !important;
    word-break: break-word !important;
    hyphens: auto !important;
    line-height: 1.4 !important; /* Increased line height for better readability */
    max-height: 4.2rem !important; /* Adjusted for 3 lines with new line height */
    height: auto !important;
    margin: 0.5rem 0 0 0 !important;
    padding: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #374151 !important;
    font-size: 0.9rem !important;
    text-align: left !important;
}

/* HIGHEST SPECIFICITY OVERRIDE - Force full description even with inline styles */
.card-hover-effect[style] p.text-sm.text-gray-600.card-description[style],
a.card-hover-effect[style] p.text-sm.text-gray-600.card-description[style],
a.bg-white.rounded-lg.overflow-hidden.card-hover-effect.block.border-2.border-orange-500[style] p.text-sm.text-gray-600.card-description[style] {
    display: block !important;
    overflow: visible !important;
    text-overflow: unset !important;
    max-height: 3.9rem !important;
    line-height: 1.3 !important;
}

/* Mobile specific card description override - Show full text */
p.text-sm.text-gray-600.card-description {
    margin-top: 0.5rem !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    -webkit-line-clamp: unset !important;
    min-height: auto !important;
    height: auto !important;
    line-height: 1.3 !important;
    overflow: visible !important;
    display: block !important;
    word-break: break-word !important;
    hyphens: auto !important;
    text-overflow: unset !important;
    color: #374151 !important;
    font-size: 0.9rem !important;
    visibility: visible !important;
    opacity: 1 !important;
    text-align: left !important;
}

/* Mobile-specific optimizations - Show full text */
@media (max-width: 768px) {
    .card-hover-effect {
        min-height: 400px !important;
        max-height: none !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .card-description {
        -webkit-line-clamp: unset !important;
        height: auto !important;
        max-height: none !important;
        margin-top: 12px !important;
        overflow: visible !important;
        display: block !important;
        line-height: 1.3 !important;
        text-overflow: unset !important;
        word-break: break-word !important;
        hyphens: auto !important;
    }
    
    .product-card-content {
        flex-grow: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        min-height: auto !important;
    }
    
    .card-title {
        -webkit-line-clamp: none !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        display: block !important;
        word-break: break-word !important;
        hyphens: auto !important;
    }
}

/* --- Scroll Animation --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform;
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Fix: Ensure header stays visible when menu is open */
body.menu-is-open header {
    display: block !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 51 !important;
}

/* New style to hide decorative text on screens smaller than 1024px */
@media (max-width: 1024px) {
    .hide-on-mobile {
        display: none;
    }
}

/* --- NEW: Radial Glow & Lift Animation --- */
.feature-card-glow {
    padding: 1.5rem;
    text-align: center;
    border-radius: 0.5rem; /* rounded-lg */
    background-color: white;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.feature-card-glow:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(249, 115, 22, 0.4), 0 0 30px rgba(249, 115, 22, 0.3); /* Orange glow */
}

.glow-icon {
    transition: filter 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.feature-card-glow:hover .glow-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 0 15px rgba(249, 115, 22, 0.8));
}

/* --- WhatsApp Icon with Orange Border --- */
.whatsapp-icon-with-border {
    border: 2px solid #f97316; /* Orange border */
}

/* --- Phone Icon Ink Blue Background --- */
a[href^="tel:"] {
    background-color: #1e3a8a !important; /* Ink blue (blue-800) */
    color: white !important;
}

a[href^="tel:"]:hover {
    background-color: #1e40af !important; /* Slightly lighter ink blue on hover */
}

/* --- ENHANCED MOBILE-FRIENDLY CHATBOT STYLES --- */
@media (max-width: 640px) {
    #chatbot-container {
        bottom: 1rem;
        right: 1rem;
    }
    
    #chat-window {
        position: fixed !important;
        bottom: 5rem !important;
        right: 1rem !important;
        left: 1rem !important;
        width: auto !important;
        max-width: none !important;
        height: 70vh !important;
        max-height: 70vh !important;
    }
    
    #chat-messages {
        font-size: 0.875rem;
    }
    
    .chat-options {
        gap: 0.5rem !important;
    }
    
    .chat-options button {
        font-size: 0.75rem !important;
        padding: 0.5rem 0.75rem !important;
        min-height: 2.5rem;
        min-width: auto;
        white-space: nowrap;
    }
}

/* --- CHATBOT BUTTON IMPROVEMENTS --- */
.chat-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.chat-options button {
    padding: 0.5rem 1rem;
    background-color: white;
    border: 1px solid #d1d5db;
    border-radius: 1rem;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px; /* Touch-friendly */
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-options button:hover {
    background-color: #f3f4f6;
    border-color: #6b7280;
    color: #374151;
    transform: translateY(-1px);
}

.chat-options button:active {
    transform: translateY(0);
    background-color: #6b7280;
    color: white;
}

/* === BLOG CARD HOVER EFFECTS === */
.blog-card-hover {
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: 550px !important; /* Uniform height for all blog cards */
    display: flex !important;
    flex-direction: column !important;
}

.blog-card-hover:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.4), 0 4px 10px rgba(249, 115, 22, 0.2);
    border-color: #f97316;
    /* Orange glow effect on hover */
    filter: drop-shadow(0 0 15px rgba(249, 115, 22, 0.6));
}

/* Blog card text fade effect */
.blog-text-container {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.blog-text-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, #fff1eb);
    pointer-events: none;
}

/* Ensure consistent content distribution in blog cards */
.blog-card-hover .blog-content {
    min-height: 310px !important;
}

.blog-card-hover .blog-content-no-image {
    min-height: 550px !important;
}

/* Blog excerpt text should take available space but not overflow */
.blog-card-hover .blog-text-container p {
    margin-bottom: 1rem;
}

/* Ensure title stays at top with normal spacing */
.blog-card-hover .blog-text-container h3 {
    margin-top: 0 !important;
    margin-bottom: 0.75rem !important;
}

/* Date stays at top too with normal spacing */
.blog-card-hover .blog-text-container p:first-child {
    margin-top: 0 !important;
    margin-bottom: 0.5rem !important;
}

/* Force blog read more button visibility on all cards */
.blog-read-more-btn {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block !important;
    margin-top: auto;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
    visibility: visible !important;
    opacity: 1 !important;
    flex-shrink: 0 !important;
    position: relative !important;
    z-index: 10 !important;
    align-self: flex-start !important;
}

.blog-read-more-btn:hover {
    background: linear-gradient(135deg, #ea580c 0%, #dc2626 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.4);
    color: white !important;
}

/* === BLOG CARD ALIGNMENT FIX === */
/* Ensure all blog cards have same height regardless of content */
.blog-grid-container {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    gap: 2rem !important;
    align-items: stretch !important;
}

.blog-card-hover {
    height: 550px !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Image height consistency */
.blog-card-hover .blog-image {
    height: 240px !important;
    min-height: 240px !important;
    max-height: 240px !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
}

/* Content area fills remaining space */
.blog-card-hover .blog-content {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
}

/* Text container takes available space but keeps natural flow */
.blog-card-hover .blog-text-container {
    flex: 1 !important;
    display: block !important;
    margin-bottom: 1rem !important;
}

/* Button always at bottom */
.blog-card-hover .blog-read-more-btn {
    margin-top: auto !important;
}

/* === PRODUCT/CATEGORY CARD IMPROVEMENTS - Full text display === */
.card-hover-effect {
    min-height: 400px;
    height: auto !important;
    max-height: none !important;
    display: flex;
    flex-direction: column;
}

.card-hover-effect .p-6 {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 1.5rem;
    gap: 0.5rem;
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
    .card-hover-effect {
        min-height: 350px;
    }
    
    .card-hover-effect .p-6 {
        padding: 1rem;
    }
    
    .card-description {
        font-size: 0.875rem !important;
        line-height: 1.4 !important; /* Increased line height for better readability */
    }
}

/* Tablet responsive adjustments */
@media (min-width: 641px) and (max-width: 1024px) {
    .card-hover-effect {
        min-height: 380px;
    }
}

/* Desktop responsive adjustments */
@media (min-width: 1025px) {
    .card-hover-effect {
        min-height: 500px; /* Increased to allow more space for text */
    }
}

/* Ensure consistent card heights - Flexible responsive approach */
@media (min-width: 640px) {
    .card-hover-effect {
        min-height: 450px; /* Increased to allow more space for text */
        height: auto !important;
        max-height: none !important;
    }
}

@media (min-width: 1024px) {
    .card-hover-effect {
        min-height: 500px; /* Increased to allow more space for text */
        height: auto !important;
        max-height: none !important;
    }
}

.blog-card-hover:hover .blog-content {
    background-color: #f3f4f6;
}

.blog-card-hover:hover .blog-content * {
    color: #1f2937; /* Dark gray for better contrast */
}

.blog-card-hover:hover .blog-content a {
    color: #374151; /* Darker gray for links */
}

.blog-card-hover:hover .blog-content a:hover {
    color: #111827; /* Even darker gray on hover */
}

/* === OVERRIDE INLINE STYLES WITH MAXIMUM SPECIFICITY === */
.blog-grid-container div.blog-card-hover[style*="height: 100%"] {
    height: 550px !important; /* Increased from 420px */
    max-height: 550px !important;
    min-height: 550px !important;
}

/* Force all grid items to same height regardless of inline styles */
.blog-grid-container > div.blog-card-hover {
    height: 550px !important; /* Increased from 420px */
    max-height: 550px !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Override Tailwind's h-56 class specifically */
.blog-card-hover img.h-56.object-cover {
    height: 224px !important;
    max-height: 224px !important;
}

/* Ensure grid items stretch to fill container height */
.blog-grid-container.grid.grid-cols-1.md\:grid-cols-3 {
    align-items: stretch !important;
    grid-auto-rows: 550px !important; /* Increased from 420px */
}

/* === FORCE CACHE REFRESH - Blog Card Fix v2.1 === */
/* Added timestamp to force cache refresh */

/* === NUCLEAR OPTION - ABSOLUTE BLOG CARD HEIGHT CONTROL === */
/* This uses maximum CSS specificity to override everything */

.blog-grid-container div.bg-gray-50.rounded-lg.overflow-hidden.blog-card-hover[style] {
    height: 550px !important; /* Increased from 420px */
    max-height: 550px !important;
    min-height: 550px !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
}

/* Completely override Tailwind's h-56 class */
.blog-card-hover a.block img.w-full.h-56.object-cover.blog-image {
    height: 224px !important;
    max-height: 224px !important;
    min-height: 224px !important;
    flex-shrink: 0 !important;
    object-fit: cover !important;
    display: block !important;
}

/* Content area exact sizing */
.blog-card-hover div.blog-content.transition-all.duration-300[style*="background-color"] {
    position: relative !important;
    overflow: hidden !important;
}

/* Blog card content area adjustments - Ensure Read More button is always visible */
.blog-card-hover .blog-content-with-image.blog-content {
    height: calc(550px - 240px) !important;
    max-height: 310px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    position: relative !important;
    padding: 1.5rem !important;
}

.blog-card-hover .blog-content-no-image.blog-content {
    height: 550px !important;
    max-height: 550px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    position: relative !important;
    padding: 1.5rem !important;
}

/* Ensure blog text container doesn't take full height */
.blog-card-hover .blog-text-container {
    flex: 1 !important;
    display: block !important;
    margin-bottom: 1rem !important;
    overflow: hidden !important;
}

/* Force read more button to bottom of card */
.blog-card-hover .blog-read-more-btn {
    margin-top: auto !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
    align-self: flex-start !important;
}

/* Force grid to exact equal heights */
.grid.grid-cols-1.md\:grid-cols-3.gap-8.blog-grid-container {
    display: grid !important;
    grid-template-rows: repeat(auto-fit, 550px) !important; /* Increased from 420px */
    align-items: stretch !important;
    grid-auto-rows: 550px !important; /* Increased from 420px */
}

/* Override any remaining inline height styles */
body .blog-grid-container > div {
    height: 550px !important; /* Increased from 420px */
}

body .blog-card-hover img.h-56 {
    height: 224px !important;
}

/* === KNOWLEDGE CENTER NAVIGATION BUTTONS === */
.knowledge-center-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.knowledge-center-nav-btn {
    background-color: #f97316;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.knowledge-center-nav-btn:hover {
    background-color: #ea580c;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    color: white;
}

.knowledge-center-nav-btn.active {
    background-color: #ea580c;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* === KNOWLEDGE CENTER PAGE SPECIFIC STYLES === */
.knowledge-center-page .blog-card-hover {
    height: 550px !important;
    display: flex !important;
    flex-direction: column !important;
}

.knowledge-center-page .blog-card-hover .blog-content {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

/* Enhanced image container styling for cards */
.img-container {
    background-color: #f8f9fa !important;
    border: none !important;
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Ensure consistent image sizing across all product cards */
.product-card .img-container,
.card-hover-effect .img-container {
    min-height: 250px;
    background-color: #f8f9fa !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

/* Smart cropping for category and product card images */
.product-card img,
.card-hover-effect img,
a[href*="/category/"] img,
.img-container img {
    object-fit: cover !important;
    object-position: center center !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

/* --- Consistent Hero Image Overlay --- */
.hero-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Consistent black overlay with 50% opacity */
    z-index: 10;
}

/* --- Video Hero Section Overlay --- */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Consistent black overlay with 50% opacity */
    z-index: 10;
}

/* --- Hero Fallback Background --- */
.hero-fallback-orange {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    position: relative;
}

.hero-fallback-orange::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5); /* Consistent black overlay with 50% opacity */
    z-index: 10;
}

.hero-fallback-orange .container {
    position: relative;
    z-index: 20;
}

/* Override any Tailwind object-cover classes with smart cropping */
.object-cover {
    object-fit: cover !important;
    object-position: center center !important;
    padding: 0 !important;
}

/* CRITICAL: Exception for category images in mega menu - use contain not cover */
.category-item .category-image.object-cover,
.category-item .category-image.object-cover img {
    object-fit: contain !important; /* Override cover with contain for category images */
}

/* Specific override for homepage category cards */
.w-full.h-full.object-cover {
    object-fit: cover !important;
    object-position: center center !important;
    padding: 0 !important;
}

/* Target specific Tailwind combinations */
.w-full.h-full.object-cover.transition-transform {
    object-fit: cover !important;
    object-position: center center !important;
    padding: 0 !important;
}

/* Specific override for category cards on homepage */
a[href*="/category/"] .img-container img {
    object-fit: contain !important;
    padding: 0.5rem !important;
    background: #ffffff;
}

.product-card .image-container {
  /* This is the area that will receive the dynamic background color.
     We use flexbox to perfectly center the image inside it. */
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f9fafb; /* A light default background */
}

.product-card .image-container img {
  /* This is the most important part: it makes the image fit without cropping. */
  object-fit: contain;

  /* This ensures the image is always on top of the background color. */
  position: relative;
  z-index: 2;

  /* This prevents a very large image from breaking the card layout. */
  max-width: 100%;
  max-height: 100%;
  padding: 0.5rem; /* Adds a small margin around the image */
}

/* ULTRA AGGRESSIVE FULL DESCRIPTION ENFORCEMENT - FINAL OVERRIDE */
.card-description,
.card-hover-effect .card-description,
p.card-description,
a.card-hover-effect p.card-description,
.product-card .card-description,
p.text-sm.text-gray-600.card-description {
    display: block !important;
    overflow: visible !important;
    text-overflow: unset !important;
    line-height: 1.4 !important; /* Increased line height for better readability */
    height: auto !important;
    max-height: none !important;
    word-break: break-word !important;
    hyphens: auto !important;
    margin: 0.5rem 0 0 0 !important;
    padding: 0 !important;
    font-size: 0.9rem !important;
    color: #374151 !important;
    visibility: visible !important;
    opacity: 1 !important;
    text-align: left !important;
    white-space: normal !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
}

/* Text truncation utility class - more robust approach */
.truncate-lines {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    max-height: 4.2rem;
    margin: 0.5rem 0 0 0;
    white-space: normal;
}

/* Fallback for browsers that don't support -webkit-line-clamp */
@supports not (-webkit-line-clamp: 3) {
    .truncate-lines {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.4;
        max-height: 4.2rem;
        margin: 0.5rem 0 0 0;
        white-space: normal;
    }
}

/* More robust fallback using standard CSS */
.truncate-lines {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-height: 1.4;
    max-height: 4.2rem;
    margin: 0.5rem 0 0 0;
    white-space: normal;
}

/* Additional fallback for maximum compatibility */
.truncate-lines {
    position: relative;
    line-height: 1.4;
    max-height: 4.2rem;
    overflow: hidden;
    padding-right: 1em;
    margin: 0.5rem 0 0 0;
}

/* Remove the ::before and ::after pseudo-elements that were causing diagonal dotted lines */
.truncate-lines::before {
    content: none;
}

.truncate-lines::after {
    content: none;
}

/* Category page specific truncation */
.category-page .truncate-lines {
    -webkit-line-clamp: 2;
    max-height: 2.8rem;
}


/* Category page specific truncation */
body.category-page .truncate-lines {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    max-height: 4.2rem;
    margin: 0.5rem 0 0 0;
    white-space: normal;
}

/* Category page card descriptions - HIGH SPECIFICITY to ensure truncation works */
body.category-page .card-hover-effect .card-description,
body.category-page .card-hover-effect p.card-description,
body.category-page p.card-description,
body.category-page a.card-hover-effect p,
body.category-page a.card-hover-effect .card-description,
body.category-page a.card-hover-effect p.card-description,
body.category-page .product-card p,
body.category-page .product-card .card-description,
body.category-page .product-card p.card-description {
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.4 !important;
    max-height: 4.2rem !important;
    margin: 0.5rem 0 0 0 !important;
    white-space: normal !important;
}

/* Subcategory page cards - HIGH SPECIFICITY to override NUCLEAR override */
body.subcategory-page .card-hover-effect .card-description,
body.subcategory-page .card-hover-effect p.card-description,
body.subcategory-page p.card-description,
body.subcategory-page a.card-hover-effect p,
body.subcategory-page a.card-hover-effect .card-description,
body.subcategory-page a.card-hover-effect p.card-description,
body.subcategory-page .product-card p,
body.subcategory-page .product-card .card-description,
body.subcategory-page .product-card p.card-description {
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.4 !important;
    max-height: 4.2rem !important;
    margin: 0.5rem 0 0 0 !important;
    white-space: normal !important;
}

/* Products page cards - Removed forced truncation to eliminate dotted lines */
body.products-page .card-hover-effect .card-description,
body.products-page .card-hover-effect p.card-description,
body.products-page p.card-description,
body.products-page a.card-hover-effect p,
body.products-page a.card-hover-effect .card-description,
body.products-page a.card-hover-effect p.card-description,
body.products-page .product-card p,
body.products-page .product-card .card-description,
body.products-page .product-card p.card-description {
    line-height: 1.4 !important;
    margin: 0.5rem 0 0 0 !important;
    white-space: normal !important;
    word-break: break-word !important;
}

/* Homepage cards - keep full text display */
body.homepage .card-description {
    display: block !important;
    overflow: visible !important;
    text-overflow: unset !important;
    word-break: break-word !important;
    hyphens: auto !important;
    line-height: 1.5 !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    flex: 1 !important;
}

/* Language selector dropdown */
.language-selector {
    position: relative;
    display: inline-block;
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    z-index: 1000;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    min-width: 150px;
    max-width: 200px;
    padding: 0.5rem;
    display: none;
    overflow: visible;
    overflow-x: visible;
    overflow-y: visible;
    border: 1px solid #e5e7eb;
    max-height: none;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.language-dropdown::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
    width: 0;
    height: 0;
}

.language-dropdown.show {
    display: block;
}

.language-dropdown a {
    display: block;
    padding: 0.625rem 0.75rem;
    text-decoration: none;
    color: #374151;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.language-dropdown a:hover {
    background-color: #f3f4f6;
    color: #f97316;
}

.language-dropdown a.active {
    background-color: #fff7ed;
    color: #f97316;
    font-weight: 600;
}

/* Add this new rule to ensure 16:9 hero images are stretched properly */
.subcategory-hero-16x9 {
    object-fit: fill !important;
    object-position: center !important;
    width: 100% !important;
    height: 100% !important;
}

/* Cart count badge styling - fixed positioning to appear properly on cart icon */
#cart-count, #mobile-cart-count {
    position: absolute !important;
    top: -0.5rem !important;
    right: -0.5rem !important;
    background-color: #f97316 !important;
    color: white !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    border-radius: 50% !important;
    min-width: 1.25rem !important;
    height: 1.25rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    z-index: 10 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

/* Ensure cart count is visible when items are in cart */
#cart-count:not(.hidden), #mobile-cart-count:not(.hidden) {
    display: flex !important;
}
/* Desktop hamburger menu hover functionality */
@media (min-width: 768px) {
    .category-item {
        position: relative;
        max-width: 300px; /* Limit the width of category items */
    }
    
    .category-item:hover .subcategory-container {
        display: block !important;
    }
    
    .subcategory-container {
        display: none !important;
        position: absolute;
        background: white;
        border: 2px solid #f97316;
        border-radius: 0.5rem;
        padding: 0.5rem 0;
        min-width: 200px;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        z-index: 100;
        top: 0;
        left: 100%;
        margin-left: 0.5rem;
    }
    
    .subcategory-container ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .subcategory-container li {
        margin-bottom: 0.125rem;
    }
    
    .subcategory-container a {
        display: block;
        padding: 0.25rem 0.75rem;
        border-radius: 0.25rem;
        transition: all 0.2s ease;
        text-decoration: none;
        color: #374151;
        font-weight: 500;
    }
    
    .subcategory-container a:hover {
        background-color: #fff7ed;
        color: #f97316;
        transform: translateX(2px);
    }
    
    /* Ensure submenu appears to the right of the main menu */
    #products-submenu-content .category-item {
        position: relative;
        max-width: 300px; /* Limit the width of category items in products submenu */
    }
    
    #products-submenu-content .category-item .subcategory-container {
        position: absolute;
        top: 0;
        left: 100%;
        margin-left: 0.5rem;
        z-index: 100;
    }
    
    /* Adjust submenu position if it would go off the right edge */
    #products-submenu-content .category-item .subcategory-container {
        right: auto;
        left: 100%;
        margin-left: 0.5rem;
    }
    
    #products-submenu-content .category-item:hover .subcategory-container {
        display: block !important;
    }
}

/* CRITICAL: Override subcategory display ONLY on mobile (under 640px) */
@media (max-width: 639px) {
    .category-item:hover .subcategory-container {
        display: none !important;
    }
    
    /* Disable all hover scale/transform effects on category items */
    .category-item,
    .category-item:hover {
        transform: none !important;
    }
    
    /* Since we removed images, no need to transform them */
    .category-item .category-image,
    .category-item .category-image:hover {
        transform: none !important;
    }
    
    /* On mobile, stack subcategories vertically within the main item */
    .category-item .subcategory-container {
        position: static !important;
        display: none !important;
        background: #fff7ed;
        border: 1px solid #fed7aa;
        border-radius: 0.25rem;
        padding: 0.5rem !important;
        margin-top: 0.5rem;
        min-width: 100%;
        box-shadow: none;
    }
    
    .category-item .subcategory-container.show {
        display: block !important;
    }
}

/* Desktop submenu within category card */
@media (min-width: 768px) {
    .category-item .subcategory-container {
        background-color: #fff7ed;
        border-radius: 0.25rem;
        padding: 0.5rem;
        border: 1px solid #fed7aa;
        /* Position to the right */
        position: absolute !important;
        top: 0 !important;
        left: 100% !important;
        margin-left: 0.5rem !important;
        margin-top: 0 !important;
        z-index: 100 !important;
        min-width: 200px;
    }
    
    .category-item .subcategory-container a {
        color: #374151;
        padding: 0.125rem 0.5rem;
        border-radius: 0.125rem;
    }
    
    .category-item .subcategory-container a:hover {
        background-color: #fed7aa;
        color: #f97316;
        transform: translateX(2px);
    }
    
    .subcategory-container li {
        margin-bottom: 0.125rem;
    }
}

/* Mobile submenu adjustments */
@media (max-width: 767px) {
    .subcategory-container {
        position: relative;
        min-width: 100%;
    }
    
    .category-item .subcategory-container {
        margin-top: 0.5rem;
    }
    
    .subcategory-container li {
        margin-bottom: 0.125rem;
    }
}

/* Subcategory container within category card - mobile only */
.category-item .subcategory-container {
    background-color: #fff7ed;
    border-radius: 0.25rem;
    padding: 0.5rem;
    margin-top: 0 !important;
    border: 1px solid #fed7aa;
}

/* Desktop subcategory containers should appear to the right, not below */
@media (min-width: 768px) {
    .category-item .subcategory-container {
        margin-top: 0 !important;
    }
}

.category-item .subcategory-container a {
    color: #374151;
    padding: 0.125rem 0.5rem;
    border-radius: 0.125rem;
}

.category-item .subcategory-container a:hover {
    background-color: #fed7aa;
    color: #f97316;
    transform: translateX(2px);
}

/* Applications link styling */
.applications-link {
    text-align: left;
}

.applications-link a {
    display: inline-block;
    color: #2563eb;
    text-decoration: underline;
}

.applications-link a:hover {
    color: #f97316;
}

/* Ensure no arrow icons appear after the applications link */
.applications-link a::after {
    display: none !important;
    content: none !important;
}

.applications-link a::before {
    display: none !important;
    content: none !important;
}

/* CRITICAL FIX: Force compact category items ONLY on mobile (under 640px) */
@media (max-width: 639px) {
    /* Force grid to not stretch items vertically */
    #products-submenu-content .menu-columns,
    .menu-columns {
        display: grid !important;
        align-items: start !important;
        align-content: start !important;
        grid-auto-rows: min-content !important;
    }
    
    /* Override any column-count layout */
    #products-submenu-content .menu-columns {
        column-count: unset !important;
    }
    
    /* Force category items to fit content only */
    #products-submenu-content .category-item,
    .menu-columns .category-item,
    .category-item {
        height: auto !important;
        min-height: unset !important;
        max-height: fit-content !important;
        align-self: start !important;
        flex: none !important;
        padding-bottom: 0.75rem !important;
        max-width: 300px; /* Limit the width of category items */
    }
    
    /* CRITICAL: Override Tailwind hover:scale utilities with high specificity */
    #products-submenu-content .menu-columns .category-item,
    #products-submenu-content .menu-columns .category-item:hover,
    #submenu-container .menu-columns .category-item,
    #submenu-container .menu-columns .category-item:hover,
    .menu-columns .category-item.hover\:scale-\[1\.02\],
    .menu-columns .category-item.hover\:scale-\[1\.02\]:hover {
        transform: none !important;
        scale: unset !important;
        --tw-scale-x: 1 !important;
        --tw-scale-y: 1 !important;
    }
    
    /* Override Tailwind hover:scale on images */
    #products-submenu-content .category-image,
    #products-submenu-content .category-image:hover,
    #submenu-container .category-image,
    #submenu-container .category-image:hover,
    .category-item .category-image.hover\:scale-105,
    .category-item .category-image.hover\:scale-105:hover {
        transform: none !important;
        scale: unset !important;
        --tw-scale-x: 1 !important;
        --tw-scale-y: 1 !important;
    }
    
    /* Remove any extra bottom padding from grid children */
    .menu-columns > div {
        padding-bottom: 0 !important;
    }
    
    /* Ensure subcategory container is completely hidden and takes no space on mobile */
    .category-item .subcategory-container {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
    }
    
    /* Ensure hover doesn't trigger subcategory display on mobile */
    .category-item:hover .subcategory-container {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
    }
}

/* Medium screens (640px-1023px): Vertical layout with subcategories to the right */
@media (min-width: 640px) and (max-width: 1023px) {
    /* Vertical layout for products submenu */
    #products-submenu-content .space-y-4,
    #submenu-container .space-y-4 {
        display: block !important;
    }
    
    /* Category items should grow to fit content */
    .category-item {
        position: relative !important;
        overflow: visible !important;
        margin-bottom: 0.5rem !important;
        max-width: 300px; /* Limit the width of category items */
    }
    
    /* Since we removed images, hide them */
    .category-item .category-image {
        display: none !important; /* Images are removed from products submenu */
    }
    
    /* Category title sizing */
    .category-item .category-title {
        font-size: 0.875rem !important; /* Standard font size */
        min-height: auto !important;
        max-height: none !important;
    }
    
    /* Hide subcategories by default - positioned to the right */
    .category-item .subcategory-container {
        display: none;
        position: absolute !important;
        top: 0 !important;
        left: 100% !important;
        background: white !important;
        border: 2px solid #f97316 !important;
        border-radius: 0.5rem !important;
        padding: 0.5rem !important;
        z-index: 100 !important;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        visibility: visible !important;
        min-width: 200px;
        margin-left: 0.5rem;
    }
    
    /* Show subcategories on hover */
    .category-item:hover .subcategory-container {
        display: block !important;
        visibility: visible !important;
        height: auto !important;
    }
    
    /* Applications link sizing - no gap between category and applications */
    .category-item .applications-link {
        font-size: 0.75rem !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
    
    /* Subcategory link sizes */
    .category-item .subcategory-container a {
        font-size: 0.8rem !important;
        padding: 0.25rem 0.5rem !important; /* Standard padding */
    }
}

/* Large screens (1024px+): Vertical layout with subcategories to the right */
@media (min-width: 1024px) {
    /* Vertical layout for products submenu */
    #products-submenu-content > div,
    #submenu-container > div {
        display: block !important;
    }
    
    .category-item {
        position: relative !important;
        overflow: visible !important;
        margin-bottom: 0.5rem !important;
        max-width: 300px; /* Limit the width of category items */
    }
    
    /* Since we removed images, no need to constrain image height */
    .category-item .category-image {
        display: none !important; /* Images are removed from products submenu */
    }
    
    /* Hide subcategories by default - positioned to the right */
    .category-item .subcategory-container {
        display: none;
        position: absolute !important;
        top: 0 !important;
        left: 100% !important;
        background: white !important;
        border: 2px solid #f97316 !important;
        border-radius: 0.5rem !important;
        padding: 0.5rem !important;
        z-index: 100 !important;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        visibility: visible !important;
        min-width: 200px;
        margin-left: 0.5rem;
    }
    
    /* Show subcategories on hover */
    .category-item:hover .subcategory-container {
        display: block !important;
        visibility: visible !important;
        height: auto !important;
    }
    
    /* Bring hovered item to front */
    .category-item:hover {
        z-index: 50 !important;
    }
}

/* Inquiry history delete button styles */
.delete-inquiry-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s ease;
}

.delete-inquiry-btn:hover {
    background-color: #fee2e2;
}

.delete-inquiry-btn i {
    width: 1.25rem;
    height: 1.25rem;
}


/* EDGE BROWSER SPECIFIC FIXES FOR HEADER ICONS AFTER AUTHENTICATION */
@supports (-webkit-appearance: none) {
    /* Ensure all header icons remain visible in Edge after login */
    header i[data-lucide] {
        visibility: visible !important;
        display: inline-block !important;
        opacity: 1 !important;
        min-width: 20px !important;
        min-height: 20px !important;
        color: #374151 !important;
        stroke: #374151 !important;
        stroke-width: 2 !important;
        fill: none !important;
    }

    /* Ensure header elements containing icons remain visible */
    header .main-menu-toggle,
    header a[aria-label="Shopping Cart"],
    header button[aria-label="Change language] {
        visibility: visible !important;
        display: flex !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 100 !important;
        pointer-events: auto !important;
    }

    /* Ensure icon containers have proper dimensions */
    header .p-2,
    header .relative.p-2 {
        visibility: visible !important;
        display: flex !important;
        opacity: 1 !important;
    }

    /* Fix for hamburger menu icon visibility */
    header .main-menu-toggle .icon-menu,
    header .main-menu-toggle .icon-close {
        visibility: visible !important;
        display: flex !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    /* Ensure cart count badge remains visible */
    #cart-count,
    #mobile-cart-count {
        visibility: visible !important;
        display: flex !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 101 !important;
    }

    /* Ensure dropdown menus remain functional */
    .language-dropdown {
        -webkit-backface-visibility: visible !important;
        backface-visibility: visible !important;
        display: none !important;
    }

    .language-dropdown.show {
        display: block !important;
    }
}
