/* =====================================================
   Universal Components - Site Styles
   Brand Colors:
   - Red:        #E70000 (logo accent, alerts, sale badges)
   - Blue:       #004775 (primary buttons, links, navigation)
   - Dark Grey:  #3B3735 (text, dark backgrounds)
   - Grey 60%:   #878787 (secondary text, borders)
   Font: Rubik (Google Fonts)
   ===================================================== */

/* ===== CSS Custom Properties ===== */
:root {
    /* Brand Colors */
    --uc-red: #E70000;
    --uc-blue: #004775;
    --uc-dark-grey: #3B3735;
    --uc-grey: #878787;
    --uc-light-grey: #f8f9fa;
    
    /* Bootstrap Overrides */
    --bs-primary: #004775;
    --bs-primary-rgb: 0, 71, 117;
    --bs-secondary: #3B3735;
    --bs-secondary-rgb: 59, 55, 53;
    --bs-danger: #E70000;
    --bs-danger-rgb: 231, 0, 0;
    --bs-link-color: #004775;
    --bs-link-hover-color: #003356;
    
    /* Typography */
    --bs-body-font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --bs-body-font-size: 1rem;
    --bs-body-font-weight: 400;
    --bs-body-line-height: 1.6;
    --bs-body-color: #3B3735;
    
    /* Spacing */
    --header-height: 140px;
}

/* ===== Base Styles ===== */
html {
    font-size: 15px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: var(--bs-body-font-family);
    color: var(--bs-body-color);
    background-color: #f5f5f5;
    line-height: var(--bs-body-line-height);
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: 'Rubik', sans-serif;
    font-weight: 500;
    color: var(--uc-dark-grey);
}

h1, .h1 { font-weight: 700; }
h2, .h2 { font-weight: 600; }

a {
    color: var(--uc-blue);
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

a:hover {
    color: #003356;
    text-decoration: underline;
}

/* ===== Layout Containers ===== */
.content-wrapper,
.content-wrapper-wide {
    max-width: 1920px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.content-wrapper-narrow {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 576px) {
    .content-wrapper,
    .content-wrapper-wide,
    .content-wrapper-narrow {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1200px) {
    .content-wrapper,
    .content-wrapper-wide,
    .content-wrapper-narrow {
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }
}

@media (min-width: 1600px) {
    .content-wrapper,
    .content-wrapper-wide,
    .content-wrapper-narrow {
        padding-left: 3.5rem;
        padding-right: 3.5rem;
    }
}

/* ===== Top Utility Bar ===== */
.utility-bar {
    background-color: var(--uc-dark-grey);
    color: #fff;
    font-size: 0.85rem;
    padding: 0.5rem 0;
}

.utility-bar a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.utility-bar a:hover {
    color: #fff;
    text-decoration: none;
}

.utility-bar .bi {
    font-size: 1rem;
}

/* ===== Main Header ===== */
.main-header {
    background-color: #fff;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e5e5;
}

.main-header .logo img {
    max-height: 50px;
    width: auto;
}

@media (min-width: 768px) {
    .main-header .logo img {
        max-height: 60px;
    }
}

.header-search {
    max-width: 500px;
}

.header-search .form-control {
    border-radius: 4px 0 0 4px;
    border-right: none;
    border-color: #dee2e6;
}

.header-search .form-control:focus {
    border-color: var(--uc-blue);
    box-shadow: none;
}

.header-search .btn {
    border-radius: 0 4px 4px 0;
    background-color: var(--uc-blue);
    border-color: var(--uc-blue);
    color: #fff;
}

.header-search .btn:hover {
    background-color: #003356;
    border-color: #003356;
}

.header-actions .btn {
    padding: 0.5rem 1rem;
}

.header-actions .cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--uc-red);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Main Navigation ===== */
.main-nav {
    background-color: var(--uc-blue);
}

.main-nav .navbar {
    padding: 0;
}

.main-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.875rem 1.25rem !important;
    transition: background-color 0.15s ease-in-out;
}

.main-nav .nav-link:hover,
.main-nav .nav-link:focus {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.1);
}

.main-nav .nav-link.active {
    background-color: rgba(0, 0, 0, 0.15);
}

.main-nav .dropdown-toggle::after {
    margin-left: 0.5rem;
}

/* ===== Mega Menu ===== */
.mega-menu {
    position: static;
}

.mega-menu .dropdown-menu {
    width: 100%;
    left: 0;
    right: 0;
    border: none;
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 1.5rem;
    margin-top: 0;
}

/* Mega Menu Multi-Column Layout */
.mega-menu-columns {
    column-count: 6;
    column-gap: 1.5rem;
}

.mega-menu-item {
    break-inside: avoid;
    margin-bottom: 1rem;
}

.mega-menu-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--uc-grey);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--uc-red);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mega-menu-title a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mega-menu-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-links li {
    margin-bottom: 0.375rem;
}

.mega-menu-links a {
    color: var(--uc-dark-grey);
    font-size: 0.9rem;
    display: block;
    padding: 0.25rem 0;
}

.mega-menu-links a:hover {
    color: var(--uc-blue);
    text-decoration: none;
}

/* ===== Buttons ===== */
.btn {
    font-family: 'Rubik', sans-serif;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    transition: all 0.15s ease-in-out;
}

