/* Campana de alertas — productos agotados (navbar) */

.stock-alert-nav {
    position: relative;
    margin-right: 12px;
    display: flex;
    align-items: center;
}

.stock-alert-trigger {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 14px 0 12px !important;
    color: #333 !important;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    text-decoration: none !important;
    transition: border-color 0.2s, box-shadow 0.2s, color 0.2s;
}

.stock-alert-trigger:hover,
.stock-alert-nav.show .stock-alert-trigger {
    color: #BE347F !important;
    border-color: rgba(190, 52, 127, 0.35);
    box-shadow: 0 4px 12px rgba(190, 52, 127, 0.12);
}

.stock-alert-trigger-icon {
    font-size: 15px;
    color: #888;
    line-height: 1;
}

.stock-alert-trigger:hover .stock-alert-trigger-icon,
.stock-alert-nav.show .stock-alert-trigger-icon,
.stock-alert-nav.stock-alert--active .stock-alert-trigger-icon {
    color: #BE347F;
}

.stock-alert-trigger-label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1;
}

.stock-alert-badge {
    display: none;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
    color: #fff;
    background: #e74c3c;
    border-radius: 999px;
    box-shadow: 0 1px 4px rgba(231, 76, 60, 0.35);
}

.stock-alert-menu {
    width: 380px;
    max-width: calc(100vw - 24px);
    padding: 0;
    margin-top: 10px;
    border: 1px solid #f0e8ec;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.stock-alert-menu-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 16px 12px;
    background: linear-gradient(180deg, #fdf5f8 0%, #fff 100%);
    border-bottom: 1px solid #f5edf1;
}

.stock-alert-menu-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #fce8ef;
    border-radius: 10px;
    color: #e74c3c;
}

.stock-alert-menu-icon svg {
    width: 20px;
    height: 20px;
}

.stock-alert-menu-title-wrap {
    flex: 1;
    min-width: 0;
}

.stock-alert-menu-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
}

.stock-alert-menu-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    font-size: 12px;
    font-weight: 700;
    color: #BE347F;
    background: #fce8ef;
    border-radius: 999px;
}

.stock-alert-menu-subtitle {
    margin-top: 2px;
    font-size: 12px;
    color: #888;
    line-height: 1.4;
}

.stock-alert-search-wrap {
    padding: 0 16px 12px;
    background: #fff;
}

.stock-alert-search {
    width: 100%;
    height: 38px;
    padding: 0 14px 0 38px;
    font-size: 13px;
    color: #333;
    background: #f5f5f7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") no-repeat 12px center;
    border: 1px solid #ececec;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.stock-alert-search:focus {
    border-color: rgba(190, 52, 127, 0.45);
    box-shadow: 0 0 0 3px rgba(190, 52, 127, 0.08);
}

.stock-alert-search::placeholder {
    color: #aaa;
}

.stock-alert-list {
    max-height: 280px;
    overflow-y: auto;
    padding: 4px 8px;
    background: #fff;
}

.stock-alert-list::-webkit-scrollbar {
    width: 6px;
}

.stock-alert-list::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.stock-alert-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 10px;
    border-radius: 10px;
    transition: background-color 0.15s;
}

.stock-alert-item:hover {
    background: #faf8f9;
}

.stock-alert-item-id {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    max-width: 72px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 700;
    color: #BE347F;
    background: #fce8ef;
    border-radius: 8px;
    text-align: center;
    word-break: break-all;
    line-height: 1.2;
}

.stock-alert-item-body {
    flex: 1;
    min-width: 0;
}

.stock-alert-item-name {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.35;
    word-break: break-word;
}

.stock-alert-item-ref {
    margin-top: 2px;
    font-size: 12px;
    color: #999;
    line-height: 1.3;
}

.stock-alert-item-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.stock-alert-stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #e74c3c;
    background: #fdecea;
    border-radius: 999px;
}

.stock-alert-stock-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #e74c3c;
    border-radius: 50%;
}

.stock-alert-empty {
    padding: 20px 16px;
    font-size: 13px;
    color: #999;
    text-align: center;
}

.stock-alert-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px 14px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
}

.stock-alert-dismiss {
    padding: 0;
    font-size: 13px;
    font-weight: 500;
    color: #888;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

.stock-alert-dismiss:hover {
    color: #555;
}

.stock-alert-ver-todos {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px !important;
    font-size: 13px;
    font-weight: 600;
    color: #fff !important;
    background: #BE347F;
    border-radius: 999px;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background-color 0.2s, transform 0.15s;
}

.stock-alert-ver-todos:hover {
    background: #a82d6d;
    color: #fff !important;
    transform: translateY(-1px);
}

.stock-alert-ver-todos-arrow {
    font-size: 14px;
    line-height: 1;
}

.stock-alert-nav.stock-alert--seen .stock-alert-badge {
    display: none !important;
}

@media (max-width: 576px) {
    .stock-alert-trigger-label {
        display: none;
    }

    .stock-alert-trigger {
        padding: 0 10px !important;
    }

    .stock-alert-menu {
        width: 320px;
    }
}
