/* Frontend Styles for HSP Parts Website - Simple Clean Version */

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
}

.header-top {
    background-color: #fff;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.logo-text-section {
    margin-left: 15px;
}

.logo-text {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    line-height: 1.2;
}

.tagline {
    font-size: 14px;
    color: #666;
    margin-top: 2px;
}

.header-right {
    text-align: right;
}

/* Desktop basket styling */
.shopping-basket {
    background-color: #007bff;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.shopping-basket:hover {
    background-color: #0056b3;
    color: white;
    transform: translateY(-1px);
}

.ssl-badge {
    background-color: #28a745;
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
}

/* Mobile Header Actions */
.mobile-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
}

.mobile-basket-container {
    position: relative;
}

.mobile-basket {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
}

.mobile-basket:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
    color: white;
}

.basket-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    display: none;
}

/* Main Navigation */
.main-nav {
    background: linear-gradient(135deg, #007bff, #0056b3);
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 123, 255, 0.3);
}

.main-nav .nav-link {
    color: white !important;
    padding: 15px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    border-bottom: 3px solid transparent;
}

.main-nav .nav-link:hover,
.main-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-bottom-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

.main-nav .nav-link i {
    margin-right: 8px;
    font-size: 1.1em;
}

/* Custom Mobile Toggle */
.custom-toggler {
    border: none;
    background: transparent;
    padding: 4px 8px;
    width: 50px;
    height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    /* Enhanced visibility for mobile */
    border: 2px solid #333;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.9);
}

.custom-toggler:hover,
.custom-toggler:focus {
    background-color: rgba(255, 255, 255, 1);
    border-color: #000;
    outline: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.custom-toggler-line {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 2px 0;
    transition: all 0.3s ease;
    /* Make lines more visible */
    box-shadow: none;
    display: block;
    border-radius: 2px;
}

/* Hamburger menu animation states */
.custom-toggler[aria-expanded="true"] .custom-toggler-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
    background-color: #333;
}

.custom-toggler[aria-expanded="true"] .custom-toggler-line:nth-child(2) {
    opacity: 0;
}

.custom-toggler[aria-expanded="true"] .custom-toggler-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
    background-color: #333;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0, 123, 255, 0.8), rgba(0, 86, 179, 0.8)), url('../assets/img/hero-section.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 500px;
    display: flex;
    align-items: center;
    padding: 50px 0;
}

.search-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-section {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 30px;
}