.btn-primary {
    background-color: var(--uc-blue);
    border-color: var(--uc-blue);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #003356;
    border-color: #003356;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 71, 117, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: var(--uc-dark-grey);
    border-color: var(--uc-dark-grey);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: #2a2826;
    border-color: #2a2826;
}

.btn-outline-primary {
    color: var(--uc-blue);
    border-color: var(--uc-blue);
}

.btn-outline-primary:hover {
    background-color: var(--uc-blue);
    border-color: var(--uc-blue);
}

.btn-danger {
    background-color: var(--uc-red);
    border-color: var(--uc-red);
}

.btn-danger:hover {
    background-color: #c60000;
    border-color: #c60000;
}

.btn-lg {
    padding: 0.75rem 1.75rem;
    font-size: 1.1rem;
}

/* ===== Form Controls ===== */
.form-control,
.form-select {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 0.5rem 0.875rem;
    font-size: 0.95rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--uc-blue);
    box-shadow: 0 0 0 0.2rem rgba(0, 71, 117, 0.15);
}

.form-label {
    font-weight: 500;
    color: var(--uc-dark-grey);
    margin-bottom: 0.375rem;
    font-size: 0.9rem;
}

.form-check-input:checked {
    background-color: var(--uc-blue);
    border-color: var(--uc-blue);
}

/* ===== Cards ===== */
.card {
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    background: #fff;
    transition: box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e5e5e5;
    font-weight: 600;
    padding: 0.875rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    background: #fff;
    border-top: 1px solid #e5e5e5;
    padding: 0.875rem 1.25rem;
}

/* Product Cards */
.product-card {
    height: 100%;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.product-card .card-img-top {
    height: 180px;
    object-fit: contain;
    padding: 1rem;
    background: #fff;
}

.product-card .card-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
}

.product-card .card-title a {
    color: var(--uc-dark-grey);
}

.product-card .card-title a:hover {
    color: var(--uc-blue);
    text-decoration: none;
}

/* ===== Tables ===== */
.table {
    background: #fff;
    margin-bottom: 0;
}

.table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.03em;
    color: var(--uc-grey);
    padding: 0.875rem;
}

.table tbody td {
    padding: 0.875rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 71, 117, 0.03);
}

/* ===== Badges ===== */
.badge {
    font-weight: 500;
    padding: 0.4em 0.7em;
    font-size: 0.8rem;
}

.badge-stock {
    background-color: #198754;
}

.badge-out-of-stock {
    background-color: var(--uc-grey);
}

.badge-sale {
    background-color: var(--uc-red);
}

/* ===== Alerts ===== */
.alert {
    border-radius: 6px;
    border-width: 1px;
    padding: 1rem 1.25rem;
}

.alert-danger {
    border-left: 4px solid var(--uc-red);
}

.alert-success {
    border-left: 4px solid #198754;
}

.alert-warning {
    border-left: 4px solid #ffc107;
}

.alert-info {
    border-left: 4px solid var(--uc-blue);
}

/* ===== Breadcrumbs ===== */
.breadcrumb {
    background: transparent;
    padding: 0.75rem 0;
    margin-bottom: 0;
    font-size: 0.875rem;
}

.breadcrumb-item a {
    color: var(--uc-grey);
}

.breadcrumb-item a:hover {
    color: var(--uc-blue);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--uc-dark-grey);
}

/* ===== Pagination ===== */
.pagination {
    gap: 0.25rem;
}

.page-link {
    color: var(--uc-blue);
    border-radius: 4px;
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.875rem;
}

.page-link:hover {
    background-color: var(--uc-blue);
    border-color: var(--uc-blue);
    color: #fff;
}

.page-item.active .page-link {
    background-color: var(--uc-blue);
    border-color: var(--uc-blue);
}

.page-item.disabled .page-link {
    color: var(--uc-grey);
}

/* ===== Footer ===== */
.site-footer {
    background-color: var(--uc-dark-grey);
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 0 0;
    margin-top: 3rem;
}

.site-footer h5 {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.site-footer h5::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--uc-red);
}

.site-footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.15s;
}

.site-footer a:hover {
    color: #fff;
    text-decoration: none;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer ul li {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 1rem 0;
    margin-top: 2rem;
    font-size: 0.85rem;
}

/* ===== Hero Section ===== */
.hero-section {
    background: linear-gradient(135deg, var(--uc-blue) 0%, #003356 100%);
    color: #fff;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-section h1 {
    color: #fff;
    font-size: 2.5rem;
    font-weight: 700;
}

@media (min-width: 768px) {
    .hero-section h1 {
        font-size: 3rem;
    }
}

.hero-search {
    max-width: 600px;
    margin: 0 auto;
}

.hero-search .form-control {
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 6px 0 0 6px;
}

.hero-search .btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 0 6px 6px 0;
    background-color: var(--uc-red);
    border-color: var(--uc-red);
}

.hero-search .btn:hover {
    background-color: #c60000;
    border-color: #c60000;
}

/* ===== Category Cards ===== */
.category-card {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    height: 200px;
    display: flex;
    align-items: flex-end;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.7) 100%);
}

.category-card-content {
    padding: 1.25rem;
    color: #fff;
    width: 100%;
}

