/* --- Header Structure (Reference Style) --- */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 9999;
    height: 80px;
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* --- REPAIR KIT STYLES --- */

/* 1. Scoped Search Bar (The Fix) */
.header-search {
    display: flex;
    align-items: center;
    background-color: #F3F4F6;
    /* Gray background */
    border-radius: 50px;
    /* Pill shape */
    padding: 4px 4px 4px 20px;
    width: 400px;
    /* Fixed width for stability */
    max-width: calc(100vw - 48px);
    /* Ensure it never exceeds viewport minus padding */
    margin: 0 20px;
    /* Spacing from neighbors */
}

/* Strictly scoped input to prevent bleeding */
.header-search input {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    flex-grow: 1;
    font-size: 14px;
    color: var(--text-main);
    padding: 0;
    margin: 0;
    height: 40px;
    /* Match aesthetic height */
}

.header-search input::placeholder {
    color: #999;
}

.header-search-btn {
    width: 36px;
    height: 36px;
    background-color: var(--primary-brand);
    border-radius: 50%;
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px;
}

.header-search-btn:hover {
    background-color: var(--primary-dark);
}

/* 2. User Tools Alignment */
.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
    /* Strict gap */
    height: 100%;
}

.header-icon-link {
    color: var(--text-main);
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.header-icon-link:hover {
    color: var(--primary-brand);
}

/* Reset .nav-triggers gap if needed, though 32px was requested in previous turn, keep it compatible */


/* 1. Left Section: Logo + Separator + Dual Triggers */
.header-left {
    display: flex;
    align-items: center;
    gap: 0;
    /* Managed by specific margins */
    position: relative;
    height: 100%;
}

/* Zone A: Brand Logo */
.brand-logo {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-brand);
    display: flex;
    align-items: center;
    text-decoration: none;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Vertical Separator */
.nav-separator {
    width: 1px;
    height: 32px;
    background-color: #E5E7EB;
    /* Light gray */
    margin-right: 20px;
}

/* Navigation Triggers Container */
.nav-triggers {
    display: flex;
    align-items: center;
    gap: 32px;
    /* Increased gap */
    height: 100%;
}

/* Common Trigger Styles */
.nav-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    height: 100%;
    color: var(--text-main);
    transition: color 0.2s;
    position: relative;
    /* Context for dropdowns */
}

.nav-trigger:hover {
    color: var(--primary-brand);
}

.nav-chevron {
    font-size: 10px;
    transition: transform 0.2s;
}

.nav-trigger:hover .nav-chevron {
    transform: rotate(180deg);
}

/* Specific Triggers */
.nav-trigger-primary {
    font-weight: 700;
    font-size: 15px;
    /* Slightly larger */
}

.nav-trigger-secondary {
    font-weight: 400;
    font-size: 15px;
}

/* --- SYSTEM 1: MEGA SIDEBAR (Equipment Specs) --- */
/* Anchored to the nav-trigger (parent) */
.header-sidebar-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    width: 280px;
    /* Keeping logical width but ensuring min-width */
    background-color: var(--white);
    border: none;
    /* Shadow handles depth */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 10px 0;
    z-index: 1000;
}

/* Show Mega on Hover of Primary Trigger or Active */
.nav-trigger-primary:hover .header-sidebar-dropdown,
.nav-trigger-primary.active .header-sidebar-dropdown,
.header-sidebar-dropdown:hover {
    display: block;
}


/* --- SYSTEM 2: SIMPLE DROPDOWN (Services) --- */
.dropdown-menu-simple {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    background-color: var(--white);
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 8px 0;
    z-index: 1000;
    animation: fadeIn 0.15s ease-out;
}

.nav-trigger-secondary:hover .dropdown-menu-simple,
.nav-trigger-secondary.active .dropdown-menu-simple,
.dropdown-menu-simple:hover {
    display: block;
}

.simple-item {
    display: block;
    padding: 10px 20px;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    transition: all 0.2s;
}

.simple-item:hover {
    background-color: var(--bg-light);
    color: var(--primary-brand);
    padding-left: 25px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Old trigger removed */

/* Removed legacy broad hover trigger */

/* Note: For better UX, we usually wrap the button and dropdown in a container. 
   I'll assume .header-left serves as that container or I'll structure HTML correctly. */

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.1s;
}

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

.sidebar-item:hover {
    background-color: var(--bg-light);
}

.sidebar-icon {
    width: 24px;
    /* Icon container */
    margin-right: 12px;
    text-align: center;
    color: #999;
    /* Gray default */
    transition: color 0.2s;
}

