/* ==================================================
   PERSONALIZADOR IMPRIMI2

   Mantiene el lenguaje visual de la marca:
   esquinas rectas, borde negro de 1px, Arial,
   micro-etiquetas en mayúsculas y acento rosa.

   Lo nuevo es la interacción: lienzo con rejilla,
   capas seleccionables, chips de color, pastillas
   de talla y barra de acción fija.
================================================== */

.personalizador-pagina {

    max-width: 1450px;

    margin: 0 auto;

    padding:
        70px
        5%
        150px;

}



/* ==================================================
   CABECERA
================================================== */

.personalizador-cabecera {

    max-width: 900px;

    margin-bottom: 55px;

}


.personalizador-cabecera > p {

    margin-bottom: 15px;

    color: #ff006e;

    font-size: 13px;

    font-weight: 800;

    letter-spacing: 1.5px;

}


.personalizador-cabecera h1 {

    margin-bottom: 20px;

    font-size:
        clamp(
            55px,
            8vw,
            105px
        );

    line-height: 0.82;

    letter-spacing: -5px;

}


.personalizador-cabecera > span {

    display: block;

    max-width: 650px;

    font-size: 18px;

    line-height: 1.5;

}



/* ==================================================
   TIRA DE PASOS
================================================== */

.personalizador-pasos {

    display: flex;

    flex-wrap: wrap;

    gap: 10px;

    margin-top: 28px;

}


.personalizador-pasos li {

    display: flex;

    align-items: center;

    gap: 9px;

    padding:
        8px
        14px
        8px
        9px;

    border:
        1px solid #111111;

    list-style: none;

    font-size: 11px;

    font-weight: 700;

    letter-spacing: 0.06em;

}


.personalizador-pasos li b {

    width: 22px;

    height: 22px;

    display: grid;

    place-items: center;

    background: #111111;

    color: #ffffff;

    font-size: 10px;

}



/* ==================================================
   LAYOUT
================================================== */

.personalizador-layout {

    display: grid;

    grid-template-columns:
        minmax(0, 1.22fr)
        minmax(360px, 0.78fr);

    gap: 55px;

    align-items: start;

}



/* ==================================================
   PREVIEW
================================================== */

.editor-preview {

    min-width: 0;

    /*
    El elemento sticky necesita que su contenedor sea más
    alto que él. Estirando esta columna a la altura de la
    fila, el lienzo puede acompañar al panel de controles.
    */
    align-self: stretch;

}


/*
El lienzo acompaña al panel mientras se hace scroll,
así nunca se pierde de vista lo que se está creando.
*/
.preview-sticky {

    position: sticky;

    top: 22px;

}


.preview-superior {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 14px;

}


.preview-superior h2 {

    display: flex;

    align-items: center;

    gap: 10px;

    font-size: 12px;

    font-weight: 800;

    letter-spacing: 0.14em;

}


.preview-superior h2::before {

    content: "";

    width: 8px;

    height: 8px;

    background: #ff006e;

}



/* ==================================================
   CARAS
================================================== */

.caras-producto {

    display: flex;

    gap: 0;

    border:
        1px solid #111111;

}


.caras-producto button {

    min-height: 38px;

    padding:
        0
        18px;

    border: none;

    background: transparent;

    color: #111111;

    cursor: pointer;

    font-family: inherit;

    font-size: 11px;

    font-weight: 700;

    letter-spacing: 0.08em;

    transition:
        background .15s ease,
        color .15s ease;

}


.caras-producto button + button {

    border-left:
        1px solid #111111;

}


.caras-producto button:hover {

    background: #ead6c4;

}


.caras-producto button.cara-activa {

    background: #111111;

    color: #ffffff;

}


/*
Marca la cara que ya tiene diseño o texto guardado.
*/
.caras-producto button[data-con-contenido="1"]::after {

    content: "";

    width: 5px;

    height: 5px;

    display: inline-block;

    margin-left: 7px;

    background: #ff006e;

    vertical-align: middle;

}


