/* --- Paleta de Colores y Variables Globales --- */
:root {
    --primary-color: #306ad3;
    --primary-color-light: #e0e7ff;
    --primary-color-hover: #c7d2fe; /* NUEVO: Tono de azul para resaltar */
    --primary-color-dark: #2b2499;
    --secondary-color: #28a745;
    --secondary-color-light: #d1fae5;
    --danger-color: #ef4444;
    --danger-color-light: #fee2e2;
    --warning-color: #f59e0b;
    --critical-color: #dc2626;
    --info-color: #3b82f6; /* Para la advertencia CMYK */
    --bg-color: #ffffff;
    --card-bg-color: #ffffff;
    --text-color-dark: #1e293b;
    --text-color-base: #334155;
    --text-color-muted: #64748b;
    --border-color: #e2e8f0;
    --font-family-base: 'Inter', sans-serif;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --border-radius-md: 0.5rem;
    --border-radius-lg: 0.75rem;
    --transition-base: all 0.2s ease-in-out;
}

/* --- Estilos Base y Globales --- */
body {
    background-color: var(--bg-color);
    font-family: var(--font-family-base);
    color: var(--text-color-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
}

.hidden { display: none !important; }

.navigation {
    position: static !important;
}

/* START OF MODIFICATION: Preloader Styles */
.preloader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
}
.preloader-content {
    text-align: center;
    color: var(--text-color-dark);
}
.preloader-content .spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--primary-color-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}
#preloader-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
#preloader-counter {
    font-size: 1rem;
    color: var(--text-color-muted);
    min-height: 1.2em;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
/* END OF MODIFICATION */


/* --- Contenedor Principal y Encabezado --- */
.promo-main-container { max-width: 1400px; margin: 0 auto; padding: 2rem 1rem; }
#app-container { margin-top: 0; }

.promo-main-container.center-login {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 60px);
    padding: 1rem;
    box-sizing: border-box;
}
.promo-main-container.center-login .login-wrapper {
    min-height: auto;
    padding: 0;
}


.main-header {
    text-align: center;
    margin-bottom: 3rem;
}
.main-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color-dark);
    margin-bottom: 0.5rem;
}
.main-subtitle {
    font-size: 1.125rem;
    color: var(--text-color-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* --- Stepper --- */
.stepper-wrapper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
}
.stepper-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    cursor: pointer;
    transition: var(--transition-base);
}
.stepper-item:hover .step-name {
    color: var(--primary-color);
}
.stepper-item .step-counter {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--card-bg-color);
    border: 2px solid var(--border-color);
    margin-bottom: 0.75rem;
    color: var(--text-color-muted);
    font-weight: 600;
    font-size: 1.25rem;
    transition: var(--transition-base);
}
.stepper-item .step-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color-muted);
    text-align: center;
    transition: var(--transition-base);
}
.stepper-item.active .step-counter {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 0 0 4px var(--primary-color-light);
}
.stepper-item.active .step-name {
    font-weight: 600;
    color: var(--primary-color);
}
.stepper-item.completed .step-counter {
    border-color: var(--secondary-color);
    background-color: var(--secondary-color);
    color: white;
}
.stepper-item.completed:hover .step-counter {
    transform: scale(1.1);
}
.stepper-wrapper::before {
    content: "";
    position: absolute;
    top: 24px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--border-color);
    z-index: 1;
}

/* --- Layout de Pasos y Tarjetas --- */
.steps-container { display: flex; flex-direction: row; gap: 2rem; align-items: flex-start; }
.step-content-column { flex: 3; min-width: 0; }
.shopping-cart-column { flex: 1; min-width: 320px; position: sticky; top: 2rem; }

