/* Caravedo Cotización por WhatsApp 0.3.0 */
/* Selector con 5 clases: gana a reglas del tema con !important de hasta 4 (por ejemplo el R4 de staging). */
/* El verde #15803D da 5.0:1 con texto blanco. El #25D366 de WhatsApp da 1.98:1 y no se lee. */
.wpcf7 .wpcf7-form input[type="submit"].wpcf7-submit.ccw-submit {
    background-color: #15803D !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: 18px center !important;
    background-size: 24px 24px !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 8px;
    min-height: 52px;
    width: 100%;
    padding: 12px 18px 12px 54px !important;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.2;
    white-space: normal;
    cursor: pointer;
}

.wpcf7 .wpcf7-form input[type="submit"].wpcf7-submit.ccw-submit:hover,
.wpcf7 .wpcf7-form input[type="submit"].wpcf7-submit.ccw-submit:focus-visible {
    background-color: #116B33 !important;
}

.wpcf7 .wpcf7-form input[type="submit"].wpcf7-submit.ccw-submit:disabled {
    background-color: #6b6b6b !important;
    cursor: not-allowed;
}

.wpcf7 .wpcf7-form input[type="submit"].wpcf7-submit.ccw-submit:focus-visible {
    outline: 3px solid #24211e;
    outline-offset: 3px;
}

/* El JS pone ccw-ok solo cuando su aviso ya está en pantalla. Sin JS queda el aviso de CF7. */
.wpcf7 form.ccw-ok .wpcf7-response-output {
    display: none;
}

.ccw-estado {
    margin-top: 16px;
    font-size: 16px;
    line-height: 1.5;
}

.ccw-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.ccw-acciones[hidden] {
    display: none;
}

.ccw-abrir,
.ccw-copiar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.ccw-abrir {
    background: #15803D;
    color: #fff;
}

.ccw-copiar {
    background: #fff;
    color: #24211e;
    border: 2px solid #24211e;
}

.ccw-texto {
    display: block;
    width: 100%;
    min-height: 120px;
    margin-top: 8px;
    padding: 10px;
    font-size: 15px;
    border: 2px solid #24211e;
}

/* Casillas de aceptación: cuadro y texto alineados, texto legible. */
.campaign-form .wpcf7-form .form-disclaimer .wpcf7-list-item {
    margin: 0 0 10px;
}

.campaign-form .wpcf7-form .form-disclaimer label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.4;
    color: #24211e;
}

.campaign-form .wpcf7-form .form-disclaimer input[type="checkbox"] {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
}

/* En celular el tema deja dos columnas de 50 %: etiquetas de dos líneas desalinean los campos y cortan los textos. */
@media (max-width: 767px) {
    .campaign-form .wpcf7-form .form-row {
        width: 100%;
    }

    .campaign-form .wpcf7-form .form-row :is(input:not([type="checkbox"]):not([type="hidden"]), select, textarea) {
        width: 100%;
        box-sizing: border-box;
        font-size: 16px;
    }

    .wpcf7 .wpcf7-form input[type="submit"].wpcf7-submit.ccw-submit {
        font-size: 16px;
        letter-spacing: 0;
        white-space: nowrap;
    }
}

/* Bloque de tienda: lo más vendido de los últimos 30 días, debajo del formulario. Botones oscuros para no competir con el verde. */
.ccw-tienda {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 20px 56px;
    text-align: center;
    color: #24211e;
}

.ccw-tienda-titulo {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.2;
}

.ccw-tienda-bajada {
    margin: 0 0 28px;
    font-size: 16px;
    line-height: 1.5;
}

.ccw-tienda-lista {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin: 0 0 28px;
    padding: 0;
    list-style: none;
}

.ccw-tienda-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: #fff;
    border: 1px solid #efe9e2;
    border-radius: 8px;
    text-align: left;
}

.ccw-tienda-producto {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    color: #24211e;
    text-decoration: none;
}

.ccw-tienda-producto img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

.ccw-tienda-nombre {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
}

.ccw-tienda-precio {
    font-size: 15px;
}

.ccw-tienda-comprar,
.ccw-tienda-todo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.ccw-tienda-comprar {
    margin-top: auto;
    background: #24211e;
    color: #fff;
}

.ccw-tienda-todo {
    border: 2px solid #24211e;
    color: #24211e;
    background: transparent;
}

.ccw-tienda-comprar:focus-visible,
.ccw-tienda-todo:focus-visible,
.ccw-tienda-producto:focus-visible {
    outline: 3px solid #24211e;
    outline-offset: 3px;
}

@media (max-width: 767px) {
    .ccw-tienda {
        padding: 36px 16px 44px;
    }

    .ccw-tienda-titulo {
        font-size: 24px;
    }

    .ccw-tienda-lista {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .ccw-tienda-item {
        padding: 10px;
    }

    .ccw-tienda-nombre,
    .ccw-tienda-precio {
        font-size: 14px;
    }
}

/* Formulario insertado en /personaliza-tu-porton/, en lugar del botón "Comprar por Whatsapp" del tema. */
.ccw-formulario {
    max-width: 760px;
    margin: 0 auto;
    padding: 36px 32px 32px;
    background: #fff;
    border-radius: 12px;
    color: #24211e;
    text-align: left;
}

.ccw-formulario[hidden] {
    display: none;
}

.ccw-formulario-titulo {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.ccw-formulario-bajada {
    margin: 0 0 24px;
    font-size: 16px;
    line-height: 1.5;
    text-align: center;
}

.ccw-formulario .wpcf7-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
}

.ccw-formulario .wpcf7-form > :not(.form-row),
.ccw-formulario .wpcf7-form .form-row.full {
    grid-column: 1 / -1;
}

/* CF7 envuelve cada fila en <p> y separa con <br>: sin esto queda doble espacio entre campos. */
.ccw-formulario .wpcf7-form .form-row p {
    margin: 0;
}

.ccw-formulario .wpcf7-form .form-row br {
    display: none;
}

.ccw-formulario .wpcf7-form .form-row label {
    display: block;
    margin-bottom: 6px;
    font-size: 15px;
    font-weight: 600;
}

.ccw-formulario .wpcf7-form .form-row :is(input:not([type="checkbox"]):not([type="submit"]), select, textarea) {
    width: 100%;
    box-sizing: border-box;
    min-height: 46px;
    padding: 10px 12px;
    font-size: 16px;
    color: #24211e;
    background: #fff;
    border: 1px solid #8a8580;
    border-radius: 8px;
}

.ccw-formulario .wpcf7-form .form-row textarea {
    min-height: 96px;
}

.ccw-formulario .wpcf7-form .form-disclaimer .wpcf7-list-item {
    margin: 0 0 10px;
}

.ccw-formulario .wpcf7-form .form-disclaimer label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.4;
}

.ccw-formulario .wpcf7-form .form-disclaimer input[type="checkbox"] {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
}

.ccw-formulario .wpcf7-form .form-disclaimer a {
    text-decoration: underline;
}

@media (max-width: 767px) {
    .ccw-formulario {
        padding: 28px 16px 24px;
    }

    .ccw-formulario-titulo {
        font-size: 24px;
    }

    .ccw-formulario .wpcf7-form {
        grid-template-columns: minmax(0, 1fr);
    }
}