.caras-producto button.cara-activa[data-con-contenido="1"]::after {

    background: #ffd600;

}



/* ==================================================
   MARCO DEL LIENZO
================================================== */

.lienzo-marco {

    position: relative;

    border:
        1px solid #111111;

    background: #ffffff;

}



/* ==================================================
   MOCKUP
================================================== */

.mockup-contenedor {

    width: 100%;

    position: relative;

    overflow: hidden;

    aspect-ratio: 1 / 1;

    background-color: #f4f3f1;

    /*
    Rejilla suave de lienzo: da sensación de editor
    sin añadir color que compita con el producto.
    */
    background-image:
        linear-gradient(
            rgba(17, 17, 17, 0.055)
            1px,
            transparent
            1px
        ),
        linear-gradient(
            90deg,
            rgba(17, 17, 17, 0.055)
            1px,
            transparent
            1px
        );

    background-size:
        26px 26px,
        26px 26px;

    user-select: none;

    touch-action: none;

}


.mockup-producto {

    width: 100%;

    height: 100%;

    position: absolute;

    inset: 0;

    object-fit: contain;

    pointer-events: none;

}



/* ==================================================
   ZONA IMPRIMIBLE

   Las medidas reales las calcula personaliza.js
   con estilos en línea. Aquí solo definimos la caja.
================================================== */

.zona-impresion {

    position: absolute;

    inset: 0;

    border: none !important;

    outline: none !important;

    background: transparent !important;

    box-shadow: none !important;

    overflow: visible !important;

}


/*
Guía de impresión opcional (se activa desde la barra
de herramientas). Es un hijo de la zona, así hereda
sus medidas sin tocar la lógica existente.
*/
.guia-impresion {

    position: absolute;

    inset: 0;

    display: none;

    border:
        1px dashed rgba(255, 0, 110, 0.75);

    background:
        rgba(255, 0, 110, 0.04);

    pointer-events: none;

    z-index: 1;

}


.lienzo-con-guia .guia-impresion {

    display: block;

}


.guia-impresion::after {

    content: "ZONA DE IMPRESIÓN";

    position: absolute;

    top: -1px;

    left: -1px;

    padding:
        3px
        6px;

    background: #ff006e;

    color: #ffffff;

    font-size: 8px;

    font-weight: 800;

    letter-spacing: 0.1em;

}



/* ==================================================
   CAPAS MOVIBLES
================================================== */

.diseno-movible {

    width: 80%;

    position: absolute;

    top: 50%;

    left: 50%;

    display: none;

    transform:
        translate(
            -50%,
            -50%
        );

    transform-origin: center;

    cursor: grab;

    touch-action: none;

    z-index: 3;

}


.diseno-movible:active {

    cursor: grabbing;

}


.diseno-movible img {

    width: 100%;

    height: auto;

    display: block;

    pointer-events: none;

}


.texto-movible {

    position: absolute;

    top: 70%;

    left: 50%;

    transform:
        translate(
            -50%,
            -50%
        );

    cursor: grab;

    touch-action: none;

    z-index: 4;

}


.texto-movible span {

    display: block;

    white-space: nowrap;

    color: #111111;

    font-size: 32px;

    font-weight: 700;

    line-height: 1;

    pointer-events: none;

}



/* ==================================================
   SELECCIÓN DE CAPA

   Marco + tiradores para escalar y girar
   directamente sobre la vista previa.
================================================== */

.capa-marco {

    position: absolute;

    inset: -6px;

    display: none;

    border:
        1px solid #ff006e;

    pointer-events: none;

}


.capa-activa > .capa-marco {

    display: block;

}


.capa-tirador {

    width: 15px;

    height: 15px;

    position: absolute;

    display: none;

    border:
        1px solid #111111;

    background: #ffffff;

    box-shadow:
        0 1px 4px
        rgba(0, 0, 0, 0.25);

    touch-action: none;

    z-index: 5;

}


.capa-activa > .capa-tirador {

    display: block;

}