.category-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.category-card-count {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* ===== USP Section ===== */
.usp-item {
    text-align: center;
    padding: 1.5rem;
}

.usp-icon {
    width: 64px;
    height: 64px;
    background-color: rgba(0, 71, 117, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--uc-blue);
    font-size: 1.5rem;
}

.usp-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.usp-text {
    font-size: 0.9rem;
    color: var(--uc-grey);
    margin-bottom: 0;
}

/* ===== Product Detail Page ===== */
.product-gallery {
    position: sticky;
    top: 1rem;
}

.product-gallery-main {
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    margin-bottom: 1rem;
}

.product-gallery-main img {
    width: 100%;
    height: 400px;
    object-fit: contain;
    padding: 1rem;
}

.product-gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.product-gallery-thumb {
    width: 80px;
    height: 80px;
    border: 2px solid #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s;
}

.product-gallery-thumb:hover,
.product-gallery-thumb.active {
    border-color: var(--uc-blue);
}

.product-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-info .product-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.product-info .product-sku {
    color: var(--uc-grey);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.product-price-box {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.product-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--uc-dark-grey);
}

.product-stock {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.product-stock.in-stock {
    color: #198754;
}

.product-stock.out-of-stock {
    color: var(--uc-grey);
}

/* ===== Account Pages ===== */
.auth-container {
    max-width: 500px;
    margin: 2rem auto;
}

.auth-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.auth-header {
    background: var(--uc-blue);
    color: #fff;
    padding: 2rem;
    text-align: center;
}

.auth-header h1 {
    color: #fff;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    opacity: 0.9;
    margin-bottom: 0;
}

.auth-body {
    padding: 2rem;
}

.auth-footer {
    padding: 1.5rem 2rem;
    background: #f8f9fa;
    text-align: center;
    border-top: 1px solid #e5e5e5;
}

/* ===== Loading States ===== */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ===== Cart Loading Overlay (preserve for cart functionality) ===== */
.cart-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 1rem;
}

.cart-loading-overlay.active {
    display: flex;
}

.cart-loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 4px solid #e9ecef;
    border-top-color: var(--uc-blue);
    border-radius: 50%;
    animation: cart-spin 0.8s linear infinite;
}

@keyframes cart-spin {
    to { transform: rotate(360deg); }
}

.cart-loading-text {
    font-size: 1.1rem;
    color: var(--uc-dark-grey);
    font-weight: 500;
}

/* ===== Utilities ===== */
.text-uc-red { color: var(--uc-red) !important; }
.text-uc-blue { color: var(--uc-blue) !important; }
.text-uc-grey { color: var(--uc-grey) !important; }
.bg-uc-red { background-color: var(--uc-red) !important; }
.bg-uc-blue { background-color: var(--uc-blue) !important; }
.bg-uc-dark-grey { background-color: var(--uc-dark-grey) !important; }

.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* ===== Focus States (Accessibility) ===== */
.btn:focus,
.btn:active:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 71, 117, 0.25);
}

a:focus {
    outline: 2px solid var(--uc-blue);
    outline-offset: 2px;
}

