/**
 * MODIFICADO: 2026-04-15 - Cursor AI
 * - Fila doble en home: vídeos + asistente comparten fila (50% cada uno).
 * - Sin `order`: se respeta el orden natural del DOM para no mover banners encima del slider.
 */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* ============================================================
   FILA DOBLE — desktop >= 768px
   ============================================================ */
/* MODIFICADO: 2026-04-16 - Cursor AI
 * - Enfoque float: NO se cambia el display de section#content.page-home.
 *   Solo los dos .ps-home-duo-part reciben float:left.
 *   Tras ellos, clear:both restaura el flujo normal.
 *   Esto evita romper el layout de cualquier otro módulo de la home.
 * - Centrado horizontal con margin-left calculado cuando el viewport
 *   es más ancho que los dos banners + gap (1582px).
 */
@media (min-width: 768px) {
    /* MODIFICADO: 2026-04-16 - Cursor AI
     * - Añadido margin-top: 30px para separar los banners del módulo superior.
     */
    #index section#content.page-home > .ps-home-duo-part {
        float: left;
        width: calc(50% - 15px);
        max-width: 776px;
        box-sizing: border-box;
        margin-top: 30px;
    }

    /* Vídeos (izquierda): margen derecho = gap, margen izquierdo = centrado */
    #index section#content.page-home > .protectsofamodelvideos-home.ps-home-duo-part {
        margin-right: 30px;
        margin-left: max(0px, calc((100% - 1582px) / 2));
    }

    /* MODIFICADO: 2026-04-16 - Cursor AI
     * - Añadido margin-bottom: 70px para separar los banners del módulo de testimonios inferior.
     */
    #index section#content.page-home > .pstab-home-root.ps-home-duo-part {
        margin-bottom: 70px;
    }

    /* Restaurar flujo normal después de los dos banners */
    #index section#content.page-home > .pstab-home-root.ps-home-duo-part + * {
        clear: both;
    }
}

/* ============================================================
   BANNER — BASE (mobile-first)
   ============================================================ */
.pstab-home-root { box-sizing: border-box; }

.pstab-home-banner { margin: 0 0 24px; }

.pstab-banner-inner {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    min-height: 200px;
    background-color: #b87a2a;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    padding: 22px 20px;
    gap: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    box-sizing: border-box;
}

.pstab-banner-inner::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(160deg, rgba(45,30,10,0.08) 0%, rgba(35,22,8,0.45) 100%);
}

.pstab-banner-text { position: relative; z-index: 1; flex: 1; }

.pstab-banner-title {
    font-family: 'Lora', Georgia, 'Times New Roman', serif !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: #fff !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    margin: 0 0 10px !important;
    padding-bottom: 7px !important;
    border-bottom: 2px solid rgba(255,255,255,0.75) !important;
    display: inline-block !important;
}

.pstab-banner-desc {
    font-family: 'Lora', Georgia, 'Times New Roman', serif !important;
    font-size: 0.9rem !important;
    color: #fff !important;
    margin: 8px 0 4px !important;
    line-height: 1.5 !important;
    text-shadow: 0 1px 4px rgba(0,0,0,0.22);
}

.pstab-banner-sub {
    font-family: 'Lora', Georgia, 'Times New Roman', serif !important;
    font-size: 0.82rem !important;
    color: rgba(255,255,255,0.88) !important;
    margin: 0 !important;
    font-style: italic !important;
}

.pstab-banner-btn {
    position: relative;
    z-index: 1;
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    align-self: flex-start;
    background: #f5f1ee !important;
    border: none !important;
    border-radius: 999px !important;
    padding: 11px 20px 11px 13px !important;
    font-family: 'Lora', Georgia, 'Times New Roman', serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #3a312a !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.14) !important;
    transition: background 0.2s, transform 0.15s, box-shadow 0.15s !important;
    flex-shrink: 0 !important;
}
.pstab-banner-btn:hover {
    background: #f5f1ee !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 14px rgba(0,0,0,0.16) !important;
}

.pstab-cta-icon {
    width: 40px !important;
    height: 40px !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
    display: block !important;
}

/* ============================================================
   BANNER — DESKTOP (>= 768px): 776 x 415
   ============================================================ */