.capa-tirador[data-tirador="escala"] {

    right: -13px;

    bottom: -13px;

    background: #ff006e;

    cursor: nwse-resize;

}


.capa-tirador[data-tirador="giro"] {

    top: -30px;

    left: 50%;

    margin-left: -7px;

    border-radius: 50%;

    background: #ffd600;

    cursor: grab;

}


.capa-tirador[data-tirador="giro"]::before {

    content: "";

    width: 1px;

    height: 16px;

    position: absolute;

    top: 14px;

    left: 6px;

    background: #ff006e;

}


.capa-movible-sombra {

    outline:
        1px dashed
        rgba(255, 0, 110, 0.45);

    outline-offset: 4px;

}



/* ==================================================
   MENSAJE SOBRE EL LIENZO
================================================== */

.mensaje-zona {

    position: absolute;

    left: 50%;

    bottom: 62px;

    transform:
        translateX(-50%);

    padding:
        9px
        14px;

    border:
        1px solid #111111;

    background:
        rgba(255, 255, 255, 0.94);

    color: #111111;

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 0.06em;

    white-space: nowrap;

    pointer-events: none;

    z-index: 6;

}



/* ==================================================
   BARRA DE HERRAMIENTAS DEL LIENZO
================================================== */

.lienzo-herramientas {

    display: flex;

    flex-wrap: wrap;

    align-items: center;

    gap: 6px;

    padding: 8px;

    border-top:
        1px solid #111111;

    background: #ffffff;

}


.lienzo-herramientas button {

    min-height: 32px;

    padding:
        0
        11px;

    border:
        1px solid #cfcfcf;

    background: #ffffff;

    color: #111111;

    cursor: pointer;

    font-family: inherit;

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 0.06em;

    transition:
        border-color .15s ease,
        background .15s ease,
        color .15s ease;

}


.lienzo-herramientas button:hover:not(:disabled) {

    border-color: #111111;

    background: #ead6c4;

}


.lienzo-herramientas button[aria-pressed="true"] {

    border-color: #111111;

    background: #111111;

    color: #ffffff;

}


.lienzo-herramientas button:disabled {

    opacity: 0.35;

    cursor: not-allowed;

}


.lienzo-herramientas .herramientas-separador {

    flex: 1;

}


.lienzo-pista {

    color: #8a8a8a;

    font-size: 10px;

    letter-spacing: 0.04em;

}


.aviso-preview {

    margin-top: 12px;

    color: #777777;

    font-size: 11px;

    line-height: 1.5;

}



/* ==================================================
   LIENZO A PANTALLA COMPLETA
================================================== */

body.lienzo-ampliado {

    overflow: hidden;

}


body.lienzo-ampliado .preview-sticky {

    position: fixed;

    inset: 0;

    z-index: 950;

    display: flex;

    flex-direction: column;

    justify-content: center;

    max-width: min(94vw, calc(94vh - 120px));

    margin: auto;

    padding: 0;

}


body.lienzo-ampliado::before {

    content: "";

    position: fixed;

    inset: 0;

    z-index: 940;

    background:
        rgba(17, 17, 17, 0.92);

}


body.lienzo-ampliado .lienzo-marco {

    background: #ffffff;

}


body.lienzo-ampliado .preview-superior h2,
body.lienzo-ampliado .aviso-preview {

    color: #ffffff;

}


body.lienzo-ampliado .caras-producto {

    border-color: #ffffff;

}


body.lienzo-ampliado .caras-producto button {

    color: #ffffff;

}


body.lienzo-ampliado .caras-producto button + button {

    border-left-color: #ffffff;

}


body.lienzo-ampliado .caras-producto button.cara-activa {

    background: #ffffff;

    color: #111111;

}



/* ==================================================
   PANEL DE CONTROLES
================================================== */

.editor-controles {

    min-width: 0;

}


.control-bloque {

    margin-bottom: 24px;

}


/*
Cada sección es una tarjeta con número de paso.
Se mantiene el borde recto de 1px de la marca.
*/
.control-seccion {

    margin-bottom: 18px;

    padding: 22px;

    border:
        1px solid #111111;

    background: #ffffff;

}


