/* 
 * Rio Jimmy Motor Custom Stylesheet
 * Integrated with Bootstrap 5.3 & Poppins Typography
 */

/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
    --primary-red: #D91E18;
    --primary-red-hover: #b8140f;
    --dark-black: #111111;
    --dark-black-hover: #000000;
    --light-gray: #F5F5F5;
    --white: #FFFFFF;
    --text-color: #222222;
    --text-muted: #666666;
    --success-green: #28A745;
    --success-green-hover: #218838;
    --border-color: #e5e5e5;
    --transition-speed: 0.3s;
    --font-poppins: 'Poppins', sans-serif;
}

body {
    font-family: var(--font-poppins);
    font-size: 16px;
    color: var(--text-color);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography Overrides */
h1, .h1 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark-black);
}

h2, .h2 {
    font-size: 38px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--dark-black);
}

h3, .h3 {
    font-size: 30px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--dark-black);
}

h4, .h4 {
    font-size: 22px;
    font-weight: 600;
}

h5, .h5 {
    font-size: 18px;
    font-weight: 600;
}

/* Navigation and Headers */
.top-bar {
    background-color: var(--dark-black);
    color: var(--white);
    font-size: 13px;
    padding: 8px 0;
}

.top-bar a {
    color: var(--white);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.top-bar a:hover {
    color: var(--primary-red);
}

.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1020;
    background-color: var(--white);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all var(--transition-speed);
}

.navbar-brand img {
    max-height: 50px;
}

.nav-link {
    color: var(--dark-black);
    font-weight: 500;
    font-size: 15px;
    padding: 10px 15px !important;
    transition: color var(--transition-speed);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-red) !important;
}

/* Button Customizations */
.btn {
    font-size: 16px;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 6px;
    transition: all var(--transition-speed) ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
    color: var(--white);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-red-hover) !important;
    border-color: var(--primary-red-hover) !important;
    color: var(--white) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(217, 30, 24, 0.3);
}

.btn-secondary {
    background-color: var(--dark-black);
    border-color: var(--dark-black);
    color: var(--white);
}

.btn-secondary:hover, .btn-secondary:focus {
    background-color: var(--dark-black-hover) !important;
    border-color: var(--dark-black-hover) !important;
    color: var(--white) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(17, 17, 17, 0.3);
}

.btn-outline-primary {
    color: var(--primary-red);
    border-color: var(--primary-red);
}

.btn-outline-primary:hover {
    background-color: var(--primary-red);
    color: var(--white);
    transform: translateY(-2px);
}

/* Mega Menu Style */
.megamenu {
    position: static;
}

.megamenu-content {
    width: 100%;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--white);
    border: none;
    border-top: 3px solid var(--primary-red);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    display: none;
    padding: 25px;
    position: absolute;
    z-index: 1000;
}

.dropdown:hover .megamenu-content {
    display: block;
}

.megamenu-column h6 {
    font-weight: 700;
    color: var(--dark-black);
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.megamenu-column ul {
    list-style: none;
    padding-left: 0;
}

.megamenu-column ul li a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    display: block;
    padding: 6px 0;
    transition: color var(--transition-speed);
}

.megamenu-column ul li a:hover {
    color: var(--primary-red);
    padding-left: 5px;
}

/* Hero Section */
.hero-section {
    background-size: cover;
    background-position: center;
    position: relative;
    padding: 100px 0;
    z-index: 1;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(17, 17, 17, 0.9) 0%, rgba(17, 17, 17, 0.6) 100%);
    z-index: -1;
}

.hero-badge {
    background-color: var(--primary-red);
    color: var(--white);
    font-weight: 600;
    font-size: 14px;
    padding: 6px 16px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    display: inline-block;
}

/* Search Box Container */
.search-container {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    padding: 30px;
}

.search-tab-btn {
    border: none;
    background: none;
    font-weight: 600;
    padding: 10px 20px;
    border-bottom: 3px dashed transparent;
    color: var(--text-muted);
    transition: all var(--transition-speed);
}

.search-tab-btn.active {
    color: var(--primary-red);
    border-bottom-style: solid;
    border-bottom-color: var(--primary-red);
}

/* Trust Badges */
.trust-badges-bar {
    background-color: var(--light-gray);
    padding: 25px 0;
    border-bottom: 1px solid var(--border-color);
}

.trust-badge-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.trust-badge-item i {
    font-size: 28px;
    color: var(--primary-red);
}

.trust-badge-item h5 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.trust-badge-item p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

/* Cards & Grid Styling */
.category-card {
    background: var(--white);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    padding: 25px 20px;
    text-align: center;
    transition: all var(--transition-speed) cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    height: 100%;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.06);
    border-color: var(--primary-red);
}

