/* Selector de color por grupos (diseño «Producto», sep 2026).
   Los tokens --ac-* los define el tema en :root (_tokens.scss); el valor de
   reserva de cada var() es el mismo color, por si el modulo se pintara fuera
   del tema.

   La rejilla es un grid auto-fill de casillas de 68 px minimo: cuantas caben
   por fila lo decide el ancho, y views/js/front.js lo mide para quedarse en
   DOS filas con la baldosa «+N · Ver más» en la ultima casilla. */
.ac_colorselector {
    margin: 0;
}
.ac_colorselector__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}
.ac_colorselector__label {
    font-family: var(--ac-display, "Oswald", "Arial Narrow", sans-serif);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ac-ink, #0e0e10);
}
.ac_colorselector__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.ac_colorselector__item {
    margin: 0;
    min-width: 0;
}
.ac_colorselector__item[hidden] {
    display: none;
}
.ac_colorselector__swatch {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 68 / 78;   /* 7:8, como las fotos de producto */
    border: 2px solid var(--ac-line, #e4dfd4);
    background-color: #fff;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: border-color .15s ease;
}
a.ac_colorselector__swatch:hover,
a.ac_colorselector__swatch:focus-visible {
    border-color: var(--ac-ink, #0e0e10);
}
.ac_colorselector__swatch.is-active {
    border-color: var(--ac-ink, #0e0e10);
    cursor: default;
}
/* La barra de abajo marca el actual, como en el diseño. */
.ac_colorselector__swatch.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: var(--ac-ink, #0e0e10);
}

/* La baldosa «+N · Ver más»: hueso, borde discontinuo, misma casilla. */
.ac_colorselector__swatch--more {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 0;
    font: inherit;
    color: var(--ac-ink, #0e0e10);
    background: var(--ac-bone, #f4f1eb);
    border-style: dashed;
}
.ac_colorselector__swatch--more strong {
    font-family: var(--ac-display, "Oswald", "Arial Narrow", sans-serif);
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}
.ac_colorselector__swatch--more small {
    font-size: 11px;
    line-height: 1.2;
    color: var(--ac-muted, #6e6a60);
}
.ac_colorselector__swatch--more:hover,
.ac_colorselector__swatch--more:focus-visible {
    background: var(--ac-bone-2, #ece7dd);
    border-color: var(--ac-ink, #0e0e10);
}

/* «Ver menos», bajo la rejilla desplegada. */
.ac_colorselector__less {
    margin-top: 10px;
    padding: 0;
    font: inherit;
    font-size: 12px;
    color: var(--ac-muted, #6e6a60);
    text-decoration: underline;
    background: none;
    border: 0;
    cursor: pointer;
}
.ac_colorselector__less:hover,
.ac_colorselector__less:focus-visible {
    color: var(--ac-ink, #0e0e10);
}
.ac_colorselector__less[hidden] {
    display: none;
}
