﻿/* ==========================================
   4. SEARCH STRIP
   ========================================== */
.search-strip {
    background: #f4f4f4;
    padding: 15px 0;
}

.department-btn, .vehicle-btn {
    height: 50px;
}



/* Ensure vehicle button text stays on one line and gracefully truncates */
.vehicle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* space between icon and text */
    white-space: nowrap; /* prevent wrapping to multiple lines */
    overflow: hidden; /* hide overflow when text too long */
    text-overflow: ellipsis; /* show ellipsis for overflow */
    padding: 0 12px; /* keep some horizontal padding */
    box-sizing: border-box;
    background: var(--secondary);
}

/* Slight adjustment on very small screens */
@media (max-width: 576px) {
    .vehicle-btn {
        gap: 6px;
        padding: 0 8px;
        font-size: 0.92rem;
    }
}

    .vehicle-btn:hover {
        background: #b93935;
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(229, 57, 53, 0.35);
    }

.search-box {
    display: flex;
    width: 100%;
}

    .search-box input {
        flex: 1;
        min-width: 0;
        height: 50px;
        border-radius: 0;
        margin-right: 20px;
    }

.search-btn {
    flex: 0 0 140px;
    width: 140px;
    height: 50px;
}



/* ==========================================
   5. HERO SECTION
   ========================================== */
.hero {
    min-height: 600px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slider, .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.slide {
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity .8s;
}

    .slide.active {
        opacity: 1;
    }

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 0; /* Removed fixed top padding so Flexbox handles centering */
    padding-bottom: 0;
    width: 100%;
}

.finder-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .15);
}

    .finder-card h4 {
        margin-bottom: 25px;
        font-weight: 700;
    }

    .finder-card select, .finder-card input {
        margin-bottom: 15px;
        height: 52px;
    }

        /* Red border on unselected required dropdowns */
        .finder-card select.is-invalid {
            border: 2px solid #e63946 !important;
            animation: shake 0.3s ease-in-out;
        }

/* Error message banner above the search button */
.finder-error-msg {
    display: none;
    color: #d90429;
    background-color: #fdf0f0;
    border: 1px solid #f8d7da;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 0.875rem;
    margin-bottom: 12px;
    text-align: center;
}

/* Subtle shake animation for invalid inputs */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    20%, 60% {
        transform: translateX(-5px);
    }

    40%, 80% {
        transform: translateX(5px);
    }
}

.divider {
    text-align: center;
    font-weight: 700;
    margin: 20px 0;
    color: #666;
}

.btn-search {
    width: 100%;
    height: 52px;
    background: var(--yellow);
    color: #222;
}

    .btn-search:hover {
        background: #ffca00;
        transform: translateY(-2px);
        box-shadow: 0 6px 18px rgba(255,213,0,.4);
    }

.hero-text {
    color: white;
    padding-left: 50px;
}

    .hero-text h1 {
        font-size: 3rem;
        font-weight: 900;
        line-height: 1;
        color: var(--yellow);
    }

    .hero-text span {
        display: block;
        color: #fff;
    }

    .hero-text p {
        max-width: 600px;
        font-size: 1.3rem;
        margin-top: 25px;
    }

.shop-btn {
    text-decoration: none;
    padding: 15px 40px;
    margin-top: 30px;
}

.custom-select {
    max-height:300px !important;
}

/* --- Add these hero-text-slider styles near the hero section rules --- */

/* container for multiple hero text blocks; they stack/fade in place */
.hero-text-slider {
    position: relative;
    min-height: 220px; /* adjust to fit the largest block */
}

/* each hero text is absolutely positioned and centered vertically */
.hero-text-slider .hero-text {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    text-align: left;
    padding-left: 50px; /* align with existing hero-text padding */
    z-index: 3;
}

/* visible state */
.hero-text-slider .hero-text.active {
    opacity: 1;
    transform: translateY(-50%);
}

/* responsive: reduce min-height on smaller screens and center text */
@media (max-width: 992px) {
    .hero-text-slider {
        min-height: 180px;
    }

    .hero-text-slider .hero-text {
        text-align: center;
        padding-left: 0;
        left: 0;
        right: 0;
    }
}

/* ==========================================
   6. SHOP BY CATEGORY & BRANDS
   ========================================== */
.shop-category {
    margin: 15px 0 35px;
}

