/* ===================================
   CUSTOM OVERRIDES - All UI fixes in one place
   =================================== */

/* 1. DROPDOWN MENUS - Products & Marketplace
   ========================================= */

/* Main dropdown containers - base styles */
.mega-menu,
.mega-menu-marketplace {
    display: none !important;
    position: absolute !important;
    top: 100% !important;
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
    padding: 25px 20px !important;
    z-index: 9999 !important;
    margin-top: 10px !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
}

/* Show on hover */
.nav-item:hover > .mega-menu,
.nav-item:hover > .mega-menu-marketplace,
.mega-menu.show,
.mega-menu-marketplace.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Products menu positioning and size */
.mega-menu {
    left: 0 !important;
    width: 1000px !important;
    max-width: 95vw !important;
    transform: none !important;
}

/* Marketplace menu positioning and size */
.mega-menu-marketplace {
    left: 0 !important;
    width: 900px !important;
    max-width: 95vw !important;
    min-width: auto !important;
    transform: none !important;
}

/* Container styling */
.mega-menu .container,
.mega-menu-marketplace .container {
    max-width: 100% !important;
    padding: 0 15px !important;
}

/* Row styling */
.mega-menu .row,
.mega-menu-marketplace .row {
    display: flex !important;
    margin: 0 !important;
}

/* Products menu columns */
.mega-menu .col-md-8 {
    flex: 0 0 75% !important;
    max-width: 75% !important;
    padding: 0 !important;
    padding-right: 20px !important;
}

.mega-menu .col-md-4 {
    flex: 0 0 25% !important;
    max-width: 25% !important;
    padding: 0 !important;
    padding-left: 20px !important;
}

/* Products inner grid - REMOVE OLD CONFLICTING STYLES */

/* Marketplace menu columns */
.mega-menu-marketplace .col-md-9 {
    flex: 0 0 75% !important;
    max-width: 75% !important;
    padding: 0 !important;
    padding-right: 15px !important;
}

.mega-menu-marketplace .col-md-3 {
    flex: 0 0 25% !important;
    max-width: 25% !important;
    padding: 0 !important;
    padding-left: 15px !important;
}

/* Marketplace inner grid - 3 columns */
.mega-menu-marketplace .col-md-9 .row {
    display: flex !important;
    flex-wrap: wrap !important;
}

.mega-menu-marketplace .col-md-4 {
    flex: 0 0 33.33% !important;
    max-width: 33.33% !important;
    padding: 0 3px !important;
}

/* Border styling */
.mega-menu .border-end,
.mega-menu-marketplace .border-end {
    border-right: 1px solid #f0f0f0 !important;
    padding-right: 15px !important;
    margin-right: 0 !important;
}

.mega-menu-marketplace .col-md-9 {
    flex: 0 0 72% !important;
    max-width: 72% !important;
    padding-right: 15px !important;
}

.mega-menu-marketplace .col-md-3 {
    flex: 0 0 28% !important;
    max-width: 28% !important;
    padding-left: 15px !important;
}

.mega-menu-marketplace .col-md-4 {
    flex: 0 0 33.33% !important;
    max-width: 33.33% !important;
    padding: 0 3px !important;
}

/* Menu items - unified hover effect */
.mega-menu .mega-menu-item,
.mega-menu-marketplace .mega-menu-item {
    display: flex !important;
    align-items: center !important;
    padding: 11px 14px !important;
    margin: 3px 0 !important;
    text-decoration: none !important;
    color: #333333 !important;
    border-radius: 6px !important;
    background: transparent !important;
    transition: all 0.2s ease !important;
}

.mega-menu .mega-menu-item:hover,
.mega-menu-marketplace .mega-menu-item:hover {
    background-color: #f5f5f5 !important;
    transform: translateX(2px) !important;
    text-decoration: none !important;
}

/* Icons and content */
.mega-menu .mega-menu-item i {
    font-size: 20px !important;
    margin-right: 12px !important;
    min-width: 28px !important;
    color: #666666 !important;
}

.mega-menu-marketplace .marketplace-app-icon {
    width: 24px !important;
    height: 24px !important;
    margin-right: 10px !important;
}

.mega-menu-content h6 {
    font-size: 13.5px !important;
    font-weight: 600 !important;
    margin: 0 0 2px 0 !important;
    color: #212529 !important;
}

.mega-menu-content p {
    font-size: 11.5px !important;
    margin: 0 !important;
    color: #6c757d !important;
    line-height: 1.3 !important;
}

/* Right column styling for both menus */
.mega-menu .ps-4,
.mega-menu-marketplace .ps-4 {
    padding-left: 0 !important;
}

.mega-menu .col-md-4 h6,
.mega-menu-marketplace .col-md-3 h6 {
    font-size: 11px !important;
    text-transform: uppercase !important;
    font-weight: 700 !important;
    color: #6c757d !important;
    margin-bottom: 12px !important;
    letter-spacing: 0.5px !important;
}