.sidebar-item:hover .sidebar-icon,
.sidebar-item:hover span {
    color: var(--primary-brand);
    /* Turn Green on Hover */
}

/* Sidebar Sub-Menu (Flyout) */
.sidebar-item {
    position: relative;
    /* Anchor for sub-menu */
}

.sidebar-sub-menu {
    display: none;
    /* Hidden by default */
    position: absolute;
    left: 100%;
    /* Right of parent */
    top: 0;
    width: 300px;
    /* Wider panel for sub-items */
    min-height: 100%;
    /* Match height of parent dropdown context if possible, or auto */
    background-color: var(--white);
    border: 1px solid var(--border-color);
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 0 8px 8px 8px;
    /* Rounded corners on right side */
    padding: 10px 0;
    z-index: 1200;
}

/* Show Sub-menu on Hover or Active (JS) */
.sidebar-item:hover .sidebar-sub-menu,
.sidebar-item.active .sidebar-sub-menu {
    display: block;
    animation: fadeInRight 0.2s ease-out;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sub-menu-header {
    padding: 12px 20px;
    font-weight: 700;
    color: var(--primary-brand);
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 5px;
    font-size: 14px;
}

.sub-menu-item {
    display: block;
    padding: 10px 20px;
    color: var(--text-body);
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sub-menu-item:hover {
    background-color: var(--bg-light);
    color: var(--primary-brand);
    padding-left: 25px;
    /* Slight indentation interaction */
}

/* Chevron for items with children */
.sidebar-chevron {
    margin-left: auto;
    color: #ccc;
    font-size: 12px;
}

.sidebar-item:hover .sidebar-chevron {
    color: var(--primary-brand);
}

/* Removing old login button styles */

/* Mobile Toggle */
.mobile-toggle-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-main);
    padding: 8px;
    /* Touch target */
}

/* Footer (Updated Z-index) */
footer {
    background-color: var(--footer-bg);
    color: var(--text-body);
    padding: 60px 0 30px;
    margin-top: 80px;
    position: relative;
    z-index: 10;
    border-top: 1px solid var(--border-color);
}

.footer-link {
    display: block;
    margin-bottom: 10px;
    color: var(--text-body);
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--primary-brand);
}

.footer-top {
    display: flex;
    align-items: center;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    gap: 30px;
}

.footer-logo {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-brand);
    letter-spacing: 1px;
    text-transform: uppercase;
    flex: 1;
    /* Take up equal space */
}

.footer-links {
    display: flex;
    gap: 30px;
    flex: 0 0 auto;
    /* Natural width */
    justify-content: center;
}

.social-icons {
    margin-bottom: 10px;
    display: flex;
    gap: 15px;
    flex: 1;
    /* Take up equal space */
    justify-content: flex-end;
    /* Push icons to right */
}

.social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-light);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
}

.social-icon:hover {
    background-color: var(--primary-brand);
    color: white;
    border-color: var(--primary-brand);
}

.footer-copyright {
    padding-top: 30px;
    font-size: 13px;
    color: #888;
    text-align: center;
}

/* Mobile Footer */
@media (max-width: 768px) {
    .footer-top {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-logo,
    .social-icons,
    .footer-links {
        flex: auto;
        justify-content: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 15px;
        padding-right: 0;
    }
}

/* Responsive */
@media (max-width: 900px) {
    .nav-search {
        display: none;
    }

    /* Hide search on medium screens for simplicity */
    .nav-actions {
        display: none;
    }

    .mobile-toggle-btn {
        display: block;
    }
}

/* Mobile Drawer - Full Screen Modal */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: var(--white);
    z-index: 20000;

    transition: right 0.3s ease-in-out;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.mobile-drawer.open {
    right: 0;
}

.drawer-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drawer-close {
    font-size: 28px;
    cursor: pointer;
    color: var(--text-main);
    padding: 10px;
    line-height: 1;
}

/* Enhanced Mobile Links & Dropdowns */
.drawer-link,
.mobile-accordion-trigger {
    padding: 16px 20px;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 1px solid #f9f9f9;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
}

.mobile-accordion-content {
    background: #fff;
}

/* Auth Section Background Fix */
.drawer-user-profile {
    background: #fff !important;
    border: 1px solid #eee;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.drawer-overlay {
    background: rgba(255, 255, 255, 0);
    /* effectively transparent or remove */
    pointer-events: none;
    /* Let clicks pass through if we want, but full screen covers it */
}

/* --- Mobile Search & Actions --- */
.mobile-actions {
    display: none;
}

@media (max-width: 900px) {
    .mobile-actions {
        display: flex !important;
        align-items: center;
        gap: 15px;
    }

    .mobile-toggle-btn {
        display: block;
        margin-left: 0;
    }
}

.mobile-search-trigger {
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Search Overlay */
.mobile-search-suggestions {
    flex: 1;
    overflow-y: auto;
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
}

/* --- FIX: Header Styles Matching Header.blade.php --- */

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.header-logo-area {
    display: flex;
    align-items: center;
}

.header-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-right: 40px;
    /* Spacing from nav */
}

.header-logo-text {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-brand);
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1;
    /* Ensure single line */
    white-space: nowrap;
}

