/*
* ===================================================
* Custom CSS for Roko Parts LLC
* ===================================================
*/

/* Google Font Import */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700&family=Roboto:wght@400;500&display=swap');

/* CSS Variables for easy theme management */
:root {
    --primary-color: #ffc107;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;

    /* --- Bootstrap Color Override --- */
    --bs-primary: #888888;
    --bs-primary-rgb: 136, 136, 136;
}

/* --- Global & Typography Styles --- */
html {
    /* Fix for fixed header overlapping section titles on anchor link jumps */
    scroll-padding-top: 70px;
}

body {
    font-family: var(--font-body);
    padding-top: 70px;
    /* Prevents initial content from being hidden by the fixed header */
    scroll-behavior: smooth;
    background-color: #ffffff;
    /* General background color for the site */
}

h1,
h2,
h3,
h4,
h5,
h6,
.fw-bold {
    font-family: var(--font-heading);
    font-weight: 700;
}

p {
    line-height: 1.8;
    color: #555;
}

/* --- Layout & Sections --- */
section {
    /* Increased vertical padding for a very spacious layout */
    padding: 180px 0;
}

/* Adds more space below section titles */
section h2.fw-bold {
    margin-bottom: 4rem !important;
}

/* Header */
.navbar .logo {
    height: 40px;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Hero Section */
#hero {
    background-color: var(--light-color);
    /* Light grey background for the new hero */
    padding: 100px 0;
    /* Adjusted padding for this specific section */
    height: auto;
    display: flex;
    align-items: center;
    min-height: calc(100vh - 70px);
    /* Ensures it takes up vertical space */
}

#hero h1 {
    color: var(--dark-color);
}

#hero .lead {
    color: #555;
}

/* Why Choose Us Section */
#why-us ul li span {
    font-size: 1.1rem;
}

/* Services Section */
#services {
    background: linear-gradient(rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.95)), url('https://images.unsplash.com/photo-1581092921441-982af1d1b4b1?q=80&w=2070&auto=format&fit=crop') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
}

/* Brands Section */
.brand-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.brand-logos img {
    height: 50px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.brand-logos img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* Contact Section */
.contact-info-details ul li {
    font-size: 1.1rem;
}

.map-container iframe {
    border-radius: 8px;
}

/* Footer */
footer {
    padding: 20px 0;
}


/* --- Components --- */

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--dark-color);
    font-weight: 700;
    padding: 12px 30px;
    transition: all 0.3s;
}

.btn-primary:hover {
    background-color: #e6ac00;
    border-color: #e6ac00;
    color: var(--dark-color);
    transform: translateY(-2px);
}

/* Category & Service Cards */
.category-card,
.service-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease-in-out;
    height: 100%;
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.category-card .card-body,
.service-card .card-body {
    padding: 2.5rem 1.5rem;
}


.category-card:hover,
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.category-card i,
.service-card i {
    color: var(--primary-color);
}

/* FAQ Accordion */
.accordion-button:not(.collapsed) {
    color: var(--dark-color);
    background-color: rgba(255, 193, 7, 0.1);
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .125);
}

.accordion-button:focus {
    box-shadow: 0 0 0 .25rem rgba(255, 193, 7, 0.4);
}

/* --- Infinite Product Scroller --- */
.product-scroller {
    max-width: 100%;
    overflow: hidden;
    -webkit-mask: linear-gradient(90deg, transparent, white 20%, white 80%, transparent);
    mask: linear-gradient(90deg, transparent, white 20%, white 80%, transparent);
}

.product-scroller .product-list {
    display: flex;
    flex-wrap: nowrap;
    width: max-content;
    /* Important for the animation */
}

.product-scroller .product-list:hover {
    animation-play-state: paused;
}

/* The animation is now tied to this attribute, which JS adds */
.product-scroller[data-animated="true"] .product-list {
    animation: scroll 40s linear infinite;
}

.product-scroller .product-list .product-item {
    flex: 0 0 auto;
    width: 300px;
    /* Width of each item */
    margin: 0 1rem;
}

.product-scroller .product-list img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #eee;
}

@keyframes scroll {
    to {
        transform: translate(-50%);
        /* Animate to half the total width */
    }
}

/*
* ===============================================
* PRELOADER STYLES
* ===============================================
*/
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background-color: #ffffff; /* Un fondo blanco sólido */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.75s ease; /* Transición para desaparecer suavemente */
}

#preloader.preloader-hidden {
    opacity: 0;
    pointer-events: none; /* Permite hacer clic a través de él cuando está oculto */
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3; /* Gris claro */
    border-top: 5px solid var(--primary-color); /* Color de acento amarillo */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}