/**
 * Sistema de Cotizaciones Embalados - Estilos CSS
 * Archivo: cotizacion-style.css
 */

/* ========================================
   BOTONES DE COTIZACIÓN
======================================== */

.embalados-cotizar-producto,
.embalados-cotizar-carrito {
    background: #2ecc71 !important;
    color: white !important;
    border: none !important;
    padding: 12px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    border-radius: 5px !important;
    transition: all 0.3s ease !important;
    margin-top: 10px !important;
    display: inline-block !important;
    width: auto !important;
}

.embalados-cotizar-producto:hover,
.embalados-cotizar-carrito:hover {
    background: #27ae60 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(46, 204, 113, 0.3);
}

.embalados-cotizar-carrito {
    width: 100% !important;
    margin-bottom: 15px !important;
}

/* ========================================
   MODAL OVERLAY
======================================== */

.embalados-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    padding: 20px;
    overflow-y: auto;
}

.embalados-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: embaladosModalSlideIn 0.3s ease;
}

@keyframes embaladosModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   HEADER DEL MODAL
======================================== */

.embalados-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px 12px 0 0;
}

.embalados-modal-header h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 700;
}

.embalados-modal-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

/* ========================================
   BOTÓN CERRAR
======================================== */

.embalados-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.embalados-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* ========================================
   FORMULARIO
======================================== */

#embalados-cotizacion-form {
    padding: 30px;
}

.embalados-form-group {
    margin-bottom: 20px;
}

.embalados-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.embalados-form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.embalados-form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.embalados-form-group input::placeholder {
    color: #999;
}

/* ========================================
   FILA CON 2 COLUMNAS
======================================== */

.embalados-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 600px) {
    .embalados-form-row {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   RESUMEN DE PRODUCTOS
======================================== */

.embalados-productos-resumen {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
}

.embalados-productos-resumen h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
}

.embalados-productos-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.embalados-producto-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.embalados-producto-item:last-child {
    border-bottom: none;
}

.producto-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.producto-info strong {
    color: #333;
    font-size: 14px;
    margin-bottom: 4px;
}

.producto-info .sku {
    color: #666;
    font-size: 12px;
}

.producto-cantidad {
    color: #666;
    font-size: 14px;
    margin: 0 15px;
}

.producto-precio {
    font-weight: 700;
    color: #2ecc71;
    font-size: 15px;
}

/* ========================================
   LOADING
======================================== */

.embalados-loading {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

/* ========================================
   BOTONES DE ACCIÓN
======================================== */

.embalados-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.embalados-btn-primary,
.embalados-btn-secondary {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.embalados-btn-primary {
    background: #667eea;
    color: white;
}

.embalados-btn-primary:hover:not(:disabled) {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.embalados-btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.embalados-btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.embalados-btn-secondary:hover {
    background: #d0d0d0;
}

/* ========================================
   MENSAJES
======================================== */

.embalados-mensaje {
    margin-top: 20px;
}

.embalados-success,
.embalados-error {
    padding: 20px;
    border-radius: 8px;
    animation: embaladosSlideDown 0.3s ease;
}

@keyframes embaladosSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.embalados-success {
    background: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
}

.embalados-success h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.embalados-success p {
    margin: 8px 0;
    font-size: 14px;
}

.embalados-error {
    background: #f8d7da;
    border: 2px solid #dc3545;
    color: #721c24;
    font-weight: 600;
}

/* ========================================
   BOTÓN DE DESCARGA
======================================== */

.embalados-btn-download {
    display: inline-block;
    background: #28a745;
    color: white !important;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none !important;
    font-weight: 600;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.embalados-btn-download:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 768px) {
    .embalados-modal-content {
        max-width: 95%;
        margin: 10px;
    }
    
    .embalados-modal-header {
        padding: 20px;
    }
    
    .embalados-modal-header h2 {
        font-size: 20px;
    }
    
    #embalados-cotizacion-form {
        padding: 20px;
    }
    
    .embalados-form-actions {
        flex-direction: column;
    }
    
    .embalados-btn-primary,
    .embalados-btn-secondary {
        width: 100%;
    }
    
    .embalados-producto-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .producto-cantidad,
    .producto-precio {
        margin: 0;
    }
}

/* ========================================
   SCROLL PERSONALIZADO
======================================== */

.embalados-modal-content::-webkit-scrollbar {
    width: 8px;
}

.embalados-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.embalados-modal-content::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.embalados-modal-content::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}

/* ========================================
   ANIMACIONES ADICIONALES
======================================== */

@keyframes embaladosPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.embalados-btn-primary:active {
    animation: embaladosPulse 0.3s ease;
}

/* ========================================
   ESTADOS DE VALIDACIÓN
======================================== */

.embalados-form-group input.error {
    border-color: #dc3545;
    background: #fff5f5;
}

.embalados-form-group input.success {
    border-color: #28a745;
}
/* Sección de envío */
.embalados-envio-section {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.embalados-envio-section h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
}

.embalados-radio-option {
    display: block;
    padding: 15px;
    margin-bottom: 10px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.embalados-radio-option:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.embalados-radio-option input[type="radio"] {
    display: none;
}

.embalados-radio-option input[type="radio"]:checked + .option-content {
    border-left: 4px solid #667eea;
    padding-left: 12px;
}

.embalados-radio-option input[type="radio"]:checked ~ * {
    color: #667eea;
}

.option-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 5px;
    align-items: center;
    transition: all 0.3s ease;
}

.option-content strong {
    grid-column: 1;
    font-size: 14px;
    color: #333;
}

.option-description {
    grid-column: 1;
    font-size: 12px;
    color: #666;
}

.option-price {
    grid-column: 2;
    grid-row: 1 / 3;
    font-size: 16px;
    font-weight: 600;
    color: #2ecc71;
    text-align: right;
}

/* Totales */
.embalados-totales {
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 2px solid #667eea;
}

.total-line {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.total-line.total-final {
    border-top: 2px solid #667eea;
    margin-top: 10px;
    padding-top: 15px;
    font-size: 18px;
    color: #667eea;
}

@media (max-width: 768px) {
    .option-content {
        grid-template-columns: 1fr;
    }
    
    .option-price {
        grid-column: 1;
        grid-row: auto;
        text-align: left;
        margin-top: 5px;
    }
}
