/* ============================================
   V2 NAVIGATION STYLES
   Extracted from header_modern.blade.php
   Overrides rhino-premium-theme.css for v2 design
   ============================================ */

/* CSS Variables - V2 Design System */
:root {
    --rhino-orange: #c57229;
    --rhino-orange-dark: #b56624;
    --bg-dark-1: #0f0f0f;
    --bg-dark-2: #141414;
    --bg-dark-3: #1a1a1a;
    --bg-dark-4: #222222;
    --text-gray: #8a8a8a;
    --text-gray-light: #b0b0b0;
    --rhino-font-heading: 'Orbitron', sans-serif;
    --rhino-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ============================================
   HEADER WRAPPER
   ============================================ */
/* Match rhino-premium-theme.css header so homepage and inner pages (e.g. product detail) look the same */
#header {
    position: sticky;
    top: 0;
    z-index: 1050;
    background: linear-gradient(135deg, #050609 0%, #0f1118 100%) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(42, 42, 42, 0.5) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

#header.header-sticky {
    background: rgba(10, 10, 10, 0.98) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* ============================================
   DESKTOP TOP BAR
   ============================================ */
.desktop-top-bar {
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--bg-dark-4);
    padding: 0.75rem 0;
    display: none;
    font-size: 0.8125rem;
}

@media (min-width: 992px) {
    .desktop-top-bar {
        display: block;
    }
}

.desktop-top-bar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-bar-contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-gray);
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.top-bar-contact-link:hover {
    color: var(--rhino-orange);
    text-decoration: none;
}

.top-bar-contact-link i {
    font-size: 0.875rem;
    color: var(--rhino-orange);
}

.top-bar-trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    background: rgba(197, 114, 41, 0.1);
    border: 1px solid rgba(197, 114, 41, 0.2);
    border-radius: 50px;
    color: var(--rhino-orange);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.top-bar-trust-badge i {
    font-size: 0.75rem;
}

.top-bar-trust-badge.flag-badge {
    background: rgba(197, 114, 41, 0.15);
    border-color: rgba(197, 114, 41, 0.3);
}

.top-bar-quick-link {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.8125rem;
    transition: color 0.3s;
    white-space: nowrap;
}

.top-bar-quick-link:hover {
    color: var(--rhino-orange);
    text-decoration: none;
}

@media (max-width: 1199px) {
    .top-bar-left {
        gap: 1rem;
    }
    
    .top-bar-right {
        gap: 0.75rem;
    }
    
    .top-bar-quick-link {
        font-size: 0.75rem;
    }
}

/* ============================================
   MOBILE TOP BAR
   ============================================ */
.mobile-top-bar {
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--bg-dark-4);
    padding: 0.75rem 0;
    display: none;
}

@media (max-width: 991px) {
    .mobile-top-bar {
        display: block;
    }
}

.mobile-top-bar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.mobile-contact-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-contact-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(197, 114, 41, 0.15);
    border: 1px solid rgba(197, 114, 41, 0.3);
    border-radius: 50%;
    color: var(--rhino-orange);
    text-decoration: none;
    transition: all 0.3s;
}

.mobile-contact-link:hover {
    background: rgba(197, 114, 41, 0.25);
    border-color: var(--rhino-orange);
    color: #ffffff;
    transform: scale(1.1);
}

.mobile-contact-link i {
    font-size: 1.1rem;
}

.mobile-social-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-dark-3);
    border: 1px solid var(--bg-dark-4);
    border-radius: 50%;
    color: var(--text-gray);
    text-decoration: none;
    transition: all 0.3s;
}

.mobile-social-link:hover {
    background: var(--bg-dark-4);
    color: #ffffff;
    border-color: var(--rhino-orange);
}

/* ============================================
   NAVIGATION - CRITICAL OVERRIDES
   Override rhino-premium-theme.css to match v2.html sizing
   ============================================ */
.navbar {
    background: transparent !important;
    padding: 0;
    position: relative;
    z-index: 1050;
}

