/*
 Theme Name:   XStore Child
 Theme URI:    http://8theme.com/
 Description:  XStore Child Theme
 Author:       8theme
 Author URI:   http://8theme.com
 Template:     xstore
 Version:      0.0.1
 Text Domain:  xstore-child
*/


/* ==========================================================================
   CUSTOM HOME AUTORECAMBIOS GL - V2 (Premium UI)
   ========================================================================== */

/* Variables Corporativas */
:root {
    --color-brand-red: #e32b2b;
    --color-brand-dark: #232f3e; /* Azul noche / oscuro */
    --color-text: #4a4a4a;
    --color-bg-light: #f7f9fa;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.home-custom-wrapper {
    background-color: var(--color-bg-light);
    font-family: inherit; /* Hereda la tipografía de XStore */
}

.home-custom-wrapper .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- Hero Section --- */
.home-hero {
    background-color: var(--color-brand-dark);
    /* Puedes cambiar este gradiente por una imagen de fondo en el futuro */
    background-image: linear-gradient(135deg, #161e27 0%, #2a3a4c 100%);
    color: #ffffff;
    padding: 60px 0 50px;
    text-align: center;
}

.hero-title {
    font-size: 36px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 18px;
    color: #b0c4de;
    margin-bottom: 30px;
}

.hero-search-box {
    max-width: 800px;
    margin: 0 auto 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px; /* Espacio para respirar alrededor del buscador nativo */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* Profundidad para resaltarlo */
}

.hero-support {
    font-size: 15px;
    color: #e0e0e0;
}

.hero-support strong {
    color: var(--color-brand-red);
    font-size: 18px;
}

/* --- Trust Bar --- */
.trust-bar {
    background-color: var(--color-brand-red);
    color: #ffffff;
    padding: 15px 0;
}

.trust-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.trust-icon {
    font-size: 20px;
}

/* --- Brands Grid (Cards UI) --- */
.home-brands {
    padding: 60px 0;
    background-color: var(--color-bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-brand-dark);
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--color-brand-red);
    margin: 10px auto 0;
}

.section-desc {
    color: var(--color-text);
    font-size: 16px;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 20px;
}

.brand-card {
    background: #ffffff;
    border: 1px solid #eaeaec;
    border-radius: 8px;
    padding: 25px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--color-brand-dark);
    transition: var(--transition);
}

.brand-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: var(--color-brand-red);
    color: var(--color-brand-red);
}

.brand-icon {
    /* Aquí aplico el nombre exacto de tu fuente */
    font-family: 'car-makes-icons', sans-serif !important; 
    font-size: 50px;
    line-height: 1;
    margin-bottom: 15px;
    font-style: normal;
    font-weight: normal;
    -webkit-font-smoothing: antialiased;
    color: inherit;
    transition: var(--transition);
}

