/**
 * Estilos para Seepsa Catálogo - Slider y Modal
 */

/* ===== SLIDER ===== */
.seepsa-slider {
    position: relative;
    margin: 0 auto;
    max-width: 1200px;
}

/* Especificidad extra para vencer el padding:0 de .swiper */
.seepsa-slider.swiper {
    /* Espacio interno para que la paginación no quede recortada por Swiper */
    padding-bottom: 38px;
}

.seepsa-slider__wrapper {
    width: 100%;
}

.seepsa-slider__slide {
    height: auto;
    /* Pequeño respiro para que la sombra de la tarjeta no quede recortada */
    padding: 6px 4px 10px;
    box-sizing: border-box;
}

/*
 * Tarjeta: replica las reglas de .device-card de /promociones/.
 * Se incluyen aquí porque landing_page.css no se carga en la home.
 */
.seepsa-slider__slide .device-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.seepsa-slider__slide .device-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12);
}

/* Imagen centrada, sin recortes y con altura uniforme entre tarjetas */
.seepsa-slider__slide .device-card-img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 240px;
    object-fit: contain;
    margin: 1rem auto 0;
    padding: 0 1rem;
    box-sizing: border-box;
}

.seepsa-slider__slide .device-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.seepsa-slider__slide .device-card-body h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c2c2c;
    margin-bottom: 0.75rem;
}

.seepsa-slider__slide .device-card-body p {
    color: #6b6b6b;
    margin: 0;
    flex: 1;
}

.seepsa-slider__actions {
    margin-top: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.seepsa-slider__actions .btn {
    min-width: 110px;
    border-radius: 0.75rem;
}

/* Navegación Swiper */
.seepsa-slider__nav {
    position: absolute;
    top: calc(50% - 19px);
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: #fff;
    color: #2c2c2c;
    border: 1px solid #e2e2e2;
    border-radius: 50%;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.seepsa-slider__nav:hover {
    background: #ea5151;
    color: #fff;
    border-color: #ea5151;
    box-shadow: 0 10px 24px rgba(234, 81, 81, 0.35);
}

.seepsa-slider__nav:focus-visible {
    outline: 3px solid rgba(234, 81, 81, 0.45);
    outline-offset: 3px;
}

.seepsa-slider__nav--prev { left: 10px; }
.seepsa-slider__nav--next { right: 10px; }

/* Chevron dibujado en CSS: no depende de Dashicons ni del SVG de Swiper */
.seepsa-slider__nav-icon {
    display: block;
    width: 11px;
    height: 11px;
    border-top: 2.5px solid currentColor;
    border-right: 2.5px solid currentColor;
}

.seepsa-slider__nav--prev .seepsa-slider__nav-icon {
    transform: rotate(-135deg);
    margin-left: 4px;
}

.seepsa-slider__nav--next .seepsa-slider__nav-icon {
    transform: rotate(45deg);
    margin-right: 4px;
}

/* Especificidad extra para vencer los estilos base de Swiper */
.seepsa-slider .seepsa-slider__pagination.swiper-pagination {
    position: absolute;
    bottom: 6px;
    left: 50%;
    width: auto;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.seepsa-slider .seepsa-slider__pagination.swiper-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    margin: 0;
    background: #ccc;
    opacity: 1;
    border-radius: 50%;
    transform: scale(1);
    transition: background 0.2s ease, transform 0.2s ease;
}

.seepsa-slider .seepsa-slider__pagination.swiper-pagination .swiper-pagination-bullet-active {
    background: #ea5151;
    transform: scale(1.2);
}

/* Responsive: breakpoints 1/2/3 */
@media (max-width: 767px) {
    .seepsa-slider__nav { display: none; }
    .seepsa-slider__slide .device-card-img { height: 220px; }
    .seepsa-slider .seepsa-slider__pagination.swiper-pagination { bottom: 4px; }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .seepsa-slider__nav--prev { left: 6px; }
    .seepsa-slider__nav--next { right: 6px; }
}

@media (min-width: 1024px) {
    .seepsa-slider__nav--prev { left: 10px; }
    .seepsa-slider__nav--next { right: 10px; }
}

/* Reducir movimiento */
@media (prefers-reduced-motion: reduce) {
    .seepsa-slider__nav,
    .seepsa-slider__pagination .swiper-pagination-bullet {
        transition: none !important;
        animation: none !important;
    }
}

/* ===== MODAL ===== */
.seepsa-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.seepsa-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(2px);
}

.seepsa-modal__panel {
    position: relative;
    background: #fff;
    border-radius: 12px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: seepsaModalIn 0.2s ease;
}

@keyframes seepsaModalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.seepsa-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}

.seepsa-modal__header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
}

.seepsa-modal__close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #999;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.seepsa-modal__close:hover {
    background: #f5f5f5;
    color: #333;
}

.seepsa-modal__form {
    padding: 24px;
}

.seepsa-form-field {
    margin-bottom: 20px;
}

.seepsa-form-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.seepsa-form-field .required {
    color: #d00;
}

.seepsa-form-field input,
.seepsa-form-field textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.seepsa-form-field input:focus,
.seepsa-form-field textarea:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0,102,204,0.15);
}

.seepsa-form-field input.error,
.seepsa-form-field textarea.error {
    border-color: #d00;
}

.seepsa-form-field .field-error {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: #d00;
}

.seepsa-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.seepsa-form-actions .button {
    padding: 10px 24px;
    font-weight: 500;
    border-radius: 6px;
}

.seepsa-modal__close-btn {
    background: #fff;
    color: #666;
    border: 1px solid #ddd;
}

.seepsa-modal__close-btn:hover {
    background: #f5f5f5;
}

.seepsa-form-messages {
    margin-top: 16px;
    padding: 12px;
    border-radius: 6px;
    display: none;
}

.seepsa-form-messages.success {
    display: block;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.seepsa-form-messages.error {
    display: block;
    background: #fdeaea;
    color: #c62828;
    border: 1px solid #f5c6cb;
}

.seepsa-form-messages.loading {
    display: block;
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

/* Estilo para botón deshabilitado en loading */
.button:disabled,
.button.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Honeypot invisible */
.seepsa-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

/* Responsive modal */
@media (max-width: 560px) {
    .seepsa-modal {
        padding: 10px;
        align-items: flex-start;
    }
    .seepsa-modal__panel {
        max-height: 100vh;
        border-radius: 12px 12px 0 0;
    }
    .seepsa-modal__form {
        padding: 20px 16px 40px;
    }
    .seepsa-form-actions {
        flex-direction: column-reverse;
    }
    .seepsa-form-actions .button {
        width: 100%;
    }
}