.navbar-collapse {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.navbar-nav {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

@media (max-width: 991px) {
    .navbar {
        padding: 0.6rem 0;
    }
    .header-row-1 .navbar-brand {
        flex-shrink: 1;
        min-width: 0;
        margin-right: 0.25rem;
    }
    .header-row-1 .navbar-brand img {
        height: 28px;
        width: auto;
        max-width: 140px;
        object-fit: contain;
    }
    .navbar-toggler {
        padding: 0.35rem 0.5rem;
    }
}

.navbar-brand img {
    height: 40px;
}

/* Header Rows Structure */
.header-rows {
    width: 100%;
}

/* Glass bar: full width, sharp corners */
@media (min-width: 992px) {
    .hero-section .navbar {
        background: rgba(10, 10, 10, 0.35) !important;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        backdrop-filter: blur(10px);
        padding-left: 0;
        padding-right: 0;
    }
}

.header-row-1 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    padding: 0.6rem 0 0.75rem;
    width: 100%;
}

.header-row-2 {
    width: 100%;
    padding: 0.25rem 0 0.5rem;
}

@media (min-width: 992px) {
    .header-row-2 {
        padding: 0.2rem 0 0.4rem;
    }
}

/* Ensure navbar-nav aligns to left edge of container */
.header-row-2 .navbar-collapse {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.header-row-2 .navbar-nav {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* All nav links use same padding (no special first-child treatment) */

@media (min-width: 992px) {
    .header-row-1 .header-search {
        flex: 1 1 auto;
        min-width: 200px;
        max-width: 420px;
    }
}

.header-search {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    white-space: nowrap;
}

.header-action-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #d1d5db;
    text-decoration: none;
    font-family: var(--rhino-font-heading);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(15,15,15,0.35);
    transition: all 0.2s ease;
}

.header-action-link:hover {
    color: #fff;
    border-color: rgba(197, 114, 41, 0.5);
    background: rgba(197, 114, 41, 0.12);
    text-decoration: none;
}

.header-action-link.primary {
    border-color: rgba(197, 114, 41, 0.45);
}

.header-cart-link {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(15,15,15,0.35);
    color: #fff;
    text-decoration: none;
    transition: all 0.2s ease;
}

.header-cart-link:hover {
    border-color: rgba(197, 114, 41, 0.5);
    background: rgba(197, 114, 41, 0.12);
    text-decoration: none;
}

@media (min-width: 992px) {
    .header-row-2 .navbar-collapse {
        display: flex;
        align-items: center;
        margin-left: 0 !important; /* Ensure no left margin */
        padding-left: 0 !important; /* Ensure no left padding */
    }

    .header-row-2 .navbar-nav {
        flex-wrap: nowrap !important;
        gap: 0.125rem 0.25rem !important; /* Reduced from 0.25rem 0.5rem */
        margin-left: 0 !important; /* Ensure no left margin */
        padding-left: 0 !important; /* Ensure no left padding */
    }
}

/* ============================================
   NAV-LINK OVERRIDES - CRITICAL
   Override rhino-premium-theme.css to match v2.html smaller sizing
   ============================================ */
/* Base nav-link - smaller than rhino-premium-theme.css */
.nav-link {
    font-family: var(--rhino-font-heading) !important;
    color: #d1d5db !important;
    font-size: 0.75rem !important; /* Reduced from 0.8125rem */
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: color 0.3s;
    padding: 0.4rem 0.5rem !important; /* Reduced horizontal padding from 0.6rem */
    white-space: nowrap;
    font-weight: 500 !important; /* Override theme */
}

/* Remove ::after underline from theme */
.nav-link::after {
    display: none !important;
}

/* Tablet sizing - even smaller */
@media (min-width: 992px) {
    .nav-link {
        font-size: 0.6875rem !important; /* Reduced from 0.75rem (11px) */
        padding: 0.35rem 0.4rem !important; /* Reduced horizontal padding from 0.5rem */
        letter-spacing: 0.06em;
    }
}

/* Desktop sizing - slightly larger but still compact */
@media (min-width: 1200px) {
    .nav-link {
        font-size: 0.75rem !important; /* Reduced from 0.8125rem (12px) */
        padding: 0.4rem 0.5rem !important; /* Reduced horizontal padding from 0.65rem */
    }
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff !important;
}

/* Remove theme's ::after hover effect */
.nav-link:hover::after,
.nav-link.active::after {
    display: none !important;
}

/* ============================================
   VEHICLE SEARCH BAR
   ============================================ */
.vehicle-search-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    padding: 0.5rem 0 0.75rem;
    width: 100%;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.vehicle-search-bar__label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.85);
    font-family: var(--rhino-font-heading);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    margin-right: 0.25rem;
}

.vehicle-search-bar__label i {
    color: var(--rhino-orange);
    font-size: 1rem;
}

.vehicle-search-bar__links {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.vehicle-search-bar__link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.9rem;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(20,20,20,0.5);
    color: #e5e7eb;
    font-size: 0.8125rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.vehicle-search-bar__link:hover {
    border-color: rgba(197, 114, 41, 0.5);
    background: rgba(197, 114, 41, 0.15);
    color: #fff;
    text-decoration: none;
}

.vehicle-search-bar__link i {
    opacity: 0.9;
}

.vehicle-search-bar__link--primary {
    border-color: rgba(197, 114, 41, 0.5);
    background: rgba(197, 114, 41, 0.12);
    color: #fff;
}

.vehicle-search-bar__link--primary:hover {
    background: rgba(197, 114, 41, 0.25);
    border-color: var(--rhino-orange);
}

.vehicle-quick-links-mobile {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--bg-dark-4);
    margin-bottom: 0.75rem;
}