.category-card i {
    font-size: 40px;
    color: var(--primary-red);
    margin-bottom: 15px;
    display: inline-block;
    transition: transform var(--transition-speed);
}

.category-card:hover i {
    transform: scale(1.1);
}

.category-card h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark-black);
    margin-bottom: 8px;
}

.category-card p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

/* Popular Parts Cards */
.part-card {
    background: var(--white);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all var(--transition-speed) ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.part-card:hover {
    box-shadow: 0 12px 25px rgba(0,0,0,0.08);
    transform: translateY(-5px);
}

.part-card-img {
    height: 200px;
    overflow: hidden;
    position: relative;
    background-color: var(--light-gray);
}

.part-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.part-card:hover .part-card-img img {
    transform: scale(1.05);
}

.part-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--success-green);
    color: var(--white);
    font-weight: 600;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
}

.part-card-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.part-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark-black);
    margin-bottom: 8px;
}

.part-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 15px;
    list-style: none;
    padding: 0;
}

.part-meta li {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.part-price-row {
    margin-top: auto;
    border-top: 1px solid var(--light-gray);
    padding-top: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.part-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-red);
}

/* Why Choose Us & Process */
.icon-box-style {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.icon-box-icon {
    width: 60px;
    height: 60px;
    min-width: 60px;
    background-color: rgba(217, 30, 24, 0.1);
    color: var(--primary-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.icon-box-content h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.icon-box-content p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

/* Steps Counters */
.step-item {
    text-align: center;
    position: relative;
}

.step-number {
    width: 70px;
    height: 70px;
    background-color: var(--white);
    border: 3px solid var(--primary-red);
    color: var(--dark-black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    margin: 0 auto 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    position: relative;
    z-index: 2;
}

.step-item::after {
    content: '';
    position: absolute;
    top: 35px;
    left: 50%;
    width: 100%;
    height: 2px;
    background-color: var(--border-color);
    z-index: 1;
}

.col-md-4:last-child .step-item::after {
    display: none;
}

.step-item h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

/* Statistics Bar */
.stats-section {
    background-color: var(--dark-black);
    color: var(--white);
    padding: 60px 0;
}

.stat-box {
    text-align: center;
}

.stat-number {
    font-size: 40px;
    font-weight: 800;
    color: var(--primary-red);
    margin-bottom: 5px;
}

.stat-text {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Testimonials */
.testimonial-card {
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    padding: 35px;
    border: 1px solid var(--border-color);
    height: 100%;
}

.testimonial-rating {
    color: #FFC107;
    margin-bottom: 15px;
}

.testimonial-content {
    font-style: italic;
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 20px;
}

.testimonial-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.testimonial-user-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--light-gray);
}

.testimonial-user-name {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
}

.testimonial-user-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

/* FAQ Accordion Custom */
.accordion-item {
    border: 1px solid var(--border-color);
    margin-bottom: 12px;
    border-radius: 8px !important;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.accordion-button {
    font-weight: 600;
    color: var(--dark-black);
    padding: 18px 25px;
}

.accordion-button:not(.collapsed) {
    background-color: rgba(217, 30, 24, 0.05);
    color: var(--primary-red);
    box-shadow: none;
}

.accordion-button::after {
    background-size: 1.25rem;
}

.accordion-body {
    padding: 20px 25px;
    color: var(--text-muted);
    font-size: 15px;
    background-color: var(--white);
}

/* CTA Banners */
.cta-banner {
    background: linear-gradient(135deg, var(--dark-black) 0%, #222222 100%);
    border-radius: 12px;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
}

.cta-banner::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(217, 30, 24, 0.1);
    border-radius: 50%;
}

.cta-banner-light {
    background: linear-gradient(135deg, var(--primary-red) 0%, #b8140f 100%);
    border-radius: 12px;
    padding: 50px 40px;
    color: var(--white);
}

/* Blog Cards */
.blog-card {
    background: var(--white);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    height: 100%;
    transition: all var(--transition-speed);
}

.blog-card:hover {
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    transform: translateY(-5px);
}

.blog-card-img {
    height: 220px;
    overflow: hidden;
    position: relative;
    background-color: var(--light-gray);
}

.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-date-badge {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: var(--white);
    color: var(--dark-black);
    font-weight: 700;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.blog-card-body {
    padding: 25px;
}

.blog-category {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-red);
    text-transform: uppercase;
    margin-bottom: 8px;
    display: inline-block;
}

.blog-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 12px;
}

.blog-title a {
    color: var(--dark-black);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.blog-title a:hover {
    color: var(--primary-red);
}

.blog-excerpt {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.blog-readmore {
    font-size: 14px;
    font-weight: 700;
    color: var(--dark-black);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color var(--transition-speed);
}

.blog-readmore:hover {
    color: var(--primary-red);
}

/* Footer styling */
.footer {
    background-color: var(--dark-black);
    color: rgba(255,255,255,0.7);
    padding: 80px 0 0;
    font-size: 14px;
}

.footer h5 {
    color: var(--white);
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--primary-red);
}

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

.footer-links li {
    margin-bottom: 12px;
}

.footer-links li a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all var(--transition-speed);
    display: inline-block;
}

.footer-links li a:hover {
    color: var(--white);
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.social-icon-btn {
    width: 36px;
    height: 36px;
    background-color: rgba(255,255,255,0.08);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all var(--transition-speed);
}

.social-icon-btn:hover {
    background-color: var(--primary-red);
    color: var(--white);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 25px 0;
    margin-top: 60px;
}

/* Breadcrumbs */
.breadcrumb-container {
    background-color: var(--light-gray);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb {
    margin: 0;
}

.breadcrumb-item a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
}

.breadcrumb-item a:hover {
    color: var(--primary-red);
}

.breadcrumb-item.active {
    color: var(--dark-black);
    font-weight: 500;
    font-size: 14px;
}

/* Sidebar filter widgets */
.filter-widget {
    background: var(--white);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    padding: 20px;
    margin-bottom: 20px;
}

.filter-widget-title {
    font-size: 16px;
    font-weight: 700;
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 250px;
    overflow-y: auto;
}

.filter-list li {
    margin-bottom: 10px;
}

.filter-list li:last-child {
    margin-bottom: 0;
}

/* Product details styling */
.gallery-main {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    background-color: var(--light-gray);
}

.gallery-main img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.gallery-thumb-item {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    overflow: hidden;
    background-color: var(--light-gray);
    height: 80px;
}

.gallery-thumb-item.active {
    border-color: var(--primary-red);
    border-width: 2px;
}

.gallery-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-info-block {
    background-color: var(--light-gray);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.detail-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.detail-info-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.detail-info-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-info-list li span:first-child {
    font-weight: 600;
    color: var(--text-muted);
}

.detail-info-list li span:last-child {
    font-weight: 700;
    color: var(--dark-black);
}

/* Blog details specific styling */
.toc-box {
    background-color: var(--light-gray);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    border-left: 4px solid var(--primary-red);
}

.toc-box h5 {
    font-weight: 700;
    margin-bottom: 15px;
}

.toc-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 8px;
}

.toc-list li a {
    color: var(--text-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.toc-list li a:hover {
    color: var(--primary-red);
}

.author-box {
    background-color: var(--light-gray);
    border-radius: 10px;
    padding: 30px;
    margin: 40px 0;
    display: flex;
    gap: 20px;
    align-items: center;
}

.author-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.article-content {
    font-size: 17px;
    line-height: 1.8;
}

.article-content p {
    margin-bottom: 25px;
}

.article-content blockquote {
    font-size: 20px;
    font-style: italic;
    border-left: 4px solid var(--primary-red);
    padding-left: 20px;
    margin: 30px 0;
    color: var(--dark-black);
}

/* Mobile responsive fixes */
@media (max-width: 991.98px) {
    h1, .h1 { font-size: 38px; }
    h2, .h2 { font-size: 30px; }
    h3, .h3 { font-size: 24px; }
    
    .nav-link {
        padding: 8px 0 !important;
    }
    
    .megamenu-content {
        position: static;
        box-shadow: none;
        padding: 10px 0;
    }
    
    .dropdown:hover .megamenu-content {
        display: none; /* Fallback on mobile: bootstrap collapse handles it */
    }
    
    .megamenu-content.show {
        display: block;
    }
    
    .step-item::after {
        display: none;
    }
    
    .step-item {
        margin-bottom: 30px;
    }
    
    .cta-banner, .cta-banner-light {
        padding: 40px 20px;
    }
    
    .author-box {
        flex-direction: column;
        text-align: center;
    }
}

/* Mobile Sticky Bottom Action Bar */
.mobile-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1025; /* overlay on top of footer but below bootstrap modals */
    box-shadow: 0 -4px 15px rgba(0,0,0,0.12);
    background-color: var(--white);
    border-top: 1px solid var(--border-color);
}

.mobile-sticky-bar .btn {
    border: none;
    font-weight: 700;
}

@media (max-width: 767.98px) {
    body {
        padding-bottom: 58px; /* space offset for mobile sticky action bar */
    }
}