.step-card {
    position: relative; /* Contexto para el tooltip */
    background-color: var(--card-bg-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    border: 1px solid var(--border-color);
}
.step-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-color-dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.step-title i {
    color: var(--primary-color);
}
.step-description {
    color: var(--text-color-muted);
    margin-top: -1rem;
    margin-bottom: 1.5rem;
}

/* --- Paso 1: Selección de Servicios --- */
.service-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}
.service-type-card {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition-base);
    color: var(--text-color-base);
    height: 135px; 
}
.service-type-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    color: var(--primary-color);
    border-color: var(--primary-color-light);
}
.service-type-card.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-color-light);
}
.service-type-icon { font-size: 2.2rem; }
.service-type-img {
    max-width: 65px;
    max-height: 65px;
    object-fit: contain;
    margin-bottom: 0.25rem;
}
.service-type-name { font-weight: 600; font-size: 0.85rem; line-height: 1.2; }


#service-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); 
    gap: 0.75rem; 
}
.service-item-card {
    background: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center; 
    padding: 0.75rem; 
    transition: var(--transition-base);
    min-height: 150px; 
    cursor: pointer; 
    position: relative; 
    text-align: center; 
    justify-content: space-between; 
}
.service-item-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color); 
}
.service-item-card.in-cart {
    border-color: var(--secondary-color); 
    box-shadow: 0 0 0 2px var(--secondary-color-light); 
}
.service-item-img {
    max-width: 60px; 
    max-height: 60px; 
    width: 100%;
    height: auto; 
    object-fit: contain;
    border-radius: var(--border-radius-md);
    margin-bottom: 0.5rem;
}
.service-name {
    font-weight: 600;
    color: var(--text-color-dark);
    font-size: 0.9rem; 
    margin-bottom: 0.5rem;
    flex-grow: 1;
    line-height: 1.3; 
}
.service-details {
    display: flex;
    flex-direction: column; 
    justify-content: center;
    align-items: center;
    margin-top: 0.5rem; 
    width: 100%; 
}
.service-price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1rem; 
    margin-bottom: 0.5rem; 
}

.in-cart-checkmark {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: bold;
    z-index: 2;
    transform: scale(0); 
    transition: transform 0.2s ease-in-out;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.in-cart-checkmark i {
    line-height: 1;
    font-size: 0.9rem;
}
.service-item-card.in-cart .in-cart-checkmark {
    transform: scale(1);
}

.service-item-card .remove-service-btn {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 24px;
    height: 24px;
    background-color: var(--danger-color);
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    z-index: 3;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease-in-out;
    box-shadow: var(--shadow-md);
}

.service-item-card.in-cart:hover .remove-service-btn {
    opacity: 1;
    transform: scale(1);
}

.service-item-card .remove-service-btn:hover {
    background-color: var(--critical-color);
    transform: scale(1.1);
}


/* --- ESTILOS PASO 2 --- */
/* INICIO DE MODIFICACIÓN: Estilos para el tooltip de ayuda */
.help-tooltip {
    position: absolute;
    top: 145px; /* Ajustado para estar debajo de las pestañas */
    left: 2rem;
    width: max-content;
    background-color: var(--danger-color);
    color: white;
    padding: 0.65rem 1.15rem;
    border-radius: var(--border-radius-md);
    z-index: 10;
    opacity: 0;
    transform: translateY(-15px); /* Inicia desde arriba */
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
    pointer-events: none;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
}

.help-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Flecha del tooltip que apunta hacia arriba */
.help-tooltip .tooltip-arrow {
    position: absolute;
    bottom: 100%; /* Se posiciona en el borde superior del tooltip */
    left: 30px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid var(--danger-color); /* Crea una flecha que apunta hacia arriba */
}
/* FIN DE MODIFICACIÓN */

.service-tabs {
    display: flex;
    flex-wrap: nowrap; 
    overflow-x: auto; 
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
    padding-bottom: 8px; 
    -ms-overflow-style: none;  
    scrollbar-width: thin; 
    scrollbar-color: var(--primary-color) var(--border-color);
}

.service-tabs::-webkit-scrollbar {
    height: 8px;
}
.service-tabs::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}
.service-tabs::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 4px;
    border: 2px solid #f1f5f9;
}

.service-tab-button {
    padding: 0.75rem 1.5rem;
    border: 1px solid transparent;
    border-bottom: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-color-muted);
    position: relative;
    transition: var(--transition-base);
    border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
    flex-shrink: 0; 
    white-space: nowrap; 
}

.service-tab-button:hover {
    color: var(--primary-color);
    background-color: #f8fafc;
}