.header-logo-text span {
    color: var(--text-heading);
}

/* New Desktop Nav Links */
.header-nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
    /* Consistent gap */
    flex: 1;
    /* Allow to take available space if needed, or justify-start */
    justify-content: flex-start;
    /* Left align next to logo */
}

.header-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
}

.header-nav-link:hover,
.header-nav-link.active {
    color: var(--primary-brand);
}

.header-nav-link i {
    font-size: 16px;
    color: #9CA3AF;
    /* Default icon color */
    transition: color 0.2s;
}

.header-nav-link:hover i {
    color: var(--primary-brand);
}

/* Actions Area */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* --- FIX: Header Styles Matching Header.blade.php --- */
.header-main {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 9999;
    /* Reinforce high z-index */
    height: 80px;
}

.header-container {
    max-width: 1440px;
    margin: 0 auto;
}

/* ZONE 1: LOGO (Left) */
.header-logo-area {
    flex: 1;
    /* Takes available left space */
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.header-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header-logo-text {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: var(--primary-brand);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
}

.header-logo-text span {
    color: var(--text-heading);
}

/* ZONE 2: NAV LINKS (Center) */
.header-nav-links {
    flex: 0 0 auto;
    /* Width based on content to stay centered */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    /* Generous gap between nav items */
}

/* Generic Nav Link Style */
.header-nav-link,
.nav-trigger-specs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
    /* For dropdowns */
    height: 40px;
    /* Consistent hit area */
}

/* Icons in Nav */
.header-nav-link i,
.nav-trigger-specs i {
    font-size: 17px;
    color: var(--primary-brand);
    /* User requested Red by default */
    transition: color 0.2s;
    opacity: 0.9;
}

/* Hover Effects */
.header-nav-link:hover,
.header-nav-link:hover i,
.nav-trigger-specs:hover,
.nav-trigger-specs:hover i {
    color: var(--primary-dark);
    /* Darker red on hover */
    opacity: 1;
}

/* Chevron specific adjustment */
.nav-trigger-specs .fa-chevron-down {
    font-size: 11px;
    margin-top: 2px;
}

/* Specs Dropdown (Crane Database hover menu) */
.specs-dropdown-root {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 280px;
    background: white !important;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.12);
    padding: 8px 0;
    z-index: 10001 !important;
    /* Force top priority */
}

.specs-dropdown-root.w-200 {
    width: 200px;
}

.specs-dropdown-root.user-dropdown-menu {
    width: 220px;
    right: 0;
    left: auto;
}

.nav-trigger-specs:hover>.specs-dropdown-root {
    display: block;
}

/* Dropdown links */
.specs-dropdown-root .nav-link-recursive {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #1F2937 !important;
    /* Force dark gray */
    text-decoration: none;
    transition: all 0.15s;
}

.specs-dropdown-root .nav-link-recursive:hover {
    background: #f9fafb;
    color: var(--primary-brand) !important;
}

.specs-dropdown-root .nav-link-recursive i {
    font-size: 14px;
    color: var(--primary-brand) !important;
    opacity: 0.9;
}

.specs-dropdown-root .nav-link-recursive span {
    color: black !important;
}


/* Recursive sub-dropdown */
.specs-dropdown-root .has-children,
.specs-dropdown-root .nav-item-recursive.has-children {
    position: relative;
}

.specs-dropdown-root .has-children>.dropdown-recursive,
.specs-dropdown-root .nav-item-recursive.has-children>.dropdown-recursive {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    width: 260px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.12);
    padding: 8px 0;
    z-index: 3001;
}

.specs-dropdown-root .has-children:hover>.dropdown-recursive,
.specs-dropdown-root .nav-item-recursive.has-children:hover>.dropdown-recursive {
    display: block;
}

/* Dropdown footer link (Browse All) */
.dropdown-footer-link {
    border-top: 1px solid #f0f0f0;
    margin-top: 4px;
    padding-top: 4px;
}

