/**
 * Estilos para el carrusel de reseñas estratégicas
 * Adaptado al tema Astra y diseño de HypedFootwear
 */

/* Contenedor principal de la sección de reseñas */
.reg-reviews-section {
    margin: 40px 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: #ffffff;
}

/* Header de la sección con título y logo de Trustpilot */
.reg-reviews-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 0 20px;
}

.reg-reviews-title {
    font-size: 24px;
    font-weight: 600;
    color: #2d3436;
    margin: 0;
    line-height: 1.3;
}

.reg-trustpilot-logo {
    display: flex;
    align-items: center;
}

.reg-tp-logo-svg {
    height: 24px;
    width: auto;
    max-width: 120px;
}

/* Contenedor del carrusel */
.reg-reviews-carousel {
    position: relative;
    padding: 0 20px;
}

.reg-reviews-swiper {
    overflow: hidden;
    padding: 10px 0 20px 0;
}

.reg-reviews-swiper .swiper-wrapper {
    display: flex;
    align-items: stretch;
}

.reg-reviews-swiper .swiper-slide {
    height: auto;
    display: flex;
}

/* Tarjeta de reseña */
.reg-review-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    min-height: 200px;
}

.reg-review-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Header de la tarjeta con autor y estrella de Trustpilot */
.reg-review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.reg-review-author {
    flex: 1;
}

.reg-author-name {
    font-size: 16px;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 4px;
    line-height: 1.2;
}

.reg-author-location {
    font-size: 14px;
    color: #636e72;
    line-height: 1.2;
}

.reg-trustpilot-star {
    flex-shrink: 0;
    margin-left: 12px;
}

.reg-trustpilot-star svg {
    width: 20px;
    height: 20px;
    fill: #00b67a;
}

/* Valoración con estrellas */
.reg-review-rating {
    margin-bottom: 16px;
    display: flex;
    gap: 2px;
}

.reg-star {
    font-size: 18px;
    line-height: 1;
    transition: color 0.2s ease;
}

.reg-star-filled {
    color: #ffc107;
}

.reg-star-empty {
    color: #e9ecef;
}

/* Texto de la reseña */
.reg-review-text {
    font-size: 15px;
    line-height: 1.5;
    color: #2d3436;
    flex: 1;
    margin: 0;
}

/* Botones de navegación */
.reg-swiper-button-next,
.reg-swiper-button-prev {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.reg-swiper-button-next:hover,
.reg-swiper-button-prev:hover {
    background: #f8f9fa;
    border-color: #00b67a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.reg-swiper-button-next svg,
.reg-swiper-button-prev svg {
    color: #636e72;
    transition: color 0.3s ease;
}

.reg-swiper-button-next:hover svg,
.reg-swiper-button-prev:hover svg {
    color: #00b67a;
}

.reg-swiper-button-next {
    right: -10px;
}

.reg-swiper-button-prev {
    left: -10px;
}

.reg-swiper-button-next.swiper-button-disabled,
.reg-swiper-button-prev.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Paginación */
.reg-swiper-pagination {
    position: relative;
    margin-top: 20px;
    text-align: center;
}

.reg-swiper-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #e9ecef;
    border-radius: 50%;
    margin: 0 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reg-swiper-pagination .swiper-pagination-bullet-active {
    background: #00b67a;
    transform: scale(1.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .reg-reviews-section {
        margin: 30px 0;
    }
    
    .reg-reviews-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 24px;
        padding: 0 16px;
    }
    
    .reg-reviews-title {
        font-size: 20px;
    }
    
    .reg-tp-logo-svg {
        height: 20px;
        max-width: 100px;
    }
    
    .reg-reviews-carousel {
        padding: 0 16px;
    }
    
    .reg-review-card {
        padding: 20px;
        min-height: 180px;
    }
    
    .reg-author-name {
        font-size: 15px;
    }
    
    .reg-author-location {
        font-size: 13px;
    }
    
    .reg-review-text {
        font-size: 14px;
    }
    
    .reg-star {
        font-size: 16px;
    }
    
    .reg-swiper-button-next,
    .reg-swiper-button-prev {
        width: 36px;
        height: 36px;
    }
    
    .reg-swiper-button-next svg,
    .reg-swiper-button-prev svg {
        width: 18px;
        height: 18px;
    }
    
    .reg-swiper-button-next {
        right: -6px;
    }
    
    .reg-swiper-button-prev {
        left: -6px;
    }
}

@media (max-width: 480px) {
    .reg-reviews-section {
        margin: 20px 0;
    }
    
    .reg-reviews-header {
        margin-bottom: 20px;
        padding: 0 12px;
    }
    
    .reg-reviews-title {
        font-size: 18px;
    }
    
    .reg-reviews-carousel {
        padding: 0 12px;
    }
    
    .reg-review-card {
        padding: 16px;
        min-height: 160px;
    }
    
    .reg-review-header {
        margin-bottom: 12px;
    }
    
    .reg-review-rating {
        margin-bottom: 12px;
    }
    
    .reg-swiper-button-next,
    .reg-swiper-button-prev {
        display: none; /* Ocultar botones en móviles muy pequeños */
    }
}

/* Animaciones de entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reg-reviews-section {
    animation: fadeInUp 0.6s ease-out;
}

/* Estados de carga */
.reg-reviews-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: #636e72;
    font-size: 14px;
}

.reg-reviews-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #00b67a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Integración con tema Astra */
.ast-container .reg-reviews-section {
    max-width: 100%;
}

.ast-single-product-summary .reg-reviews-section {
    margin-top: 40px;
    border-top: 1px solid #e9ecef;
    padding-top: 40px;
}

/* Compatibilidad con WooCommerce */
.woocommerce .reg-reviews-section {
    clear: both;
}

.woocommerce-tabs .reg-reviews-section {
    margin-top: 0;
    border-top: none;
    padding-top: 0;
}

