/**
 * DTF Manager Corte - Frontend Styles
 * Estilos para el formulario de múltiples productos
 */

/* Container principal */
.dtf-corte-container {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Mensajes */
.dtf-messages {
    padding: 12px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dtf-messages.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.dtf-messages.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.dtf-messages.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

/* Layout principal */
.dtf-corte-main {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
}

/* Contenido principal */
.dtf-corte-content {
    min-width: 0;
}

/* Productos - DISEÑO MÁS POTENTE */
.dtf-products-list {
    margin-bottom: 30px;
}

.dtf-product-item {
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 25px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.dtf-product-item:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    border-color: #d0d0d0;
}

.dtf-product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: linear-gradient(to bottom, #f8f9fa, #f0f1f3);
    border-bottom: 2px solid #e0e0e0;
}

.dtf-product-title {
    font-size: 18px;
    font-weight: 800;
    margin: 0;
    color: #000;
    letter-spacing: -0.3px;
}

.dtf-remove-product {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 5px;
    transition: all 0.2s;
}

.dtf-remove-product:hover {
    background: #dc3545;
    color: white;
    border-radius: 4px;
}

.dtf-product-content {
    padding: 25px;
}

/* Campos del formulario */
.dtf-field-group {
    margin-bottom: 28px;
}

.dtf-label {
    display: block;
    font-weight: 700;
    margin-bottom: 10px;
    color: #000;
    font-size: 15px;
    letter-spacing: -0.2px;
}

/* Upload zone - OPTIMIZADA PARA CONVERSIÓN */
.dtf-upload-zone {
    border: none;
    border-radius: 8px;
    padding: 35px 30px;
    text-align: center;
    transition: all 0.3s;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.dtf-upload-zone.has-file {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #28a745;
    padding: 33px 28px;
    animation: successPulse 0.5s ease-out;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.dtf-upload-zone.drag-over {
    border-color: #0073aa;
    background: #e8f4fd;
}

.dtf-upload-icon {
    font-size: 48px;
    color: #28a745;
    margin-bottom: 15px;
    display: block;
}

.dtf-upload-text {
    color: #333;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 20px;
}

/* Botón principal de upload - GRANDE Y CLARO */
.dtf-btn-upload {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 16px 36px;
    font-size: 17px;
    font-weight: 800;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(40,167,69,0.25);
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 10px 0;
}

.dtf-btn-upload:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40,167,69,0.35);
}

.dtf-btn-link {
    background: none;
    border: none;
    color: #0073aa;
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
}

.dtf-formats {
    font-size: 13px;
    color: #666;
    margin-top: 15px;
    font-weight: 500;
}

/* Upload progress */
.dtf-upload-progress {
    padding: 30px;
}

.dtf-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.dtf-progress-bar {
    width: 100%;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin-top: 15px;
    overflow: hidden;
}

.dtf-progress-fill {
    height: 100%;
    background: #0073aa;
    width: 0%;
    transition: width 0.3s;
}

/* Upload success - DISEÑO OPTIMIZADO */
.dtf-upload-success {
    background: white;
    border: 2px solid #28a745;
    border-radius: 6px;
    padding: 15px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dtf-file-preview img {
    max-width: 60px;
    max-height: 60px;
    border-radius: 4px;
}

.dtf-file-icon {
    font-size: 40px;
}

.dtf-file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.dtf-file-details {
    flex: 1;
    text-align: left;
}

.dtf-file-name {
    font-weight: 700;
    color: #333;
    font-size: 14px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dtf-file-name::before {
    content: "✓";
    color: #28a745;
    font-weight: 900;
    font-size: 16px;
}

.dtf-file-size {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 0;
    font-weight: 500;
}
}

.dtf-change-file {
    background: white;
    border: 1px solid #28a745;
    color: #28a745;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.dtf-change-file:hover {
    background: #28a745;
    color: white;
}

/* Selectores - MÁS DEFINIDOS */
.dtf-size-select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #cbd5e0;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    background: white;
    transition: all 0.2s;
}

.dtf-size-select:hover {
    border-color: #a0a0a0;
}

.dtf-size-select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.15);
}

/* Selector de cantidad - MÁS GRANDE */
.dtf-quantity-selector {
    display: flex;
    align-items: center;
    gap: 0;
    max-width: 220px;
}

