/* Estilos para Probador Virtual IA */

/* Botón principal */
.wc-virtual-tryon-wrapper {
    margin: 15px 0;
}

.wc-virtual-tryon-btn {
    background: linear-gradient(135deg, #00167b 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.wc-virtual-tryon-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white;
}

.wc-virtual-tryon-btn:active {
    transform: translateY(0);
}

.wc-virtual-tryon-btn .tryon-icon {
    font-size: 18px;
}

/* Indicador de créditos Ilimify */
.vto-credits-indicator {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
}

/* Modal */
.wc-virtual-tryon-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.wc-virtual-tryon-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 590px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.wc-virtual-tryon-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.wc-virtual-tryon-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.wc-virtual-tryon-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.wc-virtual-tryon-close:hover {
    background: #f0f0f0;
    color: #333;
}

.wc-virtual-tryon-modal-body {
    padding: 24px;
}

/* Pasos */
.wc-virtual-tryon-step h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
}

/* Header del paso con descripción de ancho completo */
.step-header {
    margin-bottom: 20px;
}

.step-header .step-description {
    margin: 12px 0 0 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    width: 100%;
    display: block;
}

/* Selección de imágenes del producto */
.product-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.product-image-option {
    position: relative;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    aspect-ratio: 1;
}

.product-image-option:hover {
    border-color: #8a8a8a;
    transform: scale(1.02);
}

.product-image-option.selected {
    border-color: #8a8a8a;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.product-image-option img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-image-option .selection-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: #8a8a8a;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
}

.product-image-option.selected .selection-indicator {
    display: flex;
}