@media (min-width: 768px) {
    /* MODIFICADO: 2026-04-16 - Cursor AI
     * - Eliminado padding-inline: 10px (sobraba con el nuevo layout float).
     */
    #index .pstab-home-root .pstab-home-banner {
        margin-bottom: 0;
        box-sizing: border-box;
    }

    /* MODIFICADO: 2026-04-16 - Cursor AI
     * - Layout columna: texto arriba, botón abajo-derecha (como maqueta).
     * - Transición para hover unificado con el banner de vídeos.
     */
    #index .pstab-home-root .pstab-banner-inner {
        flex-direction: column;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0;
        width: 776px;
        max-width: 100%;
        height: 415px;
        min-height: 415px;
        max-height: 415px;
        margin: 0;
        padding: 36px 36px 32px;
        border-radius: 0;
        border: none;
        box-shadow: 2px 10px 26px rgba(45,38,32,0.09);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    /* MODIFICADO: 2026-04-16 - Cursor AI
     * - Hover: elevación suave + sombra cálida + overlay aclarado.
     */
    #index .pstab-home-root .pstab-banner-inner:hover {
        transform: translateY(-5px);
        box-shadow: 0 18px 42px rgba(45, 38, 32, 0.22);
    }
    #index .pstab-home-root .pstab-banner-inner:hover::before {
        background: linear-gradient(160deg, rgba(45,30,10,0.02) 0%, rgba(35,22,8,0.25) 100%);
    }

    /* MODIFICADO: 2026-04-16 - Cursor AI
     * - Título grande, sin mayúsculas, línea corta decorativa.
     */
    #index .pstab-home-root .pstab-banner-title {
        font-size: clamp(1.6rem, 0.5rem + 2.1vw, 2.1rem) !important;
        text-transform: none !important;
        letter-spacing: 0 !important;
        border-bottom: none !important;
        padding-bottom: 14px !important;
        margin-bottom: 0 !important;
        position: relative !important;
        line-height: 1.2 !important;
    }
    #index .pstab-home-root .pstab-banner-title::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: 0;
        width: 32px;
        height: 2px;
        background: rgba(255, 255, 255, 0.7);
    }

    #index .pstab-home-root .pstab-banner-desc {
        font-size: clamp(0.9rem, 0.75rem + 0.4vw, 1rem) !important;
        margin: 14px 0 6px !important;
    }
    #index .pstab-home-root .pstab-banner-sub {
        font-size: clamp(0.82rem, 0.72rem + 0.25vw, 0.92rem) !important;
    }

    /* MODIFICADO: 2026-04-16 - Cursor AI
     * - Botón en esquina inferior derecha.
     */
    #index .pstab-home-root .pstab-banner-btn {
        align-self: flex-end !important;
        padding: 13px 24px 13px 16px !important;
        font-size: 15px !important;
    }
    #index .pstab-home-root .pstab-cta-icon { width: 46px !important; height: 46px !important; }
}

/* ============================================================
   MODAL — sin cambios
   ============================================================ */
