/**
 * DTF Product Manager Pro - Frontend Styles
 * Version: 5.0.0 - APP STYLE REDESIGN
 * Modern mobile-first app design
 */

/* CSS Variables - App Style */
:root {
    --dtf-primary: #009d45;
    --dtf-button-cart: #009d45;
    --dtf-secondary: #333333;
    --dtf-success: #28a745;
    --dtf-warning: #ffc107;
    --dtf-error: #dc3545;
    --dtf-background: #f5f5f5;
    --dtf-card-bg: #ffffff;
    --dtf-border: #e0e0e0;
    --dtf-text: #1a1a1a;
    --dtf-text-light: #757575;
    
    --dtf-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --dtf-weight-normal: 400;
    --dtf-weight-medium: 500;
    --dtf-weight-bold: 600;
    --dtf-size-base: 16px;
    --dtf-size-title: 18px;
    --dtf-size-small: 14px;
    
    --dtf-radius: 12px;
    --dtf-radius-small: 8px;
    --dtf-padding: 20px;
    --dtf-gap: 16px;
    --dtf-max-width: 1200px;
    
    /* Sombras tipo app */
    --dtf-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --dtf-shadow: 0 2px 8px rgba(0,0,0,0.08);
    --dtf-shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
}

/* Reset & Base */
.dtf-product-container {
    font-family: var(--dtf-font);
    font-size: var(--dtf-size-base);
    color: var(--dtf-text);
    line-height: 1.5;
    margin: 0;
    padding: 0;
    background: var(--dtf-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.dtf-product-container * {
    box-sizing: border-box;
}

/* Mobile First - Base Layout */
.dtf-main-grid {
    display: block;
    max-width: var(--dtf-max-width);
    margin: 0 auto;
    padding: 16px;
}

.dtf-main-content {
    width: 100%;
}

/* Steps - Card Style */
.dtf-step {
    background: var(--dtf-card-bg);
    border: none;
    border-radius: var(--dtf-radius);
    margin-bottom: var(--dtf-gap);
    padding: var(--dtf-padding);
    box-shadow: var(--dtf-shadow);
    transition: box-shadow 0.2s ease;
}

.dtf-step:hover {
    box-shadow: var(--dtf-shadow-lg);
}

.dtf-step-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px 0;
    font-size: var(--dtf-size-title);
    font-weight: var(--dtf-weight-bold);
    color: var(--dtf-text);
}

.dtf-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    background: var(--dtf-primary);
    color: white;
    border-radius: 50%;
    font-size: 15px;
    font-weight: var(--dtf-weight-bold);
    flex-shrink: 0;
}

/* Upload Zone - Modern Style */
.dtf-upload-zone {
    border: 2px dashed var(--dtf-border);
    border-radius: var(--dtf-radius);
    background: var(--dtf-background);
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 160px;
}

.dtf-upload-zone:hover {
    background: #fafafa;
    border-color: var(--dtf-primary);
    transform: translateY(-2px);
}

.dtf-upload-zone.dragover {
    background: #e8f5ed;
    border-color: var(--dtf-primary);
    border-style: solid;
    transform: scale(1.02);
}

.dtf-dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.dtf-dropzone-content h3 {
    margin: 0;
    color: var(--dtf-text);
    font-size: 16px;
    font-weight: var(--dtf-weight-medium);
}

.dtf-formats {
    color: var(--dtf-text-light);
    font-size: 13px;
    margin: 0;
}

/* Upload Loader */
.dtf-upload-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--dtf-radius);
}

.dtf-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--dtf-border);
    border-top-color: var(--dtf-primary);
    border-radius: 50%;
    animation: dtf-spin 1s linear infinite;
}

@keyframes dtf-spin {
    to { transform: rotate(360deg); }
}

.dtf-progress-bar {
    width: 80%;
    max-width: 300px;
    height: 6px;
    background: var(--dtf-border);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 15px;
}

.dtf-progress-fill {
    height: 100%;
    background: var(--dtf-primary);
    width: 0;
    transition: width 0.3s ease;
}