.brand-name {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .trust-grid {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hero-title { font-size: 28px; }
    .brands-grid { grid-template-columns: repeat(4, 1fr); gap: 15px; }
    .brand-icon { font-size: 40px; }
    .trust-item { width: 45%; justify-content: center; }
}

@media (max-width: 480px) {
    .brands-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .brand-card { padding: 15px 5px; }
    .trust-item { width: 100%; justify-content: flex-start; }
}

/* ==========================================================================
   YMM SEARCH - OVERRIDES (Premium UI)
   ========================================================================== */
   
/* Caja contenedora */
.home-hero .hero-search-box {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Distribución de las 3 columnas principales */
.home-hero .ymm-selector.ymm-horizontal .level {
    width: 32%;
    margin-right: 2%;
    float: left;
}
.home-hero .ymm-selector.ymm-horizontal .level:nth-child(3) {
    margin-right: 0;
}

/* Estilo de los Selectores (Desplegables) */
.home-hero .ymm-selector select.ymm-select,
.home-hero .ymm-selector select.ymm-category-select {
    width: 100%;
    height: 50px;
    border-radius: 6px;
    border: 1px solid #eaeaec;
    padding: 0 15px;
    font-size: 15px;
    color: var(--color-brand-dark);
    background-color: #ffffff;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none; /* Quitamos la flecha del sistema operativo */
    /* Inyectamos una flecha SVG moderna y limpia */
    background-image: url("data:image/svgxml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23232f3e%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    background-size: 12px auto;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 0;
}

.home-hero .ymm-selector select:focus {
    outline: none;
    border-color: var(--color-brand-red);
    box-shadow: 0 0 0 3px rgba(227, 43, 43, 0.2);
}

/* Estilo para los selectores inactivos (antes de elegir marca) */
.home-hero .ymm-selector select.disabled {
    background-color: #e9ecef !important;
    border-color: #ced4da !important;
    color: #6c757d !important;
    cursor: not-allowed;
}

/* Ajustes para la categoría y el botón final */
.home-hero .ymm-extra {
    clear: both;
    padding-top: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.home-hero .ymm-category-container {
    flex: 1;
}

.home-hero .ymm-category-container .level {
    width: 100%; /* Para que ocupe todo su espacio */
}

/* Ocultamos forzosamente la búsqueda de texto por si falla la config del backend */
.home-hero .ymm-search {
    display: none !important;
}

/* Estilo Botón Principal (Color Marca) */
.home-hero button.ymm-submit-any-selection,
.home-hero button.button {
    height: 50px;
    padding: 0 40px;
    background-color: var(--color-brand-red) !important;
    color: #ffffff !important;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    display: block !important; /* Forzar que se vea */
}

.home-hero button.ymm-submit-any-selection:hover,
.home-hero button.button:hover {
    background-color: #c02020 !important;
    transform: translateY(-2px);
}

/* Responsive Formulario YMM */
@media (max-width: 768px) {
    .home-hero .ymm-selector.ymm-horizontal .level {
        width: 100%;
        float: none;
        margin-right: 0;
        margin-bottom: 15px;
    }
    .home-hero .ymm-extra {
        flex-direction: column;
    }
    .home-hero button.ymm-submit-any-selection,
    .home-hero button.button {
        width: 100%;
    }
}
/* ==========================================================================
   FASE 2: CATEGORÍAS, CERO ERRORES, REVIEWS Y B2B
   ========================================================================== */

/* --- Top Categories --- */
.top-categories, .reviews-section {
    padding: 60px 0;
    background-color: #ffffff;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.cat-card {
    background: var(--color-bg-light);
    border: 1px solid #eaeaec;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    text-decoration: none;
    color: var(--color-brand-dark);
    transition: var(--transition);
}

.cat-card:hover {
    border-color: var(--color-brand-red);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.cat-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.cat-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--color-brand-dark);
}

.cat-card p {
    font-size: 14px;
    color: var(--color-text);
    margin: 0;
}

/* --- Split Layout (Cero Errores) --- */
.cero-errores-section {
    padding: 80px 0;
    background-color: var(--color-bg-light);
}

.split-layout {
    display: flex;
    align-items: center;
    gap: 50px;
}

.split-image {
    flex: 1;
}

.split-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.split-content {
    flex: 1;
}

.split-content .badge {
    display: inline-block;
    background: rgba(227, 43, 43, 0.1);
    color: var(--color-brand-red);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.split-content h2 {
    font-size: 32px;
    color: var(--color-brand-dark);
    margin-bottom: 20px;
    line-height: 1.2;
}

.benefit-list {
    list-style: none;
    padding: 0;
    margin: 25px 0;
}

.benefit-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    color: var(--color-text);
    line-height: 1.5;
}

.benefit-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--color-brand-red);
    font-weight: bold;
    font-size: 18px;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    background-color: #25D366; /* Color oficial WhatsApp */
    color: #fff !important;
    padding: 15px 30px;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    transition: var(--transition);
}

.btn-whatsapp:hover {
    background-color: #1ebe57;
    transform: translateY(-2px);
}

/* --- Reviews Section --- */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.review-card {
    background: #fff;
    border: 1px solid #eaeaec;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.stars {
    font-size: 20px;
    margin-bottom: 15px;
}

.review-card blockquote {
    font-size: 15px;
    font-style: italic;
    color: var(--color-text);
    margin: 0 0 20px 0;
    line-height: 1.6;
}

.review-card cite {
    font-weight: 700;
    color: var(--color-brand-dark);
    font-style: normal;
}

/* --- B2B CTA --- */
.b2b-cta {
    background-color: var(--color-brand-red);
    padding: 60px 0;
    color: #fff;
}

.cta-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.cta-text flex: 1;

.cta-text h2 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 28px;
}

.cta-text p {
    font-size: 16px;
    margin: 0;
    opacity: 0.9;
}

