/* ===== SOAP STYLES - CLEAN VERSION ===== */

/* Estilos básicos para grupos SOAP */
.contenedorsoapgrupoindividual {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin: 10px;
    text-align: center;
    transition: all 0.3s ease;
}

.contenedorsoapgrupoindividual.bordeseleccionado {
    border-color: #007cba;
    background-color: #f0f8ff;
}

.contenedorsoapgrupoindividual:hover {
    border-color: #007cba;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.imagen-grupo img {
    max-width: 100%;
    height: auto;
    max-height: 80px;
}

.nombre-grupo {
    margin-top: 10px;
    font-weight: bold;
}

.nombre-grupo a {
    text-decoration: none;
    color: #333;
}

.nombre-grupo a:hover {
    color: #007cba;
}

/* ===== PRIMER ELEMENTO - LAYOUT HORIZONTAL 3 COLUMNAS ===== */
.pc-soap-card-horizontal {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    gap: 20px !important;
    width: 100% !important;
    padding: 20px !important;
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
    margin-bottom: 30px !important;
}

/* Columna Izquierda: Logo + Vigencia */
.pc-soap-logo-column {
    flex: 0 0 200px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    align-items: flex-start !important;
}

.pc-soap-logo-column .company-logo {
    max-height: 60px !important;
    max-width: 180px !important;
    width: auto !important;
}

.pc-soap-logo-column .vigencia-text {
    font-size: 12px !important;
    color: #666 !important;
    margin: 0 !important;
}

/* Columna Centro: Coberturas */
.pc-soap-center-column {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    padding: 0 20px !important;
}

.pc-soap-center-column .pc-coberturas-content {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    color: #444 !important;
}

/* Columna Derecha: Categoría + Precio + Botón */
.pc-soap-right-column {
    flex: 0 0 200px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    gap: 10px !important;
}

.pc-soap-right-column .category-name {
    font-size: 20px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    color: #333 !important;
}

.pc-soap-right-column .price {
    font-size: 32px !important;
    font-weight: bold !important;
    margin: 0 !important;
    color: #333 !important;
}

.pc-soap-right-column .pc-comprar-btn {
    background: #4285f4 !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
}

.pc-soap-right-column .pc-comprar-btn:hover {
    background: #3367d6 !important;
    transform: translateY(-1px) !important;
}



/* ===== MODAL PARA COBERTURAS ===== */
.pc-coberturas-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.pc-coberturas-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pc-coberturas-modal-content {
    background-color: white;
    border-radius: 8px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    position: relative;
    animation: slideIn 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.pc-coberturas-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    border-bottom: 1px solid #e0e0e0;
    padding: 20px 25px 15px 25px;
    background: #f8f9fa;
}

.pc-coberturas-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.pc-coberturas-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 5px;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    line-height: 1;
}

.pc-coberturas-modal-close:hover {
    color: #666;
}

.pc-coberturas-modal-body {
    color: #555;
    line-height: 1.6;
    padding: 25px;
    overflow-y: auto;
    max-height: calc(80vh - 120px);
}

.pc-coberturas-modal-footer {
    background: #f8f9fa;
    padding: 15px 25px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pc-modal-site-link {
    font-size: 14px;
    color: #666;
    text-decoration: none;
}

.pc-modal-close-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.pc-modal-close-btn:hover {
    background: #c82333;
}

/* ===== ANIMACIONES ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* ===== GRID COMPACTO - TARJETAS PEQUEÑAS ===== */
.pc-soap-grid-container.elementor-element {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 20px !important;
    padding: 20px 0 !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.pc-soap-grid-container .e-con-inner {
    display: contents !important;
}

/* Tarjetas compactas del grid */
.pc-soap-card-compact {
    background: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 12px !important;
    padding: 16px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    height: fit-content !important;
    max-height: 350px !important;
}

.pc-soap-card-compact:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15) !important;
}

/* Header: Logo + Categoría */
.pc-soap-card-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

.pc-soap-card-compact .company-logo {
    max-height: 50px !important;
    max-width: 140px !important;
    width: auto !important;
    object-fit: contain !important;
}

.pc-soap-card-compact .category-name {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #333 !important;
    margin: 0 !important;
    text-align: center !important;
}

/* Content: Vigencia + Botón Ver Coberturas */
.pc-soap-card-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    flex: 1 !important;
    justify-content: space-between !important;
}

.pc-soap-card-compact .vigencia-text {
    font-size: 12px !important;
    color: #666 !important;
    text-align: center !important;
    margin: 0 !important;
}

.vigencia-dates {
    color: #4285f4 !important;
    font-weight: 500 !important;
}

/* Botón Ver Coberturas - ALINEADO */
.pc-coberturas-btn-container {
    display: flex !important;
    justify-content: center !important;
    margin-top: auto !important;
}