/* Files List - Modern Cards */
.dtf-files-list {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dtf-file-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 16px;
    background: var(--dtf-card-bg);
    border-radius: var(--dtf-radius-small);
    box-shadow: var(--dtf-shadow-sm);
    transition: all 0.2s ease;
    gap: 12px;
}

.dtf-file-item:hover {
    box-shadow: var(--dtf-shadow);
}

.dtf-file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.dtf-file-name {
    font-weight: var(--dtf-weight-medium);
    color: var(--dtf-text);
    font-size: 15px;
    word-break: break-word;
}

.dtf-file-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Quantity Control - Modern Style */
.dtf-quantity-control {
    display: flex;
    align-items: center;
    background: var(--dtf-background);
    border-radius: var(--dtf-radius-small);
    overflow: hidden;
    box-shadow: var(--dtf-shadow-sm);
}

.dtf-qty-minus,
.dtf-qty-plus {
    background: transparent;
    border: none;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: var(--dtf-primary);
    transition: all 0.2s;
    font-weight: var(--dtf-weight-bold);
}

.dtf-qty-minus:hover,
.dtf-qty-plus:hover {
    background: var(--dtf-primary);
    color: white;
}

.dtf-qty-minus:active,
.dtf-qty-plus:active {
    transform: scale(0.95);
}

.dtf-qty-input {
    width: 85px; /* Aumentado de 70px para mostrar 3+ dígitos con decimales (100,5) */
    text-align: center;
    border: none;
    background: transparent;
    padding: 10px 4px;
    font-size: 16px;
    font-weight: var(--dtf-weight-bold);
    color: var(--dtf-text);
}

.dtf-qty-unit {
    padding: 0 12px;
    color: var(--dtf-text-light);
    font-size: 13px;
    white-space: nowrap;
    min-width: 50px;
}

.dtf-file-price {
    font-weight: var(--dtf-weight-bold);
    color: var(--dtf-primary);
    font-size: 16px;
}

.dtf-file-remove {
    background: #f5f5f5;
    color: var(--dtf-error);
    border: none;
    padding: 8px;
    border-radius: var(--dtf-radius-small);
    cursor: pointer;
    transition: all 0.2s;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dtf-file-remove:hover {
    background: var(--dtf-error);
    color: white;
    transform: scale(1.1);
}

/* Delivery Options - Modern Style */
.dtf-delivery-options {
    display: grid;
    gap: 12px;
}

.dtf-delivery-card {
    display: block;
    cursor: pointer;
}

.dtf-delivery-card input[type="radio"] {
    display: none;
}

.dtf-card-content {
    border: 2px solid var(--dtf-border);
    border-radius: var(--dtf-radius);
    padding: 16px;
    transition: all 0.3s ease;
    background: var(--dtf-card-bg);
    box-shadow: var(--dtf-shadow-sm);
}

.dtf-card-content:hover {
    border-color: var(--dtf-primary);
    box-shadow: var(--dtf-shadow);
}

.dtf-delivery-card input:checked + .dtf-card-content {
    border-color: var(--dtf-primary);
    background: #e8f5ed;
    box-shadow: 0 0 0 3px rgba(0, 157, 69, 0.1);
}

.dtf-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.dtf-card-header::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--dtf-border);
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.2s;
}

.dtf-delivery-card input:checked + .dtf-card-content .dtf-card-header::before {
    border-color: var(--dtf-primary);
    background: var(--dtf-primary);
    box-shadow: inset 0 0 0 3px white;
}

.dtf-card-header strong {
    font-size: 16px;
    font-weight: var(--dtf-weight-bold);
    color: var(--dtf-text);
}

.dtf-card-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0 8px 32px;
    gap: 12px;
}

.dtf-delivery-time {
    color: var(--dtf-text-light);
    font-size: 14px;
}

.dtf-delivery-price {
    font-weight: var(--dtf-weight-bold);
    color: var(--dtf-primary);
    font-size: 16px;
}

.dtf-card-footer {
    padding-top: 8px;
    border-top: 1px solid var(--dtf-border);
    margin-top: 8px;
    margin-left: 32px;
}

.dtf-delivery-date {
    color: var(--dtf-text-light);
    font-size: 13px;
}