.vehicle-quick-links-mobile__label {
    font-family: var(--rhino-font-heading);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
    display: block;
}

.vehicle-quick-links-mobile__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.vehicle-quick-links-mobile__list a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(20,20,20,0.5);
    color: #e5e7eb;
    font-size: 0.8125rem;
    text-decoration: none;
}

.vehicle-quick-links-mobile__list a:hover {
    border-color: rgba(197, 114, 41, 0.5);
    background: rgba(197, 114, 41, 0.15);
    color: #fff;
    text-decoration: none;
}

.vehicle-quick-links-mobile__list a.vehicle-quick-links-mobile__link--primary {
    border-color: rgba(197, 114, 41, 0.5);
    background: rgba(197, 114, 41, 0.12);
    color: #fff;
}

@media (max-width: 991px) {
    .vehicle-search-bar__link {
        flex: 1 1 auto;
        justify-content: center;
        min-width: 140px;
    }
}

/* ============================================
   DROPDOWN OVERRIDES
   Fix Bootstrap 5 and theme conflicts
   ============================================ */
.dropdown {
    position: relative;
    z-index: 1051;
}

/* Profile/user dropdown must sit above cart and other header elements */
.header-user-dropdown {
    position: relative;
    z-index: 10000000 !important;
}
.header-user-dropdown .dropdown-menu {
    z-index: 10000001 !important;
    overflow: visible !important; /* allow nested submenus to show outside */
}