.service-tab-button.active {
    font-weight: 700;
    color: var(--primary-color);
    background-color: var(--card-bg-color);
    border-color: var(--border-color);
    border-bottom: 1px solid var(--card-bg-color);
    transform: translateY(2px);
    z-index: 2;
    box-shadow: inset 0 -3px 0 var(--primary-color);
}

.service-tab-button.active.uploading {
    background-color: var(--secondary-color-light); 
    color: var(--secondary-color); 
    border-color: var(--secondary-color);
    animation: pulse-upload-border 2s infinite ease-in-out;
}

@keyframes pulse-upload-border {
    0% {
        box-shadow: inset 0 -3px 0 var(--secondary-color);
    }
    50% {
        box-shadow: inset 0 -3px 0 rgba(40, 167, 69, 0.4); 
    }
    100% {
        box-shadow: inset 0 -3px 0 var(--secondary-color);
    }
}


.photo-count-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: var(--danger-color);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 50%;
    padding: 2px 6px;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.upload-area {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    border-top: none; 
    margin-top: -1px;
}

.gallery-container {
    display: none; 
}
.global-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem; 
    background-color: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    border-top-left-radius: var(--border-radius-md);
    border-top-right-radius: var(--border-radius-md);
    flex-wrap: wrap;
    gap: 1rem;
}
.thumbnail-grid {
    margin-top: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    max-height: 450px;
    overflow-y: auto;
    padding: 1rem;
    background-color: #f8fafc;
    border-bottom-left-radius: var(--border-radius-md);
    border-bottom-right-radius: var(--border-radius-md);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.action-group-left {
    display: flex;
    align-items: center;
    gap: 1rem; 
    flex-wrap: wrap;
}
.action-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.action-item > i {
    font-size: 1.1rem;
    color: var(--text-color-muted);
}
.btn-delete-all {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem; 
    font-size: 1rem;
}
.btn-toggle {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-base);
}
.btn-toggle.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}
.btn-toggle:disabled {
    background-color: var(--bg-color);
    cursor: not-allowed;
    opacity: 0.6;
}

.upload-instructions {
    position: relative;
    text-align: center;
    padding: 1.5rem;
    border: 2px dashed var(--primary-color);
    border-radius: var(--border-radius-md);
    background: var(--primary-color-light);
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    transition: var(--transition-base);
    overflow: hidden;
    min-height: 175px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-instructions:hover {
    border-color: var(--primary-color-dark);
    background-color: var(--primary-color-hover);
}

.upload-instructions.drag-over {
    border-color: var(--secondary-color);
    background-color: var(--secondary-color-light); 
    color: var(--secondary-color);
}

.upload-instructions.uploading {
    cursor: not-allowed;
    background-color: #f8fafc;
    border-style: solid;
}

.upload-instructions.uploading .upload-instructions-content {
    opacity: 0;
    visibility: hidden;
}

.upload-instructions.uploading .global-progress-wrapper {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.global-progress-wrapper .progress-info {
    flex-grow: 1;
}

.cancel-batch-btn.compact {
    flex-shrink: 0;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
    padding: 0;
    box-shadow: var(--shadow-md);
}

.cancel-batch-btn.compact:hover {
    background: var(--critical-color);
    transform: scale(1.1);
}

.upload-instructions-content {
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}
.upload-instructions i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    display: block;
}
.upload-instructions p {
    margin: 0;
    font-weight: 500;
}

/* START: Correction for text visibility */
.upload-instructions .mobile-text {
    display: none;
}

.upload-instructions .desktop-text {
    display: block;
}
/* END: Correction for text visibility */

/* START: Styles for the folder selection button updated from enviar-promo.css */
.upload-instructions .upload-button-folder {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 5;
    opacity: 0.8;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--primary-color);
    padding: 10px 18px;
    gap: 10px;
    font-size: 1rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    border-radius: 6px;
}

.upload-instructions .upload-button-folder i {
    font-size: 2.4rem;
}

.upload-instructions .upload-button-folder:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.9);
}
/* END: Styles for the folder selection button */


