.kp-colores-ficha[hidden], .kp-colores-ficha [hidden], .kp-barra-ficha,
.variations select[hidden]:has(+ .kp-colores-ficha) { display: none !important; }
.kp-colores-ficha { color: #1d2343; contain: inline-size; }
tr:has(.kp-colores-ficha:not([hidden])) > .label { display: none; }
.kp-color-elegido { margin-bottom: .35rem; font-weight: 700; }
.kp-grupo-colores { display: grid; grid-template-columns: repeat(auto-fill, 48px); gap: 6px; padding: 3px; }
.kp-colores-ficha .kp-color-muestra {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 2px;
    border: 2px solid #d6d9e0;
    border-radius: 6px;
    background: #fff;
}
.kp-color-muestra img { width: 100%; height: 100%; object-fit: contain; }
.kp-colores-ficha .kp-color-muestra[aria-checked="true"] { border-color: #1d2343; box-shadow: inset 0 0 0 1px #1d2343; }
.kp-colores-ficha :focus-visible, .kp-barra-ficha button:focus-visible { outline: 2px solid #1d2343; outline-offset: 1px; }
.kp-colores-ficha .kp-desplazar-colores {
    flex: 0 0 32px;
    height: 44px;
    padding: 0;
    border: 1px solid #d6d9e0;
    border-radius: 6px;
    background: #fff;
    color: #1d2343;
    font-size: 1.3rem;
}

@media (max-width: 767px) {
    .kp-fila-colores { display: flex; align-items: center; gap: 4px; }
    .kp-grupo-colores {
        flex: 1;
        display: flex;
        min-width: 0;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .kp-color-muestra { flex: 0 0 48px; }

    html:has(.kp-barra-ficha:not([hidden])),
    html:has(#kp-aviso-cookies:not([hidden])):has(.kp-barra-ficha:not([hidden])) {
        --kp-barra-ficha-alto: 4rem;
        --kp-barra-ficha-base: max(env(safe-area-inset-bottom, 0px), var(--kp-aviso-cookies-alto, 0px));
        scroll-padding-bottom: calc(var(--kp-barra-ficha-base) + var(--kp-barra-ficha-alto));
    }
    html:has(.kp-barra-ficha:not([hidden])) body,
    html:has(#kp-aviso-cookies:not([hidden])) body:has(.kp-barra-ficha:not([hidden])) {
        padding-bottom: calc(var(--kp-barra-ficha-base) + var(--kp-barra-ficha-alto));
    }
    body:has(.kp-barra-ficha:not([hidden])) .storefront-handheld-footer-bar { display: none; }
    body:has(.kp-barra-ficha:not([hidden])) .kp-chat,
    body:has(#kp-aviso-cookies:not([hidden])):has(.kp-barra-ficha:not([hidden])) .kp-chat {
        bottom: calc(var(--kp-barra-ficha-base) + var(--kp-barra-ficha-alto) + .5rem);
    }
    body:has(.kp-barra-ficha:not([hidden])) .kp-chat-panel {
        max-height: calc(100dvh - var(--kp-barra-ficha-base) - var(--kp-barra-ficha-alto) - 72px);
        overflow: auto;
    }
    .kp-barra-ficha:not([hidden]) {
        position: fixed;
        z-index: 9999;
        inset: auto 0 var(--kp-barra-ficha-base);
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        height: var(--kp-barra-ficha-alto);
        padding: .35rem max(.75rem, env(safe-area-inset-right, 0px)) .35rem max(.75rem, env(safe-area-inset-left, 0px));
        gap: .75rem;
        border-top: 1px solid #d6d9e0;
        background: #fff;
        color: #1d2343;
        box-shadow: 0 -3px 12px rgb(29 35 67 / 10%);
    }
    body:has(.kp-dialogo[open]) .kp-barra-ficha { display: none !important; }
    .kp-barra-ficha-datos { min-width: 0; line-height: 1.2; }
    .kp-barra-ficha-datos strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
    .kp-barra-ficha-datos [data-kp-precio] { font-size: .875rem; }
    .kp-barra-ficha button {
        flex-shrink: 0;
        min-height: 44px;
        padding: .45rem .75rem;
        border: 1px solid #1d2343;
        border-radius: 6px;
        background: #1d2343;
        color: #fff;
        font: inherit;
        font-weight: 700;
    }
}