/* Área de subida mejorada - Basada en la opción 4 que funciona */
.upload-area-improved {
    border: 2px dashed var(--wc-tryon-primary-color, #00167b);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.upload-area-improved:hover {
    border-color: var(--wc-tryon-primary-color, #00167b);
    background: linear-gradient(135deg, #f0f2ff 0%, #f8f9ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.upload-area-improved.dragover {
    border-color: var(--wc-tryon-primary-color, #00167b);
    background: linear-gradient(135deg, #e8ebff 0%, #f0f2ff 100%);
    border-style: solid;
    transform: scale(1.02);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.25);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.upload-content .upload-icon {
    font-size: 48px;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.upload-area-improved:hover .upload-content .upload-icon {
    transform: scale(1.1) rotate(5deg);
}

.upload-content h5 {
    margin: 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Input de archivo mejorado */
.file-input-improved {
    width: 100%;
    max-width: 350px;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    color: #495057;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.file-input-improved:hover {
    border-color: var(--wc-tryon-primary-color, #00167b);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.file-input-improved:focus {
    outline: none;
    border-color: var(--wc-tryon-primary-color, #00167b);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Botón personalizado para el input file */
.file-input-improved::-webkit-file-upload-button {
    background: linear-gradient(135deg, var(--wc-tryon-primary-color, #00167b) 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.file-input-improved::-webkit-file-upload-button:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Firefox */
.file-input-improved::file-selector-button {
    background: linear-gradient(135deg, var(--wc-tryon-primary-color, #00167b) 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.file-input-improved::file-selector-button:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.upload-requirements {
    margin: 0;
}

.upload-requirements small {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    color: #495057;
    font-size: 12px;
    font-weight: 500;
}

/* Indicador de drag & drop */
.drag-drop-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 16px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 20px;
    border: 1px dashed rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.upload-area-improved:hover .drag-drop-hint {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.5);
}

.drag-drop-hint .drag-icon {
    font-size: 16px;
    animation: bounce 2s infinite;
}

.drag-drop-hint p {
    margin: 0;
    color: #666;
    font-size: 13px;
    font-weight: 500;
}

/* Animación para el icono de drag */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* Estados de carga mejorados */
.upload-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: var(--wc-tryon-primary-color, #00167b);
    padding: 40px 20px;
}

.upload-loading p {
    margin: 0;
    font-weight: 600;
    color: var(--wc-tryon-primary-color, #00167b);
}

/* Responsive */
@media (max-width: 768px) {
    .upload-area-improved {
        padding: 20px 15px;
    }
    
    .upload-content .upload-icon {
        font-size: 40px;
    }
    
    .upload-content h5 {
        font-size: 18px;
    }
    
    .file-input-improved {
        max-width: 100%;
        font-size: 16px; /* Evita zoom en iOS */
    }
}

/* Estilos para drop zone mejorado */
.drop-zone {
    position: relative;
}

.drop-zone__thumb {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 10px;
    color: white;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
    font-size: 14px;
    font-weight: 500;
}

.drop-zone__thumb::before {
    content: attr(data-label);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 20px 10px 10px;
    font-size: 12px;
    text-align: center;
}

.drop-zone__input {
    display: none !important;
}

/* Preview de imagen subida */
.uploaded-image-preview {
    text-align: center;
    margin-bottom: 20px;
}

.uploaded-image-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 12px;
}

.change-image-btn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.2s ease;
}

.change-image-btn:hover {
    background: #e9ecef;
    border-color: #ccc;
}

/* Comparación visual de imágenes */
.image-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #ddd;
}

.comparison-item {
    text-align: center;
    flex: 1;
    max-width: 120px;
}

.comparison-item img {
    width: 100px;
    height: 140px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid #fff;
}

.comparison-item p {
    margin: 8px 0 0 0;
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.comparison-plus,
.comparison-equals {
    font-size: 24px;
    font-weight: bold;
    color: #00167b;
    flex-shrink: 0;
}

.comparison-result {
    text-align: center;
    flex: 1;
    max-width: 120px;
}

.result-placeholder {
    width: 100px;
    height: 140px;
    background: linear-gradient(135deg, #00167b 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    margin: 0 auto 0px;
}

.result-placeholder .result-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.result-placeholder p {
    margin: 0;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.9);
}

/* Estados de subida */
.upload-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: #00167b;
}

.upload-loading p {
    margin: 0;
    font-weight: 600;
    color: #00167b;
}

.upload-progress {
    display: none;
    text-align: center;
    margin: 10px 0;
}

.upload-progress .progress-bar {
    width: 100%;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.upload-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00167b, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
}

.upload-spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #00167b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.upload-success {
    background: #d4edda;
    color: #155724;
    padding: 8px 12px;
    border-radius: 4px;
    margin: 10px 0;
    font-size: 14px;
    border: 1px solid #c3e6cb;
}

/* Responsive para comparación */
@media (max-width: 768px) {
    .image-comparison {
        flex-direction: column;
        gap: 15px;
    }
    
    .comparison-plus,
    .comparison-equals {
        transform: rotate(90deg);
    }
    
    .comparison-item,
    .comparison-result {
        max-width: 150px;
    }
    
    .comparison-item img,
    .result-placeholder {
        width: 120px;
        height: 140px;
    }
}

/* Botones de navegación */
.step-buttons {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 20px;
}

.wc-virtual-tryon-next-btn,
.wc-virtual-tryon-back-btn,
.wc-virtual-tryon-process-btn,
.wc-virtual-tryon-download-btn,
.wc-virtual-tryon-new-try-btn,
.wc-virtual-tryon-retry-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.wc-virtual-tryon-next-btn,
.wc-virtual-tryon-process-btn {
    background: #00167b;
    color: white;
}

.wc-virtual-tryon-next-btn:hover,
.wc-virtual-tryon-process-btn:hover {
    background: #5a6fd8;
}

.wc-virtual-tryon-next-btn:disabled,
.wc-virtual-tryon-process-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.wc-virtual-tryon-process-btn.limit-reached {
    background: #dc35455c !important;
    border-color: #dc35451c !important;
    cursor: not-allowed;
}

.wc-virtual-tryon-process-btn.limit-reached:hover {
    background: #c82333;
    border-color: #bd2130;
}

.wc-virtual-tryon-back-btn {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
}

.wc-virtual-tryon-back-btn:hover {
    background: #e9ecef;
}

.wc-virtual-tryon-download-btn {
    background: #28a745;
    color: white;
}

.wc-virtual-tryon-download-btn:hover {
    background: #218838;
    color: white;
}

.wc-virtual-tryon-new-try-btn,
.wc-virtual-tryon-retry-btn {
    background: #6c757d;
    color: white;
}

.wc-virtual-tryon-new-try-btn:hover,
.wc-virtual-tryon-retry-btn:hover {
    background: #5a6268;
    color: white;
}

/* Procesamiento */
.processing-content {
    text-align: center;
    padding: 40px 20px;
}

.processing-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #00167b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.processing-content h4 {
    color: #333;
    margin-bottom: 12px;
}

.processing-content p {
    color: #666;
    margin: 0;
}

/* Resultado */
.result-images {
    text-align: center;
    margin-bottom: 20px;
}

.result-image-container {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.result-image-container img {
    max-width: 100%;
    height: auto;
    max-height: var(--wc-tryon-result-image-height, 540px);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Error */
.error-content {
    text-align: center;
    padding: 40px 20px;
}

.error-content h4 {
    color: #dc3545;
    margin-bottom: 12px;
}

.error-content p {
    color: #666;
    margin-bottom: 20px;
}





/* Responsive */
@media (max-width: 768px) {
    .wc-virtual-tryon-modal {
        padding: 10px;
    }
    
    .wc-virtual-tryon-modal-content {
        max-height: 95vh;
    }
    
    .wc-virtual-tryon-modal-body {
        padding: 16px;
    }
    
    .product-images-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .step-buttons {
        flex-direction: column;
    }
    
    .result-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .product-images-grid {
        grid-template-columns: 1fr;
    }
    
    .upload-area {
        padding: 30px 15px;
    }
}
/* Estilos para nuevas funcionalidades */

/* Sección de acciones de compra */
.purchase-actions {
    margin-top: 5px;
    padding: 0px;
    border-radius: 12px;
}

/* Texto de llamada a la acción */
.purchase-cta-message {
    text-align: center;
    margin: 20px 0px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border-left: 4px solid var(--wc-tryon-primary-color, #00167b);
}

.purchase-cta-message p {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
}

.purchase-message {
    text-align: center;
    margin-bottom: 20px;
}

.purchase-message h5 {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.purchase-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Botón Añadir al Carrito */
.wc-virtual-tryon-add-to-cart-btn {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(86, 171, 47, 0.3);
    min-width: 180px;
    justify-content: center;
}

.wc-virtual-tryon-add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(86, 171, 47, 0.4);
    background: linear-gradient(135deg, #4a9428 0%, #96d4b8 100%);
}

.wc-virtual-tryon-add-to-cart-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.wc-virtual-tryon-add-to-cart-btn.success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

/* Botón WhatsApp */
.wc-virtual-tryon-whatsapp-btn {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    min-width: 180px;
    justify-content: center;
}

.wc-virtual-tryon-whatsapp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    background: linear-gradient(135deg, #20b858 0%, #0f7a6b 100%);
}

/* Sección de variaciones */
.add-to-cart-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

#product-variations {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-bottom: 15px;
    width: 100%;
    max-width: 400px;
}

#product-variations h6 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

.variation-wrapper {
    margin-bottom: 15px;
}

.variation-wrapper label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

.variation-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

.variation-select:focus {
    outline: none;
    border-color: #00167b;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.variation-price {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-top: 10px;
}

/* Spinner de carga */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .purchase-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .wc-virtual-tryon-add-to-cart-btn,
    .wc-virtual-tryon-whatsapp-btn {
        width: 100%;
        max-width: 280px;
    }
    
    #product-variations {
        max-width: 100%;
    }
}

/* Estados de éxito y error */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 10px 15px;
    border-radius: 4px;
    border: 1px solid #c3e6cb;
    margin: 10px 0;
    text-align: center;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 10px 15px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
    margin: 10px 0;
    text-align: center;
}

/* Mejoras visuales para iconos de botones */
.btn-icon {
    font-size: 18px;
    line-height: 1;
}

/* Animación para botones de éxito */
@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.wc-virtual-tryon-add-to-cart-btn.success {
    animation: successPulse 0.6s ease-in-out;
}
/* Estilos para el botón de eliminar imagen */
.user-image-container {
    position: relative;
    display: inline-block;
}

.remove-image-btn {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 30px;
    padding: 0px 0px 6px;
    height: 30px;
    background-color: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 25px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.remove-image-btn:hover {
    background-color: #cc0000;
    transform: scale(1.1);
}

.remove-image-btn:active {
    transform: scale(0.95);
}

/* Asegurar que la imagen tenga posición relativa para el botón absoluto */
.comparison-item img {
    position: relative;
    display: block;
}
/* Estilos para la comparación de imágenes */
.image-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.comparison-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.comparison-item img {
    max-width: 120px;
    max-height: 140px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.comparison-item p {
    margin: 8px 0 0 0;
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.comparison-plus,
.comparison-equals {
    font-size: 24px;
    font-weight: bold;
    color: var(--wc-tryon-primary-color, #00167b);
    display: flex;
    align-items: center;
    height: 120px; /* Misma altura que las imágenes */
    margin-bottom: 30px;
    padding: 0;
}

.comparison-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.result-placeholder {
    width: 120px;
    height: 140px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
	margin-bottom: 25px;
}

.result-placeholder .result-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.result-placeholder p {
    margin: 0;
    font-size: 11px;
    color: #999;
}

/* Estilos para todos los botones del modal - altura uniforme */
.wc-virtual-tryon-next-btn,
.wc-virtual-tryon-back-btn,
.wc-virtual-tryon-process-btn,
.wc-virtual-tryon-download-btn,
.wc-virtual-tryon-new-try-btn,
.wc-virtual-tryon-add-to-cart-btn,
.wc-virtual-tryon-whatsapp-btn,
.wc-virtual-tryon-retry-btn {
    height: 45px !important;
    min-height: 45px !important;
    padding: 0 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    box-sizing: border-box;
}

/* Centrar el mensaje de éxito */
.result-header {
    text-align: center;
    margin-bottom: 20px;
}

.result-header h4 {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

/* Responsive para la comparación */
@media (max-width: 768px) {
    .image-comparison {
        flex-direction: column;
        gap: 10px;
    }
    
    .comparison-plus,
    .comparison-equals {
        height: auto;
        transform: rotate(90deg);
    }
    
    .comparison-item img,
    .result-placeholder {
        max-width: 100px;
        max-height: 100px;
        width: 100px;
        height: 100px;
    }
}
/* Estilos para los botones de compra - ancho uniforme */
.purchase-actions {
    margin: 0px;
}

.purchase-buttons-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Todos los botones de compra tienen el mismo ancho */
.purchase-buttons-row .wc-virtual-tryon-whatsapp-btn,
.purchase-buttons-row .wc-virtual-tryon-add-to-cart-btn {
    flex: 1;
    width: auto;
    min-width: 0;
}

/* Botones de resultado también uniformes */
.result-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.result-actions .wc-virtual-tryon-download-btn,
.result-actions .wc-virtual-tryon-new-try-btn {
    flex: 1;
    width: auto;
    min-width: 0;
}

/* Cuando solo hay un botón de compra, ocupa todo el ancho */
.purchase-buttons-row:has(.wc-virtual-tryon-whatsapp-btn):not(:has(.wc-virtual-tryon-add-to-cart-btn)) .wc-virtual-tryon-whatsapp-btn,
.purchase-buttons-row:has(.wc-virtual-tryon-add-to-cart-btn):not(:has(.wc-virtual-tryon-whatsapp-btn)) .wc-virtual-tryon-add-to-cart-btn {
    flex: 1;
    width: 100%;
}

/* Fallback para navegadores que no soportan :has() */
@supports not (selector(:has(*))) {
    .purchase-buttons-row.single-button .wc-virtual-tryon-whatsapp-btn,
    .purchase-buttons-row.single-button .wc-virtual-tryon-add-to-cart-btn {
        flex: none;
        width: 100%;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .purchase-buttons-row,
    .result-actions {
        flex-direction: column;
    }
    
    .purchase-buttons-row .wc-virtual-tryon-whatsapp-btn,
    .purchase-buttons-row .wc-virtual-tryon-add-to-cart-btn,
    .result-actions .wc-virtual-tryon-download-btn,
    .result-actions .wc-virtual-tryon-new-try-btn {
        width: 100%;
        flex: none;
    }
}
/* Alineación de botones en los pasos */
.step-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    gap: 15px;
}

.step-actions .wc-virtual-tryon-back-btn {
    margin-right: auto;
}

.step-actions .wc-virtual-tryon-process-btn,
.step-actions .wc-virtual-tryon-next-btn {
    margin-left: auto;
}

/* Grid de imágenes de producto - 3 columnas en móvil */
.product-images-grid {
    display: grid;
    gap: 15px;
    margin: 20px 0;
}

/* Desktop: 4 columnas */
@media (min-width: 769px) {
    .product-images-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        max-width: 600px;
        margin: 20px auto;
    }
}

/* Móvil: 3 columnas */
@media (max-width: 768px) {
    .product-images-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .product-image-option {
        aspect-ratio: 1;
    }
    
    .product-image-option img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
}

/* Ocultar el preview de imagen subida */
.uploaded-image-preview {
    display: none !important;
}

/* Comparación en móviles - solo producto + tu foto */
@media (max-width: 768px) {
    .image-comparison {
        flex-direction: row !important;
        justify-content: center;
        gap: 20px;
    }
    
    .comparison-plus {
        height: auto !important;
        transform: none !important;
        font-size: 20px;
    }
    
    /* Ocultar el = y resultado final en móviles */
    .comparison-equals,
    .comparison-result {
        display: none !important;
    }
    
    .comparison-item img,
    .result-placeholder {
        max-width: 80px;
        max-height: 160px;
        width: 120px;
        height: 80px;
    }
}
/* Estilos base para botones principales */
.wc-virtual-tryon-next-btn,
.wc-virtual-tryon-process-btn,
.wc-virtual-tryon-add-to-cart-btn {
    background: var(--wc-tryon-primary-color, #00167b);
    color: white;
    border: 1px solid var(--wc-tryon-primary-color, #00167b);
}

.wc-virtual-tryon-next-btn:hover,
.wc-virtual-tryon-process-btn:hover,
.wc-virtual-tryon-add-to-cart-btn:hover {
    background: var(--wc-tryon-primary-color, #00167b)dd;
    border-color: var(--wc-tryon-primary-color, #00167b)dd;
}

/* Estilos para selección de imagen de producto */
.product-image-option {
    position: relative;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-image-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product-image-option.selected {
    border-color: var(--wc-tryon-primary-color, #00167b);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

.product-image-option img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.image-overlay {
    display: none !important;
}

.image-type {
    display: none !important;
}

/* Botones secundarios */
.wc-virtual-tryon-back-btn,
.wc-virtual-tryon-download-btn,
.wc-virtual-tryon-new-try-btn,
.wc-virtual-tryon-whatsapp-btn {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.wc-virtual-tryon-back-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
}

.wc-virtual-tryon-download-btn {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.wc-virtual-tryon-download-btn:hover {
    background: #218838;
    border-color: #1e7e34;
    color: white;
}

.wc-virtual-tryon-new-try-btn {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

.wc-virtual-tryon-new-try-btn:hover {
    background: #5a6268;
    border-color: #545b62;
    color: white;
}

.wc-virtual-tryon-whatsapp-btn {
    background: #25d366;
    color: white;
    border-color: #25d366;
}

.wc-virtual-tryon-whatsapp-btn:hover {
    background: #128c7e;
    border-color: #128c7e;
    color: white;
}

/* Indicador de vista previa de prueba virtual - ÚNICO */
.virtual-tryon-preview-indicator {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    background: linear-gradient(135deg, var(--wc-tryon-primary-color, #00167b) 0%, rgba(102, 126, 234, 0.95) 100%) !important;
    color: white !important;
    padding: 8px 14px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    z-index: 9999 !important;
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.4) !important;
    backdrop-filter: blur(4px);
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    animation: fadeInScale 0.5s ease-out;
    max-width: calc(100% - 20px);
    text-align: center;
    line-height: 1.2;
    pointer-events: none;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.virtual-tryon-preview-indicator:before {
    content: '✨';
    margin-right: 4px;
}

/* Mejorar la posición del indicador en diferentes temas */
.woocommerce-product-gallery__image {
    position: relative !important;
}

.product-image,
.product-gallery {
    position: relative !important;
}

/* Responsive para el indicador */
@media (max-width: 768px) {
    .virtual-tryon-preview-indicator {
        font-size: 11px !important;
        padding: 5px 10px !important;
        top: 5px !important;
        left: 5px !important;
    }
}

/* Indicador de modo demo */
.demo-mode-indicator {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
    animation: demoModePulse 2s ease-in-out infinite;
}

@keyframes demoModePulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* Responsive para el indicador de demo */
@media (max-width: 768px) {
    .demo-mode-indicator {
        font-size: 10px;
        padding: 3px 6px;
        margin-left: 4px;
    }
    
    .wc-virtual-tryon-modal-header h3 {
        font-size: 18px;
        line-height: 1.3;
    }
}

@media (max-width: 480px) {
    .demo-mode-indicator {
        display: block;
        margin: 4px 0 0 0;
        text-align: center;
        width: fit-content;
    }
}

/* Estilos para el historial de fotos - Layout vertical a la derecha */
.result-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    justify-content: center;
    max-width: 100%;
}

.result-main {
    flex: 1;
    max-width: 400px;
    text-align: center;
}

.result-sidebar {
    flex: 0 0 100px;
    min-width: 100px;
}

.history-section {
    border-radius: 8px;
    padding: 12px 8px;
    height: fit-content;
}

.history-section h6 {
    margin: 0 0 12px 0;
    color: #495057;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.history-thumbnails-vertical {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.history-thumbnail {
    position: relative;
    width: 70px;
    height: 90px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 0px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.history-thumbnail:hover {
    transform: translateX(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--wc-tryon-primary-color, #00167b);
}

.history-thumbnail.active {
    border-color: var(--wc-tryon-primary-color, #00167b);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
    transform: translateX(-3px);
}

.history-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.history-thumbnail .thumbnail-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    font-size: 9px;
    padding: 3px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-weight: 600;
}

.history-thumbnail:hover .thumbnail-overlay {
    opacity: 1;
}

.history-thumbnail .demo-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ff6b6b;
    color: white;
    font-size: 7px;
    padding: 1px 3px;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Loading state para historial vertical */
.history-loading {
    text-align: center;
    padding: 15px 5px;
    color: #6c757d;
    font-size: 11px;
}

.history-loading .loading-spinner {
    width: 14px;
    height: 14px;
    margin-bottom: 5px;
}

/* Responsive para historial vertical */
@media (max-width: 768px) {
    .result-layout {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .result-main {
        max-width: 100%;
        order: 1;
    }
    
    .result-sidebar {
        flex: none;
        width: 100%;
        max-width: 300px;
        order: 2;
    }
    
    .history-section {
        padding: 12px;
    }
    
    .history-section h6 {
        font-size: 13px;
        margin-bottom: 10px;
    }
    
    .history-thumbnails-vertical {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .history-thumbnail {
        width: 60px;
        height: 75px;
    }
    
    .history-thumbnail:hover {
        transform: translateY(-2px);
    }
    
    .history-thumbnail.active {
        transform: translateY(-2px);
    }
}

@media (max-width: 480px) {
    .result-layout {
        gap: 12px;
    }
    
    .history-section {
        padding: 10px;
    }
    
    .history-thumbnail {
        width: 50px;
        height: 65px;
    }
    
    .history-thumbnails-vertical {
        gap: 6px;
    }
}

/* Animación sutil para el historial */
.history-section {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Indicador visual cuando hay historial activo */
.result-layout:has(.history-section:not([style*="display: none"])) .result-main {
    position: relative;
}

.result-layout:has(.history-section:not([style*="display: none"])) .result-main::after {
    content: '';
    position: absolute;
    top: 0;
    right: -10px;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--wc-tryon-primary-color, #00167b), transparent);
    opacity: 0.3;
    border-radius: 1px;
}

/* Fallback para navegadores que no soportan :has() */
@supports not (selector(:has(*))) {
    .result-main.has-history::after {
        content: '';
        position: absolute;
        top: 0;
        right: -10px;
        width: 2px;
        height: 100%;
        background: linear-gradient(to bottom, transparent, var(--wc-tryon-primary-color, #00167b), transparent);
        opacity: 0.3;
        border-radius: 1px;
    }
}

/* Área de notificaciones */
.wc-virtual-tryon-notifications {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    margin: 20px 24px 0px 24px;
    padding: 12px 16px;
    animation: slideDown 0.3s ease-out;
}

.wc-virtual-tryon-notifications.success {
    background: #efe;
    border-color: #cfc;
}

.wc-virtual-tryon-notifications.warning {
    background: #fff3cd;
    border-color: #ffeaa7;
}

.wc-virtual-tryon-notifications.error {
    background: #fee;
    border-color: #fcc;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.notification-message {
    color: #d63384;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.wc-virtual-tryon-notifications.success .notification-message {
    color: #198754;
}

.wc-virtual-tryon-notifications.warning .notification-message {
    color: #f57c00;
}

.wc-virtual-tryon-notifications.error .notification-message {
    color: #d63384;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Header del modal */
.wc-virtual-tryon-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Botón de historial */
.wc-virtual-tryon-history-btn {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.wc-virtual-tryon-history-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wc-virtual-tryon-history-btn:active {
    transform: translateY(0);
    background: #dee2e6;
}

/* Vista de historial */
.wc-virtual-tryon-history-view {
    padding: 24px;
}

.history-header {
    text-align: center;
    margin-bottom: 24px;
}

.history-header h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 20px;
}

.history-description {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Grid de historial */
.history-grid {
    min-height: 200px;
}

.history-grid-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.history-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.history-item:hover {
    border-color: var(--wc-tryon-primary-color, #00167b);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.history-item.selected {
    border-color: var(--wc-tryon-primary-color, #00167b);
    background: rgba(102, 126, 234, 0.05);
}

.history-item-image {
	width: 100%;
    height: 150px !important;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
    object-position: center top;
}

.history-item-info {
    text-align: center;
}

.history-item-date {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.history-item-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 8px;
}

.history-download-btn {
    background: var(--wc-tryon-primary-color, #00167b);
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-download-btn:hover {
    background: rgba(102, 126, 234, 0.8);
}

.history-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
}

.history-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #666;
}

.history-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Acciones del historial */
.history-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* Responsive para historial */
@media (max-width: 768px) {
    .history-grid-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .history-item-image {
        height: 120px;
    }
    
    .wc-virtual-tryon-history-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* Estructura de acciones de pasos */
.step-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.step-actions-left {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Responsive para acciones de pasos */
@media (max-width: 768px) {
    .step-actions {
        flex-direction: row;
        gap: 8px;
    }
    
    .step-actions-left {
        width: 100%;
        justify-content: center;
    }
}


/* Área de carga bloqueada cuando se alcanza el límite */
.upload-area-improved.upload-disabled,
#upload-area.upload-disabled {
    opacity: 1;
    pointer-events: none;
    cursor: not-allowed;
    background: #f5f5f5 !important;
    border-color: #ccc !important;
    position: relative;
}

.upload-area-improved.upload-disabled::after,
#upload-area.upload-disabled::after {
    content: '🔒';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    opacity: 1;
    z-index: 10;
}

.upload-area-improved.upload-disabled .upload-content,
#upload-area.upload-disabled .upload-content,
.upload-area-improved.upload-disabled .upload-loading,
#upload-area.upload-disabled .upload-loading {
    opacity: 0.1;
}

/* Botón de historial en los pasos */
.step-history-btn {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
    height: 45px !important;
    min-height: 45px !important;
}

.step-history-btn:hover {
    background: #575757 !important;
    color: white !important;
}

/* Ajuste para paso 1 - botón historial a la izquierda */
#step-product-selection .step-actions {
    justify-content: space-between;
}

#step-product-selection .step-actions #history-btn-step1 {
    order: -1;
}

/* Responsive para botones de historial en pasos */
@media (max-width: 768px) {
    .step-history-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .step-actions-left {
        flex-wrap: wrap;
    }
}


/* Sección de WhatsApp en historial */
.history-whatsapp-section {
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0px;
}

.history-whatsapp-text {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 14px;
}

.history-whatsapp-btn {
    background: #25D366;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.history-whatsapp-btn:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

/* Responsive para móviles pequeños - SIEMPRE 2 columnas en historial */
@media (max-width: 480px) {
    .history-grid-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .history-item {
        min-height: auto;
    }
    
    .history-item-image {
        height: 120px;
    }
    
    .history-item-info {
        padding: 8px;
    }
    
    .history-item-date {
        font-size: 11px;
    }
    
    .history-download-btn {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .history-whatsapp-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   BOTONES RESULTADO - MÓVILES UNIFORMES
   ======================================== */

/* Contenedor de acciones del resultado */
.result-actions {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-top: 15px;
}

/* Contenedor de botones de compra */
.purchase-buttons-row {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-top: 10px;
}

/* Todos los botones de acción con mismo estilo base */
.result-actions .wc-virtual-tryon-download-btn,
.result-actions .wc-virtual-tryon-new-try-btn,
.purchase-buttons-row .wc-virtual-tryon-add-to-cart-btn,
.purchase-buttons-row .wc-virtual-tryon-whatsapp-btn {
    flex: 1;
    min-width: 0;
    height: 48px !important;
    padding: 0 16px !important;
    font-size: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Móviles: botones en columna, mismo ancho */
@media (max-width: 768px) {
    .result-actions,
    .purchase-buttons-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .result-actions .wc-virtual-tryon-download-btn,
    .result-actions .wc-virtual-tryon-new-try-btn,
    .purchase-buttons-row .wc-virtual-tryon-add-to-cart-btn,
    .purchase-buttons-row .wc-virtual-tryon-whatsapp-btn {
        width: 100% !important;
        flex: none;
        height: 50px !important;
        font-size: 15px !important;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .result-actions,
    .purchase-buttons-row {
        gap: 8px;
    }
    
    .result-actions .wc-virtual-tryon-download-btn,
    .result-actions .wc-virtual-tryon-new-try-btn,
    .purchase-buttons-row .wc-virtual-tryon-add-to-cart-btn,
    .purchase-buttons-row .wc-virtual-tryon-whatsapp-btn {
        height: 48px !important;
        font-size: 14px !important;
        padding: 0 12px !important;
    }
}

/* ========================================
   ESTILOS PARA NOTIFICACIÓN DE CUPÓN
   ======================================== */

/* Notificación del cupón (verde/positiva) */
.wc-virtual-tryon-coupon-notification {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #28a745;
    border-radius: 10px;
    padding: 15px 20px;
    margin: 10px 20px;
    display: none;
    animation: couponSlideIn 0.5s ease-out;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

.coupon-notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.coupon-notification-icon {
    font-size: 28px;
    flex-shrink: 0;
    animation: couponBounce 1s ease-in-out infinite;
}

.coupon-notification-message {
    color: #155724;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
}

/* Código del cupón resaltado */
.coupon-code-highlight {
    display: inline-block;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white !important;
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 1px;
    margin: 0 4px;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    text-transform: uppercase;
    animation: couponPulse 2s ease-in-out infinite;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.coupon-code-highlight:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.coupon-code-highlight.copied {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    animation: none;
}

/* Cronómetro del cupón */
.coupon-countdown {
    display: inline;
}

.countdown-timer {
    display: inline;
    font-weight: bold;
}

.countdown-timer.countdown-critical {
    animation: criticalBlink 0.5s ease-in-out infinite;
}

.countdown-expired {
    color: #dc3545;
    font-weight: bold;
}

/* Notificación de cupón expirado */
.wc-virtual-tryon-coupon-notification.coupon-expired {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-color: #f5c6cb;
}

.wc-virtual-tryon-coupon-notification.coupon-expired .coupon-notification-message {
    color: #721c24;
}

@keyframes urgentPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 10px 3px rgba(255, 193, 7, 0.6);
    }
}

@keyframes criticalBlink {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.08);
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* Animaciones */
@keyframes couponSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes couponBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes couponPulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(40, 167, 69, 0.5);
    }
}

.coupon-animate-in {
    animation: couponSlideIn 0.5s ease-out;
}

/* Responsive para cupón */
@media (max-width: 768px) {
    .wc-virtual-tryon-coupon-notification {
        margin: 10px 15px;
        padding: 12px 15px;
    }
    
    .coupon-notification-content {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .coupon-notification-message {
        font-size: 13px;
    }
    
    .coupon-code-highlight {
        font-size: 14px;
        padding: 3px 10px;
    }
}

/* ========================================
   BOTÓN FLOTANTE DEL CUPÓN
   ======================================== */

.vto-floating-coupon-btn {
    position: fixed;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99999;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.5);
}

.vto-floating-coupon-btn.vto-floating-visible {
    opacity: 1;
    transform: scale(1);
}

.vto-floating-coupon-btn:hover {
    transform: scale(1.1);
}

.vto-floating-icon {
    font-size: 28px;
    line-height: 1;
}

/* Imagen personalizada en el botón */
.vto-floating-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

/* Lottie en el botón */
.vto-floating-coupon-btn lottie-player {
    width: 100% !important;
    height: 100% !important;
}

/* Posiciones del botón flotante */
.vto-floating-bottom-left {
    bottom: 20px;
    left: 20px;
}

.vto-floating-bottom-right {
    bottom: 20px;
    right: 20px;
}

.vto-floating-top-left {
    top: 20px;
    left: 20px;
}

.vto-floating-top-right {
    top: 20px;
    right: 20px;
}

@keyframes floatingPulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(0, 0, 0, 0.5), 0 0 20px rgba(40, 167, 69, 0.4);
    }
}

/* ========================================
   MINI CRONÓMETRO FLOTANTE
   ======================================== */

.vto-floating-mini-timer {
    position: fixed;
    display: block;
    background: #28a745;
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 99998;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    white-space: nowrap;
    pointer-events: none;
}

.vto-floating-mini-timer.vto-mini-timer-visible {
    opacity: 1;
    transform: scale(1);
}

.vto-floating-mini-timer.vto-mini-timer-expired {
    background: #dc3545 !important;
    color: #fff !important;
}

/* Posiciones del mini timer (opuesto al botón) */
.vto-floating-mini-timer.vto-mini-timer-bottom {
    bottom: 25px;
}

.vto-floating-mini-timer.vto-mini-timer-top {
    top: 25px;
}

.vto-floating-mini-timer.vto-mini-timer-left {
    left: 20px;
}

.vto-floating-mini-timer.vto-mini-timer-right {
    right: 20px;
}

/* ========================================
   POPUP DEL CUPÓN FLOTANTE
   ======================================== */

.vto-floating-coupon-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vto-floating-coupon-popup.vto-popup-visible {
    opacity: 1;
}

.vto-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.vto-popup-content {
    position: relative;
    background: linear-gradient(145deg, #ffffff 0%, #f0f4f8 100%);
    border-radius: 24px;
    padding: 0;
    max-width: 380px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    transform: scale(0.8) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.vto-popup-visible .vto-popup-content {
    transform: scale(1) translateY(0);
}

.vto-popup-close {
    position: absolute;
    top: 10px;
    right: 0px;
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 30px;
    cursor: pointer;
    color: #ffffff;
    transition: all 0.2s;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.vto-popup-close:hover {
	background: none;
    color: #ffffff;
    box-shadow: none;
}

/* Header del popup */
.vto-popup-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px 20px 20px;
}

.vto-popup-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    animation: popupBounce 0.6s ease;
}

@keyframes popupBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Descuento grande */
.vto-popup-discount {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0 20px 30px;
    margin-bottom: -15px;
}

.vto-popup-discount-value {
    display: block;
    font-size: 72px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.vto-popup-discount-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 3px;
    margin-top: 5px;
}

.vto-popup-discount-subtext {
    display: block;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 8px;
}

/* Contenedor del código */
.vto-popup-code-container {
    background: #fff;
    padding: 30px 25px 20px;
    border-radius: 20px 20px 0 0;
    position: relative;
}

.vto-popup-code-label {
    display: block;
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.vto-popup-code {
    display: inline-block;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.vto-popup-code:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.vto-popup-code:active {
    transform: scale(0.98);
}

.vto-popup-code-text {
    position: relative;
    z-index: 1;
}

.vto-popup-code-tooltip {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: #333;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.vto-popup-code-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #333;
}

.vto-popup-code.copied .vto-popup-code-tooltip {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

.vto-popup-code.copied {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.vto-popup-code-hint {
    display: block;
    font-size: 12px;
    color: #aaa;
    margin-top: 12px;
}

/* Timer del popup */
.vto-popup-timer-container {
    background: #f8f9fa;
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.vto-popup-timer-icon {
    font-size: 18px;
}

.vto-popup-timer-label {
    font-size: 14px;
    color: #666;
}

.vto-popup-timer {
    font-size: 14px;
    font-weight: 600;
    color: #28a745;
}

.vto-popup-timer.expired {
    color: #dc3545;
}

/* Responsive para popup */
@media (max-width: 480px) {
    .vto-popup-content {
        max-width: 95%;
        margin: 10px;
    }
    
    .vto-popup-discount-value {
        font-size: 56px;
    }
    
    .vto-popup-code {
        font-size: 20px;
        padding: 12px 24px;
    }
    
    .vto-popup-timer-container {
        flex-direction: column;
        gap: 5px;
    }
}

/* Responsive para botón flotante */
@media (max-width: 768px) {
    .vto-floating-coupon-btn {
        width: 50px;
        height: 50px;
    }
    
    .vto-floating-icon {
        font-size: 24px;
    }
    
    .vto-popup-content {
        margin: 15px;
    }
    
    .vto-popup-icon {
        font-size: 40px;
    }
    
    .vto-popup-message {
        font-size: 14px;
    }
}