/* Price Table - Modern Style */
.dtf-price-table-wrapper {
    overflow-x: auto;
    margin: 0 -4px;
}

.dtf-price-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--dtf-card-bg);
    border-radius: var(--dtf-radius);
    overflow: hidden;
    box-shadow: var(--dtf-shadow-sm);
}

.dtf-price-table thead {
    background: var(--dtf-primary);
    color: white;
}

.dtf-price-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: var(--dtf-weight-bold);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dtf-price-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--dtf-border);
    font-size: 15px;
}

.dtf-price-table tbody tr:last-child td {
    border-bottom: none;
}

.dtf-price-table tbody tr:hover {
    background: var(--dtf-background);
}

.dtf-price-table tbody tr.active {
    background: #e8f5ed;
    font-weight: var(--dtf-weight-bold);
}

.dtf-table-note {
    margin-top: 12px;
    color: var(--dtf-text-light);
    font-size: 13px;
    font-style: italic;
}

/* Summary - Mobile First - Modern Sticky Bar */
.dtf-summary {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--dtf-card-bg);
    border-top: 1px solid var(--dtf-border);
    z-index: 1000;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.1);
}

.dtf-summary-content {
    display: none; /* Hidden on mobile */
}

.dtf-summary-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    gap: 16px;
}

.dtf-mobile-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dtf-mobile-qty {
    font-size: 13px;
    color: var(--dtf-text-light);
}

.dtf-mobile-total {
    font-size: 22px;
    font-weight: var(--dtf-weight-bold);
    color: var(--dtf-primary);
    line-height: 1.2;
}

.dtf-btn-mobile-cart {
    background: var(--dtf-button-cart);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: var(--dtf-radius);
    font-weight: var(--dtf-weight-bold);
    font-size: 15px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    box-shadow: var(--dtf-shadow);
    flex-shrink: 0;
}

.dtf-btn-mobile-cart:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--dtf-shadow-lg);
}

.dtf-btn-mobile-cart:active:not(:disabled) {
    transform: translateY(0);
}

.dtf-btn-mobile-cart:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Buttons - Modern Style */
.dtf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border: none;
    border-radius: var(--dtf-radius);
    font-size: 15px;
    font-weight: var(--dtf-weight-bold);
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--dtf-shadow-sm);
}

.dtf-btn-primary {
    background: var(--dtf-primary);
    color: white;
}

.dtf-btn-primary:hover:not(:disabled) {
    background: #007a36;
    transform: translateY(-2px);
    box-shadow: var(--dtf-shadow);
}

.dtf-btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

/* Botón del Carrito Configurable */
.dtf-cart-form {
    display: block !important;
    margin: 20px 0 !important;
    padding: 0 !important;
}

/* Botón Añadir al Carrito - DESTACADO */
.dtf-btn-cart {
    display: block !important;
    visibility: visible !important;
    width: 100%;
    margin: 20px 0;
    padding: 18px 32px;
    background: var(--dtf-button-cart);
    background-color: var(--dtf-button-cart) !important;
    color: white !important;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: var(--dtf-weight-bold);
    border: none;
    border-radius: var(--dtf-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    box-shadow: var(--dtf-shadow);
}

.dtf-btn-cart:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: #cccccc !important;
}

/* Hover del botón del carrito */
.dtf-btn-cart:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--dtf-shadow-lg);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.dtf-btn-cart:active:not(:disabled) {
    transform: translateY(0);
}

/* Tamaños */
.dtf-btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.dtf-btn-medium {
    padding: 12px 20px;
    font-size: 1rem;
}

.dtf-btn-large {
    padding: 16px 24px;
    font-size: 1.1rem;
}

.dtf-btn-xlarge {
    padding: 20px 32px;
    font-size: 1.2rem;
}

/* Estilos */
.dtf-btn-solid {
    background: var(--dtf-btn-bg, var(--dtf-primary));
    border-color: var(--dtf-btn-bg, var(--dtf-primary));
}

.dtf-btn-outline {
    background: transparent;
    border: 2px solid var(--dtf-btn-bg, var(--dtf-primary));
    color: var(--dtf-btn-bg, var(--dtf-primary));
}