.shop-header, .section-header, .section-title {
    margin-bottom: 35px;
}

    .shop-category h2, .section-header h2, .section-title h2 {
        font-size: 2rem;
        font-weight: 700;
        margin-bottom: 10px;
    }

        .shop-category h2::after, .section-header::after, .section-title::after {
            content: '';
            display: block;
            height: 3px;
            background: #f5b400;
            margin-top: 12px;
        }

        .shop-category h2::after {
            width: 260px;
        }

    .section-header::after {
        width: 230px;
    }

    .section-title::after {
        width: 270px;
    }

.category-card, .brand-card {
    background: #fff;
    border: 1px solid #eee;
    transition: all .3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.category-card {
    padding: 20px;
    cursor: pointer;
    height: 100%;
}
    .category-card:hover, .brand-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 10px 25px rgba(0,0,0,.08);
    }

    .category-card a {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none; /* Removes underline */
        color: inherit; /* Use card's text color (not default link blue) */
        width: 100%;
    }
    .category-card img {
        width: 100%;
        height: 130px;
        object-fit: contain;
        margin-bottom: 15px;
        display: inline-block; /* Works perfectly with parent text-align: center */
    }

    .category-card h6,
    .category-card a h6 {
        margin-top: 10px; /* Gap between image and text */
        font-weight: 600;
        font-size: 16px;
        text-align: center;
        color: #333333;
        text-decoration: none;
    }

.category-carousel .owl-nav {
    position: absolute;
    top: -75px;
    right: 0;
}

    .category-carousel .owl-nav button {
        width: 36px;
        height: 36px;
        border-radius: 50% !important;
        background: #fff !important;
        border: 1px solid #ddd !important;
        margin-left: 8px;
    }

        .category-carousel .owl-nav button:hover {
            background: var(--primary) !important;
            color: white !important;
        }

.popular-brands {
    background-color: #e0f1fb;
    padding: 30px 0;
}

.brand-card {
    height: 170px;
    text-decoration: none;
    color: #111;
}

    .brand-card img {
        width: 90px;
        height: 60px;
        object-fit: contain;
        margin-bottom: 12px;
    }
.visually-hidden {
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
    padding: 0;
    margin: -1px;
}

/* ==========================================
   7. SERVICE FEATURES
   ========================================== */
.service-features {
    background: #eeeeee;
    padding: 35px 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    border-right: 1px solid #ddd;
    transition: all .3s ease;
}

    .feature-item:hover {
        transform: translateY(-3px);
        background: white;
        box-shadow: 0 5px 15px rgba(0,0,0,.08);
    }

.feature-content h6 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.feature-content p {
    font-size: 14px;
    margin: 0;
}

.feature-icon {
    color: var(--secondary);
    font-size: 30px;
    transition: all .3s ease;
}

.feature-item:hover .feature-icon {
    transform: scale(1.1);
}

/* ==========================================
   8. FEATURED PRODUCTS
   ========================================== */
.featured-products {
    padding: 50px 0;
    background: #f5f5f5;
}

.product-card {
    position: relative;
    border: 1px solid #ececec;
    background: #fff;
    padding: 15px;
    height: 100%;
    transition: all .3s ease;
    display: flex;
    flex-direction: column;
}

    .product-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 12px 30px rgba(0,0,0,.08);
    }

.product-image {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

    .product-image img {
        max-width: 100%;
        max-height: 180px;
        object-fit: contain;
    }

.product-brand {
    color: #888;
    font-size: .9rem;
    margin-bottom: 8px;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    min-height: 48px;
    line-height: 1.5;
}

.product-rating {
    color: #f5b400;
    margin: 10px 0;
}

.product-price {
    margin-bottom: 18px;
}

.current-price {
    font-size: 1.5rem;
    font-weight: 700;
}

.old-price {
    color: #999;
    text-decoration: line-through;
    margin-left: 10px;
}

.add-cart-btn {
    width: 100%;
    height: 48px;
    margin-top: auto;
}

.badge-sale, .badge-new {
    position: absolute;
    top: 12px;
    font-size: .8rem;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 2;
}

.badge-sale {
    left: 12px;
    background: #ef2b10;
    color: white;
    font-weight: 700;
}

.badge-new {
    left: 70px;
    background: #f3f3f3;
    font-weight: 600;
}

.view-products-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 250px;
    height: 56px;
    border: 2px solid #222;
    text-decoration: none;
    color: #222;
    font-weight: 700;
    transition: .3s;
}

    .view-products-btn:hover {
        background: #222;
        color: white;
    }