.control-bloque > label,
.control-seccion > label {

    display: block;

    margin-bottom: 9px;

    color: #6e6e6e;

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 0.12em;

    text-transform: uppercase;

}


.control-seccion h2 {

    display: flex;

    align-items: center;

    gap: 11px;

    margin-bottom: 18px;

    font-size: 15px;

    font-weight: 800;

    letter-spacing: -0.01em;

}


.control-seccion h2::before {

    content: attr(data-paso);

    width: 24px;

    height: 24px;

    flex: none;

    display: grid;

    place-items: center;

    background: #111111;

    color: #ffffff;

    font-size: 10px;

    font-weight: 800;

}


.seccion-cabecera {

    display: flex;

    align-items: baseline;

    justify-content: space-between;

    gap: 14px;

}


.seccion-cabecera h2 {

    margin-bottom: 0;

}


.seccion-nota {

    color: #8a8a8a;

    font-size: 10px;

    letter-spacing: 0.05em;

}


.control-fila {

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 16px;

}



/* ==================================================
   SELECT
================================================== */

.select-envoltorio {

    position: relative;

}


.select-envoltorio::after {

    content: "";

    width: 7px;

    height: 7px;

    position: absolute;

    top: 50%;

    right: 17px;

    border-right:
        2px solid #111111;

    border-bottom:
        2px solid #111111;

    transform:
        translateY(-70%)
        rotate(45deg);

    pointer-events: none;

}


.control-bloque select,
.control-seccion select,
.control-seccion input[type="text"],
.control-seccion textarea {

    width: 100%;

    min-height: 50px;

    padding:
        13px
        40px
        13px
        14px;

    border:
        1px solid #111111;

    border-radius: 0;

    background: #ffffff;

    color: #111111;

    font-family: inherit;

    font-size: 14px;

    -webkit-appearance: none;

    appearance: none;

    transition:
        box-shadow .15s ease;

}


.control-seccion input[type="text"],
.control-seccion textarea {

    padding-right: 14px;

}


.control-bloque select:focus-visible,
.control-seccion select:focus-visible,
.control-seccion input:focus-visible,
.control-seccion textarea:focus-visible,
.control-bloque input:focus-visible {

    outline: none;

    box-shadow:
        0 0 0 3px
        rgba(255, 0, 110, 0.28);

}


.control-seccion textarea {

    min-height: 110px;

    resize: vertical;

    line-height: 1.5;

}



/* ==================================================
   CHIPS DE COLOR
================================================== */

.color-chips {

    display: flex;

    flex-wrap: wrap;

    gap: 8px;

}


.color-chip {

    width: 40px;

    height: 40px;

    position: relative;

    padding: 0;

    border:
        1px solid #c9c9c9;

    background: #ffffff;

    cursor: pointer;

    transition:
        transform .12s ease,
        border-color .12s ease;

}


.color-chip span {

    position: absolute;

    inset: 4px;

    display: block;

}


.color-chip:hover:not(:disabled) {

    border-color: #111111;

    transform: translateY(-2px);

}


.color-chip[aria-pressed="true"] {

    border-color: #ff006e;

    box-shadow:
        0 0 0 2px
        rgba(255, 0, 110, 0.25);

}


.color-chip:disabled {

    cursor: not-allowed;

    opacity: 0.4;

}


.color-chip:disabled::after {

    content: "";

    position: absolute;

    top: 50%;

    left: -2px;

    right: -2px;

    height: 1px;

    background: #ff006e;

    transform: rotate(-45deg);

}


/*
Damero para el color "Transparente".
*/
.muestra-transparente {

    background-color: #ffffff;

    background-image:
        linear-gradient(
            45deg,
            #d0d0d0 25%,
            transparent 25%,
            transparent 75%,
            #d0d0d0 75%
        ),
        linear-gradient(
            45deg,
            #d0d0d0 25%,
            transparent 25%,
            transparent 75%,
            #d0d0d0 75%
        );

    background-size:
        10px 10px;

    background-position:
        0 0,
        5px 5px;

}