.btn-b2b {
    display: inline-block;
    background-color: var(--color-brand-dark);
    color: #fff !important;
    padding: 15px 35px;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-b2b:hover {
    background-color: #161e27;
    transform: translateY(-2px);
}

/* --- Responsive Updates --- */
@media (max-width: 992px) {
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .split-layout { flex-direction: column; text-align: center; }
    .benefit-list li { text-align: left; }
    .reviews-grid { grid-template-columns: 1fr; }
    .cta-container { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .categories-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   LANDING EMPRESAS B2B
   ========================================================================== */

.b2b-custom-wrapper {
    background-color: var(--color-bg-light);
    font-family: inherit;
}

/* --- B2B Hero --- */
.b2b-hero {
    background-color: var(--color-brand-dark);
    background-image: linear-gradient(135deg, #161e27 0%, #232f3e 100%);
    color: #fff;
    padding: 80px 15px;
    text-align: center;
}

.b2b-badge {
    display: inline-block;
    background-color: var(--color-brand-red);
    color: #fff;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.b2b-title {
    font-size: 42px;
    font-weight: 800;
    color: #fff;
    max-width: 800px;
    margin: 0 auto 20px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.b2b-subtitle {
    font-size: 18px;
    color: #b0c4de;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.b2b-subtitle strong {
    color: #fff;
}

/* --- B2B Benefits --- */
.b2b-benefits {
    padding: 60px 0;
    margin-top: -30px; /* Para solapar ligeramente con el Hero si queremos, o dejarlo normal */
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.benefit-card {
    background: #fff;
    border: 1px solid #eaeaec;
    border-radius: 10px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.benefit-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-brand-red);
}

.benefit-card .b-icon {
    font-size: 50px;
    margin-bottom: 20px;
}

.benefit-card h3 {
    font-size: 20px;
    color: var(--color-brand-dark);
    margin-bottom: 15px;
}

.benefit-card p {
    color: var(--color-text);
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

/* --- B2B Form Section --- */
.b2b-form-section {
    padding: 60px 0 100px;
}

.form-layout {
    display: flex;
    gap: 50px;
    align-items: flex-start;
    max-width: 1100px;
    margin: 0 auto;
}

.form-text {
    flex: 1;
}

.form-text h2 {
    font-size: 32px;
    color: var(--color-brand-dark);
    margin-bottom: 20px;
}

.form-text p {
    font-size: 16px;
    color: var(--color-text);
    line-height: 1.6;
    margin-bottom: 30px;
}

.b2b-contact-info {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #fff;
    border: 1px solid #eaeaec;
    border-radius: 8px;
    padding: 25px;
}

.b2b-contact-info li {
    margin-bottom: 15px;
    font-size: 15px;
    color: var(--color-text);
}

.b2b-contact-info li:last-child {
    margin-bottom: 0;
}

.form-box {
    flex: 1.2;
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    border-top: 5px solid var(--color-brand-red);
}

/* Form Styles */
.custom-b2b-form .form-group {
    margin-bottom: 20px;
}

.custom-b2b-form .form-group-row {
    display: flex;
    gap: 20px;
}

.custom-b2b-form .form-group-row .form-group {
    flex: 1;
}

.custom-b2b-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-brand-dark);
    margin-bottom: 8px;
}

.custom-b2b-form input[type="text"],
.custom-b2b-form input[type="email"],
.custom-b2b-form input[type="tel"],
.custom-b2b-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
    background-color: #fcfcfc;
}

.custom-b2b-form input:focus,
.custom-b2b-form textarea:focus {
    outline: none;
    border-color: var(--color-brand-red);
    box-shadow: 0 0 0 3px rgba(227, 43, 43, 0.1);
    background-color: #fff;
}

.btn-submit-form {
    width: 100%;
    background-color: var(--color-brand-red);
    color: #fff;
    border: none;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 6px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
}

.btn-submit-form:hover {
    background-color: #c02020;
    transform: translateY(-2px);
}

/* --- Responsive B2B --- */
@media (max-width: 992px) {
    .b2b-title { font-size: 32px; }
    .benefits-grid { grid-template-columns: 1fr; max-width: 500px; }
    .form-layout { flex-direction: column; }
    .custom-b2b-form .form-group-row { flex-direction: column; gap: 0; }
    .form-box { width: 100%; padding: 30px 20px; }
}