/* ===== Print Styles ===== */
@media print {
    .utility-bar,
    .main-header,
    .main-nav,
    .site-footer,
    .btn {
        display: none !important;
    }
    
    body {
        background: #fff;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ===== Pricing Visibility Toggle ===== */
/* Add .price-display class to any element that should be hidden when pricing is off */
.hide-pricing .price-display,
.hide-pricing .product-price,
.hide-pricing .product-price-box,
.hide-pricing [data-price],
.hide-pricing .card-footer .fw-bold.text-uc-blue,
.hide-pricing .card-footer .fw-bold.text-primary {
    display: none !important;
}

/* Show "Login for price" or alternative message when prices hidden */
.hide-pricing .price-hidden-msg {
    display: inline !important;
}

.price-hidden-msg {
    display: none;
}

/* Pricing toggle in utility bar */
.utility-bar .form-check-input {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.utility-bar .form-check-input:checked {
    background-color: var(--uc-blue);
    border-color: var(--uc-blue);
}

.utility-bar .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

/* ===== Dark Mode Styles (Bootstrap 5.3 data-bs-theme="dark") ===== */
[data-bs-theme="dark"] {
    --uc-light-grey: #1a1a1a;
    --bs-body-bg: #121212;
    --bs-body-color: #e0e0e0;
}

[data-bs-theme="dark"] body {
    background-color: #121212;
}

[data-bs-theme="dark"] .utility-bar {
    background-color: #1a1a1a;
}

[data-bs-theme="dark"] .main-header {
    background-color: #1e1e1e;
    border-bottom-color: #333;
}

[data-bs-theme="dark"] .main-nav {
    background-color: #003356;
}

[data-bs-theme="dark"] .card {
    background-color: #1e1e1e;
    border-color: #333;
}

[data-bs-theme="dark"] .card-header {
    background-color: #252525;
    border-bottom-color: #333;
}

[data-bs-theme="dark"] .card-footer {
    background-color: #1e1e1e;
    border-top-color: #333;
}

[data-bs-theme="dark"] .table {
    --bs-table-bg: #1e1e1e;
    --bs-table-border-color: #333;
}

[data-bs-theme="dark"] .table thead th {
    background-color: #252525;
    color: #aaa;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: #2a2a2a;
    border-color: var(--uc-blue);
    color: #e0e0e0;
}

[data-bs-theme="dark"] .input-group-text {
    background-color: #333;
    border-color: #444;
    color: #aaa;
}

[data-bs-theme="dark"] .breadcrumb {
    --bs-breadcrumb-divider-color: #666;
}

[data-bs-theme="dark"] .breadcrumb-item a {
    color: #aaa;
}

[data-bs-theme="dark"] .breadcrumb-item.active {
    color: #e0e0e0;
}

[data-bs-theme="dark"] .alert-info {
    background-color: rgba(0, 71, 117, 0.2);
    border-color: rgba(0, 71, 117, 0.4);
    color: #8ecae6;
}

[data-bs-theme="dark"] .alert-warning {
    background-color: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

[data-bs-theme="dark"] .alert-danger {
    background-color: rgba(231, 0, 0, 0.15);
    border-color: rgba(231, 0, 0, 0.3);
    color: #ff6b6b;
}

[data-bs-theme="dark"] .alert-success {
    background-color: rgba(25, 135, 84, 0.15);
    border-color: rgba(25, 135, 84, 0.3);
    color: #75d9a3;
}

[data-bs-theme="dark"] .bg-light {
    background-color: #252525 !important;
}

[data-bs-theme="dark"] .bg-white {
    background-color: #1e1e1e !important;
}

[data-bs-theme="dark"] .text-dark {
    color: #e0e0e0 !important;
}

[data-bs-theme="dark"] .text-muted {
    color: #888 !important;
}

[data-bs-theme="dark"] .border {
    border-color: #333 !important;
}

[data-bs-theme="dark"] .border-top,
[data-bs-theme="dark"] .border-bottom {
    border-color: #333 !important;
}

[data-bs-theme="dark"] h1, 
[data-bs-theme="dark"] h2, 
[data-bs-theme="dark"] h3, 
[data-bs-theme="dark"] h4, 
[data-bs-theme="dark"] h5, 
[data-bs-theme="dark"] h6,
[data-bs-theme="dark"] .h1, 
[data-bs-theme="dark"] .h2, 
[data-bs-theme="dark"] .h3, 
[data-bs-theme="dark"] .h4, 
[data-bs-theme="dark"] .h5, 
[data-bs-theme="dark"] .h6 {
    color: #e0e0e0;
}

[data-bs-theme="dark"] a {
    color: #5fa8d3;
}

[data-bs-theme="dark"] a:hover {
    color: #8ecae6;
}

[data-bs-theme="dark"] .product-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .product-card .card-title a {
    color: #e0e0e0;
}

[data-bs-theme="dark"] .product-card .card-title a:hover {
    color: #5fa8d3;
}

[data-bs-theme="dark"] .hero-section {
    background: linear-gradient(135deg, #002244 0%, #001122 100%);
}

[data-bs-theme="dark"] .site-footer {
    background-color: #0a0a0a;
}

[data-bs-theme="dark"] .footer-bottom {
    background-color: rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .dropdown-menu {
    background-color: #252525;
    border-color: #333;
}

[data-bs-theme="dark"] .dropdown-item {
    color: #e0e0e0;
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
    background-color: #333;
    color: #fff;
}

[data-bs-theme="dark"] .dropdown-item.active {
    background-color: var(--uc-blue);
}

[data-bs-theme="dark"] .mega-menu .dropdown-menu {
    background-color: #1e1e1e;
}

[data-bs-theme="dark"] .mega-menu-links a {
    color: #ccc;
}

[data-bs-theme="dark"] .mega-menu-links a:hover {
    color: #5fa8d3;
}

[data-bs-theme="dark"] .nav-tabs {
    border-bottom-color: #333;
}

[data-bs-theme="dark"] .nav-tabs .nav-link {
    color: #aaa;
}

[data-bs-theme="dark"] .nav-tabs .nav-link:hover {
    border-color: #444 #444 #333;
}

[data-bs-theme="dark"] .nav-tabs .nav-link.active {
    background-color: #1e1e1e;
    border-color: #333 #333 #1e1e1e;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .tab-content {
    background-color: #1e1e1e;
    border-color: #333;
}

[data-bs-theme="dark"] .accordion-button {
    background-color: #252525;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .accordion-button:not(.collapsed) {
    background-color: #333;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .accordion-body {
    background-color: #1e1e1e;
}

[data-bs-theme="dark"] .page-link {
    background-color: #1e1e1e;
    border-color: #333;
    color: #5fa8d3;
}

[data-bs-theme="dark"] .page-link:hover {
    background-color: var(--uc-blue);
    border-color: var(--uc-blue);
    color: #fff;
}

[data-bs-theme="dark"] .page-item.active .page-link {
    background-color: var(--uc-blue);
    border-color: var(--uc-blue);
}

[data-bs-theme="dark"] .page-item.disabled .page-link {
    background-color: #1a1a1a;
    border-color: #333;
    color: #555;
}

[data-bs-theme="dark"] .product-price-box {
    background-color: #252525;
}

[data-bs-theme="dark"] .product-gallery-main {
    background-color: #252525;
    border-color: #333;
}

[data-bs-theme="dark"] .product-gallery-thumb {
    border-color: #444;
}

[data-bs-theme="dark"] .product-gallery-thumb:hover,
[data-bs-theme="dark"] .product-gallery-thumb.active {
    border-color: var(--uc-blue);
}

[data-bs-theme="dark"] .cart-loading-overlay {
    background: rgba(0, 0, 0, 0.9);
}

[data-bs-theme="dark"] .cart-loading-text {
    color: #e0e0e0;
}

[data-bs-theme="dark"] .usp-icon {
    background-color: rgba(0, 71, 117, 0.3);
}

[data-bs-theme="dark"] .badge.bg-light {
    background-color: #333 !important;
    color: #e0e0e0 !important;
}

/* Auth pages dark mode */
[data-bs-theme="dark"] .auth-card {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .auth-footer {
    background-color: #252525;
    border-top-color: #333;
}

[data-bs-theme="dark"] .offcanvas {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .offcanvas-header.bg-success {
    background-color: #146c43 !important;
}

[data-bs-theme="dark"] .check-icon::before,
[data-bs-theme="dark"] .check-icon::after,
[data-bs-theme="dark"] .check-icon .icon-fix {
    background-color: #1e1e1e;
}

/* ===== Offcanvas Add to Order Panel ===== */
.offcanvas-end {
    width: 380px;
}

@media (max-width: 576px) {
    .offcanvas-end {
        width: 100%;
    }
}

/* ===== Cookie Consent Banner ===== */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--uc-dark-grey);
    color: #fff;
    padding: 1rem 0;
    z-index: 1050;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-consent-banner.hiding {
    animation: slideDown 0.3s ease-out forwards;
}

@keyframes slideDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

.cookie-consent-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cookie-consent-text {
    flex: 1;
    min-width: 250px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.cookie-consent-text a {
    color: #fff;
    text-decoration: underline;
}

.cookie-consent-text a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.cookie-consent-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.cookie-consent-actions .btn {
    white-space: nowrap;
}

@media (max-width: 576px) {
    .cookie-consent-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-consent-actions {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-consent-actions .btn {
        flex: 1;
    }
}

/* Manage Cookies link in footer */
.manage-cookies-link {
    cursor: pointer;
}

.manage-cookies-link:hover {
    text-decoration: underline !important;
}

/* Dark mode adjustments for cookie banner */
[data-bs-theme="dark"] .cookie-consent-banner {
    background-color: #1a1a1a;
    border-top: 1px solid #333;
}
/* ===== Mega Menu Nav Pills ===== */
.mega-menu-nav {
    border-bottom: 2px solid var(--uc-blue);
    gap: 0.25rem;
}

.mega-menu-nav.nav-pills .nav-link {
    color: #3B3735 !important;
    background-color: #e9ecef !important;
    border: none;
    border-radius: 4px 4px 0 0;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.mega-menu-nav.nav-pills .nav-link:hover {
    color: #004775 !important;
    background-color: #dee2e6 !important;
}

.mega-menu-nav.nav-pills .nav-link.active {
    color: #fff !important;
    background-color: #004775 !important;
}

[data-bs-theme="dark"] .mega-menu-nav.nav-pills .nav-link {
    color: #ccc !important;
    background-color: #333 !important;
}

[data-bs-theme="dark"] .mega-menu-nav.nav-pills .nav-link:hover {
    color: #fff !important;
    background-color: #444 !important;
}

[data-bs-theme="dark"] .mega-menu-nav.nav-pills .nav-link.active {
    color: #fff !important;
    background-color: #004775 !important;
}

/* ================================
   Product Breadcrumb Styles
   ================================ */
.breadcrumb-more .btn-link {
    font-size: 0.75rem;
    text-decoration: none;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.125rem 0.375rem !important;
    background-color: #f8f9fa;
    transition: all 0.2s ease;
}

.breadcrumb-more .btn-link:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    text-decoration: none;
}

.breadcrumb-more .btn-link:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 71, 117, 0.25);
    outline: none;
}

/* Category paths popover content */
.category-paths-popover {
    max-width: 350px;
    max-height: 300px;
    overflow-y: auto;
}

.category-path-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #dee2e6;
    font-size: 0.875rem;
    line-height: 1.4;
}

.category-path-item:last-child {
    border-bottom: none;
}

.category-path-item .badge {
    font-size: 0.625rem;
    font-weight: 500;
    vertical-align: middle;
}

.category-path-item a {
    color: #004775;
    word-break: break-word;
}

.category-path-item a:hover {
    text-decoration: underline !important;
}

/* Popover customization for breadcrumbs */
.popover {
    max-width: 400px;
}

.popover-header {
    background-color: #004775;
    color: #fff;
    font-weight: 500;
}

/* Dark mode adjustments for breadcrumb */
[data-bs-theme="dark"] .breadcrumb-more .btn-link {
    background-color: #343a40;
    border-color: #495057;
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .breadcrumb-more .btn-link:hover {
    background-color: #495057;
    border-color: #6c757d;
}

[data-bs-theme="dark"] .category-path-item {
    border-bottom-color: #495057;
}

[data-bs-theme="dark"] .category-path-item a {
    color: #6ea8fe;
}

[data-bs-theme="dark"] .popover {
    background-color: #212529;
    border-color: #495057;
}

[data-bs-theme="dark"] .popover-header {
    background-color: #004775;
    border-bottom-color: #495057;
}

[data-bs-theme="dark"] .popover-body {
    color: #dee2e6;
}

/* =====================================================
   Product List Page Styles
   ===================================================== */

/* ===== Filter Sidebar ===== */
.product-filters {
    background-color: #fff;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.filter-header h5 {
    color: var(--uc-dark-grey);
    font-weight: 600;
}

.filter-accordion .accordion-item {
    border: none;
    border-bottom: 1px solid #e9ecef;
}

.filter-accordion .accordion-item:last-child {
    border-bottom: none;
}

.filter-accordion .accordion-button {
    padding: 0.75rem 0;
    background: transparent;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--uc-dark-grey);
    box-shadow: none;
}

.filter-accordion .accordion-button:not(.collapsed) {
    color: var(--uc-blue);
    background: transparent;
}

.filter-accordion .accordion-button::after {
    width: 1rem;
    height: 1rem;
    background-size: 1rem;
}

.filter-accordion .accordion-body {
    padding: 0 0 0.75rem 0;
}

/* Filter Options */
.filter-multiselect .filter-option {
    padding: 0.25rem 0;
}

.filter-multiselect .form-check-label {
    font-size: 0.875rem;
    cursor: pointer;
}

.filter-multiselect .option-label {
    word-break: break-word;
}

.filter-search {
    border-radius: 4px;
}

.show-more-btn {
    font-size: 0.8rem;
    color: var(--uc-blue);
}

/* Filter Range Inputs */
.filter-range .form-control {
    text-align: center;
}

.filter-range .input-group-text {
    background-color: #f8f9fa;
    font-size: 0.875rem;
}

/* Filter Toggle */
.filter-toggle .form-check-label {
    font-size: 0.875rem;
}

/* Active Filters Summary */
.active-filters-summary .badge {
    font-weight: 400;
    padding: 0.4rem 0.6rem;
}

.active-filters-summary .btn-close {
    padding: 0.25rem;
}

/* ===== Product Card Enhancements ===== */
.product-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e9ecef;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.product-card .card-img-top-link {
    display: block;
    text-decoration: none;
}

.product-card .product-link {
    color: var(--uc-dark-grey);
    font-weight: 600;
}

.product-card .product-link:hover {
    color: var(--uc-blue);
}

/* Product Attributes */
.product-attributes {
    margin-top: 0.5rem;
}

.product-attributes-preview,
.product-attributes-full {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
}

.attr-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background-color: #f0f4f8;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    color: #495057;
    max-width: 100%;
    overflow: hidden;
}

.attr-badge .attr-name {
    font-weight: 500;
    color: #6c757d;
    white-space: nowrap;
}

.attr-badge .attr-value {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attr-expand-btn,
.attr-collapse-btn {
    font-size: 0.7rem;
    color: var(--uc-blue);
    white-space: nowrap;
}

.attr-expand-btn:hover,
.attr-collapse-btn:hover {
    text-decoration: underline;
}

/* Price Display */
.product-price {
    font-size: 1rem;
    font-weight: 600;
}

.product-price-call {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--uc-blue);
}

/* ===== Favourite Button ===== */
.favourite-toggle-btn {
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s;
}

.favourite-toggle-btn:hover {
    opacity: 1;
    transform: scale(1.15);
}

.favourite-toggle-btn .bi-heart-fill {
    color: #dc3545 !important;
}

/* ===== Results Bar ===== */
.product-list-results .card {
    border: none;
    background-color: #f8f9fa;
}

/* ===== Mobile Filter Drawer ===== */
#filterDrawer {
    width: 320px;
    max-width: 85vw;
}

#filterDrawer .offcanvas-header {
    background-color: var(--uc-blue);
    color: #fff;
}

#filterDrawer .btn-close {
    filter: brightness(0) invert(1);
}

#filterDrawer .product-filters {
    box-shadow: none;
    padding: 0;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 991.98px) {
    /* Hide desktop filters on mobile */
    .product-filters {
        background: transparent;
    }
}

@media (min-width: 992px) {
    /* Sticky filter sidebar */
    .product-filters {
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
    
    /* Custom scrollbar for filter sidebar */
    .product-filters::-webkit-scrollbar {
        width: 6px;
    }
    
    .product-filters::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
    }
    
    .product-filters::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 3px;
    }
    
    .product-filters::-webkit-scrollbar-thumb:hover {
        background: #a1a1a1;
    }
}