.color-elegido {

    margin-top: 11px;

    color: #6e6e6e;

    font-size: 11px;

    letter-spacing: 0.04em;

}


.color-elegido b {

    color: #111111;

}



/* ==================================================
   PASTILLAS DE TALLA
================================================== */

.talla-pastillas {

    display: flex;

    flex-wrap: wrap;

    gap: 7px;

}


.talla-pastilla {

    min-width: 46px;

    min-height: 42px;

    padding:
        0
        12px;

    border:
        1px solid #111111;

    background: #ffffff;

    color: #111111;

    cursor: pointer;

    font-family: inherit;

    font-size: 12px;

    font-weight: 700;

    transition:
        background .15s ease,
        color .15s ease;

}


.talla-pastilla:hover:not(:disabled) {

    background: #ead6c4;

}


.talla-pastilla[aria-pressed="true"] {

    background: #111111;

    color: #ffffff;

}


.talla-pastilla:disabled {

    border-color: #d5d5d5;

    color: #bdbdbd;

    cursor: not-allowed;

    text-decoration: line-through;

}



/* ==================================================
   CANTIDAD
================================================== */

.cantidad-personalizador {

    width: 150px;

    height: 48px;

    display: grid;

    grid-template-columns:
        46px
        1fr
        46px;

    border:
        1px solid #111111;

}


.cantidad-personalizador button {

    border: none;

    background: transparent;

    color: #111111;

    cursor: pointer;

    font-family: inherit;

    font-size: 19px;

    transition:
        background .15s ease;

}


.cantidad-personalizador button:hover:not(:disabled) {

    background: #ead6c4;

}


.cantidad-personalizador button:disabled {

    opacity: 0.35;

    cursor: not-allowed;

}


.cantidad-personalizador input {

    width: 100%;

    border: none;

    outline: none;

    background: transparent;

    text-align: center;

    font-family: inherit;

    font-size: 14px;

    font-weight: 700;

    -moz-appearance: textfield;

}


.cantidad-personalizador
input::-webkit-inner-spin-button,
.cantidad-personalizador
input::-webkit-outer-spin-button {

    -webkit-appearance: none;

    margin: 0;

}



/* ==================================================
   SUBIR ARCHIVO
================================================== */

#archivo-diseno {

    display: none;

}


/*
Zona de arrastre: acepta soltar el archivo y también
pegarlo desde el portapapeles.
*/
.zona-soltar {

    display: block;

    padding:
        30px
        20px;

    border:
        2px dashed #c2c2c2;

    background: #fbfaf8;

    cursor: pointer;

    text-align: center;

    transition:
        border-color .15s ease,
        background .15s ease;

}


.zona-soltar:hover {

    border-color: #111111;

    background: #f3f1ed;

}


.zona-soltar.soltar-activa {

    border-color: #ff006e;

    background:
        rgba(255, 0, 110, 0.06);

}


.zona-soltar strong {

    display: block;

    margin-bottom: 7px;

    font-size: 13px;

}


.zona-soltar em {

    display: block;

    color: #8a8a8a;

    font-size: 11px;

    font-style: normal;

    line-height: 1.6;

}


.zona-soltar-icono {

    width: 34px;

    height: 34px;

    display: grid;

    place-items: center;

    margin: 0 auto 12px;

    border:
        1px solid #111111;

    font-size: 16px;

}


.boton-subir {

    width: 100%;

    min-height: 46px;

    display: flex !important;

    align-items: center;

    justify-content: center;

    margin-top: 12px;

    border:
        1px solid #111111;

    background: #111111;

    color: #ffffff;

    cursor: pointer;

    font-size: 11px !important;

    font-weight: 700;

    letter-spacing: 0.1em;

    transition:
        background .15s ease,
        color .15s ease;

}


.boton-subir:hover {

    background: #ff006e;

    border-color: #ff006e;

}


