[data-carrito-preview] {
    display: inline-flex;
    align-items: stretch;
    gap: 4px;
}

[data-carrito-preview] .top-cart-widget {
    border-radius: 4px;
}

.ifc-cart-preview-toggle {
    min-width: 36px;
    min-height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.ifc-cart-preview-toggle[hidden],
.ifc-cart-preview-panel[hidden] {
    display: none !important;
}

.ifc-cart-preview-panel {
    position: fixed;
    z-index: 2600;
    width: 350px;
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px;
    border: 1px solid #cbd5e1;
    border-top: 3px solid #0d3b66;
    border-radius: 4px;
    background: #fff;
    color: #172b40;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
    text-align: left;
    font-size: 14px;
    line-height: 1.45;
}

.ifc-cart-preview-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.ifc-cart-preview-heading h2 {
    margin: 0;
    color: #0d3b66;
    font-size: 15px;
}

.ifc-cart-preview-heading button {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 3px;
    background: #eef2f6;
    color: #0d3b66;
    font-size: 22px;
    cursor: pointer;
}

.ifc-cart-preview-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ifc-cart-preview-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid #e2e8f0;
}

.ifc-cart-preview-item > div {
    min-width: 0;
}

.ifc-cart-preview-item img,
.ifc-cart-preview-placeholder {
    flex: 0 0 64px;
    width: 64px;
    height: 48px;
    border-radius: 2px;
    object-fit: cover;
}

.ifc-cart-preview-placeholder {
    display: grid;
    place-items: center;
    background: #eaf2fa;
    color: #0d3b66;
    font-weight: 700;
}

.ifc-cart-preview-item a,
.ifc-cart-preview-empty a {
    color: #0d3b66;
    font-weight: 600;
    text-decoration: underline;
    overflow-wrap: anywhere;
}

.ifc-cart-preview-item p {
    margin: 4px 0 0;
    color: #475569;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.ifc-cart-preview-item .ifc-cart-preview-warning {
    color: #92400e;
}

.ifc-cart-preview-empty {
    margin: 16px 0;
}

.ifc-cart-preview-link {
    display: block;
    margin-top: 12px;
    padding: 10px;
    border-radius: 3px;
    background: #0d3b66;
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
}

.ifc-cart-preview-link:hover {
    background: #164d7d;
    color: #fff;
}

[data-carrito-preview] :focus-visible {
    outline: 3px solid #b28a36;
    outline-offset: 3px;
}

.ifc-cart-preview-item > div {
    flex: 1;
}

.ifc-cart-preview-item > form {
    flex: 0 0 auto;
    margin: 0;
}

.ifc-cart-preview-remove {
    padding: 5px 7px;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    background: #fff;
    color: #8b2525;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.ifc-cart-preview-remove:hover {
    background: #fef2f2;
    border-color: #8b2525;
}

.ifc-cart-preview-remove:disabled {
    opacity: 0.6;
    cursor: wait;
}