.gallery-label {
    font-weight: 500;
    color: var(--text-color-dark);
    margin-bottom: 1rem;
}
.gallery-photo-count-badge {
    background-color: var(--primary-color);
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 0.5rem;
    padding: 0.2rem 0.5rem;
    margin-left: 0.5rem;
    display: inline-block;
    vertical-align: middle;
}

.global-progress-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 var(--border-radius-md) var(--border-radius-md);
    margin-bottom: 0;
    box-sizing: border-box;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.global-progress-container {
    width: 100%;
    height: 12px;
    background-color: #d1d5db;
    border-radius: 6px;
    overflow: hidden;
}
.global-progress-bar {
    width: 0%;
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 6px;
    transition: width 0.3s ease;
}
.global-progress-text {
    font-size: 0.875rem;
    color: var(--text-color-base);
    margin-top: 0.5rem;
    font-weight: 500;
}

.thumbnail-item {
    position: relative;
    background-color: var(--card-bg-color);
    box-shadow: var(--shadow-sm);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    transition: var(--transition-base);
    border: 1px solid var(--border-color);
}
.thumbnail-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.thumbnail-img-wrapper {
    aspect-ratio: 10 / 9;
    cursor: pointer;
    position: relative;
    background-color: #f0f2f5; 
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}
.thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    display: block;
    transition: all 0.3s;
    box-sizing: border-box;
}
.thumbnail-footer {
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.progress-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    border-radius: var(--border-radius-md);
}
.progress-ring {
    position: relative;
}
.progress-overlay .cancel-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 6;
    background: rgba(30, 41, 59, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}


.quantity-selector.individual {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    background: var(--card-bg-color);
    font-weight: 600;
    cursor: pointer;
    border-radius: 50%;
    transition: var(--transition-base);
}
.qty-btn:hover {
    background-color: var(--primary-color);
    color: white;
}
.qty-btn:disabled {
    background-color: var(--bg-color);
    cursor: not-allowed;
    opacity: 0.5;
}
.qty-input {
    width: 40px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 600;
    font-size: 1rem;
}
.delete-btn, .crop-btn {
    position: absolute;
    top: 8px;
    background: rgba(30, 41, 59, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-base);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}
.thumbnail-img-wrapper:hover .delete-btn, .thumbnail-img-wrapper:hover .crop-btn {
    opacity: 1;
}
.delete-btn { right: 8px; }
.crop-btn { right: 48px; }
.delete-btn:hover, .crop-btn:hover { background: var(--primary-color); }

.thumbnail-item.with-border .thumbnail-img {
    width: calc(100% - 8px);
    height: calc(100% - 8px);
    filter: drop-shadow(4px 0 0 white)
            drop-shadow(-4px 0 0 white)
            drop-shadow(0 4px 0 white)
            drop-shadow(0 -4px 0 white);
}

.thumbnail-img-wrapper .status-badge {
    position: absolute;
    z-index: 11;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    cursor: help;
    box-shadow: var(--shadow-md);
    border: 2px solid white;
}
.thumbnail-img-wrapper .check-badge {
    top: 8px;
    left: 8px;
    background-color: var(--secondary-color);
}
.thumbnail-img-wrapper .error-badge {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    background-color: var(--danger-color);
    border: none;
}
.thumbnail-item.aspect-ratio-warning {
    border-color: var(--warning-color);
}
.thumbnail-img-wrapper .aspect-ratio-badge {
    bottom: 8px;
    left: 8px;
    background-color: var(--warning-color);
}
.thumbnail-img-wrapper .cmyk-badge {
    bottom: 8px;
    left: 8px;
    background-color: var(--info-color);
    font-size: 0.9rem;
}

.thumbnail-img-wrapper .check-badge.resolution-low {
    background-color: var(--warning-color);
}

.thumbnail-img-wrapper .check-badge.resolution-very-low {
    background-color: var(--critical-color);
}