/* Multi-tier submenus in profile dropdown (Management, Manage, Admin, etc.) */
.header-user-dropdown .dropdown-submenu {
    position: relative;
}
.header-user-dropdown .dropdown-submenu > .dropdown-menu {
    position: absolute !important;
    left: 100% !important;
    top: 0 !important;
    margin-top: 0 !important;
    margin-left: 0 !important;
    display: none;
    min-width: 220px;
    z-index: 10000002 !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.4);
    border: 1px solid var(--bg-dark-4, #222);
    background: var(--bg-dark-2, #141414);
}
.header-user-dropdown .dropdown-submenu:hover > .dropdown-menu,
.header-user-dropdown .dropdown-submenu > .dropdown-menu.show {
    display: block !important;
}
/* Third-level submenus (e.g. Showcases, Vehicle inside Manage) */
.header-user-dropdown .dropdown-submenu .dropdown-submenu > .dropdown-menu {
    position: absolute !important;
    left: 100% !important;
    top: 0 !important;
    margin-top: 0 !important;
    margin-left: 0 !important;
    display: none;
    min-width: 200px;
    z-index: 10000003 !important;
}
.header-user-dropdown .dropdown-submenu .dropdown-submenu:hover > .dropdown-menu,
.header-user-dropdown .dropdown-submenu .dropdown-submenu > .dropdown-menu.show {
    display: block !important;
}
/* Submenu trigger - show arrow, prevent nav when it's only a toggle */
.header-user-dropdown .dropdown-submenu > .dropdown-item.dropdown-toggle {
    padding-right: 2rem;
}
.header-user-dropdown .dropdown-submenu > .dropdown-item.dropdown-toggle::after {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    content: "\203A"; /* right-pointing angle */
    font-size: 1.1rem;
    vertical-align: middle;
}

.dropdown-menu {
    overflow: hidden !important;
    z-index: 1052 !important;
    min-width: 240px !important;
    max-width: 100% !important;
}

.dropdown-mega-menu {
    z-index: 1052 !important;
    overflow: hidden !important;
}

.dropdown-item {
    box-sizing: border-box !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
}

.dropdown-item:hover {
    transform: none !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

/* Main nav dropdown: headers and muted text must be light for readability on dark background */
.navbar .dropdown-menu .dropdown-header,
.navbar-nav .dropdown-menu .dropdown-header {
    color: var(--text-gray-light, #b0b0b0) !important;
    opacity: 1;
}
.navbar .dropdown-menu .dropdown-header.text-muted,
.navbar-nav .dropdown-menu .dropdown-header.text-muted {
    color: var(--text-gray-light, #b0b0b0) !important;
}
.navbar .dropdown-menu .dropdown-item .text-muted,
.navbar-nav .dropdown-menu .dropdown-item .text-muted {
    color: rgba(255, 255, 255, 0.75) !important;
}

.dropdown-mega-sub-nav .dropdown-item:hover {
    transform: none !important;
}

.dropdown-item-cta {
    background: linear-gradient(135deg, rgba(199, 120, 43, 0.15) 0%, rgba(199, 120, 43, 0.05) 100%) !important;
    border: 1.5px solid #c7782b !important;
    border-radius: 4px !important;
    padding: 0.5rem 0.625rem !important;
    text-align: center !important;
    margin-top: 0.5rem !important;
    margin-left: 0.5rem !important;
    margin-right: 0.5rem !important;
    margin-bottom: 0.5rem !important;
    transition: all 0.3s ease !important;
    color: #ffffff !important;
    position: relative;
    overflow: visible !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    font-size: 0.8125rem !important;
    box-sizing: border-box !important;
    width: calc(100% - 1rem) !important;
    display: block !important;
}

.dropdown-item-cta:hover {
    background: linear-gradient(135deg, #c7782b 0%, #ff9500 100%) !important;
    border-color: #ff9500 !important;
    color: #ffffff !important;
    transform: none !important;
    box-shadow: 0 4px 12px rgba(199, 120, 43, 0.3);
}

.dropdown-item-cta:hover strong,
.dropdown-item-cta:hover .small,
.dropdown-item-cta:hover i {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.dropdown-item-cta strong {
    font-size: 0.8125rem;
    display: block;
    line-height: 1.2;
    font-weight: 600;
}

.dropdown-item-cta .small {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
    line-height: 1.1;
    margin-top: 0.125rem;
}

.dropdown-item-cta i {
    font-size: 0.875rem;
}

.nav-link-rhinolink {
    color: #c7782b !important;
    font-weight: 600;
}

.nav-link-rhinolink:hover {
    color: #ff9500 !important;
}

#navControllers.nav-link {
    color: #c7782b !important;
    font-weight: 600;
}

#navControllers.nav-link:hover {
    color: #ff9500 !important;
}

.nav-link .badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    margin-left: 0.25rem;
}

@media (min-width: 992px) {
    .header-row-2 .navbar-nav .nav-item {
        flex-shrink: 0;
        margin: 0 !important; /* Remove any default margins */
    }
}

.navbar-toggler {
    border: 1px solid rgba(199, 120, 43, 0.3);
    padding: 0.5rem 0.75rem;
    background: rgba(15, 15, 15, 0.5);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(199, 120, 43, 0.25);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-nav .dropdown.show > .nav-link {
    color: #ffffff !important;
}

/* ============================================
   SEARCH BAR
   ============================================ */
.navbar-search {
    position: relative;
    margin-left: 0;
}

.search-wrapper {
    display: flex;
    align-items: center;
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid var(--bg-dark-4);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    transition: all 0.3s;
    width: 100%;
}

.search-wrapper:focus-within {
    border-color: var(--rhino-orange);
    box-shadow: 0 0 0 3px rgba(197, 114, 41, 0.1);
}

.search-input {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    flex: 1 1 auto;
    min-width: 0;
    outline: none;
}

.search-input::placeholder {
    color: var(--text-gray);
}

.search-btn {
    background: transparent;
    border: none;
    color: var(--text-gray);
    margin-left: auto;
    padding: 0.25rem 0.35rem;
    cursor: pointer;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    color: var(--rhino-orange);
}

/* Mobile search: toggle button + slide-down search bar */
.mobile-search-toggle {
    flex-shrink: 0;
}
.mobile-search-bar {
    background: var(--bg-dark-2, #141414);
    border-bottom: 1px solid var(--bg-dark-4, #222);
}
.mobile-search-bar .search-wrapper {
    max-width: 100%;
}
@media (max-width: 991.98px) {
    .mobile-search-bar .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

@media (max-width: 991px) {
    .navbar-search {
        margin-left: 0;
        margin-top: 1rem;
        width: 100%;
    }
    
    .search-wrapper {
        width: 100%;
    }
    
    .search-input {
        width: 100%;
    }
}

/* ============================================
   MINI CART
   ============================================ */
.header-cart {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 9999999;
}

/* Space between cart (and QTY badge) and nav toggler on mobile */
@media (max-width: 991.98px) {
    .header-row-1 .header-cart {
        margin-right: 0.5rem;
    }
    .header-row-1 .navbar-toggler {
        margin-left: 0.25rem;
    }
}

.header-nav-features-cart .header-nav-features-dropdown,
.header-nav-features-cart-big .header-nav-features-dropdown,
.header-nav-feature .header-nav-features-dropdown {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    z-index: 1008 !important;
}

.header-nav-features-cart .header-nav-features-dropdown.show,
.header-nav-features-cart-big .header-nav-features-dropdown.show,
.header-nav-feature .header-nav-features-dropdown.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    z-index: 1008 !important;
}
