/* Custom CSS for B2B Marketplace */

/* Conversation Type Tags */
.conversation-type-badge {
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-weight: 600;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    text-transform: uppercase;
}

.conversation-type-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.conversation-type-badge i {
    font-size: 0.8em;
}

.badge-product {
    background: linear-gradient(45deg, #007bff, #0056b3) !important;
    border: 1px solid rgba(255,255,255,0.2);
}

.badge-rfq {
    background: linear-gradient(45deg, #ffc107, #e0a800) !important;
    border: 1px solid rgba(0,0,0,0.1);
}

.badge-inquiry {
    background: linear-gradient(45deg, #17a2b8, #138496) !important;
    border: 1px solid rgba(255,255,255,0.2);
}

.badge-urgent {
    background: linear-gradient(45deg, #dc3545, #c82333) !important;
    border: 1px solid rgba(255,255,255,0.2);
    animation: pulse-urgent 2s infinite;
}

.badge-general {
    background: linear-gradient(45deg, #6c757d, #5a6268) !important;
    border: 1px solid rgba(255,255,255,0.2);
}

@keyframes pulse-urgent {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Conversation Items */
.conversation-item {
    transition: all 0.2s ease-in-out;
    border-left: 4px solid transparent;
}

/* RFQ Card Hover Effects */
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.conversation-item:hover {
    background-color: #f8f9fa !important;
    border-left-color: #007bff;
    transform: translateX(2px);
}

.conversation-item.active {
    border-left-color: #007bff !important;
    background-color: #e3f2fd !important;
}

/* Enhanced dropdown functionality - Keep dropdown open when hovering over button or menu */
.dropdown:hover > .dropdown-menu,
.dropdown .dropdown-menu:hover {
    display: block !important;
}

/* Keep dropdown parent at high z-index when active */
.navbar .dropdown.show,
.navbar .dropdown:hover {
    z-index: 10001 !important;
    position: relative !important;
}

/* Ensure smooth transition - no gap between button and menu */
.navbar .dropdown-menu {
    margin-top: 0 !important;
}

.dropdown-menu {
    z-index: 10000 !important; /* Highest z-index to appear above navbar and hero section */
    position: absolute !important;
}

/* Vendor dashboard dropdown positioning */
.list-group-item .dropdown {
    margin-right: 15px;
}

.list-group-item .dropdown .dropdown-menu {
    z-index: 99999 !important;
    right: 0;
    left: auto;
}

/* Override transform stacking context for dropdown parent */
.list-group-item:has(.dropdown.show) {
    z-index: 999 !important;
    transform: none !important;
    position: relative !important;
}

/* Alternative for browsers that don't support :has() */
.list-group-item.dropdown-active {
    z-index: 999 !important;
    transform: none !important;
    position: relative !important;
}

.dropdown-toggle:focus {
    box-shadow: none;
}

/* Product card spacing reservation - consistent line allocations */
.product-card .product-title {
    min-height: 3rem; /* Always reserve space for 2 lines */
    line-height: 1.5rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 1rem;
}

.product-card .price-range {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.product-card .moq-info {
    min-height: 1.5rem; /* Always reserve space for MOQ line */
    line-height: 1.5rem;
    margin-bottom: 1rem;
}


.product-card .supplier-info {
    min-height: 2rem; /* Reserve space for supplier name and verified badge */
    margin-bottom: 0.5rem;
}

.product-card .supplier-details {
    min-height: 1.5rem; /* Always reserve space for "X yrs • Verified Supplier" line */
    line-height: 1.5rem;
    margin-bottom: 0.5rem;
}

.product-card .supplier-location {
    min-height: 1.5rem; /* Always reserve space for location line */
    line-height: 1.5rem;
    margin-bottom: 1rem;
}

.product-card .product-actions {
    margin-top: auto; /* Push buttons to bottom */
    padding-top: 1rem;
}



/* Ensure dropdown works on all devices */
@media (max-width: 768px) {
    .dropdown-menu {
        position: absolute;
        right: 0;
        left: auto;
        transform: none;
    }
}

/* Color overrides */
.text-primary {
    color: #1a73e8 !important;
}

.bg-primary {
    background-color: #1a73e8 !important;
}

.border-primary {
    border-color: #1a73e8 !important;
}

/* Card text colors only */
.card .card-title {
    color: #202124 !important;
    margin-bottom: 0.5rem !important;
}

.card .card-text {
    color: #5f6368 !important;
    margin-bottom: 1rem !important;
}

.card .text-muted {
    color: #70757a !important;
}


/* Button styling */
.btn-primary {
    background: #1a73e8;
    border-color: #1a73e8;
}

.btn-primary:hover {
    background: #1565c0;
    border-color: #1565c0;
}

.btn-outline-primary {
    border-color: #1a73e8;
    color: #1a73e8;
}

.btn-outline-primary:hover {
    background: #1a73e8;
    border-color: #1a73e8;
}

/* Hero section styles - continues the background from navbar */
.hero-section {
    min-height: 700px;
    margin-top: -1px; /* Remove gap between nav and hero */
    position: relative;
    overflow: hidden;
    background-color: #1a73e8; /* Fallback solid color */
    z-index: 1; /* Keep hero section below navbar dropdowns */
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 115, 232, 0.05); /* Much lighter overlay to show silhouettes clearly */
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

/* Category cards */
.category-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    background: white;
}

/* Category cards in Popular Categories section - 90% transparent */
.popular-categories-section .category-card {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Category card text in Popular Categories section - white text */
.popular-categories-section .category-card .card-title,
.popular-categories-section .category-card .card-text {
    color: white !important;
}

/* Category icons in Popular Categories section - grey */
.popular-categories-section .category-icon {
    color: #888 !important;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* Removed - was forcing white background on all sections */

.category-icon {
    font-size: 2.5rem;
}


.price-tier {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    font-size: 12px;
    line-height: 1.2;
}

.price-quantity {
    color: #666;
}

.price-value {
    color: #ff6b35;
    font-weight: 600;
}

.price-value.main-price {
    font-size: 16px;
    color: #ff6b35;
    font-weight: 700;
}

.moq-info {
    font-size: 12px;
    color: #666;
    margin-bottom: 12px;
}

.supplier-section {
    border-top: 1px solid #f0f0f0;
    padding-top: 8px;
    margin-top: 8px;
}

.supplier-info {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.supplier-logo {
    width: 20px;
    height: 20px;
    border-radius: 2px;
    background: #1890ff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    margin-right: 6px;
}

.supplier-name {
    font-size: 12px;
    color: #333;
    font-weight: 500;
    margin-right: 6px;
}

.verified-badge {
    background: #52c41a;
    color: white;
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 2px;
    font-weight: 500;
}

.supplier-details {
    font-size: 11px;
    color: #999;
    margin-bottom: 8px;
}

.supplier-location {
    display: flex;
    align-items: center;
    font-size: 11px;
    color: #999;
    margin-bottom: 12px;
}

.supplier-location i {
    margin-right: 4px;
}

.product-actions {
    display: flex;
    gap: 8px;
}

.btn-send-inquiry {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    flex: 1;
    transition: all 0.2s ease;
}

.btn-send-inquiry:hover {
    background: #e55a2b;
    color: white;
}

.btn-chat-now {
    border: 1px solid #1890ff;
    color: #1890ff;
    background: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    flex: 1;
    transition: all 0.2s ease;
}

.btn-chat-now:hover {
    background: #1890ff;
    color: white;
}

/* Feature boxes */
.feature-box {
    padding: 2rem 1rem;
    transition: all 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-5px);
}

/* Account type cards for registration */
.account-type-card {
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.account-type-card:hover {
    border-color: #007bff;
    box-shadow: 0 4px 15px rgba(0,123,255,0.2);
}

.account-type-card input[type="radio"]:checked + label .card {
    border-color: #007bff;
    background-color: #f8f9ff;
}

/* Dashboard styles */
.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15px;
    height: 100%;
    width: 2px;
    background: #dee2e6;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 3rem;
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.timeline-content {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
}

/* Product detail page */
.thumbnail {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.thumbnail:hover {
    border-color: #007bff;
}

/* Supplier info card */
.supplier-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Navigation enhancements */
.navbar-brand {
    font-size: 1.5rem;
}

.navbar .dropdown-menu {
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.dropdown-menu-large {
    min-width: 800px;
    padding: 1rem;
}

.dropdown-header {
    color: #007bff;
    font-weight: 600;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

.dropdown-item.small {
    font-size: 0.9rem;
    padding: 0.25rem 1rem;
}

.dropdown-item.small:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

/* Button enhancements */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Form enhancements */
.form-control:focus,
.form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

/* Card enhancements */
.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-radius: 10px;
}

/* Footer styles */
footer {
    background: linear-gradient(135deg, #343a40 0%, #212529 100%);
}

footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: #007bff !important;
}

/* Utility classes */
.text-primary-gradient {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-light-gradient {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
        padding: 3rem 0;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .category-icon {
        font-size: 2rem;
    }
    
    .feature-box {
        padding: 1rem;
        margin-bottom: 2rem;
    }
}

/* Animation classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Badge enhancements */
.badge {
    font-weight: 500;
    padding: 0.5em 0.8em;
}

/* Alert enhancements */
.alert {
    border: none;
    border-radius: 8px;
}

/* Progress bar enhancements */
.progress {
    height: 8px;
    border-radius: 4px;
    background-color: #f1f3f4;
}

.progress-bar {
    border-radius: 4px;
}

/* Table enhancements */
.table {
    background: white;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
}

/* Enhanced Search Bar */
#searchForm {
    position: relative;
}

#searchInput {
    border-radius: 25px 0 0 25px;
    border-right: none;
    padding-left: 20px;
    font-size: 1rem;
}

#searchForm .btn-primary {
    border-radius: 0 25px 25px 0;
    padding: 0.5rem 1.5rem;
}

/* Search Suggestions Dropdown */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    margin-top: 2px;
    max-height: 400px;
    overflow-y: auto;
}

.suggestions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px 8px;
    border-bottom: 1px solid #f0f0f0;
}

.suggestions-list {
    padding: 0;
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    transition: background-color 0.2s;
}

.suggestion-item:hover,
.suggestion-item:focus {
    background-color: #f8f9fa;
    outline: none;
}

.suggestion-item .suggestion-icon {
    width: 20px;
    margin-right: 12px;
    color: #6c757d;
    font-size: 0.9rem;
}

.suggestion-item .suggestion-image {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 12px;
    border: 1px solid #e9ecef;
}

.suggestion-item .suggestion-text {
    flex: 1;
    font-size: 0.95rem;
}

.suggestion-item .suggestion-category {
    font-size: 0.8rem;
    color: #6c757d;
    margin-left: 8px;
}

.recent-searches {
    border-bottom: 1px solid #f0f0f0;
}

.recent-searches:last-child {
    border-bottom: none;
}

/* Search highlight */
.suggestion-highlight {
    background-color: #fff3cd;
    font-weight: 500;
}

/* Loading state */
.search-loading {
    padding: 20px;
    text-align: center;
    color: #6c757d;
}

/* No results */
.search-no-results {
    padding: 20px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

/* Mobile responsive search */
@media (max-width: 768px) {
    #searchForm .mx-auto {
        max-width: none !important;
    }
    
    #searchInput {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .search-suggestions {
        position: fixed;
        top: auto;
        left: 10px;
        right: 10px;
        max-height: 60vh;
    }
}

/* Breadcrumb enhancements */
.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #6c757d;
}

/* Pagination enhancements */
.pagination .page-link {
    border: none;
    color: #007bff;
    font-weight: 500;
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

/* Membership Tiers */
.membership-diamond {
    background: linear-gradient(135deg, #e1f4fd 0%, #cef0ff 100%);
    color: #1565c0;
    border: 2px solid #42a5f5;
}

.membership-platinum {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    color: #7b1fa2;
    border: 2px solid #ab47bc;
}

.membership-gold {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    color: #f57f17;
    border: 2px solid #ffc107;
}

.membership-standard {
    background: linear-gradient(135deg, #f5f5f5 0%, #eeeeee 100%);
    color: #616161;
    border: 2px solid #9e9e9e;
}

.verified-badge {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    color: #2e7d32;
    border: 1px solid #4caf50;
    border-radius: 15px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Tier-based badges */
.verified-badge.badge-gold {
    background: linear-gradient(135deg, #fff8e1 0%, #ffe082 100%);
    color: #e65100;
    border: 1px solid #ffc107;
}

.verified-badge.badge-diamond {
    background: linear-gradient(135deg, #e3f2fd 0%, #90caf9 100%);
    color: #1565c0;
    border: 1px solid #2196f3;
}

.supplier-tier {
    border-radius: 20px;
    padding: 0.4rem 1rem;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 0.5rem;
}

.product-supplier-info {
    background: rgba(0,123,255,0.1);
    border-radius: 8px;
    padding: 0.75rem;
    margin-top: 0.5rem;
}

/* Container width adjustments - Make content area much wider */
.container {
    max-width: 1600px !important;
    padding-left: 20px;
    padding-right: 20px;
}

@media (min-width: 1200px) {
    .container {
        max-width: 1600px;
        padding-left: 30px;
        padding-right: 30px;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1800px;
        padding-left: 40px;
        padding-right: 40px;
    }
}

@media (min-width: 1600px) {
    .container {
        max-width: 90%;
        padding-left: 50px;
        padding-right: 50px;
    }
}

/* Two-level Navigation */
.navbar.border-bottom {
    box-shadow: none;
    border-bottom: none !important;
}

/* Create one continuous background image that spans from navbar to hero */
.custom-bg-primary {
    background: url('/images/business-silhouettes-dark.jpg'), linear-gradient(135deg, #1a73e8 0%, #1565c0 100%) !important;
    background-attachment: scroll !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-position: center top !important;
}

.hero-section {
    background: url('/images/business-silhouettes-dark.jpg') !important;
    background-attachment: scroll !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
}

/* Create a container that wraps both navbars to have continuous background */
.navbar-container {
    background: url('/images/business-silhouettes-dark.jpg'), linear-gradient(135deg, #1a73e8 0%, #1565c0 100%) !important;
    background-attachment: scroll !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-position: center top !important;
    position: relative;
    z-index: 1000; /* Ensure navbar stays above hero section */
}

/* Force navbar styling */
.custom-bg-primary {
    background-color: #1a73e8 !important;
    color: white !important;
}

.custom-bg-primary .navbar-brand,
.custom-bg-primary .nav-link,
.custom-bg-primary .btn-outline-light {
    color: white !important;
}

/* Top navbar - part of continuous background */
nav.navbar.custom-bg-primary {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    position: relative !important;
    z-index: 1001 !important; /* Above navbar-container */
}

/* Even more specific */
nav.navbar.navbar-expand-lg.navbar-dark.custom-bg-primary {
    background-color: transparent !important;
}

.custom-bg-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 115, 232, 0.1); /* Reduced overlay to show silhouettes better */
    z-index: 1;
}

.custom-bg-primary .container {
    position: relative;
    z-index: 2;
}

/* White categories bar cuts through the continuous background image */
.navbar-light.bg-white {
    border-top: none;
    border-bottom: none !important;
    margin-bottom: 0;
    box-shadow: none;
    background: transparent !important;
    backdrop-filter: none;
    position: relative;
    z-index: 3;
}

/* Override Bootstrap navbar-light default background - Super specific selectors */
.navbar.navbar-expand-lg.navbar-light.border-bottom {
    background-color: white !important;
    background: white !important;
    background-image: none !important;
}

nav.navbar.navbar-expand-lg.navbar-light.border-bottom {
    background-color: white !important;
    background: white !important;
    background-image: none !important;
}

/* Also override any Bootstrap defaults */
.navbar-light {
    background-color: white !important;
    background: white !important;
}

/* Alibaba-style Mega Menu */
.categories-mega-menu {
    position: fixed;
    left: 0;
    right: 0;
    top: 100px;
    width: 100vw;
    background: white;
    border: none;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    max-height: 600px;
    overflow-y: auto;
}

.categories-mega-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu-content {
    display: flex;
    min-height: 500px;
}

.mega-menu-sidebar-wrapper {
    width: 280px;
    position: relative;
    background: transparent;
    overflow: hidden;
    border: none;
    height: 500px;
}

.mega-menu-sidebar {
    width: 100%;
    background: transparent;
    border: none;
    padding: 0;
    height: 500px;
    max-height: 500px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.mega-menu-sidebar::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

.category-scroll-arrow {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    background: rgba(0, 123, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    border-radius: 50%;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
    box-shadow: none;
    border: none;
    outline: none;
}

.mega-menu-sidebar-wrapper:hover .category-scroll-arrow {
    opacity: 1;
    pointer-events: auto;
}

.category-scroll-up {
    top: 10px;
}

.category-scroll-down {
    bottom: 10px;
}

.category-scroll-arrow:hover {
    background: rgba(0, 123, 255, 1);
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.category-scroll-arrow i {
    font-size: 12px;
    color: white;
    transition: all 0.2s ease;
}

.category-scroll-arrow:hover i {
    color: white;
}

.mega-menu-main {
    flex: 1;
    padding: 2rem;
    background: white;
}

.category-main-item {
    display: block;
    padding: 1rem 1.5rem;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.2s ease;
    position: relative;
}

.category-main-item:hover,
.category-main-item.active {
    background: white;
    color: #007bff;
    border-right: 3px solid #007bff;
    transform: translateX(3px);
}

.category-main-item .category-icon {
    width: 20px;
    margin-right: 10px;
    font-size: 1.1rem;
}

.category-main-item .arrow {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
}

.subcategories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.subcategory-group h6 {
    color: #007bff;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.subcategory-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.subcategory-list li {
    margin-bottom: 0.5rem;
}

.subcategory-list a {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
    display: block;
    padding: 0.25rem 0;
}

.subcategory-list a:hover {
    color: #007bff;
    padding-left: 5px;
}

.category-stats {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
    text-center;
}

.category-stats h5 {
    color: #007bff;
    margin-bottom: 0.5rem;
}

.category-stats p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

/* Responsive mega menu */
@media (max-width: 768px) {
    .categories-mega-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        max-height: none;
        transform: translateX(-100%);
    }
    
    .categories-mega-menu.show {
        transform: translateX(0);
    }
    
    .mega-menu-content {
        flex-direction: column;
        min-height: 100vh;
    }
    
    .mega-menu-sidebar {
        width: 100%;
    }
    
    .subcategories-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Custom scrollbar - disabled to prevent unwanted slider/track elements */
/*
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
*/

/* Set Popular Categories section background to brown */
.popular-categories-section {
    background-color: #331b14 !important;
    border-radius: 30px !important;
}

/* Featured Products card consistency */
.product-card {
    height: 100% !important;
    width: 100% !important;
    min-width: 0 !important;
}

/* FEATURED PRODUCTS GRID - 5 COLUMNS - NUCLEAR OVERRIDE */
.featured-products-grid {
    display: grid !important;
    gap: 1px !important;
    width: 100% !important;
    grid-template-columns: repeat(5, 1fr) !important;
}

@media (max-width: 991px) {
    .featured-products-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 767px) {
    .featured-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 575px) {
    .featured-products-grid {
        grid-template-columns: 1fr !important;
    }
}

.featured-products-grid .featured-product-item {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    overflow: hidden !important;
}

.featured-products-grid .card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

.featured-products-grid .card-body,
.featured-products-grid .card-title,
.featured-products-grid .card-text {
    min-width: 0 !important;
    overflow-wrap: break-word !important;
}

.featured-products-grid img {
    width: 100% !important;
    max-width: 100% !important;
}

/* NUCLEAR APPROACH - Force product title truncation */
.product-card .card-body h5.card-title {
    height: 3rem !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    line-height: 1.5rem !important;
    text-overflow: ellipsis !important;
    white-space: normal !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    word-break: break-word !important;
}

/* Product cards flex layout without forced height */
.product-card {
    display: flex !important;
    flex-direction: column !important;
}

/* Override min-height for pricing tables */
.pricing-table {
    min-height: auto !important;
}

.card .card-body {
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

.card .card-footer {
    margin-top: auto !important;
}

/* Smaller height for Featured Suppliers cards - Correct selector */
.featured-suppliers .col-md-4 .card.h-100.product-card {
    min-height: 275px !important;
    max-height: 275px !important;
    height: 275px !important;
}

/* Ribbon styling for awarded RFQs */
.ribbon {
    position: absolute;
    top: 15px;
    right: -5px;
    z-index: 10;
    transform: rotate(45deg);
    transform-origin: center;
    background: linear-gradient(45deg, #28a745, #20a03a);
    color: white;
    padding: 8px 25px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ribbon-awarded {
    background: linear-gradient(45deg, #28a745, #20a03a);
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3);
}

.ribbon::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgba(40, 167, 69, 0.8);
}

.ribbon::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgba(40, 167, 69, 0.8);
}

/* Ensure card overflow is visible for ribbon */
.card {
    overflow: visible !important;
}

/* Vendor Dashboard Accordion Styling */
.vendor-dashboard .accordion-button {
    background-color: #f8f9fa;
    border: none;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-size: 0.9rem;
    font-weight: normal;
}

.vendor-dashboard .accordion-header .d-flex {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.vendor-dashboard .accordion-button-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-size: 0.9rem;
}

.vendor-dashboard .accordion-button-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Permanent shadow for accordion grid cards */
.vendor-dashboard .accordion-body .card {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    transition: transform 0.2s ease-in-out;
    cursor: pointer;
}

.vendor-dashboard .accordion-body .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
}

/* Custom 5-column grid for featured products */
@media (min-width: 992px) {
    .col-lg-5col {
        flex: 0 0 auto;
        width: 20% !important;
        max-width: 20% !important;
    }
}

/* Cache buster - force browser refresh */
/* Updated: 2025-01-21 15:30 */