/* ===== Dark Mode Support ===== */
[data-bs-theme="dark"] .product-filters {
    background-color: #212529;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .filter-accordion .accordion-item {
    border-bottom-color: #495057;
}

[data-bs-theme="dark"] .filter-accordion .accordion-button {
    color: #dee2e6;
}

[data-bs-theme="dark"] .filter-accordion .accordion-button:not(.collapsed) {
    color: #6ea8fe;
}

[data-bs-theme="dark"] .product-card {
    background-color: #212529;
    border-color: #495057;
}

[data-bs-theme="dark"] .product-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .product-card .product-link {
    color: #dee2e6;
}

[data-bs-theme="dark"] .product-card .product-link:hover {
    color: #6ea8fe;
}

[data-bs-theme="dark"] .attr-badge {
    background-color: #343a40;
    color: #adb5bd;
}

[data-bs-theme="dark"] .attr-badge .attr-name {
    color: #868e96;
}

[data-bs-theme="dark"] #filterDrawer .offcanvas-body {
    background-color: #212529;
}

[data-bs-theme="dark"] .filter-range .input-group-text {
    background-color: #343a40;
    border-color: #495057;
    color: #dee2e6;
}

/* ===== Subcategory Links ===== */
.subcategory-links li a {
    color: var(--bs-body-color);
    transition: all 0.15s ease;
}

