/* === ESTILOS PRINCIPALES DE TALLERES === */

/* Contenedor principal */
.sw-taller-single {
    max-width: 1100px;
    margin: 20px auto;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    box-sizing: border-box;
}

/* Títulos de secciones */
/* Títulos de secciones */
/* Títulos de secciones */
.sw-taller-single h3,
#content .sw-taller-single h3,
.entry-content .sw-taller-single h3,
.sw-map-block h4,
.sw-reviews-card h3 {
    /* Agregado para comentarios */
    /* Agregado para el mapa */
    font-size: 30px !important;
    margin: 0 0 12px 0 !important;
    font-weight: 700 !important;
    letter-spacing: normal !important;
    line-height: 1.2 !important;
    color: #222;
}

/* Fix para título del formulario de comentarios (que no sea tan gigante) */
#reply-title {
    font-size: 22px !important;
    margin: 20px 0 10px 0 !important;
    font-weight: 700 !important;
    display: block;
}

.sw-taller-single h4 {
    font-size: 13px;
    /* Reduced from 14px */
    margin: 0 0 10px 0;
    font-weight: 700;
}

/* Header del taller */
.sw-taller-header {
    position: relative;
    color: #fff;
    background-size: cover;
    background-position: center;
    padding: 60px 20px;
    border-bottom: 4px solid var(--sw-violet, #6c44d3);
}

.sw-taller-header h1 {
    font-size: 19px;
    /* Reduced from 20px */
    font-weight: 800;
    /* Extra bold */
    margin-bottom: 6px;
    line-height: 1.1;
    letter-spacing: normal;
}

/* Slider principal */
.sw-slider {
    margin: 12px 0 18px;
}

.sw-slider-main img {
    width: 100%;
    height: auto;
    display: none;
    border-radius: 8px;
}

.sw-slider-main img:first-child {
    display: block;
}

.sw-slide-controls {
    position: relative;
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
}

.sw-slide-btn {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    padding: 4px 8px;
    cursor: pointer;
}

.sw-slider-nav {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.sw-slider-nav img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.6;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.sw-slider-nav img.is-active {
    opacity: 1;
    border-color: var(--sw-violet, #6c44d3);
}

/* Aside contacto y mapa */
.sw-map-block iframe {
    width: 100%;
    height: 220px;
    border-radius: 8px;
    display: block;
    border: 0;
}

/* === MARCAS === */
.sw-marcas-slider {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding: 10px 2px 14px;
    -webkit-overflow-scrolling: touch;
}

.sw-marcas-slider::-webkit-scrollbar {
    height: 6px;
}

.sw-marcas-slider::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

/* Tarjetas de marca */
.sw-marca-card {
    flex: 0 0 140px;
    scroll-snap-align: start;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    text-align: center;
    padding: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: transform .2s ease;
}

.sw-marca-card:hover {
    transform: translateY(-2px);
}

.sw-marca-card img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 6px;
}

.sw-marca-card div {
    font-size: 14px;
    font-weight: 500;
}

/* === BLOQUES ANCHOS (talleres relacionados + comentarios) === */
.sw-fullwidth-block {
    grid-column: 1 / -1;
    width: 100%;
}

/* === CARRUSELES === */
.sw-rel-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
    gap: 10px;
}

.sw-rel-slider::-webkit-scrollbar {
    height: 6px;
}

.sw-rel-slider::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

/* === RESEÑAS === */
.sw-reviews-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 16px;
}

.sw-review-item {
    border: 1px solid #e9e9e9;
    border-radius: 10px;
    padding: 12px;
    margin: 8px 0;
    background: #fff;
}

.sw-review-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.sw-review-name {
    font-weight: 600;
}

.sw-review-stars {
    color: #f0b400;
    font-size: 14px;
}

.sw-admin-reply {
    margin-top: 8px;
    border-left: 3px solid #6c44d3;
    background: #f8f5ff;
    padding: 8px 10px;
    border-radius: 6px;
}

.sw-admin-reply strong {
    color: #6c44d3;
}


/* === FIX DESPLAZAMIENTO HORIZONTAL GLOBAL === */
html,
body {
    overflow-x: clip !important;
}

.sw-rel-slider,
.sw-marcas-slider,
.sw-slider {
    overflow-x: auto;
    max-width: 100%;
    box-sizing: border-box;
}

.sw-slider-main img,
.sw-map-block iframe {
    max-width: 100%;
    height: auto;
    display: block;
    box-sizing: border-box;
}

.sw-taller-single {
    overflow: visible !important;
}

.sw-taller-single>div,
.sw-taller-single>aside {
    min-width: 0;
}

