/* --- ESTILOS COMPLETOS Y DEFINITIVOS PARA EL FORMULARIO --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

/* Variables de color */
:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --text-color-dark: #1f2937;
    --text-color-light: #6b7280;
    --background-color: #f9fafb;
    --border-color: #d1d5db;
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
    --card-shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Le damos estilo de "tarjeta" al formulario de Gravity Forms */
.gform_wrapper.gform-theme {
    font-family: 'Poppins', sans-serif;
    max-width: 1100px; /* <-- ANCHO AUMENTADO */
    width: 100%;
    background: #ffffff;
    padding: 1.5rem 1.5rem;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    border: 1px solid #e5e7eb;
    box-sizing: border-box;
    margin: 2rem auto 0 auto;
}

/* Título y Descripción */
.form-post-title {
    display:none;
}
.form-post-title + p {
    font-family: 'Poppins', sans-serif;
    text-align: center;
    color: var(--text-color-light);
    max-width: 750px;
    margin: 0 auto 1.5rem auto !important;
    line-height: 1.7;
    font-size: 1rem;
}
h1.entry-title {
    font-family: 'Poppins', sans-serif;
    text-align: center;
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--text-color-dark);
    width: 100%;
}

/* --- BARRA DE PROGRESO --- */
.gform_wrapper .gf_progressbar_wrapper {
    padding: 0;
    margin-bottom: 2.5rem;
}
.gform_wrapper .gf_progressbar_title {
    text-align: center;
    color: var(--text-color-light);
    margin-bottom: 1rem;
    font-weight: 500;
}
.gform_wrapper .gf_progressbar {
    background-color: #e5e7eb;
    border-radius: 25px;
    height: 16px;
}
.gform_wrapper .gf_progressbar .gf_progressbar_percentage {
    height: 100%;
    border-radius: 25px;
}
.gform_wrapper .gf_progressbar span {
    display: none;
}

/* --- PASO 1: TARJETAS DE ELECCIÓN --- */
.gfield_radio.gform-theme__no-reset--children {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    align-items: stretch; 
}

.image-choices-field .gchoice { 
    border: none;
    flex: 1;
    max-width: 280px;
    display: flex;
}
.image-choices-field .gchoice label { 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
}
.image-choices-field .gchoice:hover label { 
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--card-shadow);
}
.image-choices-field .gchoice input:checked + label { 
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
    background-color: #eff6ff;
}
.image-choices-field .image-choices-choice-image-wrap { 
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem auto;
}
.image-choices-field .image-choices-choice-text { 
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color-dark);
    word-break: normal;
    white-space: normal;
    line-height: 1.4;
	width:100%;
}

/* --- PASO 2: LISTA DE PRODUCTOS --- */
.gfield--type-option .gfield_checkbox {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}
.gfield--type-option .gchoice {
    border: none;
    transition: all 0.3s ease;
	margin-bottom:5px;
}
.gfield--type-option .gchoice:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow);
}
.gfield--type-option .gchoice label {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1rem;
    cursor: pointer;
    box-sizing: border-box;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}
.gfield--type-option .gchoice input:checked + label {
    border-color: var(--primary-color);
    background-color: #eff6ff;
}
.gfield--type-option .custom-image-choice {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 1rem;
}
.gfield--type-option label p {
    text-align: center;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-color-dark);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gfield--type-option .ginput_price {
    margin-top: auto;
    padding-top: 0.5rem;
    display: block; 
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    text-align: center;
}
.gfield--type-option input[type="checkbox"] {
    display: none;
}

