/* ============================================================
   VARIABLES GLOBALES — SISTEMA PRINTMYVIBES

   2563eb
   #0336a2
============================================================ */
:root {
    --color-primary: #0336a2;
    --color-primary-light: #3d8bfd;
    --color-bg: #ffffff;
    --color-border: #e5e7eb;
    --color-muted: #6b7280;
    --color-text: #111;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;

    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 22px;
    --space-xl: 32px;

    --shadow-sm: 0 2px 6px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 14px rgba(0,0,0,0.06);
}

/* ============================================================
   BASE #f8f9fb;
============================================================ */
body {
    padding-top: 75px;
    background: #ffffff;
    font-family: "Inter", sans-serif;
    color: var(--color-text);
}

/* ============================================================
   HEADER PREMIUM
============================================================ */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.08);
    z-index: 2000;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 14px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left #logo {
    font-family: "Playfair Display", serif;
    font-size: 28px;
    font-weight: 700;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* ============================================================
   LAYOUT PRINCIPAL (3 COLUMNAS)
============================================================ */
.layout {
    display: grid;
    grid-template-columns: 300px 1fr 260px;
    gap: 16px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: start;
}

/* ============================================================
   TITULOS
============================================================ */
.step-label {
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.step-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: black;
    color: white;
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

/* ============================================================
   TARJETAS PREMIUM (.box)
============================================================ */
.box {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
}

.box h2 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

/* ============================================================
   IMÁGENES
============================================================ */
.img-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.img-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ============================================================
   TOGGLES
============================================================ */
.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.toggle-label {
    font-weight: 500;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.switch-pmv {
    position: relative;
    width: 42px;
    height: 22px;
}

.switch-pmv input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-pmv {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0;
    right: 0; bottom: 0;
    background-color: #d1d5db;
    transition: .3s;
    border-radius: 34px;
}

.slider-pmv:before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: .3s;
}

.switch-pmv input:checked + .slider-pmv {
    background-color: var(--color-primary);
}

.switch-pmv input:checked + .slider-pmv:before {
    transform: translateX(20px);
}

/* ============================================================
   ESCALA
============================================================ */
.scale-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
}

.scale-btn {
    text-align: center;
    padding: 6px 0;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: white;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    transition: 0.2s;
}

.scale-btn:hover {
    background: #f3f4f6;
}

.scale-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* ============================================================
   DENSIDAD DE COLOR
============================================================ */
.density-number {
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-primary);
    padding: 2px 8px;
    background: #e8f1ff;
    border-radius: var(--radius-sm);
}

.pmv-range {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 5px;
}

.pmv-range::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
    background: var(--color-primary);
    border-radius: 50%;
    cursor: pointer;
}

/* ============================================================
   PALETA DE COLORES
============================================================ */
.color-circle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    margin-right: 4px;
    border: 2px solid transparent;
    transition: 0.15s ease;
}

.active-color {
    border-color: #000;
}

.alt-color {
    border-color: #ccc;
}

.alt-color.selected {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px #bcd9ff;
}

.volume-bar {
    width: 100px;
    height: 6px;
    background: #ddd;
    border-radius: 4px;
    overflow: hidden;
    display: inline-block;
}

.volume-fill {
    height: 100%;
    background: var(--color-primary-light);
}

.volume-percent {
    font-size: 0.75rem;
    font-weight: 600;
    color: #444;
    margin-left: 6px;
}

/* ============================================================
   SPEC CARDS (COLUMNA DERECHA)
============================================================ */
.spec-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-md);
}

.spec-title {
    text-transform: uppercase;
    font-weight: 700;
    opacity: 0.7;
    letter-spacing: 2px;
    font-size: 0.75rem;
    margin-bottom: 10px;
}

.spec-value {
    font-weight: 700;
    font-size: 1.6rem;
    margin: 0;
}

.spec-sub {
    text-transform: uppercase;
    opacity: 0.6;
    letter-spacing: 1px;
    font-size: 0.65rem;
}

/* ============================================================
   BOTONES
============================================================ */
.action-btn {
    background: var(--color-primary-light);
    color: #fff;
    border: none;
    border-radius: var(--radius-lg);
    padding: 12px 28px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.action-btn:hover {
    background: #5a9bff;
    box-shadow: 0 4px 12px rgba(61, 139, 253, 0.35);
}

.action-btn:active {
    background: #2c6cd6;
    transform: scale(0.97);
}

/* ============================================
   FILA DE IMÁGENES — LADO A LADO
============================================ */
.row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* Ambas cajas deben ocupar el mismo ancho */
#zona-original,
#zona-preview {
    flex: 1;
}