.dtf-btn-outline:hover:not(:disabled) {
    background: var(--dtf-btn-bg, var(--dtf-primary));
    color: var(--dtf-btn-text, white);
}

.dtf-btn-gradient {
    background: linear-gradient(135deg, var(--dtf-btn-bg, var(--dtf-primary)) 0%, var(--dtf-btn-hover, #007a36) 100%);
    border: none;
}

.dtf-btn-shadow {
    box-shadow: 0 4px 12px rgba(0, 157, 69, 0.2);
}

.dtf-btn-shadow:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(0, 157, 69, 0.3);
}

/* Animaciones */
.dtf-anim-none:hover:not(:disabled) {
    transform: none;
}

.dtf-anim-lift:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 157, 69, 0.3);
}

.dtf-anim-pulse {
    animation: dtf-pulse 2s infinite;
}

@keyframes dtf-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.dtf-anim-slide {
    overflow: hidden;
    position: relative;
}

.dtf-anim-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
}

.dtf-anim-slide:hover::before {
    left: 100%;
}

/* Hover del botón del carrito */
.dtf-btn-cart:hover:not(:disabled) {
    filter: brightness(0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dtf-btn-cart:active:not(:disabled) {
    transform: scale(0.98);
}

/* Modificadores */
.dtf-uppercase {
    text-transform: uppercase !important;
}

.dtf-full-width {
    width: 100% !important;
}

/* Iconos del botón */
.dtf-btn-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 4px;
}

.dtf-icon-cart::before { content: '🛒'; }
.dtf-icon-plus::before { content: '➕'; }
.dtf-icon-check::before { content: '✓'; }
.dtf-icon-arrow::before { content: '→'; }

.dtf-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Icons */
.dtf-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    color: var(--dtf-primary);
}

.dtf-icon svg {
    width: 100%;
    height: 100%;
}

/* Messages */
.dtf-messages {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: var(--dtf-radius);
    animation: dtf-slideDown 0.3s ease;
}

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

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

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

/* Tablet (768px+) */
@media (min-width: 768px) {
    .dtf-main-grid {
        padding: 30px;
    }
    
    .dtf-delivery-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dtf-summary {
        position: sticky;
        bottom: 20px;
        left: auto;
        right: auto;
        margin: 20px 0;
        border: 2px solid var(--dtf-primary);
        border-radius: var(--dtf-radius);
    }
    
    .dtf-summary-content {
        display: block;
        padding: 25px;
    }
    
    .dtf-summary-mobile {
        display: none;
    }
    
    .dtf-summary-title {
        margin: 0 0 20px 0;
        font-size: 1.1rem;
        font-weight: var(--dtf-weight-bold);
        color: var(--dtf-text);
        text-transform: uppercase;
    }
    
    .dtf-summary-section {
        padding: 15px 0;
        border-bottom: 1px solid var(--dtf-border);
    }
    
    .dtf-summary-item {
        display: flex;
        align-items: flex-start;
        gap: 12px;
    }
    
    .dtf-summary-text {
        flex: 1;
    }
    
    .dtf-summary-text strong {
        display: block;
        margin-bottom: 4px;
    }
    
    /* Desglose de precios en resumen */
    .dtf-summary-breakdown {
        margin-left: 36px;
        margin-top: 8px;
    }
    
    .dtf-breakdown-line {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 4px 0;
        font-size: 14px;
        color: var(--dtf-text);
    }
    
    .dtf-breakdown-line span:first-child {
        color: var(--dtf-text-light);
    }
    
    .dtf-breakdown-line span:last-child {
        font-weight: var(--dtf-weight-medium);
        color: var(--dtf-text);
    }
    
    .dtf-summary-totals {
        padding: 20px 0;
    }
    
    .dtf-price-line {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
    }
    
    .dtf-price-line.dtf-total {
        border-top: 2px solid var(--dtf-border);
        margin-top: 10px;
        padding-top: 15px;
        font-size: 1.2rem;
    }
    
    .dtf-price-line.dtf-total strong {
        color: var(--dtf-primary);
    }
    
    /* Estilo para + IVA */
    .dtf-price-line.dtf-total span:last-child {
        color: var(--dtf-text-light);
        font-size: 0.9em;
        font-weight: normal;
    }
    
    .dtf-trust-badges {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid var(--dtf-border);
    }
    
    .dtf-badge {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
        font-size: var(--dtf-size-small);
        color: var(--dtf-text-light);
    }
    
    .dtf-badge .dtf-icon {
        width: 16px;
        height: 16px;
        color: var(--dtf-success);
    }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
    .dtf-main-grid {
        display: grid;
        grid-template-columns: 1fr 400px;
        gap: 30px;
        padding: 40px;
    }
    
    .dtf-summary {
        position: sticky;
        top: 20px;
        bottom: auto;
        height: fit-content;
        margin: 0;
    }
}

