/* ========================================
   First Line Fasteners - Brand Theme
   Primary Blue: #00448B
   Accent Yellow: #FFCC01
   ======================================== */

:root {
    --flf-blue: #00448B;
    --flf-blue-dark: #003366;
    --flf-blue-light: #0066CC;
    --flf-yellow: #FFCC01;
    --flf-yellow-hover: #E6B800;
    --flf-dark: #1a1a2e;
    --flf-gray: #f8f9fa;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: #333;
}

/* === Brand Colors === */
.bg-flf-primary { background-color: var(--flf-blue) !important; }
.bg-flf-dark { background-color: var(--flf-dark) !important; }
.bg-flf-yellow { background-color: var(--flf-yellow) !important; }
.bg-flf-gray { background-color: var(--flf-gray) !important; }
.text-flf-primary { color: var(--flf-blue) !important; }
.text-flf-yellow { color: var(--flf-yellow) !important; }
.border-flf { border-color: var(--flf-blue) !important; }

/* === Buttons === */
.btn-flf-primary {
    background-color: var(--flf-blue);
    border-color: var(--flf-blue);
    color: white;
}
.btn-flf-primary:hover {
    background-color: var(--flf-blue-dark);
    border-color: var(--flf-blue-dark);
    color: white;
}

.btn-flf-yellow {
    background-color: var(--flf-yellow);
    border-color: var(--flf-yellow);
    color: #1a1a2e;
    font-weight: 600;
}
.btn-flf-yellow:hover {
    background-color: var(--flf-yellow-hover);
    border-color: var(--flf-yellow-hover);
    color: #1a1a2e;
}

.btn-outline-flf {
    border-color: var(--flf-blue);
    color: var(--flf-blue);
}
.btn-outline-flf:hover {
    background-color: var(--flf-blue);
    color: white;
}

/* === Mega Menu === */
.mega-dropdown {
    position: static !important;
}

/* Invisible hover bridge: extend the clickable/hoverable area
   of the nav link so cursor doesn't leave the hover zone */
.mega-dropdown > .nav-link {
    padding-bottom: 1rem !important;
    margin-bottom: -0.5rem;
}

.mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: white;
    border: none;
    border-top: 3px solid var(--flf-yellow);
    border-radius: 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    margin-top: 0 !important;
    padding-top: 0;
    z-index: 1050;
}

/* Short transition delay prevents flicker when cursor
   briefly passes through the gap between link and menu */
.mega-dropdown:hover > .mega-menu {
    display: block;
    animation: fadeIn 0.15s ease;
}

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

.mega-link {
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
}
.mega-link:hover {
    color: var(--flf-blue);
    transform: translateX(4px);
}

.mega-product-card {
    transition: transform 0.2s ease;
    cursor: pointer;
}
.mega-product-card:hover {
    transform: translateY(-3px);
}

/* === Navigation === */
#mainNav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* === Hero Section === */
.hero-section {
    background: linear-gradient(135deg, var(--flf-blue) 0%, var(--flf-blue-dark) 100%);
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(255,204,1,0.1) 0%, transparent 70%);
    pointer-events: none;
}

/* === Category Filter Cards === */
.filter-card {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: white;
    text-decoration: none;
    color: #333;
    display: block;
}
.filter-card:hover {
    border-color: var(--flf-blue);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 68, 139, 0.15);
    color: var(--flf-blue);
}
.filter-card .filter-icon {
    font-size: 2.5rem;
    color: var(--flf-blue);
    margin-bottom: 0.75rem;
}
.filter-card h5 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.filter-card p {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* === Product Cards === */
.product-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}
.product-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}
.product-card .product-img {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}
.product-card .product-img i {
    font-size: 4rem;
    color: #ccc;
}
.product-card .card-body {
    padding: 1rem;
}
.product-card .product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--flf-blue);
}
.product-card .product-sku {
    font-size: 0.75rem;
    color: #999;
}

/* === Breadcrumb === */
.breadcrumb-item a {
    color: var(--flf-blue);
    text-decoration: none;
}
.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* === Quote Status Badges === */
.badge-new { background-color: var(--flf-blue); }
.badge-contacted { background-color: #17a2b8; }
.badge-quoted { background-color: var(--flf-yellow); color: #333; }
.badge-accepted { background-color: #28a745; }
.badge-rejected { background-color: #dc3545; }

/* === Admin Sidebar === */
.admin-sidebar {
    background: var(--flf-dark);
    min-height: calc(100vh - 200px);
}
.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    margin-bottom: 2px;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: white;
}
.admin-sidebar .nav-link.active {
    border-left: 3px solid var(--flf-yellow);
}

/* === Dashboard Cards === */
.stat-card {
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}
.stat-card:hover {
    transform: translateY(-2px);
}
.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* === Responsive === */
@media (max-width: 991.98px) {
    .mega-menu {
        position: static !important;
        border: none;
        box-shadow: none;
        padding: 1rem !important;
        display: none;
    }
    .mega-dropdown.show > .mega-menu {
        display: block;
    }
    .hero-section { padding: 2rem 0 !important; }
}

@media (max-width: 575.98px) {
    .filter-card { padding: 1.25rem; }
    .filter-card .filter-icon { font-size: 2rem; }
}

/* === Misc === */
.section-heading {
    position: relative;
    padding-bottom: 0.75rem;
    margin-bottom: 2rem;
}
.section-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background: var(--flf-yellow);
}
.section-heading.text-center::after {
    left: 50%;
    transform: translateX(-50%);
}