.subcategory-links li a:hover {
    color: var(--bs-primary);
    padding-left: 0.25rem;
}

.subcategory-links li a i {
    transition: transform 0.15s ease;
}

.subcategory-links li a:hover i {
    transform: translateX(2px);
}

[data-bs-theme="dark"] .subcategory-links li a {
    color: #dee2e6;
}

[data-bs-theme="dark"] .subcategory-links li a:hover {
    color: #6ea8fe;
}

/* ===== Technical Diagram Page ===== */
.technical-diagram-container {
    max-width: 1400px;
    margin: 0 auto;
}

.technical-diagram-header {
    border-bottom: 2px solid var(--bs-primary);
    padding-bottom: 1rem;
}

.technical-diagram-image-section .card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.technical-image-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.technical-diagram-img {
    max-height: 600px;
    width: auto;
    cursor: crosshair;
}

/* Parts Table Styling */
.technical-parts-table {
    font-size: 0.95rem;
}

.technical-parts-table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.025em;
    border-bottom: 2px solid var(--bs-primary);
}

.technical-parts-table tbody tr {
    transition: all 0.15s ease;
}

.technical-parts-table tbody tr:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.08);
}

.technical-parts-table tbody tr.table-success {
    animation: flash-success 0.3s ease;
}

.technical-parts-table tbody tr.table-warning {
    animation: flash-highlight 0.3s ease;
    background-color: rgba(var(--bs-warning-rgb), 0.2);
}