/* Lupa y Lightbox */
.zoom-icon{position:absolute;top:12px;left:12px;width:32px;height:32px;background-color:rgba(255,255,255,0.8);background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>');background-size:20px 20px;background-position:center;background-repeat:no-repeat;border-radius:50%;cursor:pointer;z-index:10;transition:transform .2s ease}.zoom-icon:hover{transform:scale(1.1)}#lightbox-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.85);display:none;justify-content:center;align-items:center;z-index:1000;cursor:pointer;padding:20px;box-sizing:border-box}#lightbox-figure{text-align:center}#lightbox-image{max-width:100%;max-height:85vh;border-radius:8px;box-shadow:0 0 30px rgba(0,0,0,.5)}#lightbox-caption{margin-top:1rem;font-family:'Poppins',sans-serif;font-size:1rem;color:#fff;line-height:1.5}

/* Estilo para el campo Total */
.gfield--type-total{background-color:#f9fafb;border:1px solid var(--border-color);border-radius:12px;padding:1rem 1.5rem;margin-top:1.5rem;display:flex;justify-content:space-between;align-items:center}.gfield--type-total .gfield_label{font-size:1rem;font-weight:500;color:var(--text-color-light)}.gfield--type-total .ginput_container_total input{font-size:1.8rem!important;font-weight:600!important;color:var(--primary-color)!important;background-color:transparent!important;border:none!important;padding:0!important;text-align:right;box-shadow:none!important;width:auto!important}

/* Botones de Navegación */
.gform_wrapper .gform_page_footer{display:flex;justify-content:center;gap:1rem;margin-top:2rem;padding-top:1.5rem;border-top:1px solid #e5e7eb}.gform_wrapper input.gform_button,.gform_wrapper input.gform_next_button,.gform_wrapper input.gform_previous_button{padding:.75rem 1.5rem!important;border:none!important;border-radius:8px!important;font-size:1rem!important;font-weight:600!important;cursor:pointer!important;transition:all .3s ease!important;text-transform:uppercase!important;height:auto!important;line-height:normal!important}.gform_wrapper input.gform_button,.gform_wrapper input.gform_next_button{background-color:var(--primary-color)!important;color:#fff!important}.gform_wrapper input.gform_button:hover,.gform_wrapper input.gform_next_button:hover{background-color:var(--primary-hover)!important}.gform_wrapper input.gform_previous_button{background-color:#e5e7eb!important;color:var(--text-color-dark)!important;border:1px solid var(--border-color)!important}.gform_wrapper input.gform_previous_button:hover{background-color:#d1d5db!important}

/* Formulario de Contraseña */
.post-password-form{font-family:'Poppins',sans-serif;max-width:500px;margin:4rem auto;padding:1.5rem;background:#fff;border-radius:16px;box-shadow:var(--card-shadow);text-align:center}.gemini-error-message{background-color:#fef2f2;color:#991b1b;border:1px solid #fecaca;padding:1rem;margin-bottom:1.5rem;border-radius:8px}.post-password-form p{margin-bottom:1.5rem;color:var(--text-color-light);line-height:1.6}.post-password-form .form-instructions p{margin:0 0 1rem}.post-password-form label{display:block;width:100%;text-align:center;font-weight:500;color:var(--text-color-dark)}.post-password-form br{display:none}.post-password-form input[type=password]{width:100%;padding:12px 15px;border:1px solid var(--border-color);border-radius:8px;font-size:1rem;box-sizing:border-box;transition:all .3s ease;margin-top:.5rem;margin-bottom:1.5rem}.post-password-form input[type=password]:focus{outline:0;border-color:var(--primary-color);box-shadow:0 0 0 3px rgba(59,130,246,.3)}.post-password-form input[type=submit]{padding:.75rem 1.5rem;border:none;border-radius:8px;font-size:1rem;font-weight:600;cursor:pointer;transition:all .3s ease;background-color:var(--primary-color);color:#fff;width:100%;text-transform:uppercase}.post-password-form input[type=submit]:hover{background-color:var(--primary-hover)}

/* --- AJUSTE DE COLUMNAS PARA PRODUCTOS (.gchoice) --- */

/* Por defecto (PC > 1200px): 4 columnas */
.gfield--type-option .gchoice {
    width: 25%;
}

/* Tablets (hasta 1200px): 3 columnas */
@media (max-width: 1200px) {
    .gfield--type-option .gchoice {
        width: 33.33%;
    }
}

/* Móviles (hasta 600px): 2 columnas */
@media (max-width: 600px) {
    .gfield--type-option .gchoice {
        width: 50%;
    }
}

/* --- Ajustes adicionales para que funcione con Flexbox --- */
/* Es importante que el contenedor principal sea Flexbox */
#gform_fields_4_2 #input_4_5,
#gform_fields_5_2 #input_5_5,
.gfield--type-option .gfield_checkbox {
    display: flex;
    flex-wrap: wrap; /* Permite que las tarjetas salten de línea */
    justify-content: center;
}
/* --- CLASE PARA TRUNCAR TEXTO --- */

.truncate {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