.pc-ver-coberturas-btn {
    background: #f8f9fa !important;
    color: #4285f4 !important;
    border: 1px solid #4285f4 !important;
    border-radius: 6px !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
    width: auto !important;
    min-width: 100px !important;
}

.pc-ver-coberturas-btn:hover {
    background: #4285f4 !important;
    color: white !important;
    transform: scale(1.05) !important;
}

/* Footer: Precio + Botón Comprar */
.pc-soap-card-footer {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin-top: auto !important;
}

.pc-soap-card-compact .price {
    font-size: 24px !important;
    font-weight: bold !important;
    color: #333 !important;
    text-align: center !important;
    margin: 0 !important;
}

.pc-soap-card-compact .pc-comprar-btn {
    background: #4285f4 !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
    display: block !important;
    width: 100% !important;
}

.pc-soap-card-compact .pc-comprar-btn:hover {
    background: #3367d6 !important;
    transform: translateY(-1px) !important;
}

/* ===== ESTILOS ESPECÍFICOS PARA TEMPLATE ELEMENTOR ===== */

/* Botones COMPRAR con clases Elementor */
.elementor-button.pc-comprar-btn,
.elementor-button-link.pc-comprar-btn {
    background: #4285f4 !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
    text-align: center !important;
    min-width: 120px !important;
    box-shadow: 0 2px 4px rgba(66, 133, 244, 0.3) !important;
}

.elementor-button.pc-comprar-btn:hover,
.elementor-button-link.pc-comprar-btn:hover {
    background: #3367d6 !important;
    color: white !important;
    text-decoration: none !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(66, 133, 244, 0.4) !important;
}

.elementor-button-content-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.elementor-button-text {
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
}

/* Estilos para precios en template Elementor */
.elementor-heading-title.price {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #333 !important;
    margin: 15px 0 !important;
    text-align: center !important;
}

/* Estilos para categorías en template Elementor */
.elementor-heading-title.category-name {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #666 !important;
    margin: 10px 0 !important;
    text-align: center !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Contenedores de columnas */
.pc-soap-right-column {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 15px !important;
    padding: 20px !important;
}

/* Arreglar espaciado en cards compactas */
.pc-soap-card-compact {
    padding: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    min-height: 280px !important;
    justify-content: space-between !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    /* PRIMER ELEMENTO CON MÁRGENES */
    .pc-soap-card-horizontal {
        flex-direction: column !important;
        gap: 15px !important;
        margin: 15px 15px 25px 15px !important; /* MÁRGENES LATERALES */
    }

    .pc-soap-logo-column,
    .pc-soap-center-column,
    .pc-soap-right-column {
        flex: 1 !important;
    }

    .pc-soap-right-column {
        align-items: stretch !important;
        text-align: left !important;
    }

    .pc-soap-right-column .price {
        font-size: 24px !important;
    }

    /* GRID COMPACTO CON MÁRGENES */
    .pc-soap-grid-container.elementor-element {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
        gap: 15px !important;
        padding: 15px 15px !important; /* PADDING LATERAL */
        margin: 0 !important;
    }

    .pc-soap-card-compact {
        padding: 12px !important;
        gap: 10px !important;
        max-height: 320px !important;
    }

    .pc-soap-card-compact .price {
        font-size: 20px !important;
    }

    /* Modal */
    .pc-coberturas-modal-content {
        margin: 20px;
        width: calc(100% - 40px);
        max-height: 90vh;
    }

    .pc-coberturas-modal-header {
        padding: 15px 20px 10px 20px !important;
    }

    .pc-coberturas-modal-body {
        padding: 20px !important;
        max-height: calc(90vh - 100px) !important;
    }

    .pc-coberturas-modal-footer {
        padding: 10px 20px !important;
    }
}

/* ===== MÓVILES PEQUEÑOS ===== */
@media (max-width: 480px) {
    /* PRIMER ELEMENTO MÁS COMPACTO */
    .pc-soap-card-horizontal {
        margin: 12px 12px 20px 12px !important; /* MÁRGENES MÁS PEQUEÑOS */
        padding: 12px !important;
    }

    /* GRID MÁS COMPACTO */
    .pc-soap-grid-container.elementor-element {
        grid-template-columns: 1fr !important; /* UNA SOLA COLUMNA */
        gap: 12px !important;
        padding: 12px 12px !important; /* PADDING LATERAL REDUCIDO */
    }

    .pc-soap-card-compact {
        padding: 10px !important;
        gap: 8px !important;
        max-height: 300px !important;
    }

    .pc-soap-card-compact .company-logo {
        max-height: 40px !important;
        max-width: 120px !important;
    }

    .pc-soap-card-compact .category-name {
        font-size: 14px !important;
    }

    .pc-soap-card-compact .price {
        font-size: 18px !important;
    }
}