/* VKEY VClips Commerce Layer · creador mobile-first */

.vclip-commerce-tool {
    position: relative;
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
    transition: transform .18s ease, background .18s ease, color .18s ease;
}

.vclip-commerce-tool:active { transform: scale(.94); }
.vclip-commerce-tool.has-product { background: #ffdd00; color: #050505; border-color: #ffdd00; }
.vclip-commerce-tool span { position: absolute; top: -2px; right: -2px; width: 15px; height: 15px; border-radius: 50%; background: #26d980; border: 3px solid #000; opacity: 0; transform: scale(.5); transition: .18s ease; }
.vclip-commerce-tool.has-product span { opacity: 1; transform: scale(1); }

.vclip-commerce-selected {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: max(112px, calc(env(safe-area-inset-bottom) + 98px));
    z-index: 58;
    min-height: 66px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 10px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 20px;
    background: rgba(9, 9, 10, .88);
    color: #fff;
    box-shadow: 0 18px 45px rgba(0, 0, 0, .38);
    backdrop-filter: blur(20px);
}

.vclip-commerce-selected[hidden] { display: none !important; }
.vclip-commerce-selected img { width: 48px; height: 48px; flex: 0 0 48px; object-fit: cover; border-radius: 14px; background: #202024; }
.vclip-commerce-selected div { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.vclip-commerce-selected span { color: #ffdd00; font-size: 8px; line-height: 1; font-weight: 1000; text-transform: uppercase; letter-spacing: .12em; }
.vclip-commerce-selected strong { overflow: hidden; color: #fff; font-size: 12px; line-height: 1.15; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.vclip-commerce-selected button { width: 34px; height: 34px; flex: 0 0 34px; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.12); color: #fff; }

.vclip-commerce-selector { position: absolute; inset: 0; z-index: 90; visibility: hidden; pointer-events: none; }
.vclip-commerce-selector.is-open { visibility: visible; pointer-events: auto; }
.vclip-commerce-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(0, 0, 0, .62); opacity: 0; transition: opacity .24s ease; }
.vclip-commerce-selector.is-open .vclip-commerce-backdrop { opacity: 1; }
.vclip-commerce-sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: min(78dvh, 720px);
    display: flex;
    flex-direction: column;
    padding: 9px 16px max(16px, env(safe-area-inset-bottom));
    border-radius: 30px 30px 0 0;
    background: #f8f8fa;
    color: #090909;
    box-shadow: 0 -28px 70px rgba(0, 0, 0, .38);
    transform: translateY(102%);
    transition: transform .32s cubic-bezier(.2, .8, .2, 1);
}
.vclip-commerce-selector.is-open .vclip-commerce-sheet { transform: translateY(0); }
.vclip-commerce-handle { width: 42px; height: 5px; margin: 0 auto 12px; border-radius: 999px; background: #d1d1d6; }
.vclip-commerce-sheet header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.vclip-commerce-sheet header span { display: block; margin-bottom: 4px; color: #8a7400; font-size: 8px; font-weight: 1000; text-transform: uppercase; letter-spacing: .15em; }
.vclip-commerce-sheet h3 { margin: 0; font-size: 20px; line-height: 1.02; font-weight: 1000; letter-spacing: -.035em; }
.vclip-commerce-sheet header > button { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #e9e9ed; color: #111; }
.vclip-commerce-help { margin: 10px 0 13px; color: #696970; font-size: 10px; line-height: 1.42; font-weight: 700; }
.vclip-commerce-products { min-height: 130px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 9px; padding: 1px 2px 8px; }
.vclip-commerce-state { min-height: 145px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; border: 1px dashed #d3d3d8; border-radius: 22px; color: #777780; text-align: center; font-size: 11px; font-weight: 800; }
.vclip-commerce-state i { color: #111; font-size: 25px; }
.vclip-commerce-product { width: 100%; min-height: 78px; display: flex; align-items: center; gap: 11px; padding: 9px; border: 2px solid transparent; border-radius: 20px; background: #fff; color: #111; text-align: left; box-shadow: 0 8px 20px rgba(15, 23, 42, .05); transition: transform .16s ease, border-color .16s ease; }
.vclip-commerce-product:active { transform: scale(.985); }
.vclip-commerce-product.is-selected { border-color: #ffcf00; background: #fffbed; }
.vclip-commerce-product img { width: 58px; height: 58px; flex: 0 0 58px; border-radius: 15px; object-fit: cover; background: #eee; }
.vclip-commerce-product div { min-width: 0; flex: 1; }
.vclip-commerce-product strong { display: block; overflow: hidden; margin-bottom: 5px; font-size: 12px; line-height: 1.1; font-weight: 950; text-overflow: ellipsis; white-space: nowrap; }
.vclip-commerce-product small { color: #85858d; font-size: 9px; font-weight: 750; }
.vclip-commerce-product b { flex: 0 0 auto; color: #111; font-size: 12px; font-weight: 1000; }
.vclip-commerce-product i { flex: 0 0 auto; color: #17ad69; font-size: 21px; }
.vclip-commerce-sheet footer { padding-top: 9px; }
.vclip-commerce-none { width: 100%; min-height: 44px; border: 0; border-radius: 15px; background: #e9e9ed; color: #202024; font-size: 9px; font-weight: 1000; text-transform: uppercase; letter-spacing: .08em; }

@media (min-width: 720px) {
    .vclip-commerce-sheet { left: 50%; right: auto; width: min(520px, calc(100% - 32px)); bottom: 18px; border-radius: 30px; transform: translate(-50%, calc(100% + 38px)); }
    .vclip-commerce-selector.is-open .vclip-commerce-sheet { transform: translate(-50%, 0); }
    .vclip-commerce-selected { left: 50%; right: auto; width: min(470px, calc(100% - 28px)); transform: translateX(-50%); }
}

@media (max-width: 390px) {
    .vclip-commerce-tool { width: 50px; height: 50px; flex-basis: 50px; }
    .vclip-commerce-sheet { padding-left: 13px; padding-right: 13px; border-radius: 25px 25px 0 0; }
    .vclip-commerce-selected { left: 9px; right: 9px; }
}