@keyframes flash-success {
    0% { background-color: rgba(var(--bs-success-rgb), 0.4); }
    100% { background-color: rgba(var(--bs-success-rgb), 0.15); }
}

@keyframes flash-highlight {
    0% { background-color: rgba(var(--bs-warning-rgb), 0.5); }
    100% { background-color: rgba(var(--bs-warning-rgb), 0.2); }
}

/* New group separator */
.technical-parts-table tbody tr.new-group {
    border-top: 2px solid var(--bs-border-color);
}

.technical-parts-table tbody tr.new-group:first-child {
    border-top: none;
}

/* Alternative row styling */
.technical-parts-table tbody tr.alternative-row {
    background-color: rgba(0, 0, 0, 0.02);
}

.technical-parts-table tbody tr.alternative-row:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.08);
}

/* Diagram number badge */
.diagram-number-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bs-primary);
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
}

.diagram-number-alt {
    font-size: 1.1rem;
}

/* Part thumbnail */
.part-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
    background-color: white;
    transition: transform 0.15s ease;
}

.part-thumbnail:hover {
    transform: scale(1.1);
}

/* Part details */
.part-details {
    line-height: 1.4;
}

.part-name {
    font-weight: 500;
    color: var(--bs-body-color);
    display: block;
    margin-bottom: 0.25rem;
}

.part-name:hover {
    color: var(--bs-primary);
}

.part-sku {
    font-size: 0.85rem;
}

/* Part price */
.part-price {
    font-weight: 600;
    font-size: 1rem;
    color: var(--bs-success);
}

/* Stock badge */
.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.stock-badge.in-stock {
    background-color: rgba(var(--bs-success-rgb), 0.1);
    color: var(--bs-success);
}

.stock-badge.out-of-stock {
    background-color: rgba(var(--bs-danger-rgb), 0.1);
    color: var(--bs-danger);
}

/* Quantity input */
.technical-parts-table .quantity-input {
    text-align: center;
}

/* Add to order button */
.technical-parts-table .add-to-order-btn {
    white-space: nowrap;
}

/* Anchor scroll offset for fixed header */
.part-row {
    scroll-margin-top: 100px;
}

/* Success Checkmark Animation (same as product detail) */
.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.check-icon {
    width: 80px;
    height: 80px;
    position: relative;
    border-radius: 50%;
    box-sizing: content-box;
    border: 4px solid #198754;
}

.check-icon::before {
    top: 3px;
    left: -2px;
    width: 30px;
    transform-origin: 100% 50%;
    border-radius: 100px 0 0 100px;
}

.check-icon::after {
    top: 0;
    left: 30px;
    width: 60px;
    transform-origin: 0 50%;
    border-radius: 0 100px 100px 0;
    animation: rotate-circle 4.25s ease-in;
}