/*
Ficha del archivo cargado.
*/
.archivo-ficha {

    display: none;

    align-items: center;

    gap: 12px;

    margin-top: 12px;

    padding: 10px;

    border:
        1px solid #111111;

    background: #ffffff;

}


.archivo-ficha.visible {

    display: flex;

}


.archivo-ficha-miniatura {

    width: 46px;

    height: 46px;

    flex: none;

    display: grid;

    place-items: center;

    overflow: hidden;

    border:
        1px solid #e2e2e2;

    background: #f4f3f1;

    font-size: 10px;

    font-weight: 800;

}


.archivo-ficha-miniatura img {

    width: 100%;

    height: 100%;

    object-fit: contain;

}


.archivo-ficha-datos {

    min-width: 0;

    flex: 1;

}


.archivo-nombre {

    overflow: hidden;

    color: #111111;

    font-size: 12px;

    font-weight: 700;

    text-overflow: ellipsis;

    white-space: nowrap;

}


.archivo-peso {

    margin-top: 3px;

    color: #8a8a8a;

    font-size: 10px;

    letter-spacing: 0.05em;

}


.archivo-quitar {

    flex: none;

    width: 30px;

    height: 30px;

    border:
        1px solid #111111;

    background: #ffffff;

    cursor: pointer;

    font-family: inherit;

    font-size: 13px;

    line-height: 1;

}


.archivo-quitar:hover {

    background: #ff006e;

    border-color: #ff006e;

    color: #ffffff;

}


.archivo-error {

    margin-top: 9px;

    color: #ff006e;

    font-size: 12px;

    font-weight: 700;

}



/* ==================================================
   RANGOS
================================================== */

.control-rango {

    margin-bottom: 20px;

}


.control-rango > label {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 12px;

    margin-bottom: 10px;

    color: #6e6e6e;

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 0.12em;

    text-transform: uppercase;

}


.rango-valor {

    min-width: 52px;

    padding:
        3px
        7px;

    border:
        1px solid #e0e0e0;

    background: #fbfaf8;

    color: #111111;

    font-size: 11px;

    font-weight: 800;

    letter-spacing: 0;

    text-align: center;

}


.rango-linea {

    display: grid;

    grid-template-columns:
        34px
        minmax(0, 1fr)
        34px;

    gap: 8px;

    align-items: center;

}


.rango-paso {

    height: 32px;

    border:
        1px solid #cfcfcf;

    background: #ffffff;

    color: #111111;

    cursor: pointer;

    font-family: inherit;

    font-size: 15px;

    line-height: 1;

}


.rango-paso:hover:not(:disabled) {

    border-color: #111111;

    background: #ead6c4;

}


.rango-paso:disabled {

    opacity: 0.35;

    cursor: not-allowed;

}


input[type="range"] {

    width: 100%;

    height: 26px;

    background: transparent;

    accent-color: #ff006e;

    -webkit-appearance: none;

    appearance: none;

    cursor: pointer;

}


input[type="range"]:disabled {

    cursor: not-allowed;

    opacity: 0.4;

}


input[type="range"]::-webkit-slider-runnable-track {

    height: 3px;

    background: #d8d8d8;

}


input[type="range"]::-webkit-slider-thumb {

    width: 18px;

    height: 18px;

    margin-top: -8px;

    border:
        1px solid #111111;

    background: #ff006e;

    -webkit-appearance: none;

    appearance: none;

    cursor: grab;

}


input[type="range"]::-moz-range-track {

    height: 3px;

    background: #d8d8d8;

}


input[type="range"]::-moz-range-thumb {

    width: 16px;

    height: 16px;

    border:
        1px solid #111111;

    border-radius: 0;

    background: #ff006e;

    cursor: grab;

}



/* ==================================================
   BOTONES DE AJUSTE
================================================== */

.botones-ajuste {

    display: flex;

    flex-wrap: wrap;

    gap: 8px;

}


