/* Admas Importer · selector de color de la ficha (opción B) */
.aim-colors {
    margin: 1.25rem 0 0.25rem;
    font-size: 13px;
    line-height: 1.35;
    color: #1a1a1a;
    text-align: left;
    clear: both;
}
.aim-colors__label {
    margin: 0 0 0.6rem;
    font-size: 13px;
    font-weight: 400;
    color: #1a1a1a;
    text-transform: none;
    letter-spacing: 0;
}
.aim-colors__label-key { color: #767676; }
.aim-colors__label-value { font-weight: 500; }

.aim-colors__list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.aim-colors__item { margin: 0; padding: 0; }

.aim-colors__swatch {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 70px;
    color: #555555;
    text-decoration: none;
}
a.aim-colors__swatch:hover,
a.aim-colors__swatch:focus { color: #1a1a1a; text-decoration: none; }

.aim-colors__img {
    display: block;
    box-sizing: border-box;
    width: 70px;
    aspect-ratio: 4 / 5;
    padding: 2px;
    border: 1px solid #e5e5e5;
    background: #ffffff;
    transition: border-color 0.15s ease;
}
.aim-colors__img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #f4f4f4;
}
a.aim-colors__swatch:hover .aim-colors__img { border-color: #8a8a8a; }
a.aim-colors__swatch:focus-visible { outline: none; }
a.aim-colors__swatch:focus-visible .aim-colors__img { outline: 2px solid #1a1a1a; outline-offset: 2px; }
.aim-colors__item.is-current .aim-colors__img { border-color: #1a1a1a; }

.aim-colors__name {
    display: block;
    font-size: 11px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.aim-colors__item.is-current .aim-colors__name { color: #1a1a1a; font-weight: 500; }

/* Sin stock: atenuado y con línea diagonal, pero se puede abrir */
.aim-colors__item.is-out .aim-colors__img { position: relative; }
.aim-colors__item.is-out .aim-colors__img img { opacity: 0.45; }
.aim-colors__item.is-out .aim-colors__img::after {
    content: "";
    position: absolute;
    inset: 2px;
    background: linear-gradient(to top right, transparent calc(50% - 0.5px), #8a8a8a calc(50% - 0.5px), #8a8a8a calc(50% + 0.5px), transparent calc(50% + 0.5px));
}

.aim-colors__sr {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Móvil: una sola fila con desplazamiento horizontal */
@media (max-width: 767.98px) {
    .aim-colors__list {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
    }
    .aim-colors__list::-webkit-scrollbar { display: none; }
    .aim-colors__item { flex: 0 0 auto; }
    .aim-colors__swatch, .aim-colors__img { width: 64px; }
}
