/* ── Layout producto: galería + selector ───────────────────── */
.nti-product-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    max-width: 1100px;
    margin: 2rem auto;
}

/* Galería izquierda */
.nti-gallery {
    flex: 0 0 400px;
    max-width: 400px;
    position: sticky;
    top: 120px;

}

.nti-gallery-main {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nti-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.nti-gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.nti-thumb {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    background: #f5f5f5;
    padding: 3px;
    transition: border-color 0.2s;
}

.nti-thumb:hover {
    border-color: #aaa;
}

.nti-thumb.active {
    border-color: #0073aa;
}

/* Selector derecha */
.variaciones-pasos-container {
    flex: 1 1 0;
    min-width: 0;
    padding: 25px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .nti-product-layout {
        flex-direction: column;
    }

    .nti-gallery {
        flex: none;
        max-width: 100%;
        width: 100%;
        position: static;
    }
}

.progreso-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.progreso-container:before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 3px;
    background: #e0e0e0;
    z-index: 1;
}

.paso-indicador {
    position: relative;
    z-index: 2;
    background: #f5f5f5;
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid #ddd;
    font-size: 14px;
}

.paso-indicador.activo {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.paso-indicador.completado {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.paso {
    margin-bottom: 30px;
    display: none;
}

.paso-activo {
    display: block;
}

.instrucciones,
.seleccion-actual {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.95em;
}

.seleccion-actual .valor-seleccion {
    font-weight: bold;
    color: #0073aa;
}

.opciones-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
}

.opcion-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
}

.opcion {
    padding: 4px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background: #fff !important;
    cursor: pointer;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    box-shadow: none !important;
}

.opcion img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: top center;
    display: block;
}

.opcion:hover {
    border-color: #aaa;
    transform: scale(1.05);
    background: #fff !important;
}

.opcion.seleccionada {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.3) !important;
}

.opcion-texto {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    display: block;
    width: 100%;
    text-align: center;
}

.opcion-container.seleccionada .opcion-texto {
    color: #0073aa;
    font-weight: 600;
}

.resumen-seleccion {
    background: #f8f8f8;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #0073aa;
}

.resumen-seleccion p {
    margin: 12px 0;
    font-size: 16px;
}

.navegacion-pasos {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.button {
    padding: 12px 25px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.btn-anterior {
    background: #f5f5f5;
    color: #555;
}

.btn-anterior:hover {
    background: #e9e9e9;
}

.btn-siguiente,
#anadir-carrito {
    background: #0073aa;
    color: white;
}

.btn-siguiente:hover,
#anadir-carrito:hover {
    background: #005a87;
}

.btn-siguiente:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #0073aa;
}

.error-opciones {
    color: #d32f2f;
    padding: 10px;
    background: #ffebee;
    border-radius: 4px;
    border-left: 3px solid #d32f2f;
}

.wc-variacion-error {
    padding: 15px;
    background: #ffebee;
    border-left: 4px solid #d32f2f;
    color: #d32f2f;
}

/* Paso de Cantidad / Cajas */
.paso-cantidad .opciones-container {
    justify-content: center;
}

.opcion-cantidad-btn {
    width: 80px;
    height: 80px;
    border-radius: 50% !important;
    border: 3px solid #e0e0e0;
    background: linear-gradient(145deg, #ffffff, #f0f0f0) !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 16px;
    font-weight: bold;
    color: #333 !important;
}

.opcion-cantidad-btn:hover {
    border-color: #0073aa;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 115, 170, 0.2);
}

.opcion-cantidad-btn.seleccionada {
    border-color: #0073aa;
    background: linear-gradient(145deg, #0073aa, #005a87) !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(0, 115, 170, 0.4);
}

.cantidad-numero {
    font-size: 20px;
    font-weight: 700;
}

.paso-cantidad .opcion-container {
    min-width: 90px;
}

.paso-cantidad .opcion-texto {
    font-size: 12px;
    margin-top: 8px;
    color: #666;
}

.paso-cantidad .opcion-container.seleccionada .opcion-texto {
    color: #0073aa;
    font-weight: 600;
}

/* Precio calculado */
.precio-calculado {
    text-align: center;
    margin-top: 25px;
    padding: 15px;
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.precio-calculado p {
    margin: 0;
    font-size: 18px;
    color: #333;
}

#precio-total {
    font-size: 24px;
    font-weight: 700;
    color: #0073aa;
}

/* Resumen final con precio */
.precio-final {
    font-size: 18px !important;
    margin-top: 15px !important;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

#resumen-precio {
    font-size: 22px;
    font-weight: 700;
    color: #4CAF50;
}

/* Número de cajas */
.cantidad-cajas-wrapper {
    margin-top: 20px;
    text-align: center;
}

.cantidad-cajas-wrapper label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.cantidad-cajas-controles {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.input-numero-cajas {
    width: 70px;
    text-align: center;
}

#resumen-cantidad {
    font-weight: 600;
    color: #0073aa;
}