.botones-ajuste button {

    min-height: 42px;

    flex: 1 1 120px;

    padding:
        0
        12px;

    border:
        1px solid #111111;

    background: transparent;

    color: #111111;

    cursor: pointer;

    font-family: inherit;

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 0.08em;

    transition:
        background .15s ease,
        color .15s ease;

}


.botones-ajuste button:hover:not(:disabled) {

    background: #111111;

    color: #ffffff;

}


.botones-ajuste button:disabled {

    border-color: #d8d8d8;

    color: #bdbdbd;

    cursor: not-allowed;

}


#eliminar-diseno:hover:not(:disabled) {

    background: #ff006e;

    border-color: #ff006e;

}



/* ==================================================
   TEXTO
================================================== */

.texto-controles {

    display: grid;

    grid-template-columns:
        minmax(0, 1fr);

    gap: 18px;

    margin:
        18px
        0
        0;

}


.texto-controles > div > label {

    display: block;

    margin-bottom: 9px;

    color: #6e6e6e;

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 0.12em;

    text-transform: uppercase;

}


.texto-color-linea {

    display: flex;

    flex-wrap: wrap;

    align-items: center;

    gap: 8px;

}


#color-texto {

    width: 46px;

    height: 40px;

    flex: none;

    padding: 3px;

    border:
        1px solid #111111;

    background: #ffffff;

    cursor: pointer;

}


.texto-color-preset {

    width: 26px;

    height: 26px;

    padding: 0;

    border:
        1px solid #c9c9c9;

    cursor: pointer;

    transition:
        transform .12s ease,
        border-color .12s ease;

}


.texto-color-preset:hover {

    border-color: #111111;

    transform: translateY(-2px);

}


.texto-color-preset[aria-pressed="true"] {

    border-color: #ff006e;

    box-shadow:
        0 0 0 2px
        rgba(255, 0, 110, 0.25);

}



/* ==================================================
   PRECIO
================================================== */

.personalizador-precio {

    display: flex;

    flex-wrap: wrap;

    align-items: center;

    justify-content: space-between;

    gap: 12px;

    margin:
        28px
        0
        16px;

    padding:
        20px;

    border:
        1px solid #111111;

    background: #111111;

    color: #ffffff;

}


.personalizador-precio span {

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 0.12em;

    text-transform: uppercase;

}


.personalizador-precio strong {

    color: #ffd600;

    font-size: 30px;

    letter-spacing: -1px;

}


.personalizador-precio .personalizador-stock {

    flex-basis: 100%;

    margin: 0 !important;

}



/* ==================================================
   BOTONES FINALES
================================================== */

.boton-anadir-personalizado {

    width: 100%;

    min-height: 58px;

    border: none;

    background: #ff006e;

    color: #ffffff;

    cursor: pointer;

    font-family: inherit;

    font-size: 12px;

    font-weight: 800;

    letter-spacing: 0.14em;

    transition:
        background .15s ease,
        transform .1s ease;

}


.boton-anadir-personalizado:hover:not(:disabled) {

    background: #111111;

}


.boton-anadir-personalizado:active:not(:disabled) {

    transform: translateY(1px);

}


.boton-anadir-personalizado:disabled {

    background: #cccccc;

    cursor: not-allowed;

}


.boton-restablecer {

    width: 100%;

    min-height: 46px;

    margin-top: 10px;

    border:
        1px solid #111111;

    background: transparent;

    color: #111111;

    cursor: pointer;

    font-family: inherit;

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 0.1em;

    transition:
        background .15s ease,
        color .15s ease;

}


.boton-restablecer:hover {

    background: #111111;

    color: #ffffff;

}


.mensaje-personalizador {

    min-height: 20px;

    margin-top: 12px;

    color: #ff006e;

    text-align: center;

    font-size: 12px;

    font-weight: 700;

}



/* ==================================================
   AVISO FLOTANTE
================================================== */