.dropdown-footer-link .nav-link-recursive {
    font-weight: 700;
    color: var(--primary-brand);
}

/* Logout button in dropdown */
.btn-logout {
    width: 100%;
    border: none;
    background: none;
    cursor: pointer;
    color: #ef4444;
    text-align: left;
}


.header-actions {
    flex: 1;
    /* Takes available right space */
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
    /* Gap between Search and Auth */
}

/* Search Trigger */
.search-trigger,
.header-action-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-main);
    background: transparent;
    text-decoration: none;
}

.search-trigger:hover,
.header-action-icon:hover {
    background-color: #f3f4f6;
    color: var(--primary-brand);
    transform: scale(1.05);
}

/* Auth Area */
.header-auth-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.auth-buttons-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-login-link {
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    font-size: 15px;
    border-radius: 6px;
    transition: background 0.2s;
}

.btn-login-link:hover {
    background: #f9fafb;
    color: var(--primary-brand);
}

.btn-signup {
    background-color: var(--primary-brand);
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
    transition: all 0.2s;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(220, 38, 38, 0.2);
    /* Subtle shadow for pop */
}

.btn-signup:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

/* User Profile Header Dropdown */
.auth-user-dropdown-area:hover {
    background: transparent !important;
}

.auth-user-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 5px 8px 5px 5px;
    border-radius: 30px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.auth-user-trigger:hover {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.user-avatar-circle {
    width: 32px;
    height: 32px;
    background: #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4b5563;
    font-size: 14px;
}

.user-avatar-circle i {
    color: inherit !important;
}

/* --- Phase 12: Standard Page Layouts --- */
.standard-page-container {
    padding-top: 40px !important;
    padding-bottom: 60px !important;
}

/* Smart Ad Spacing: Reduce padding if followed by an active ad slot */
.ad-slot-header-active+.ad-header-wrapper+.standard-page-container,
.ad-slot-header-active+.ad-header-wrapper+.container {
    padding-top: 10px !important;
}

.hero-section {
    margin-top: 40px !important;
}

.ad-slot-header-active+.ad-header-wrapper+.hero-section {
    margin-top: 10px !important;
}

/* Landing Page Mid-Ad Spacing */
.ad-mid-wrapper + .bottom-links-section {
    margin-top: 60px !important;
}

.standard-breadcrumb {
    margin-bottom: 30px !important;
}

.breadcrumb-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.breadcrumb-link {
    color: var(--primary-brand);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.breadcrumb-link:hover {
    color: var(--primary-dark);
}

.breadcrumb-separator {
    font-size: 10px;
    color: #ccc;
}

.breadcrumb-current {
    color: var(--text-main);
    font-weight: 600;
}

/* Global Search Overlay (Enhanced) */
.mobile-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 20px;
}

.mobile-search-overlay.open {
    opacity: 1;
    visibility: visible;
}

.mobile-search-overlay .mobile-search-header {
    position: absolute;
    top: 40px;
    left: 0;
    right: 0;
    width: 100%;
    margin: 0 auto;
    max-width: 900px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    z-index: 10;
}

.mobile-search-overlay .search-title {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #9ca3af;
}

.mobile-search-overlay .search-close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 50%;
    background: #f3f4f6;
}

.mobile-search-overlay .search-close:hover {
    background: var(--primary-brand);
    color: white;
    transform: rotate(90deg);
}

