/* ===================================
   MSB Auto Parts - Theme Styles
   Industrial Theme for Auto Parts Store
   =================================== */

/* CSS Variables - Brand Colors */
:root {
    --bs-primary: #D42E12;
    --primary-color: #D42E12;      /* MSB Red - from logo */
    --bs-secondary: #00080F;
    --secondary-color: #00080F;    /* MSB Dark - from logo */
    --accent-color: #D42E12;       /* MSB Red for CTAs */
    --dark-gray: #34495e;
    --medium-gray: #7f8c8d;
    --light-gray: #ecf0f1;
    --white: #FEFEFE;              /* MSB White - from logo */
    --black: #00080F;              /* MSB Dark - from logo */
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #D42E12;             /* MSB Red for danger states */
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base Typography - Extra clear and readable */
body {
    font-family: 'Arial', 'Helvetica', sans-serif;
    line-height: 1.6;
    color: #333;
}

body.industrial-theme {
    font-family: 'Arial', 'Helvetica', sans-serif;
    color: var(--black);
    background-color: var(--white);
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Typography */
.industrial-theme h1,
.industrial-theme h2,
.industrial-theme h3,
.industrial-theme h4,
.industrial-theme h5,
.industrial-theme h6 {
    font-weight: 700;
    color: var(--secondary-color);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top Info Bar */
.top-info-bar {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.top-info-bar .info-item {
    margin-right: 1.5rem;
}

.top-info-bar i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

/* Main Header */
.main-header {
    background-color: var(--secondary-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header {
    background-color: #2c3e5014;
    color: white;
}

/* Navigation - Simple and Clear */
.navbar {
    display: flex;
    align-items: center;
    padding: 0;
}

/* .industrial-theme .navbar {
    padding: 1rem 0;
} */

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.industrial-theme .navbar-brand.logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary-color);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.industrial-theme .navbar-brand.logo:hover,
.industrial-theme .navbar-brand.logo:focus {
    color: var(--secondary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.nav-menu a:hover {
    opacity: 0.8;
}

.industrial-theme .nav-link {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white) !important;
    text-transform: uppercase;
    padding: 0.5rem 1rem !important;
    border-radius: 5px;
    transition: all 0.3s ease;
    margin: 0 0.25rem;
}

.industrial-theme .nav-link:hover,
.industrial-theme .nav-link:focus {
    background-color: var(--primary-color) !important;
    color: var(--white) !important;
}


/* Dropdown Menus */
.industrial-theme .dropdown-menu {
    border: 2px solid var(--secondary-color);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    background-color: var(--white);
}

.industrial-theme .dropdown-item {
    color: var(--secondary-color);
    padding: 0.75rem 1.5rem;
    font-weight: 500;
}

.industrial-theme .dropdown-item:hover,
.industrial-theme .dropdown-item:focus {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Main content */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Search Bar - Prominent and Easy to Use */
.search-section {
    background-color: var(--light-gray);
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.search-section-full {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 3rem 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-box {
    max-width: 800px;
    margin: 0 auto;
}

.search-box-full {
    max-width: 100%;
    width: 100%;
}

.search-box input,
.search-box-full input {
    font-size: 1.3rem;
    padding: 1.2rem 1.5rem;
    border: 3px solid var(--primary-color);
    border-radius: 15px;
    font-weight: 500;
}

.search-box button,
.search-box-full button {
    font-size: 1.3rem;
    padding: 1.2rem 3rem;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 15px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    min-width: 150px;
}

/* Search Form Styles */
.ss-search-form__input.input-group {
    overflow: hidden;
}

.ss-search-form__input .input-group-text {
    background-color: #f8f9fa;
    border-right: none;
}

.ss-search-form__input .form-control {
    border-radius: 0 0 0 0;
    border-left: none;
}

.ss-search-form__input .form-control:focus {
    box-shadow: none;
    border-color: #ced4da;
}

.ss-search-form__results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 1rem 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
    margin-top: -1px;
    isolation: isolate;
}

.ss-search-form__results--visible {
    display: block !important;
}

.ss-search-form__results .ss-search-result {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.ss-search-form__results .ss-search-result:hover {
    background-color: #f8f9fa;
}

.ss-search-form__results .ss-search-result:last-child {
    border-bottom: none;
}

.ss-search-form__results .ss-search-result h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.ss-search-form__results .ss-search-result p {
    margin: 0;
    font-size: 14px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ss-search-form__results .ss-show-all-results {
    padding: 12px 16px;
    text-align: center;
    background-color: #f8f9fa;
    border-radius: 0 0 1rem 1rem;
}

.ss-search-form__results .ss-show-all-results a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.ss-search-form__results .ss-show-all-results a:hover {
    text-decoration: underline;
}

/* Buttons - Large and Clear */
.industrial-theme .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.industrial-theme .btn-primary:hover,
.industrial-theme .btn-primary:focus {
    background-color: #b8260f;
    border-color: #b8260f;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.industrial-theme .btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--white);
    font-weight: 700;
    text-transform: uppercase;
}

.industrial-theme .btn-secondary:hover,
.industrial-theme .btn-secondary:focus {
    background-color: #1a252f;
    border-color: #1a252f;
    color: var(--white);
}

/* Cards - Simple and Clear */
.card {
    border: 2px solid var(--light-gray);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary-color);
}

/* Product Cards */
.product-card {
    text-align: center;
    padding: 1.5rem;
}

.product-card img {
    max-width: 100%;
    height: 200px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-color);
    margin: 1rem 0;
}

/* Categories - Visual and Easy to Navigate */
.category-box {
    background-color: var(--light-gray);
    border: 3px solid transparent;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-box:hover {
    border-color: var(--primary-color);
    background-color: var(--white);
}

.category-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.category-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary-color);
}

/* Call to Action Sections */
.cta-section {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
}

.cta-section h2 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.cta-section .btn {
    background-color: var(--white);
    color: var(--primary-color);
    font-size: 1.3rem;
    padding: 1rem 3rem;
}

/* Help Section - Guide Users */
.help-box {
    background-color: #e8f6f3;
    border-left: 5px solid var(--success);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 5px;
}

.help-box h4 {
    color: var(--success);
    margin-bottom: 0.5rem;
}

.help-box p {
    margin-bottom: 0;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background-color: #34495e;
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

.main-footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--white);
    font-size: 1.1rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* Bootstrap Extensions */
.min-vh-50 {
    min-height: 50vh;
}

/* Utility Classes */
.text-industrial {
    font-family: 'Arial Black', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.bg-industrial {
    background-color: var(--secondary-color);
    color: var(--white);
}

.highlight-box {
    background-color: #fff3cd;
    border: 2px solid var(--warning);
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1rem 0;
}

/* ===================================
   VEHICLE SEARCH COMPONENTS - SHARED STYLES
   =================================== */

/* Vehicle Search Modal */
.vehicle-search-modal .modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    border-bottom: none;
}

.vehicle-search-modal .modal-title {
    font-weight: 700;
    display: flex;
    align-items: center;
}

.vehicle-search-modal .modal-title::before {
    content: '\f1b9';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 0.75rem;
    font-size: 1.2em;
}

.vehicle-search-modal .btn-close {
    filter: invert(1);
}

.vehicle-search-modal .modal-body {
    background-color: #f8f9fa;
    padding: 2rem;
}

.vehicle-search-modal .modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* Vehicle Search Form - Universal Styles */
.vehicle-search-wrapper .vehicle-search-v2 form.row {
    justify-content: center;
    align-items: end;
    gap: 1rem;
}

.vehicle-search-wrapper .vehicle-search-v2 form .col-auto {
    flex: 0 0 auto;
    min-width: 140px;
}

/* Form Controls - Enhanced Bootstrap */
.vehicle-search-wrapper .form-select,
.vehicle-search-wrapper .form-control {
    font-size: 1rem !important;
    padding: 0.75rem 1rem !important;
    border: 2px solid #dee2e6 !important;
    border-radius: 8px !important;
    min-width: 140px !important;
    width: 100% !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.3s ease;
}

.vehicle-search-wrapper .form-select:focus,
.vehicle-search-wrapper .form-control:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.25rem rgba(212, 46, 18, 0.25) !important;
    transform: translateY(-1px);
}

.vehicle-search-wrapper .form-select:hover:not(:focus),
.vehicle-search-wrapper .form-control:hover:not(:focus) {
    border-color: var(--medium-gray) !important;
}

/* Override Bootstrap small classes */
.vehicle-search-wrapper .form-select-sm {
    font-size: 1rem !important;
    padding: 0.75rem 1rem !important;
    min-height: auto !important;
}

/* Button Enhancements */
.vehicle-search-wrapper .btn {
    padding: 0.75rem 1.5rem !important;
    font-size: 1rem !important;
    white-space: nowrap;
    font-weight: 700;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.vehicle-search-wrapper .btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #b8260f 100%) !important;
    border-color: var(--primary-color) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vehicle-search-wrapper .btn-primary:hover {
    background: linear-gradient(135deg, #b8260f 0%, var(--primary-color) 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 46, 18, 0.3);
}

.vehicle-search-wrapper .btn-outline-secondary {
    border-color: var(--secondary-color) !important;
    color: var(--secondary-color) !important;
    background: transparent !important;
}

.vehicle-search-wrapper .btn-outline-secondary:hover {
    background-color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    color: var(--white) !important;
    transform: translateY(-2px);
}

/* Form Labels - Professional styling */
.vehicle-search-wrapper .form-label {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Search History Enhanced */
.vehicle-search-wrapper .search-history {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.vehicle-search-wrapper .search-history h5 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-weight: 700;
    text-align: center;
}

.vehicle-search-wrapper .btn-search-history {
    background: linear-gradient(135deg, var(--primary-color) 0%, #b8260f 100%) !important;
    border: 2px solid var(--primary-color) !important;
    color: white !important;
    margin: 0.25rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: normal;
}

.vehicle-search-wrapper .btn-search-history:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #1a1a1a 100%) !important;
    border-color: var(--secondary-color) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 8, 15, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .vehicle-search-wrapper .vehicle-search-v2 form.row {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .vehicle-search-wrapper .vehicle-search-v2 form .col-auto {
        width: 100%;
        margin-bottom: 0;
    }

    .vehicle-search-wrapper .form-select,
    .vehicle-search-wrapper .form-control,
    .vehicle-search-wrapper .btn {
        width: 100% !important;
        min-width: unset !important;
    }
    
    .vehicle-search-modal .modal-body {
        padding: 1rem;
    }
    
    .vehicle-search-wrapper .search-history {
        padding: 1rem;
        margin-top: 1rem;
    }
}

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

.spinner {
    border: 4px solid var(--light-gray);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 991px) {
    .ss-search-form__results {
        position: fixed;
        top: auto;
        left: 15px;
        right: 15px;
        max-width: calc(100vw - 30px);
    }
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }

    .nav-menu {
        flex-direction: column;
        align-items: center;
    }

    .nav-menu li {
        margin: 0.5rem 0;
    }

    .top-info-bar {
        text-align: center;
    }

    .top-info-bar .col-md-6:last-child {
        text-align: center !important;
        margin-top: 0.5rem;
    }
}
/* ========================================
   Featured Products Box Styles
======================================== */

/* Product Image Container */
.product-image-container {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.product-image {
    max-height: 150px;
    max-width: 100%;
    object-fit: contain;
}

.product-image-placeholder {
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    border-radius: 0.375rem;
}

/* Product Card Layout - Fixed Heights */
.featured-products .card-title {
    min-height: 3rem;
    max-height: 3rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    margin-bottom: 0.5rem;
}

/* Product Description Container */
.product-description-container {
    min-height: 4.5rem;
    max-height: 4.5rem;
    overflow: hidden;
    margin-bottom: 1rem;
}

.product-description-container .card-text {
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Product Price Container */
.featured-products .product-price {
    min-height: 3.5rem;
}

/* Stock Status */
.featured-products .stock-status {
    min-height: 2rem;
}

/* Product Card Enhancements */
.featured-products .product-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.featured-products .product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* ========================================
   OctoberCMS Validation Error Styles
======================================== */

/* Make validation errors visible when OctoberCMS adds .oc-visible class */
[data-validate-for].oc-visible {
    display: block !important;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

/* Checkout specific - more visible error messages */
.mall-quick-checkout [data-validate-for].oc-visible {
    background-color: #fff3f3;
    padding: 0.5rem;
    border-radius: 4px;
    border-left: 3px solid #dc3545;
}