/* --- Carrito de Compras --- */
#shopping-cart-container .step-title i { color: var(--secondary-color); }
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}
.cart-item-name { font-weight: 500; }
.cart-item-quantity { font-size: 0.875rem; color: var(--text-color-muted); }
.remove-cart-item-btn {
    background: none;
    border: none;
    color: var(--text-color-muted);
    cursor: pointer;
    transition: var(--transition-base);
}
.remove-cart-item-btn:hover { color: var(--danger-color); transform: scale(1.2); }
.cart-empty-message {
    color: var(--text-color-muted);
    text-align: center;
    padding: 3rem 1rem;
    background-color: #f8fafc;
    border-radius: var(--border-radius-md);
}
.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1rem;
    color: var(--text-color-dark);
}
#cart-total-amount { color: var(--secondary-color); }

/* --- Paso 3: Resumen y Formulario --- */
.order-summary-box {
    background-color: #f8fafc;
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    margin-bottom: 2rem;
}
.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}
.summary-item:last-child { border-bottom: none; }
.summary-item span { color: var(--text-color-muted); }
.summary-item strong { color: var(--text-color-dark); font-weight: 600; }
.order-summary-box .summary-item:last-of-type {
    font-size: 1.2rem;
    font-weight: 700;
}
.form-info-text {
    padding: 1rem;
    background-color: var(--primary-color-light);
    color: var(--primary-color-dark);
    border-radius: var(--border-radius-md);
    margin-bottom: 2rem;
    text-align: center;
}
.form-grid-step3 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.form-group-full { grid-column: 1 / -1; }
.form-label { font-weight: 500; margin-bottom: 0.5rem; }
.form-control {
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    transition: var(--transition-base);
}
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-color-light);
}
.form-control.is-invalid {
    border-color: var(--danger-color);
    background-color: var(--danger-color-light);
}
.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px var(--danger-color-light);
}

/* --- Botones de Navegación --- */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

#btn-back {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
    color: white;
}

#btn-back:hover {
    background-color: var(--critical-color);
    border-color: var(--critical-color);
}

/* --- Animación de "pop" para el carrito --- */
@keyframes cart-pop-animation {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.cart-pop {
    animation: cart-pop-animation 0.3s ease-in-out;
}

/* --- Estilos para el Modal de Login con SweetAlert --- */
.login-swal-popup {
    max-width: 500px !important;
    width: 90% !important;
}

#swal-login-form .login-wrapper {
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
}

.swal-warning-text {
    background-color: #fff9e6;
    border: 1px solid #ffecb3;
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-top: 1rem;
    color: #6d5b0f;
    font-size: 0.9rem;
    text-align: left;
}

.swal-warning-text i {
    color: #f59e0b;
    margin-right: 0.5rem;
}


/* --- Responsive --- */
.hidden-desktop {
    display: none;
}

