/* Botón Flotante */
.uniderma-gifts-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: #fff;
    padding: 12px 25px;
    border-radius: 12px;
    /* Sombra multicapa MASIVA para máxima notoriedad */
    box-shadow:
        0 15px 25px rgba(0, 0, 0, 0.4),
        0 30px 60px rgba(0, 0, 0, 0.5),
        0 50px 150px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1.5px solid #eee;
}

.uniderma-gifts-float:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow:
        0 20px 30px rgba(0, 0, 0, 0.3),
        0 40px 60px rgba(0, 0, 0, 0.4),
        0 50px 120px rgba(0, 0, 0, 0.5);
    /* Sombra extrema absoluta */
}

.gifts-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.gifts-text {
    font-weight: 700;
    color: #444;
    font-size: 16px;
    white-space: nowrap;
}

.gifts-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ff2d20;
    color: white;
    font-size: 12px;
    font-weight: 800;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Modal Overlay (Popover Style) */
.uniderma-gifts-overlay {
    position: fixed;
    bottom: 110px;
    /* Offset para no tapar el botón */
    left: 30px;
    width: 450px;
    max-height: calc(100vh - 160px);
    /* Límite de altura estricto */
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateY(15px) scale(0.98);
    pointer-events: none;
    display: flex;
    /* Para que el hijo se comporte correctamente */
}

.uniderma-gifts-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.gifts-modal-content {
    background: #fff;
    width: 100%;
    max-height: 100%;
    /* Hereda el límite del overlay */
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.gifts-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 11;
    padding: 0;
}

.gifts-modal-close:hover {
    color: #283F80;
    transform: rotate(90deg);
}

.gifts-modal-header {
    padding: 25px 30px 15px;
    background: #fff;
    border-bottom: 1px solid #f5f5f5;
    flex-shrink: 0;
    /* No se encoge para que el scroll sea en la lista */
}

.gifts-modal-header h2 {
    margin: 0 0 8px;
    font-size: 22px;
    color: #283F80;
    font-weight: 800;
}

.gifts-modal-header p {
    font-size: 13px;
    color: #888;
    line-height: 1.4;
    margin: 0;
}

/* Gifts List (Scrollable) */
.gifts-list {
    padding: 15px 25px 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    /* Scroll habilitado */
    flex-grow: 1;
    min-height: 0;
    /* Importante para flex scroll */
    /* Scrollbar Style */
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}

.gifts-list::-webkit-scrollbar {
    width: 5px;
}

.gifts-list::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 10px;
}

.gift-item {
    background: #f8f9fc;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #f0f0f0;
    transition: all 0.2s;
}

.gift-item:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: #e0e0e0;
}

.gift-image img {
    width: 55px;
    height: 55px;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #eee;
}

.gift-details {
    flex-grow: 1;
}

.gift-details h3 {
    font-size: 12px;
    margin: 0 0 4px;
    color: #333;
    line-height: 1.3;
    font-weight: 700;
}

.gift-details p {
    margin: 0;
    font-size: 10px;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.gift-action {
    background: #fff;
    color: #283F80;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1.5px solid #283F80;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.gift-action:hover {
    background: #283F80;
    color: #fff;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .uniderma-gifts-overlay {
        left: 10px;
        width: calc(100% - 20px);
        bottom: 85px;
        max-height: 70vh;
    }

    .uniderma-gifts-float {
        bottom: 20px;
        left: 10px;
        padding: 10px 15px;
    }

    .gifts-text {
        font-size: 14px;
    }

    .gifts-modal-header {
        padding: 20px 20px 12px;
    }

    .gifts-list {
        padding: 12px 15px 15px;
    }
}