.mega-menu .col-md-4 .nav-link,
.mega-menu-marketplace .col-md-3 .nav-link {
    padding: 6px 0 !important;
    font-size: 13px !important;
    color: #6c757d !important;
    transition: color 0.2s ease !important;
    text-decoration: none !important;
}

.mega-menu .col-md-4 .nav-link:hover,
.mega-menu-marketplace .col-md-3 .nav-link:hover {
    color: #212529 !important;
}

/* Desktop hover behavior */
@media (min-width: 769px) {
    .nav-item:hover > .mega-menu,
    .nav-item:hover > .mega-menu-marketplace {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* Mobile behavior */
@media (max-width: 768px) {
    .mega-menu,
    .mega-menu-marketplace {
        position: relative !important;
        width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        top: auto !important;
        left: 0 !important;
        margin-top: 10px !important;
        padding: 15px !important;
        max-height: 60vh !important;
        overflow-y: auto !important;
    }
    
    .mega-menu.show,
    .mega-menu-marketplace.show {
        display: block !important;
    }
}

/* 2. BUTTONS
   ========================================= */

/* Rounded corners for all buttons */
.btn {
    border-radius: 8px !important;
}

.btn-sm {
    border-radius: 6px !important;
}

.btn-lg {
    border-radius: 10px !important;
}

/* Remove focus outlines */
.btn:focus,
.btn:active,
button:focus,
button:active,
a:focus,
a:active {
    outline: none !important;
    box-shadow: none !important;
}

/* Fix pressed appearance */
.btn {
    box-shadow: none !important;
    background-image: none !important;
    text-shadow: none !important;
}

.btn:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    transform: translateY(-1px) !important;
}

/* 3. LANGUAGE SELECTOR
   ========================================= */

.language-selector,
.language-dropdown .btn,
.language-dropdown button {
    border: none !important;
    background: transparent !important;
    border-radius: 6px !important;
    box-shadow: none !important;
}

.language-selector:hover,
.language-dropdown .btn:hover,
.language-dropdown button:hover {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Login button - completely remove border */
.navbar .btn-outline-primary {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.navbar .btn-outline-primary:hover {
    border: none !important;
    background: rgba(248, 248, 248, 0.3) !important;
    box-shadow: none !important;
    transform: none !important;
}

.navbar .btn-outline-primary:focus,
.navbar .btn-outline-primary:active {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Force remove all borders from login button */
.auth-buttons .btn-outline-primary {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* 4. MARKETPLACE APP PAGES
   ========================================= */

.app-hero {
    border: none !important;
    border-bottom: none !important;
}

.hero-badge {
    border: 1px solid #f0f0f0 !important;
    background: #fafafa !important;
}

.app-logo {
    border: none !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
}

.info-section {
    border: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}

.sidebar-card {
    border: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}

.feature-list li {
    border-bottom: 1px solid #f5f5f5 !important;
}

.feature-list li:last-child {
    border-bottom: none !important;
}

/* 5. GENERAL FIXES
   ========================================= */

/* White headers */
[class*="hero"] {
    background-color: #ffffff !important;
}

/* Remove tap highlight on mobile */
* {
    -webkit-tap-highlight-color: transparent !important;
}

/* Ensure nav items are positioned correctly */
.navbar-nav > .nav-item {
    position: relative !important;
}

/* Force Products menu to have 2 columns - COMPLETE FIX */

/* First, ensure the container row works */
.mega-menu .col-md-8 .row.g-0 {
    display: -webkit-box !important;
    display: -ms-flexbox !important;
    display: flex !important;
    -webkit-box-orient: horizontal !important;
    -webkit-box-direction: normal !important;
    -ms-flex-direction: row !important;
    flex-direction: row !important;
    -ms-flex-wrap: wrap !important;
    flex-wrap: wrap !important;
    margin: 0 !important;
}

/* Then force each column to be 50% */
.mega-menu .col-6,
.mega-menu .col-md-6 {
    -webkit-box-flex: 0 !important;
    -ms-flex: 0 0 50% !important;
    flex: 0 0 50% !important;
    max-width: 50% !important;
    width: 50% !important;
    padding: 0 5px !important;
}

/* Ultra specific selector for both col-6 and col-md-6 */
body .navbar .mega-menu .col-md-8 .row > div[class*="col-6"],
body .navbar .mega-menu .col-md-8 .row > div[class*="col-md-6"] {
    -webkit-box-flex: 0 !important;
    -ms-flex: 0 0 50% !important;
    flex: 0 0 50% !important;
    max-width: 50% !important;
    width: 50% !important;
}

/* Ensure items fill their containers */
.mega-menu .mega-menu-item {
    width: 100% !important;
    display: flex !important;
    margin: 3px 0 !important;
}