@media (max-width: 767px) {
    .promo-main-container {
        padding-left: 0;
        padding-right: 0;
    }
    .main-title { font-size: 2rem; }
    .step-card {
        padding: 1.5rem 1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
        box-shadow: var(--shadow-sm);
    }
    #step-2-content .step-card {
        padding-left: 0;
        padding-right: 0;
    }
    .step-header-info {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .upload-area {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .form-grid-step3 { grid-template-columns: 1fr; }
    .navigation-buttons { flex-direction: column-reverse; gap: 1rem; }
    .navigation-buttons .btn-action { width: 100%; }
    
    #btn-back {
        width: 50%;
        margin-left: auto;
        margin-right: auto;
    }

    .service-type-grid { 
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        padding: 0 1rem;
    }
    #service-list-container { 
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.5rem;
        padding: 0 1rem; 
    }
    .service-item-card {
        min-height: 130px;
        padding: 0.5rem;
    }
    .service-item-img {
        max-width: 50px;
        max-height: 50px;
        margin-bottom: 0.25rem;
    }
    .service-name {
        font-size: 0.8rem;
        margin-bottom: 0.25rem;
    }
    .service-price {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }

    .upload-instructions {
        padding: 1.5rem 1rem;
        min-height: 150px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .upload-instructions i {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }

    .upload-instructions p {
        font-size: 0.9rem;
        margin-bottom: 0;
    }

    /* START: Correction for text visibility */
    .upload-instructions .desktop-text {
        display: none;
    }

    .upload-instructions .mobile-text {
        display: block;
    }
    /* END: Correction for text visibility */
    
    /* START: Mobile styles for the folder selection button */
    .upload-instructions .upload-button-folder span,
    .upload-instructions .upload-button-folder .desktop-only-text {
        display: none;
    }
    
    .upload-instructions .upload-button-folder {
        padding: 10px;
        bottom: 5px;
        right: 5px;
    }

    .upload-instructions .upload-button-folder i {
        font-size: 1.3rem;
    }
    /* END: Mobile styles for the folder selection button */

    .thumbnail-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        max-height: 350px;
    }
    
    .thumbnail-img-wrapper .crop-btn {
        display: none;
    }

    .thumbnail-img-wrapper .delete-btn {
        opacity: 1; 
    }

    /* --- Mobile Shopping Cart Bar --- */
    .shopping-cart-column { 
        display: none;
    }

    .hidden-desktop { 
        display: flex; 
    }

    .mobile-cart-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000; 
        background-color: var(--card-bg-color);
        border-top: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
        transition: transform 0.3s ease-out, max-height 0.3s ease-out;
        transform: translateY(0); 
        max-height: 55px;
        overflow: hidden; 
        flex-direction: column; 
    }

    .mobile-cart-bar.expanded {
        max-height: 80vh; 
        overflow-y: auto; 
    }

    .mobile-cart-summary-header {
        display: flex;
        justify-content: space-between; 
        align-items: center;
        padding: 0.50rem 1rem;
        background-color: #000000; 
        color: white;
        cursor: pointer;
        flex-shrink: 0;
        min-height: 55px;
    }
    
    .mobile-cart-info {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        font-size: 1.1rem;
        font-weight: 600;
        flex-grow: 1; 
    }

    .mobile-cart-count-badge {
        background-color: var(--danger-color);
        color: white;
        font-size: 0.7rem;
        font-weight: bold;
        border-radius: 50%;
        padding: 2px 6px;
        min-width: 20px;
        height: 20px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-cart-toggle-btn {
        background: none;
        border: none;
        color: white;
        font-size: 1.2rem;
        transition: transform 0.3s ease-out;
        margin-left: 1rem; 
        order: 3; 
    }

    .mobile-cart-bar.expanded .mobile-cart-toggle-btn {
        transform: rotate(180deg); 
    }

    .mobile-cart-items-container {
        padding: 1rem;
        background-color: var(--card-bg-color);
        flex-grow: 1;
        overflow-y: auto;
    }

    .mobile-cart-items .cart-item {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-color);
    }
    .mobile-cart-items .cart-item:last-child {
        border-bottom: none;
    }
    
    body {
        padding-bottom: 55px;
    }

    #mobile-shopping-cart-bar .mobile-cart-summary-header .btn {
        color: white;
        border: none;
        border-radius: var(--border-radius-md);
        padding: 0.5rem 1rem !important;
        line-height: 1.4 !important;
        font-size: 0.9rem;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 0.4rem;
        transition: background-color 0.2s ease-in-out;
    }

    #mobile-shopping-cart-bar .mobile-cart-summary-header .btn.btn-primary {
        background-color: var(--primary-color);
    }
    #mobile-shopping-cart-bar .mobile-cart-summary-header .btn.btn-primary:hover {
        background-color: var(--primary-color-dark);
    }

    #mobile-shopping-cart-bar .mobile-cart-summary-header .btn.btn-success {
        background-color: var(--secondary-color);
    }
    #mobile-shopping-cart-bar .mobile-cart-summary-header .btn.btn-success:hover {
        background-color: #218838;
    }
}

.swal-crop-link {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 600;
    cursor: pointer;
}

.swal-crop-link:hover {
    color: var(--primary-color-dark);
}

.swal2-html-container .swal-file-list {
    display: block;
    max-height: 150px;
    overflow-y: auto;
    list-style-type: decimal;
    list-style-position: inside;
    padding: 0;
    margin: 1rem auto 0;
    width: 90%;
    text-align: left;
}

.swal2-html-container .swal-file-list li {
    display: list-item;
    margin-bottom: 8px;
    padding-left: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.swal-duplicate-footer {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}