.dtf-qty-minus,
.dtf-qty-plus {
    width: 45px;
    height: 45px;
    border: 2px solid #cbd5e0;
    background: white;
    color: #333; /* Fix: color explícito para que se vean los símbolos + y - */
    cursor: pointer;
    font-size: 22px;
    font-weight: 700;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dtf-qty-minus {
    border-radius: 6px 0 0 6px;
}

.dtf-qty-plus {
    border-radius: 0 6px 6px 0;
}

.dtf-qty-minus:hover,
.dtf-qty-plus:hover {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.dtf-qty-input {
    width: 90px;
    height: 45px;
    border: 2px solid #cbd5e0;
    border-left: none;
    border-right: none;
    text-align: center;
    font-size: 18px;
    font-weight: 800;
}

.dtf-qty-label {
    margin-left: 12px;
    color: #333;
    font-weight: 600;
    font-size: 15px;
}

/* Subtotal producto */
.dtf-product-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: linear-gradient(to right, #f0f9ff, #e6f7ff);
    border: 2px solid #0073aa;
    border-radius: 6px;
    margin-top: 25px;
}

.dtf-product-subtotal span {
    color: #333;
    font-weight: 700;
    font-size: 16px;
}

.dtf-product-price {
    font-size: 24px;
    color: #0073aa;
    font-weight: 900;
    letter-spacing: -0.5px;
}

/* Botón añadir producto */
.dtf-add-product-section {
    text-align: center;
    margin: 30px 0;
}

.dtf-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dtf-btn-add {
    background: white;
    color: #0073aa;
    border: 2px dashed #0073aa;
}

.dtf-btn-add:hover {
    background: #0073aa;
    color: white;
    border-style: solid;
}

/* Delivery options */
.dtf-step {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}

.dtf-step-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.dtf-step-icon {
    font-size: 24px;
}

.dtf-delivery-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.dtf-delivery-card {
    position: relative;
    cursor: pointer;
}

.dtf-delivery-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.dtf-card-content {
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.dtf-delivery-card input:checked + .dtf-card-content {
    border-color: #0073aa;
    background: #f0f8ff;
}

.dtf-card-header strong {
    font-size: 16px;
}

.dtf-delivery-time {
    display: block;
    margin: 10px 0;
    color: #666;
    font-size: 14px;
}

.dtf-card-footer {
    font-size: 12px;
    color: #999;
}

/* Resumen lateral - STICKY */
.dtf-corte-summary {
    position: sticky;
    top: 30px;
    height: fit-content;
    z-index: 100;
}

/* Admin bar adjustment */
.admin-bar .dtf-corte-summary {
    top: 62px;
}

@media (max-width: 782px) {
    .admin-bar .dtf-corte-summary {
        top: 76px;
    }
}

.dtf-summary-content {
    background: white;
    border: 3px solid #0073aa;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.dtf-summary-content h3 {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

/* Productos en resumen */
.dtf-summary-products {
    margin-bottom: 20px;
}

.dtf-empty-cart {
    text-align: center;
    color: #999;
    padding: 20px 0;
    font-size: 14px;
}

.dtf-summary-product {
    display: grid;
    grid-template-columns: 30px 1fr auto;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.dtf-sp-number {
    font-weight: 700;
    color: #0073aa;
}

.dtf-sp-number strong {
    font-weight: 800;
}

.dtf-sp-details {
    color: #1a1a1a;
}

.dtf-sp-details strong {
    font-weight: 700;
    color: #000;
}

.dtf-sp-details small {
    color: #666;
    font-size: 11px;
}

.dtf-unit-price {
    color: #333;
    margin-top: 2px;
}

.dtf-unit-price strong {
    color: #0073aa;
}

.dtf-sp-price {
    font-weight: 700;
    color: #1a1a1a;
}

.dtf-sp-price strong {
    font-weight: 800;
}

.dtf-summary-separator {
    height: 1px;
    background: #e0e0e0;
    margin: 20px 0;
}

/* Totales - MÁS PROMINENTES */
.dtf-summary-totals {
    margin-bottom: 20px;
}

.dtf-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    padding: 5px 0;
}

.dtf-summary-row strong {
    font-weight: 800;
    color: #000;
    font-size: 16px;
}

.dtf-summary-row.dtf-total {
    font-size: 20px;
    font-weight: 900;
    color: #0073aa;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 3px solid #0073aa;
}

.dtf-summary-row.dtf-total strong {
    font-size: 24px;
    letter-spacing: -0.5px;
}

.dtf-tax-notice {
    text-align: right;
    font-size: 12px;
    color: #999;
}

/* Mensaje de mínimo */
.dtf-minimum-notice {
    margin: 15px 0;
}

.dtf-notice-warning,
.dtf-notice-success {
    padding: 12px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
}

.dtf-notice-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

.dtf-notice-success {
    background: #d4edda;
    border: 1px solid #28a745;
    color: #155724;
}

.dtf-check-mark {
    font-weight: 700;
    font-size: 16px;
    color: #28a745;
}

/* Tabla de precios en resumen */
#dtf-pricing-table-container {
    margin: 20px 0;
    padding: 18px;
    background: linear-gradient(to bottom, #f8f9fa, #fff);
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.dtf-pricing-table-wrapper h4 {
    margin: 0 0 12px 0;
    font-size: 15px;
    font-weight: 800;
    color: #000;
    letter-spacing: -0.2px;
}

/* Tabs de tamaños */
.dtf-pricing-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 8px;
}

.dtf-pricing-tab {
    padding: 8px 16px;
    background: #f0f0f0;
    border: 2px solid transparent;
    border-radius: 4px 4px 0 0;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    font-weight: 700;
    color: #666;
}

.dtf-pricing-tab:hover {
    background: #e0e0e0;
    color: #333;
}

.dtf-pricing-tab.active {
    background: var(--dtf-primary, #0073aa);
    color: white;
    border-color: var(--dtf-primary, #0073aa);
}

.dtf-table-size {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: #666;
    font-weight: 600;
}

.dtf-summary-pricing-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.dtf-summary-pricing-table th {
    background: #0073aa;
    color: white;
    padding: 10px 12px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
}

.dtf-summary-pricing-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    font-weight: 600;
}

.dtf-summary-pricing-table tr.active-range {
    background: #e8f4fd;
}

.dtf-summary-pricing-table tr.active-range td {
    font-weight: 800;
    color: #0073aa;
    font-size: 14px;
}

/* Botón carrito */
.dtf-summary-actions {
    margin-bottom: 20px;
}

.dtf-btn-cart {
    background: #28a745;
    color: white;
    width: 100%;
    justify-content: center;
    padding: 15px;
    font-size: 16px;
}

.dtf-btn-cart:hover {
    background: #218838;
}

.dtf-btn-cart:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Features */
.dtf-features {
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.dtf-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #666;
}

.dtf-check {
    color: #28a745;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .dtf-corte-main {
        grid-template-columns: 1fr;
    }
    
    .dtf-corte-summary {
        position: static;
        margin-top: 30px;
        order: -1;
    }
    
    .dtf-delivery-options {
        grid-template-columns: 1fr;
    }
    
    .dtf-quantity-selector {
        max-width: 100%;
    }
    
    .dtf-product-header {
        padding: 10px 15px;
    }
    
    .dtf-product-content {
        padding: 15px;
    }
    
    .dtf-upload-zone {
        padding: 20px;
    }
    
    .dtf-summary-content {
        border-width: 1px;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .dtf-corte-container {
        margin: 10px 0;
    }
    
    .dtf-product-item {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .dtf-step {
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 20px 15px;
    }
    
    .dtf-summary-product {
        font-size: 12px;
    }
    
    .dtf-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .dtf-btn-cart {
        padding: 12px;
        font-size: 14px;
    }
}


/* Toast messages para feedback */
.dtf-success-toast {
    position: fixed;
    top: 100px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(40,167,69,0.25);
    font-weight: 600;
    z-index: 9999;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s;
}

.dtf-success-toast.show {
    opacity: 1;
    transform: translateX(0);
}

/* Botón cambiar archivo mejorado */
.dtf-file-change,
.dtf-change-file {
    padding: 8px 16px;
    background: white;
    border: 2px solid #6c757d;
    border-radius: 4px;
    color: #6c757d;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.dtf-file-change:hover,
.dtf-change-file:hover {
    background: #6c757d;
    color: white;
}

/* Indicadores de paso */
.dtf-step-indicator {
    display: inline-block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    line-height: 28px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s;
}

.dtf-step-indicator.completed {
    background: #28a745;
    color: white;
}

.dtf-step-indicator.active {
    background: #0073aa;
    color: white;
    animation: pulse 1.5s infinite;
}

