/* =================================================
   PERSONALIZADOR DE CONTENEDORES (Three.js)
   Adaptado del sistema de Shellcon a la paleta naranja de Plásticos Roca
   ================================================= */
.customizer {
    margin-top: 2.5rem;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 18px;
    overflow: hidden;
}
.customizer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.75rem 1.75rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
    flex-wrap: wrap;
}
.customizer-eyebrow {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    color: #ea580c;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.customizer-title {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 1.625rem;
    color: #0f172a;
    margin: 0.5rem 0 0.5rem;
    letter-spacing: -0.02em;
    line-height: 1.15;
}
.customizer-subtitle {
    color: #475569;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    line-height: 1.55;
    max-width: 38rem;
    margin: 0;
}
.customizer-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    flex-shrink: 0;
}
.customizer-badge i { font-size: 0.85rem; }

/* Cuerpo: canvas + controles */
.customizer-body {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 1.5rem;
    padding: 1.75rem;
}
@media (max-width: 900px) {
    .customizer-body { grid-template-columns: 1fr; }
}

/* Canvas */
.customizer-canvas-wrap {
    position: relative;
    border: 1.5px solid #cbd5e1;
    border-radius: 14px;
    overflow: hidden;
    background: #fafaf9;
    aspect-ratio: 1 / 1;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
}
.customizer-canvas-wrap canvas { display: block; max-width: 100%; }

/* Controles */
.customizer-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.customizer-upload {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.125rem;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    background: #fafaf9;
    color: #334155;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.customizer-upload:hover {
    border-color: #ea580c;
    background: #fff7ed;
}
.customizer-upload > i {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #ea580c;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}
.customizer-upload strong {
    display: block;
    font-family: 'Manrope', sans-serif;
    color: #0f172a;
    font-size: 0.95rem;
}
.customizer-upload small {
    color: #475569;
    font-size: 0.75rem;
}

/* Tools */
.customizer-tools {
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 1rem 1.125rem;
    background: #fafaf9;
}
.customizer-tools-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin: 0 0 0.75rem;
}
.cz-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.625rem;
}
.cz-row > span {
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    color: #334155;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.cz-row > span i { color: #ea580c; }
.cz-row input[type="range"] {
    width: 100%;
    accent-color: #ea580c;
}

/* Modos de aplicación (Vinilo / Impresión / Grabado) */
.cz-modes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
}
.cz-mode {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.625rem 0.5rem 0.5rem;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
    text-align: center;
}
.cz-mode:hover {
    border-color: #ea580c;
    background: #fafaf9;
}
.cz-mode.is-active {
    border-color: #ea580c;
    background: #fff7ed;
}
.cz-mode > i {
    font-size: 1.15rem;
    color: #475569;
    transition: color 0.15s ease;
}
.cz-mode.is-active > i { color: #ea580c; }
.cz-mode > span {
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    color: #0f172a;
    line-height: 1.1;
}
.cz-mode > small {
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    color: #475569;
    line-height: 1.15;
}

.customizer-help {
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    color: #475569;
    line-height: 1.55;
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
}
.customizer-help i { color: #ea580c; flex-shrink: 0; margin-top: 2px; }
.customizer-help strong { color: #0f172a; }

/* Botones del personalizador */
.cz-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #ea580c;
    color: #ffffff;
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 0.9rem;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    border: 1px solid #ea580c;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.cz-btn-primary:hover:not(:disabled) {
    background: #c2410c;
    border-color: #c2410c;
}
.cz-btn-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.cz-btn-secondary {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 0.8125rem;
    padding: 0.625rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.cz-btn-secondary:hover {
    border-color: #ea580c;
    color: #ea580c;
    background: #fff7ed;
}
.cz-btn-wa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #25D366;
    color: #ffffff;
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 0.9rem;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    border: 1px solid #1ebe5a;
    transition: background 0.15s ease;
    text-decoration: none;
}
.cz-btn-wa:hover { background: #1ebe5a; color: #ffffff; }

/* =================================================
   MODAL DE PREVIEW del personalizador
   ================================================= */
.cz-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.cz-modal[hidden] { display: none; }
.cz-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(31, 35, 40, 0.78);
    cursor: pointer;
    animation: czFadeIn 0.18s ease;
}
.cz-modal-card {
    position: relative;
    background: #ffffff;
    border-radius: 18px;
    max-width: 720px;
    width: 100%;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    padding: 1.75rem 1.75rem 1.5rem;
    animation: czScaleIn 0.22s ease;
    border: 1px solid #cbd5e1;
}
@keyframes czFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes czScaleIn {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.cz-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f3f4f6;
    border: 1px solid #cbd5e1;
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.15rem;
    transition: background 0.15s ease, color 0.15s ease;
}
.cz-modal-close:hover { background: #e5e7eb; color: #0f172a; }
.cz-modal-head {
    margin-bottom: 1.25rem;
    padding-right: 3rem;
}
.cz-modal-head h3 {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: #0f172a;
    margin: 0.4rem 0 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}
.cz-modal-img-wrap {
    background: #fafaf9;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}
.cz-modal-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.cz-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem;
}
.cz-modal-actions > button[data-cz-close] {
    grid-column: 1 / -1;
    margin-top: 0.25rem;
}
@media (max-width: 540px) {
    .cz-modal-actions { grid-template-columns: 1fr; }
}