.mobile-search-overlay .mobile-search-body {
    width: 100%;
    max-width: 800px;
    animation: searchBodySlide 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes searchBodySlide {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-search-overlay .mobile-search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.mobile-search-overlay .mobile-search-input {
    width: 100%;
    padding: 24px 80px 24px 30px;
    font-size: 32px;
    font-weight: 700;
    border: none;
    border-bottom: 2px solid #eee;
    background: transparent;
    color: var(--text-main);
    transition: all 0.3s;
    outline: none;
}

.mobile-search-overlay .mobile-search-input:focus {
    border-color: var(--primary-brand);
}

.mobile-search-overlay .mobile-search-submit {
    position: absolute;
    right: 10px;
    width: 60px;
    height: 60px;
    background: var(--primary-brand);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
}

.mobile-search-overlay .mobile-search-submit:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

@media (max-width: 768px) {
    .mobile-search-overlay .mobile-search-input {
        font-size: 20px;
        padding: 15px 60px 15px 15px;
    }

    .mobile-search-overlay .mobile-search-submit {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }
}

/* Standard Breadcrumb Styling */
.standard-breadcrumb {
    padding-top: 5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    font-size: 14px;
    font-weight: 600;
}

.standard-breadcrumb a {
    text-decoration: none;
    color: var(--primary-brand);
    transition: color 0.2s;
}

.standard-breadcrumb a:hover {
    color: var(--primary-dark);
}

.standard-breadcrumb i {
    font-size: 10px;
    color: #9ca3af;
}

.standard-breadcrumb span {
    color: var(--text-main);
}

/* User Profile Header Dropdown Refinement */
.auth-user-dropdown-area:hover {
    background: transparent !important;
}

.auth-user-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px 8px 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 40px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    cursor: pointer;
}

.auth-user-dropdown-area:hover .auth-user-trigger {
    background: #fff;
    border-color: var(--primary-brand);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.user-avatar-circle {
    width: 34px;
    height: 34px;
    background: var(--primary-brand);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.user-name-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    transition: color 0.2s;
}

.auth-user-dropdown-area:hover .user-name-label {
    color: var(--text-main);
}

.user-dropdown-menu {
    width: 200px !important;
    min-width: 180px !important;
    right: 0;
    left: auto !important;
    top: calc(100% + 12px) !important;
    padding: 8px !important;
    border: none !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
    background: white;
    border-radius: 12px !important;
}

.user-dropdown-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 4px;
}

.user-icon-btn {
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 0 12px;
    border-radius: 10px;
    background: transparent;
    color: var(--text-main);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 500;
}

.user-icon-btn i {
    font-size: 20px !important;
    color: var(--primary-brand) !important;
    transition: transform 0.2s;
}

.user-icon-btn:hover {
    background: #fff5f5;
    border-color: var(--primary-brand);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(211, 47, 47, 0.1);
}

.user-icon-btn:hover i {
    transform: scale(1.1);
}

.user-dropdown-menu form {
    margin: 0;
    padding: 0;
}

.btn-logout i {
    color: #ef4444 !important;
}



/* Mobile Drawer Profile Section Sync */
.drawer-user-section {
    padding: 24px;
    background: #f9fafb;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

.drawer-user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.drawer-user-avatar {
    width: 50px;
    height: 50px;
    background: var(--primary-brand);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.drawer-user-name {
    display: flex;
    flex-direction: column;
}

.drawer-user-name .name {
    font-weight: 800;
    font-size: 18px;
    color: var(--text-main);
}

.drawer-user-name .role {
    font-size: 13px;
    color: #9ca3af;
}

.drawer-user-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.drawer-user-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
}

.drawer-user-btn.logout {
    background: #fef2f2;
    border-color: #fee2e2;
    color: var(--primary-brand);
}

/* Global Pagination Redesign */
.pagination {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    justify-content: center;
    margin: 40px 0;
}

.pagination li a,
.pagination li span {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    color: var(--text-main);
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    min-width: 44px;
    justify-content: center;
}

.pagination li.active span {
    background: var(--primary-brand);
    color: white;
    border-color: var(--primary-brand);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.2);
}

.pagination li a:hover {
    border-color: var(--primary-brand);
    color: var(--primary-brand);
    background: #fff5f5;
    transform: translateY(-2px);
}

.pagination li.disabled span {
    color: #9ca3af;
    background: #f9fafb;
    border-color: #f3f4f6;
    cursor: not-allowed;
}

/* Specific styling for Prev/Next text buttons */
.pagination li:first-child a,
.pagination li:first-child span,
.pagination li:last-child a,
.pagination li:last-child span {
    padding-left: 24px;
    padding-right: 24px;
    background: #f9fafb;
}

@media (max-width: 600px) {
    .pagination {
        flex-wrap: wrap;
        gap: 6px;
    }

    .pagination li a,
    .pagination li span {
        padding: 10px 14px;
        font-size: 13px;
        border-radius: 8px;
    }
}

/* --- Breadcrumb Navigation Responsiveness --- */
.breadcrumb-nav {
    flex-wrap: wrap;
    line-height: 1.6;
    padding-top: 5px;
}

.breadcrumb-nav span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: bottom;
}

@media (max-width: 768px) {
    .breadcrumb-nav {
        gap: 6px !important;
        font-size: 12px !important;
    }

    /* Truncate the long product title on mobile to keep nav usable */
    .breadcrumb-nav span {
        max-width: 140px;
    }

    /* Hide the 'Listing' link on very small phones to prioritize Category & Product */
    @media (max-width: 480px) {

        .breadcrumb-nav a:nth-of-type(2),
        .breadcrumb-nav i:nth-of-type(2) {
            display: none;
        }
    }
}

/* --- UTILITIES --- */
body.no-scroll,
html.no-scroll {
    overflow: hidden !important;
}