.pstab-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}
.pstab-modal-box {
    background: #fff; width: 100%; max-width: 600px;
    max-height: 88vh; border-radius: 16px; overflow-y: auto;
    padding: 0 0 32px; box-shadow: 0 8px 40px rgba(0,0,0,0.22);
}
.pstab-modal-header {
    position: sticky; top: 0; background: #fff;
    display: flex; align-items: center;
    padding: 16px 20px; border-bottom: 1px solid #eee; gap: 12px; z-index: 2;
}
.pstab-modal-back, .pstab-modal-close {
    background: none; border: none; padding: 6px; cursor: pointer;
    color: #555; border-radius: 50%; transition: background 0.15s; line-height: 1; flex-shrink: 0;
}
.pstab-modal-back:hover, .pstab-modal-close:hover { background: #f0f0f0; }
.pstab-modal-step-label { flex: 1; font-size: 16px; font-weight: 600; color: #333; text-align: center; }
.pstab-steps-bar {
    display: flex; align-items: center; justify-content: center;
    padding: 12px 20px; gap: 8px; background: #fafafa; border-bottom: 1px solid #eee;
}
.pstab-step { font-size: 13px; color: #aaa; padding: 4px 14px; border-radius: 20px; transition: all 0.2s; }
.pstab-step.pstab-step-active { color: #E7A235; font-weight: 600; background: rgba(231,162,53,0.08); }
.pstab-step.pstab-step-done { color: #2ECC71; }
.pstab-step-sep { color: #ccc; font-size: 16px; }
.pstab-modal-step { padding: 20px 24px 8px; }
.pstab-opciones-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
@media (max-width: 480px) { .pstab-opciones-grid { grid-template-columns: 1fr 1fr; } }
.pstab-opcion-btn {
    background: #fff; border: 2px solid #E7A235; border-radius: 12px;
    padding: 16px 12px; font-size: 15px; font-weight: 600; color: #333;
    cursor: pointer; text-align: center; transition: background 0.18s, color 0.18s;
    min-height: 72px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 10px;
}
.pstab-opcion-btn:hover { background: #E7A235; color: #fff; }
.pstab-opcion-img { width: 130px; height: 80px; object-fit: contain; display: block; transition: filter 0.2s, transform 0.2s; }
.pstab-opcion-btn--img { min-height: 120px; }
#pstabCatGrid .pstab-opcion-btn:hover .pstab-opcion-img { filter: brightness(0) invert(1); }
#pstabSubcatGrid .pstab-opcion-btn:hover { background: #fff; color: #333; }
#pstabSubcatGrid .pstab-opcion-btn:hover .pstab-opcion-img { transform: scale(1.08); }
.pstab-loading { text-align: center; padding: 48px 20px; color: #888; }
.pstab-spinner {
    width: 40px; height: 40px; border: 4px solid #eee; border-top-color: #E7A235;
    border-radius: 50%; animation: pstabSpin 0.8s linear infinite; margin: 0 auto 14px;
}
@keyframes pstabSpin { to { transform: rotate(360deg); } }
#pstab-home-form-inner { padding: 0; }
.pstab-form-diagram { text-align: center; margin-bottom: 16px; }
.pstab-form-diagram img { max-width: 100%; max-height: 260px; object-fit: contain; }
.pstab-medidas-header {
    display: flex; align-items: center; gap: 12px; background: #fafafa;
    border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px; color: #555; font-weight: 500;
}
.pstab-cinta-mini { width: 56px; height: 44px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.pstab-medidas-lista { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.pstab-medida-item { display: flex; align-items: center; gap: 10px; }
.pstab-medida-letra { font-weight: 700; font-size: 16px; min-width: 20px; text-align: center; }
.pstab-medida-input {
    width: 90px; height: 38px; border: 1px solid #ddd; border-radius: 6px;
    text-align: center; font-size: 15px; padding: 0 8px; transition: border-color 0.15s;
}
.pstab-medida-input:focus { border-color: #E7A235; outline: none; }
.pstab-medida-nombre { font-size: 14px; font-weight: 600; flex: 1; }
.pstab-cojines-check { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: #555; margin-bottom: 16px; line-height: 1.4; }
.pstab-contacto { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.pstab-field label { font-size: 13px; font-weight: 600; color: #555; display: block; margin-bottom: 4px; }
.pstab-input { width: 100%; border: 1px solid #ddd; border-radius: 8px; padding: 10px 14px; font-size: 14px; box-sizing: border-box; transition: border-color 0.15s; }
.pstab-input:focus { border-color: #E7A235; outline: none; }
textarea.pstab-input { resize: vertical; }
.pstab-fotos { margin-bottom: 18px; }
.pstab-fotos-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; font-size: 13px; color: #555; line-height: 1.4; }
.pstab-camara-mini { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.pstab-fotos-header strong { font-size: 14px; display: block; margin-bottom: 3px; }
.pstab-fotos-header p { margin: 0; font-size: 12px; }
.pstab-fotos-grid { display: flex; gap: 10px; }
.pstab-foto-item { flex: 1; text-align: center; }
.pstab-foto-label {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    background: #f7f7f7; border: 1.5px dashed #ccc; border-radius: 10px;
    padding: 14px 8px; font-size: 12px; color: #888; cursor: pointer;
    min-height: 80px; justify-content: center; transition: border-color 0.15s, background 0.15s;
}
.pstab-foto-label:hover { border-color: #E7A235; background: #fffbe6; }
.pstab-foto-file { display: none; }
.pstab-foto-preview { width: 100%; height: 80px; object-fit: cover; border-radius: 10px; }
.pstab-btn-enviar {
    display: block; width: 100%; background: #E7A235; color: #fff;
    border: none; border-radius: 10px; padding: 14px; font-size: 16px;
    font-weight: 700; cursor: pointer; text-align: center; letter-spacing: 0.02em;
    transition: background 0.2s, transform 0.15s;
}
.pstab-btn-enviar:hover { background: #c98a1e; transform: translateY(-1px); }
.pstab-error { color: #e74c3c; text-align: center; padding: 24px; }