.personalizador-aviso {

    position: fixed;

    left: 50%;

    bottom: 26px;

    z-index: 980;

    max-width: min(420px, 90vw);

    padding:
        14px
        18px;

    border:
        1px solid #ffffff;

    background: #111111;

    color: #ffffff;

    font-size: 12px;

    font-weight: 700;

    text-align: center;

    opacity: 0;

    transform:
        translate(-50%, 14px);

    pointer-events: none;

    transition:
        opacity .2s ease,
        transform .2s ease;

}


.personalizador-aviso.visible {

    opacity: 1;

    transform:
        translate(-50%, 0);

}



/* ==================================================
   BARRA DE ACCIÓN FIJA
================================================== */

.barra-accion {

    position: fixed;

    left: 0;

    right: 0;

    bottom: 0;

    z-index: 900;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 14px;

    padding:
        11px
        5%;

    border-top:
        1px solid #ffffff;

    background: #111111;

    color: #ffffff;

    transform:
        translateY(105%);

    transition:
        transform .22s ease;

}


.barra-accion.visible {

    transform:
        translateY(0);

}


.barra-accion-datos {

    min-width: 0;

}


.barra-accion-datos small {

    display: block;

    color: #9a9a9a;

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 0.12em;

    text-transform: uppercase;

}


.barra-accion-datos strong {

    color: #ffd600;

    font-size: 20px;

    letter-spacing: -0.5px;

}


.barra-accion button {

    min-height: 44px;

    flex: none;

    padding:
        0
        24px;

    border: none;

    background: #ff006e;

    color: #ffffff;

    cursor: pointer;

    font-family: inherit;

    font-size: 11px;

    font-weight: 800;

    letter-spacing: 0.12em;

}


.barra-accion button:hover:not(:disabled) {

    background: #ffd600;

    color: #111111;

}


.barra-accion button:disabled {

    background: #4a4a4a;

    color: #9a9a9a;

    cursor: not-allowed;

}


body.lienzo-ampliado .barra-accion {

    display: none;

}



/* ==================================================
   RESPONSIVE
================================================== */

@media (max-width: 1000px) {

    .personalizador-layout {

        grid-template-columns: 1fr;

        gap: 40px;

    }


    .preview-sticky {

        position: static;

    }


    .editor-preview,
    .editor-controles {

        max-width: 720px;

        width: 100%;

        margin: 0 auto;

    }

}


@media (max-width: 900px) {

    .personalizador-pagina {

        padding:
            50px
            20px
            120px;

    }


    .personalizador-cabecera {

        margin-bottom: 38px;

    }


    .personalizador-cabecera h1 {

        letter-spacing: -3px;

    }

}


@media (max-width: 560px) {

    .personalizador-cabecera h1 {

        font-size: 56px;

        letter-spacing: -2px;

    }


    .personalizador-cabecera > span {

        font-size: 15px;

    }


    .preview-superior {

        align-items: stretch;

        flex-direction: column;

        gap: 12px;

    }


    .caras-producto {

        width: 100%;

    }


    .caras-producto button {

        flex: 1;

    }


    .control-seccion {

        padding: 18px;

    }


    .control-fila {

        grid-template-columns:
            minmax(0, 1fr);

    }


    .mensaje-zona {

        max-width: 88%;

        white-space: normal;

        text-align: center;

    }


    .barra-accion {

        padding:
            10px
            16px;

    }


    .barra-accion button {

        padding:
            0
            16px;

    }


    /*
    Zonas táctiles cómodas en pantallas pequeñas.
    */
    .lienzo-herramientas button,
    .rango-paso {

        min-height: 42px;

    }


    .rango-linea {

        grid-template-columns:
            42px
            minmax(0, 1fr)
            42px;

    }


    .texto-color-preset {

        width: 40px;

        height: 40px;

    }


    input[type="range"] {

        height: 42px;

    }


    input[type="range"]::-webkit-slider-thumb {

        width: 24px;

        height: 24px;

        margin-top: -11px;

    }


    input[type="range"]::-moz-range-thumb {

        width: 22px;

        height: 22px;

    }

}


@media (prefers-reduced-motion: reduce) {

    * {

        transition-duration: 0.01ms !important;

    }

}