/* Cantidad fija para productos DTF en carrito */
.dtf-fixed-quantity {
    display: inline-block;
    padding: 8px 12px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 50px;
    text-align: center;
    font-weight: bold;
    color: #333;
    cursor: not-allowed;
    position: relative;
}

.dtf-fixed-quantity::after {
    content: '(DTF fijo)';
    position: absolute;
    top: 100%;
    left: 0;
    font-size: 0.75em;
    color: #999;
    white-space: nowrap;
    margin-top: 2px;
    font-weight: normal;
}

/* ============================================
   RESPONSIVE MÓVIL - MEJORAS TOUCH-FRIENDLY
   ============================================ */

/* Por defecto: Mostrar tabla desktop, ocultar lista móvil */
.dtf-price-table-wrapper {
    display: block;
}

.dtf-price-list-mobile {
    display: none;
}

@media (max-width: 767px) {
    /* TABLA DE PRECIOS: Ocultar tabla desktop, mostrar lista móvil */
    .dtf-price-table-wrapper {
        display: none !important;
    }
    
    .dtf-price-list-mobile {
        display: block !important;
        margin-top: 15px;
    }
    
    .dtf-mobile-price-container {
        background: #fff;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .dtf-mobile-price-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 15px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .dtf-mobile-price-row:last-child {
        border-bottom: none;
    }
    
    .dtf-mobile-price-range {
        font-weight: 600;
        font-size: 14px;
        color: #333;
        min-width: 80px;
    }
    
    .dtf-mobile-price-values {
        display: flex;
        gap: 15px;
        font-size: 13px;
    }
    
    .dtf-mobile-price-normal,
    .dtf-mobile-price-express {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }
    
    .dtf-mobile-price-label {
        color: #666;
        font-size: 11px;
        text-transform: uppercase;
        margin-bottom: 2px;
    }
    
    .dtf-mobile-price-amount {
        font-weight: 600;
        color: var(--dtf-primary);
        font-size: 14px;
    }
    
    .dtf-mobile-price-note {
        font-size: 12px;
        color: #666;
        margin-top: 10px;
        padding: 0 15px;
        font-style: italic;
    }
    
    /* Contenedor principal más compacto */
    .dtf-product-container {
        padding: 15px;
    }
    
    .dtf-main-grid {
        padding: 0;
    }
    
    /* Pasos más compactos */
    .dtf-step {
        padding: 20px 15px;
        margin-bottom: 15px;
    }
    
    .dtf-step-title {
        font-size: 1.1em;
        margin-bottom: 15px;
    }
    
    .dtf-step-number {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    /* Dropzone más compacto */
    .dtf-dropzone {
        min-height: 180px;
        padding: 20px;
    }
    
    /* Tarjetas de entrega responsive */
    .dtf-delivery-options {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .dtf-delivery-card {
        padding: 15px;
    }
    
    /* Archivos subidos en lista vertical */
    .dtf-file-item {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 15px;
    }
    
    .dtf-file-info {
        width: 100%;
        justify-content: flex-start;
        gap: 12px;
    }
    
    .dtf-file-name {
        font-size: 14px;
        line-height: 1.4;
    }
    
    /* Controles de archivo más espaciados */
    .dtf-file-controls {
        width: 100%;
        display: flex;
        flex-direction: row;
        justify-content: flex-start !important;
        align-items: center;
        gap: 10px;
        flex-wrap: nowrap !important;
    }
    
    /* Selector de cantidad TOUCH-FRIENDLY con width controlado */
    .dtf-quantity-control {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        flex: 0 0 auto !important;
        max-width: 220px !important;
        min-width: 200px !important;
        visibility: visible !important;
    }
    
    /* Botones grandes para dedos - FORZAR VISIBILIDAD */
    .dtf-qty-minus,
    .dtf-qty-plus {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        visibility: visible !important;
        opacity: 1 !important;
        min-width: 44px !important;
        min-height: 44px !important;
        padding: 0 !important;
        font-size: 20px !important;
        border-radius: 6px !important;
        flex-shrink: 0 !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: transparent !important;
        background: var(--dtf-primary) !important;
        color: white !important;
        border: none !important;
        cursor: pointer !important;
        position: relative !important;
        z-index: 1 !important;
    }
    
    /* Input de cantidad legible y grande */
    .dtf-qty-input {
        width: 80px !important; /* Aumentado de 70px para mostrar 3+ dígitos (100,5) */
        height: 44px !important;
        font-size: 16px !important;
        padding: 8px !important;
        text-align: center;
        border: 2px solid var(--dtf-border);
        border-radius: 6px;
        flex-shrink: 0;
    }
    
    /* Unidad visible */
    .dtf-qty-unit {
        font-size: 13px;
        white-space: nowrap;
        color: #666;
        flex-shrink: 0;
    }
    
    /* Precio del archivo */
    .dtf-file-price {
        font-size: 15px;
        font-weight: 600;
        color: var(--dtf-primary);
        white-space: nowrap;
        margin-left: auto;
    }
    
    /* Botón eliminar más grande */
    .dtf-file-remove {
        width: 44px !important;
        height: 44px !important;
        padding: 0 !important;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    /* Tabla de precios responsive */
    .dtf-price-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .dtf-price-table {
        min-width: 100%;
        font-size: 14px;
    }
    
    .dtf-price-table th,
    .dtf-price-table td {
        padding: 10px 8px;
        font-size: 13px;
    }
    
    /* Resumen lateral se convierte en sticky bottom en móvil */
    .dtf-summary {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
        z-index: 100;
        margin: 0;
    }
    
    .dtf-summary-content {
        padding: 15px 20px;
    }
    
    .dtf-summary-row {
        margin-bottom: 8px;
        font-size: 14px;
    }
    
    .dtf-summary-row strong {
        font-size: 14px;
    }
    
    .dtf-summary-total {
        font-size: 20px;
        padding-top: 12px;
        margin-top: 12px;
    }
    
    /* Botón añadir al carrito más grande y accesible */
    .dtf-add-to-cart-btn {
        width: 100%;
        padding: 16px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        min-height: 52px !important;
        border-radius: 10px;
        touch-action: manipulation;
    }
    
    /* Espaciado inferior para que el contenido no quede detrás del resumen */
    .dtf-main-content {
        padding-bottom: 200px;
    }
    
    /* Mensajes más visibles */
    .dtf-messages {
        position: fixed;
        top: 20px;
        left: 10px;
        right: 10px;
        width: auto;
        z-index: 1000;
        padding: 15px;
        font-size: 14px;
        border-radius: 8px;
    }
}

/* Ajustes para móviles muy pequeños - FIX PRECIO DESCUADRADO */
@media (max-width: 380px) {
    /* Quantity control más compacto para que TODO quepa */
    .dtf-quantity-control {
        gap: 6px !important;
        min-width: 150px !important;
        max-width: 180px !important;
    }
    
    /* Botones 40x40px (sigue siendo touch-friendly) */
    .dtf-qty-minus,
    .dtf-qty-plus {
        min-width: 40px !important;
        min-height: 40px !important;
        font-size: 18px !important;
    }
    
    /* Input más compacto */
    .dtf-qty-input {
        width: 70px !important; /* Aumentado de 60px para mostrar 3 dígitos */
        height: 40px !important;
        font-size: 15px !important;
    }
    
    /* Unidad más pequeña */
    .dtf-qty-unit {
        font-size: 12px !important;
    }
    
    /* Precio sin margin-left auto y más pequeño */
    .dtf-file-price {
        font-size: 14px !important;
        margin-left: 0 !important;
        flex-shrink: 1;
    }
    
    /* Botón eliminar más compacto */
    .dtf-file-remove {
        width: 40px !important;
        height: 40px !important;
    }
    
    /* Resumen total más compacto */
    .dtf-summary-total {
        font-size: 18px;
    }
}
/* Sticky forzado en escritorio para evitar problemas con overflow/transform de los padres */
@media (min-width: 1024px) {
    #dtf-summary.dtf-forced-sticky {
        position: fixed !important;
        top: 20px;
        z-index: 1000;
        /* left y width los controla el JS para alinearlo con la columna de Elementor */
    }
}
.woocommerce-js input[type=number]

 {
    max-width: 100px;
    min-height: 36px;
padding: .70em;
}

/* =============================================
   OVERLAY DE SUBIDA MÚLTIPLE DE ARCHIVOS
   ============================================= */
.dtf-multi-upload-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.dtf-multi-upload-overlay[style*="block"] {
    display: flex !important;
}

.dtf-multi-upload-modal {
    background: white;
    border-radius: 16px;
    padding: 40px 50px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: dtf-modal-appear 0.3s ease;
}

@keyframes dtf-modal-appear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.dtf-multi-upload-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top-color: var(--dtf-primary, #009d45);
    border-radius: 50%;
    animation: dtf-spin 1s linear infinite;
    margin: 0 auto 20px;
}

.dtf-multi-upload-text {
    margin-bottom: 20px;
}

.dtf-multi-upload-text strong {
    display: block;
    font-size: 18px;
    color: #333;
    margin-bottom: 8px;
}

.dtf-multi-upload-count {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: var(--dtf-primary, #009d45);
}

.dtf-multi-upload-count .current {
    font-size: 28px;
}

.dtf-multi-upload-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.dtf-multi-upload-bar-fill {
    height: 100%;
    background: var(--dtf-primary, #009d45);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.dtf-multi-upload-wait {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* =============================================
   ESTILOS PARA PRECIOS MÍNIMOS (0,25m y 0,50m)
   ============================================= */

/* Badge de mínimo en tabla desktop */
.dtf-minimum-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    color: #fff;
    background: var(--dtf-primary, #009d45);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

/* Badge móvil */
.dtf-minimum-badge-mobile {
    display: inline-block;
    font-size: 10px;
    font-weight: 500;
    color: var(--dtf-primary, #009d45);
    margin-left: 4px;
}

/* Final del archivo */
/* =============================================
   ESTILOS PARA CHECKOUT - ARCHIVOS LARGOS
   ============================================= */

/* Contenedor de archivo en checkout */
.woocommerce-checkout .dtf-file-detail {
    max-width: 200px;
    word-break: break-word;
}

/* Nombre de archivo largo colapsable */
.dtf-file-collapsible {
    position: relative;
}

.dtf-file-collapsible .dtf-file-short {
    display: block;
}

.dtf-file-collapsible .dtf-file-full {
    display: none;
    padding: 8px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-top: 5px;
    font-size: 12px;
    word-break: break-all;
}

.dtf-file-collapsible.expanded .dtf-file-full {
    display: block;
}

.dtf-file-toggle {
    color: var(--dtf-primary, #009d45);
    cursor: pointer;
    font-size: 12px;
    text-decoration: none;
    margin-left: 5px;
}

.dtf-file-toggle:hover {
    text-decoration: underline;
}

/* Estilo para la cantidad fija en carrito */
.dtf-fixed-quantity {
    font-weight: 600;
    color: var(--dtf-primary, #009d45);
}

/* Meta de archivo en carrito/checkout */
.woocommerce-cart-form .variation-Archivo,
.woocommerce-checkout .variation-Archivo,
.woocommerce-cart-form dd.variation-Archivo p,
.woocommerce-checkout dd.variation-Archivo p {
    font-weight: 500;
}