/* Las imágenes deben ser más pequeñas y centradas */
#zona-original .img-box,
#zona-preview .img-box {
    width: 100%;
    max-width: 380px;   /* ajustable */
    margin: 0 auto;
}

/* ============================================================
   HEADER PREMIUM (versión final)
============================================================ */
.pmv-header {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.08);
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 2000;
}

.pmv-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 14px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pmv-logo {
    height: 38px;
    width: auto;
}

/* ============================================================
   BOTONES PREMIUM
============================================================ */
.pmv-btn {
    padding: 8px 16px;
    background: #f3f4f6;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.pmv-btn:hover {
    background: #e5e7eb;
}

.pmv-btn-primary {
    padding: 10px 16px;
    background: var(--color-primary);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: 0.2s;
}

.pmv-btn-primary:hover {
    background: var(--color-primary-light);
}

/* ============================================================
   UPLOAD AREA PREMIUM
============================================================ */
.pmv-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 110px;
    background: rgba(0,0,0,0.02);
    border: 1px dashed rgba(0,0,0,0.15);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: 0.2s;
    padding: 16px;
}

.pmv-upload-area:hover {
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.25);
}

/* ============================================================
   TABLAS PREMIUM
============================================================ */
.pmv-table-scroll {
    max-height: 340px;
    overflow-y: auto;
    padding-right: 4px;
}

.pmv-table {
    width: 100%;
    border-collapse: collapse;
}

.pmv-table th {
    padding: 6px 4px;
    font-size: 10px;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 600;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.pmv-table td {
    padding: 6px 4px;
    font-size: 11px;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

/* ============================================================
   COLORES PREMIUM
============================================================ */
.pmv-color {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.15);
    cursor: pointer;
    transition: 0.15s;
}

.pmv-color.alt.selected {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px #bcd9ff;
}

.pmv-alt-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* ============================================================
   VOLUMEN PREMIUM
============================================================ */
.pmv-volume {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pmv-volume-bar {
    flex: 1;
    height: 5px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.pmv-volume-fill {
    height: 100%;
    background: var(--color-primary);
}

.pmv-volume-label {
    font-size: 10px;
    color: #4b5563;
    min-width: 28px;
    text-align: right;
}

/* ============================================================
   LAYOUTS PREMIUM
============================================================ */
.pmv-row {
    display: flex;
    gap: 1.2rem;
    width: 100%;
}

.pmv-box-tall {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* --- ADICIONES NECESARIAS PARA CUBRIR ESTILOS DEL HTML --- */

/* Contenedores de Debug */
.debug-box { font-size: 11px; background: #f1f5f9; padding: 10px; border-radius: var(--radius-sm); border: 1px solid #e2e8f0; }

/* Mensajes de "Estado Vacío" (Canvas y Preview) */
.empty-msg { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem; text-align: center; position: absolute; inset: 0; background: #ffffff; padding: 24px; z-index: 10; }
.empty-msg h3 { font-family: Georgia, 'Times New Roman', serif; font-size: 1.5rem; font-weight: 800; color: #1e293b; margin: 0; letter-spacing: -0.02em; }
.empty-msg p { font-size: 12px; color: #64748b; margin: 0; line-height: 1.4; font-weight: 400; letter-spacing: -0.01em; max-width: 320px; }

/* Layout de la sección de Palette y Detalles */
.pallette-label { width: 100%; border-collapse: collapse; }
.pallette-label th { padding: 4px 2px; text-align: left; font-size: 10px; color: #64748b; font-weight: 600; text-transform: uppercase; }
.pallette-label td { padding: 4px 2px; vertical-align: middle; }

/* Tarjeta de Especificaciones (Layout, Resolution, etc.) */
.spec-card-container { display: flex; flex-direction: column; gap: 8px; }
.spec-card-inline { padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; background: rgba(0,0,0,0.015); border-radius: 8px; border: 1px solid rgba(0,0,0,0.02); }

/* Assembly Guide (Locked State) */
.assembly-locked-box { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.1); }
.assembly-icon-lock { background: #ffffff; padding: 12px; border-radius: 50%; box-shadow: 0 4px 12px rgba(0,0,0,0.08); display: flex; align-items: center; justify-content: center; }
.tooltip-box-custom { visibility: hidden; width: 260px; background-color: #1e293b; color: #ffffff; text-align: left; padding: 12px 14px; border-radius: 8px; position: absolute; z-index: 50; bottom: 135%; left: 0; opacity: 0; transition: opacity 0.2s, transform 0.2s; transform: translateY(4px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); pointer-events: none; }