/* === CARRUSEL MANUAL DE MARCAS === */
.sw-marcas-wrapper {
    position: relative;
}

.sw-marcas-slider {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding: 10px 40px 14px;
    scroll-behavior: smooth;
}

.sw-marcas-slider::-webkit-scrollbar {
    height: 6px;
}

.sw-marcas-slider::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.sw-marcas-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 50%;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    transition: all .2s ease;
    z-index: 10;
}

.sw-marcas-arrow:hover {
    background: var(--sw-violet, #6c44d3);
    color: #fff;
}

.sw-marcas-arrow.left {
    left: 6px;
}

.sw-marcas-arrow.right {
    right: 6px;
}

.sw-marca-card {
    flex: 0 0 140px;
    scroll-snap-align: start;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    padding: 8px;
    transition: transform .2s ease;
}

.sw-marca-card img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 6px;
}

.sw-marca-card:hover {
    transform: translateY(-3px);
}


/* === BOTONES ESTÁNDAR === */
.sw-btn {
    display: inline-block;
    background: var(--sw-violet, #6c44d3);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 0;
    text-align: center;
    border-radius: 10px;
    transition: all 0.2s ease-in-out;
    width: 100%;
}

.sw-btn:hover {
    background: #5838b7;
    transform: translateY(-1px);
}

.sw-btn.sw-outline {
    background: #fff;
    color: var(--sw-violet, #6c44d3);
    border: 2px solid var(--sw-violet, #6c44d3);
}

.sw-btn.sw-outline:hover {
    background: var(--sw-violet, #6c44d3);
    color: #fff;
}


/* === ESPACIADO ENTRE BOTONES === */
.sw-btn+.sw-btn {
    margin-top: 8px;
}

.sw-map-block .sw-btn {
    margin-top: 10px;
}


/* === RESPONSIVE PARA MÓVILES (GENERAL) === */
@media (max-width: 900px) {
    .sw-taller-single {
        grid-template-columns: 1fr;
    }

    .sw-taller-single>aside {
        order: 10;
        width: 100%;
    }

    .sw-taller-single>div,
    .sw-taller-single aside,
    .sw-fullwidth-block {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .sw-taller-header div[style*="padding:60px"] {
        padding: 30px 15px !important;
    }

    .sw-btn {
        width: 100%;
        font-size: 15px;
    }

    .sw-slider-main img {
        width: 100%;
        height: auto;
    }

    .sw-rel-slider,
    .sw-marcas-slider {
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 10px;
    }

    .sw-fullwidth-block {
        margin-top: 25px;
    }

    .sw-map-block,
    .sw-taller-single aside>div {
        margin-top: 20px !important;
        padding: 20px !important;
        /* Más espacio interno en móvil */
    }

    /* Títulos más pequeños en móvil */
    .sw-taller-header h1 {
        font-size: 18px;
    }

    .sw-taller-single h3,
    #content .sw-taller-single h3,
    .entry-content .sw-taller-single h3,
    .sw-map-block h4,
    .sw-reviews-card h3 {
        font-size: 23px !important;
    }
}


/* === GALERÍA PRINCIPAL === */
.sw-slider {
    position: relative;
    margin: 16px 0 20px;
}

.sw-slider-main {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.sw-slider-main img {
    width: 100%;
    display: none;
    border-radius: 12px;
    transition: opacity 0.4s ease;
}

.sw-slider-main img:first-child {
    display: block;
}

.sw-slide-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    font-size: 22px;
    padding: 8px 14px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s ease;
    z-index: 5;
}

.sw-slide-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

.sw-slide-btn[data-sw-prev] {
    left: 10px;
}

.sw-slide-btn[data-sw-next] {
    right: 10px;
}

.sw-slider-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.sw-slider-nav img {
    width: 70px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border 0.2s ease;
}

.sw-slider-nav img.is-active {
    border-color: var(--sw-violet, #6c44d3);
}


/* ==========================================================================
   === NUEVOS ESTILOS PARA RESULTADOS AJAX (SOLUCIÓN AL PROBLEMA) ===
   ========================================================================== */

/* Contenedor general de resultados */
.sw-results-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* La tarjeta individual (Versión Escritorio) */
.sw-taller-card-ajax {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 10px;

    /* GRID PARA ESCRITORIO */
    display: grid;
    grid-template-columns: 140px 1fr 200px;
    align-items: center;
    gap: 15px;
}

/* Imagen */
.sw-ajax-img img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

/* Info */
.sw-ajax-info h3 {
    margin: 0 0 5px 0;
    font-size: 30px !important;
    font-weight: 700 !important;
    color: #222;
    line-height: 1.2 !important;
}

.sw-ajax-info p {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

/* Contenedor de botones */
.sw-ajax-btn {
    text-align: right;
}

.sw-ajax-btn .sw-btn {
    width: 100%;
    display: block;
    margin-bottom: 6px;
    text-align: center;
    background-color: #000;
    color: #fff;
    border: 1px solid #000;
    font-weight: 600;
}

.sw-ajax-btn .sw-btn:hover {
    background-color: #333;
    border-color: #333;
    color: #fff;
}

.sw-ajax-btn .sw-btn.sw-outline {
    background-color: #25d366 !important;
    border-color: #25d366 !important;
    color: #fff !important;
}

.sw-ajax-btn .sw-btn.sw-outline:hover {
    background-color: #1da851 !important;
    border-color: #1da851 !important;
}

/* === RESPONSIVE PARA RESULTADOS AJAX (MÓVIL) === */
@media (max-width: 768px) {
    .sw-taller-card-ajax {
        /* Cambiamos grid a columna vertical */
        display: flex;
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    /* Imagen al 100% y más alta */
    .sw-ajax-img {
        width: 100%;
        margin-bottom: 12px;
    }

    .sw-ajax-img img {
        height: auto;
        max-height: 200px;
        /* Evita que sea enorme */
    }

    /* Información centrada */
    .sw-ajax-info {
        width: 100%;
        margin-bottom: 15px;
    }

    .sw-ajax-info h3 {
        font-size: 23px !important;
    }

    /* Botones grandes y fáciles de tocar */
    .sw-ajax-btn {
        width: 100%;
        text-align: center;
    }
}

/* === ESTILOS ESPECÍFICOS DE BOTONES (PERSONALIZADOS) === */

/* 1. Por defecto, TODOS los botones dentro del taller son Negros */
.sw-taller-single .sw-btn,
.sw-btn.sw-btn-dark {
    background-color: #000;
    color: #fff;
    border: 1px solid #000;
}

.sw-taller-single .sw-btn:hover,
.sw-btn.sw-btn-dark:hover {
    background-color: #333;
    border-color: #333;
    color: #fff;
}

/* === ESTILOS PARA TABS Y FILTROS === */

/* Tabs (Categorías): Restaurados a estilo original (Gris claro) */
.sw-tab {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid #e5e7eb !important;
    background: #f3f4f6 !important;
    color: #333 !important;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.sw-tab:hover,
.sw-tab.active {
    background: #000 !important;
    border-color: #000 !important;
    color: #fff !important;
    transform: translateY(-1px);
}

/* Botón Buscar: Negro */
.sw-btn-search {
    background: #000 !important;
    color: #fff !important;
    border: 1px solid #000 !important;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    width: 100%;
}

.sw-btn-search:hover {
    background: #333 !important;
    border-color: #333 !important;
}

/* Botón Ayuda WhatsApp: Verde (Estilo Pill para tabs) */
.sw-btn-wa-help {
    background: #25d366 !important;
    color: #fff !important;
    border: 1px solid #25d366 !important;
    border-radius: 999px !important;
    font-weight: 600;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 14px;
    width: auto !important;
    /* Prevent full width */
    margin: 0 !important;
    /* Reset margins */
    /* Adjust to match tabs if needed */
}

.sw-btn-wa-help:hover {
    background: #1da851 !important;
    border-color: #1da851 !important;
    color: #fff !important;
}

.sw-btn.sw-btn-dark:hover {
    background-color: #333;
    border-color: #333;
    color: #fff;
    transform: translateY(-1px);
}

/* 2. Excepción: Botón WhatsApp (Verde) */
.sw-btn.sw-btn-wa {
    background-color: #25D366 !important;
    color: #fff !important;
    border: 1px solid #25D366 !important;
}

.sw-btn.sw-btn-wa:hover {
    background-color: #128C7E !important;
    border-color: #128C7E !important;
    color: #fff !important;
}

/* 3. Excepción: Botón Waze (Celeste) */
.sw-btn.sw-btn-waze {
    background-color: #33ccff !important;
    color: #000 !important;
    border: 1px solid #33ccff !important;
}

.sw-btn.sw-btn-waze:hover {
    background-color: #00bfff !important;
    border-color: #00bfff !important;
    color: #000 !important;
}

/* 4. Excepción: Botón Pago (Morado) */
.sw-btn.sw-btn-pago {
    background-color: #6B1F7C !important;
    color: #fff !important;
    border: 1px solid #6B1F7C !important;
}

.sw-btn.sw-btn-pago:hover {
    background-color: #551762 !important;
    border-color: #551762 !important;
    color: #fff !important;
}