.search-title {
    color: #007bff;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

/* Simple Form Controls */
.form-select, .form-control {
    margin-bottom: 15px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 16px;
    line-height: 1.5;
    background-color: white;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

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

.btn-search {
    background-color: #007bff;
    border: none;
    color: white;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 600;
    margin: 5px;
    transition: background-color 0.3s;
}

.btn-search:hover {
    background-color: #0056b3;
    color: white;
}

.btn-outline-search {
    background-color: transparent;
    border: 2px solid #007bff;
    color: #007bff;
    padding: 10px 25px;
    border-radius: 5px;
    font-weight: 600;
    margin: 5px;
    transition: all 0.3s;
}

.btn-outline-search:hover {
    background-color: #007bff;
    color: white;
}

/* Mobile SSL Badge */
.ssl-badge-mobile {
    background-color: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    white-space: nowrap;
}

.mobile-ssl {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Navigation Right Side */
.mobile-nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    margin-right: 15px; /* Add some margin from the right edge */
    padding-right: 0;
}

.mobile-search-btn,
.mobile-account-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #333;
    border-radius: 8px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mobile-search-btn:hover,
.mobile-search-btn:focus,
.mobile-account-btn:hover,
.mobile-account-btn:focus {
    background: #fff;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    color: #007bff;
    border-color: #007bff;
}

.ssl-badge-mobile {
    background: #28a745;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ssl-badge-mobile i {
    font-size: 1rem;
}

.ssl-text {
    font-size: 0.8rem;
    font-weight: 700;
}

/* Mobile Navigation Footer */
.mobile-nav-footer {
    background-color: rgba(0, 123, 255, 0.1);
    padding: 20px;
    margin-top: 20px;
    border-radius: 0 0 8px 8px;
}

.mobile-basket-info h6 {
    color: #007bff;
    margin-bottom: 10px;
}

.mobile-basket-info p {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Footer */
.footer-section {
    background-color: #f8f9fa;
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid #dee2e6;
}

.footer-text {
    color: #6c757d;
    margin: 0;
    font-size: 16px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .search-container {
        margin: 10px;
        padding: 20px;
    }
    
    .search-title {
        font-size: 20px;
    }
    
    .search-section {
        margin-bottom: 40px;
    }
    
    .form-select, .form-control {
        font-size: 16px;
        margin-bottom: 12px;
        padding: 10px 12px;
    }
    
    .btn-search, .btn-outline-search {
        width: 100%;
        margin-bottom: 10px;
        padding: 12px;
        font-size: 16px;
    }
    
    .header-top {
        padding: 15px 0;
    }
    
    .logo-text {
        font-size: 20px;
    }
    
    .tagline {
        font-size: 12px;
    }
    
    .navbar {
        padding: 10px 0;
    }
    
    .custom-toggler {
        margin: 5px 0;
    }
    
    /* Ensure the mobile menu toggle is always visible */
    .navbar-toggler {
        display: block !important;
        position: relative;
        z-index: 1050;
    }
    
    /* Make sure navbar collapse works properly */
    .navbar-collapse {
        background-color: rgba(0, 123, 255, 0.98);
        margin-top: 10px;
        border-radius: 8px;
        padding: 20px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
    
    /* Style mobile navigation links */
    .navbar-nav .nav-link {
        color: white !important;
        padding: 12px 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        transition: all 0.3s ease;
    }
    
    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link:focus {
        background-color: rgba(255, 255, 255, 0.1);
        border-radius: 5px;
        transform: translateX(5px);
    }
    
    /* Mobile navigation icons */
    .navbar-nav .nav-link i {
        margin-right: 12px;
        font-size: 1.2em;
        width: 20px;
        text-align: center;
    }
    
    /* Last nav item styling */
    .navbar-nav .nav-item:last-child .nav-link {
        border-bottom: none;
    }
    
    /* Mobile basket info styling */
    .mobile-nav-footer {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .mobile-nav-footer h6 {
        color: white;
        margin-bottom: 10px;
    }
    
    .mobile-nav-footer .text-muted {
        color: rgba(255, 255, 255, 0.7) !important;
    }
}

@media (max-width: 576px) {
    .header-top {
        padding: 12px 0;
    }
    
    .logo-section {
        align-items: center;
    }
    
    .logo-text-section {
        margin-left: 10px;
    }
    
    .logo-text {
        font-size: 18px;
        line-height: 1.1;
    }
    
    .tagline {
        font-size: 11px;
        margin-top: 2px;
    }
    
    .search-section {
        padding: 20px 15px;
        margin-bottom: 15px;
    }
    
    .search-title {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .form-select, .form-control {
        padding: 8px 10px;
        margin-bottom: 10px;
    }
    
    .hero-section {
        min-height: auto;
        padding: 20px 0;
    }
    
    .search-container {
        padding: 15px;
        margin: 10px 5px;
    }
    
    .btn-search, .btn-outline-search {
        width: 100%;
        margin: 5px 0;
    }
    
    .navbar-toggler {
        margin: 15px auto;
        display: block;
    }
}

/* Landscape phone orientation */
@media (max-width: 767px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: 10px 0;
        background-attachment: scroll;
        background-position: center center;
    }
    
    .search-container {
        padding: 15px;
        margin: 5px;
    }
}

/* Animation for better UX */
.search-container {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Extra fallback for mobile menu visibility */
@media (max-width: 991px) {
    .custom-toggler {
        /* Force visibility on mobile */
        display: block !important;
        background-color: #fff !important;
        border: 2px solid #333 !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .custom-toggler-line {
        /* Ensure lines are always visible */
        background-color: #333 !important;
        opacity: 1 !important;
        display: block !important;
        position: relative;
    }
    
    /* Make sure the button has proper spacing */
    .navbar-toggler {
        margin-left: auto;
        margin-right: 0;
    }
}

/* Mobile Navigation Responsive Improvements */
@media (max-width: 991px) {
    .main-nav {
        padding: 12px 0;
    }
    
    .main-nav .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-left: 20px;
        padding-right: 15px;
    }
    
    .navbar-toggler {
        margin-left: 0;
        margin-right: auto;
        order: -1; /* Ensure hamburger stays on the left */
    }
    
    .mobile-nav-right {
        flex-shrink: 0;
        order: 1; /* Ensure right content stays on the right */
        margin-left: auto;
        margin-right: 0;
    }
      /* Ensure proper spacing on smaller screens */
    @media (max-width: 480px) {
        .main-nav .container {
            padding-left: 15px;
            padding-right: 10px;
        }
        
        .mobile-nav-right {
            gap: 6px;
            margin-right: 5px;
        }
        
        .mobile-search-btn,
        .mobile-account-btn {
            width: 40px;
            height: 40px;
            font-size: 1.1rem;
        }
        
        .ssl-badge-mobile {
            padding: 6px 8px;
            font-size: 0.75rem;
        }
        
        .ssl-text {
            display: none; /* Hide text on very small screens */
        }
    }
}

/* Mobile Search Modal Styles */
.mobile-search-form .form-control:focus,
.mobile-search-form .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.quick-categories .btn {
    font-size: 0.85rem;
    padding: 6px 12px;
}

.quick-categories .btn:hover {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

/* Modal customizations for mobile */
@media (max-width: 576px) {
    .modal-fullscreen-sm-down .modal-body {
        padding: 1.5rem;
    }
    
    .mobile-search-form .form-control-lg {
        font-size: 1.1rem;
        padding: 12px 16px;
    }
}