.check-icon::before, .check-icon::after {
    content: '';
    height: 100px;
    position: absolute;
    background: var(--bs-body-bg, #fff);
    transform: rotate(-45deg);
}

.check-icon .icon-line {
    height: 5px;
    background-color: #198754;
    display: block;
    border-radius: 2px;
    position: absolute;
    z-index: 10;
}

.check-icon .icon-line.line-tip {
    top: 46px;
    left: 14px;
    width: 25px;
    transform: rotate(45deg);
    animation: icon-line-tip 0.75s;
}

.check-icon .icon-line.line-long {
    top: 38px;
    right: 8px;
    width: 47px;
    transform: rotate(-45deg);
    animation: icon-line-long 0.75s;
}

.check-icon .icon-circle {
    top: -4px;
    left: -4px;
    z-index: 10;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: absolute;
    box-sizing: content-box;
    border: 4px solid rgba(25, 135, 84, 0.5);
}

.check-icon .icon-fix {
    top: 8px;
    width: 5px;
    left: 26px;
    z-index: 1;
    height: 85px;
    position: absolute;
    transform: rotate(-45deg);
    background-color: var(--bs-body-bg, #fff);
}

@keyframes icon-line-tip {
    0% { width: 0; left: 1px; top: 19px; }
    54% { width: 0; left: 1px; top: 19px; }
    70% { width: 50px; left: -8px; top: 37px; }
    84% { width: 17px; left: 21px; top: 48px; }
    100% { width: 25px; left: 14px; top: 46px; }
}

@keyframes icon-line-long {
    0% { width: 0; right: 46px; top: 54px; }
    65% { width: 0; right: 46px; top: 54px; }
    84% { width: 55px; right: 0px; top: 35px; }
    100% { width: 47px; right: 8px; top: 38px; }
}

/* Dark mode adjustments for technical diagram */
[data-bs-theme="dark"] .technical-diagram-image-section .card {
    background-color: #212529;
}

[data-bs-theme="dark"] .technical-parts-table tbody tr.alternative-row {
    background-color: rgba(255, 255, 255, 0.02);
}

[data-bs-theme="dark"] .part-thumbnail {
    background-color: #343a40;
    border-color: #495057;
}

[data-bs-theme="dark"] .diagram-number-badge {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .part-price {
    color: #75b798;
}

[data-bs-theme="dark"] .stock-badge.in-stock {
    background-color: rgba(25, 135, 84, 0.2);
    color: #75b798;
}

[data-bs-theme="dark"] .stock-badge.out-of-stock {
    background-color: rgba(220, 53, 69, 0.2);
    color: #ea868f;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .technical-diagram-img {
        max-height: 400px;
    }
    
    .technical-parts-table {
        font-size: 0.85rem;
    }
    
    .diagram-number-badge {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .part-thumbnail {
        width: 50px;
        height: 50px;
    }
    
    .part-name {
        font-size: 0.9rem;
    }
    
    .technical-parts-table .quantity-input {
        width: 50px !important;
    }
}

/* =====================================================
   Predictive Search (Header Autocomplete)
   ===================================================== */

.predictive-search-wrapper {
    position: relative;
    width: 100%;
}

.predictive-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

.predictive-search-dropdown.show {
    display: block;
}

.predictive-search-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--uc-dark-grey);
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.15s ease;
}

.predictive-search-item:hover,
.predictive-search-item.active {
    background-color: #f8f9fa;
    color: var(--uc-dark-grey);
    text-decoration: none;
}

.predictive-search-item:last-of-type {
    border-bottom: none;
}

.predictive-search-image {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 4px;
    overflow: hidden;
}

.predictive-search-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.predictive-search-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.predictive-search-name {
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.3;
    margin-bottom: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.predictive-search-name mark {
    background-color: rgba(0, 71, 117, 0.15);
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

.predictive-search-sku {
    font-size: 0.8rem;
    color: var(--uc-grey);
}

.predictive-search-all {
    display: block;
    padding: 0.75rem 1rem;
    text-align: center;
    background-color: #f8f9fa;
    color: var(--uc-blue);
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    border-top: 1px solid #e9ecef;
}

.predictive-search-all:hover {
    background-color: #e9ecef;
    color: var(--uc-blue);
    text-decoration: none;
}

.predictive-search-empty {
    padding: 1rem;
    text-align: center;
    color: var(--uc-grey);
    font-size: 0.9rem;
}

/* Mobile adjustments */
@media (max-width: 767.98px) {
    .predictive-search-dropdown {
        max-height: 60vh;
    }
    
    .predictive-search-image {
        width: 40px;
        height: 40px;
    }
    
    .predictive-search-name {
        font-size: 0.85rem;
    }
}

/* Dark mode support */
[data-bs-theme="dark"] .predictive-search-dropdown {
    background-color: #212529;
    border-color: #495057;
}

[data-bs-theme="dark"] .predictive-search-item {
    color: #e0e0e0;
    border-bottom-color: #343a40;
}

[data-bs-theme="dark"] .predictive-search-item:hover,
[data-bs-theme="dark"] .predictive-search-item.active {
    background-color: #2a2f34;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .predictive-search-image {
    background-color: #343a40;
}

[data-bs-theme="dark"] .predictive-search-name mark {
    background-color: rgba(95, 168, 211, 0.25);
}

[data-bs-theme="dark"] .predictive-search-sku {
    color: #adb5bd;
}

[data-bs-theme="dark"] .predictive-search-all {
    background-color: #2a2f34;
    color: #6ea8fe;
    border-top-color: #495057;
}

[data-bs-theme="dark"] .predictive-search-all:hover {
    background-color: #343a40;
    color: #6ea8fe;
}

[data-bs-theme="dark"] .predictive-search-empty {
    color: #adb5bd;
}
