/* ================================================================
   BANNER PUBLICITARIO INDEPENDIENTE
   ================================================================ */

.announcement-ribbon {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    width: 100%;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(90deg, #0f172a 0%, #2563eb 55%, #ef4444 100%);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.5s ease-out;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.announcement-ribbon.is-hidden {
    transform: translateY(-100%);
    pointer-events: none;
}

/* Temas de banner */
.announcement-ribbon.theme-yellow {
    background: linear-gradient(90deg, #0f172a 0%, #2563eb 55%, #ef4444 100%);
    color: #ffffff;
}

.announcement-ribbon.theme-red {
    background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
    color: #fee2e2;
}

.announcement-ribbon.theme-blue {
    background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
    color: #ffffff;
}

.announcement-ribbon.theme-black {
    background: linear-gradient(90deg, #1f2937 0%, #374151 100%);
    color: #ffffff;
}

.announcement-ribbon.theme-green {
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    color: #065f46;
}

.announcement-ribbon.theme-purple {
    background: linear-gradient(90deg, #8b5cf6 0%, #a78bfa 100%);
    color: #ffffff;
}

/* Contenedor del texto */
.ribbon-content {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 100%;
    animation: shimmer 3s infinite;
}

.ribbon-icon {
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    animation: pulse 2s infinite;
}

.ribbon-text {
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ribbon-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    margin-left: 8px;
}

.ribbon-close-btn {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: currentColor;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 14px;
}

.ribbon-close-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

/* ================================================================
   BOTONES LATERALES OCULTOS (MENÚ FLOTANTE)
   ================================================================ */

.floating-menu-container {
    --floating-card-width: 330px;
    --floating-tab-width: 52px;
    position: fixed;
    left: 0;
    right: auto;
    top: 65%;
    transform: translateY(-50%);
    z-index: 110;
    display: flex;
    align-items: center;
    padding: 0;
    width: calc(var(--floating-card-width) + var(--floating-tab-width));
    overflow: visible;
}

.floating-menu-trigger {
    width: var(--floating-tab-width);
    height: 56px;
    border-radius: 0 14px 14px 0;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 10px 20px rgba(29, 78, 216, 0.34);
    transform: translateX(0);
    transition: all 0.25s ease;
    position: absolute;
    left: 0;
    top: 50%;
    margin-top: -28px;
    z-index: 3;
}

.floating-menu-container:hover .floating-menu-trigger,
.floating-menu-container.is-open .floating-menu-trigger {
    transform: translateX(var(--floating-card-width)) translateY(-1px);
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.42);
}

.floating-menu-items {
    position: absolute;
    left: 0;
    top: 65%;
    transform: translateX(calc(-1 * var(--floating-card-width))) translateY(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 2;
}

.floating-menu-container:hover .floating-menu-items,
.floating-menu-container.is-open .floating-menu-items {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0) translateY(-50%);
}

.floating-menu-card {
    width: var(--floating-card-width);
    padding: 14px 14px 12px;
    border-radius: 0 14px 14px 0;
    border: 1px solid #d7dee8;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.22);
    position: relative;
}

.floating-menu-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
}

.floating-menu-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 10px;
    padding-left: 6px;
}

.floating-menu-foot {
    margin-top: 10px;
    font-size: 12px;
    color: #475569;
    font-weight: 500;
    padding-left: 6px;
}

.floating-menu-item {
    width: 100%;
    padding: 10px 6px;
    border-radius: 0;
    border: 0;
    border-bottom: 1px solid #dbe3ee;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 11px;
    font-weight: 600;
    font-size: 13px;
    color: #0f172a;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    text-decoration: none;
    margin-bottom: 0;
}

.floating-menu-item:hover {
    transform: translateX(2px);
    border-bottom-color: #bfdbfe;
    background: rgba(37, 99, 235, 0.06);
}

.floating-menu-item i {
    font-size: 15px;
    min-width: 20px;
    text-align: center;
}

.floating-menu-item .contact-label {
    min-width: 76px;
    color: #334155;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.floating-menu-item .contact-value {
    color: #0f172a;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.floating-menu-item.whatsapp {
    color: #16a34a;
}

.floating-menu-item.phone {
    color: #2563eb;
}

.floating-menu-item.email {
    color: #ef4444;
}

/* ================================================================
   MODALES FLOTANTES DINÁMICOS (POPUPS)
   ================================================================ */

.floating-modal {
    position: fixed;
    bottom: 120px;
    right: 32px;
    z-index: 92;
    max-width: 420px;
    width: 90%;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s ease;
    animation: none;
}

.floating-modal.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    animation: slideUp 0.3s ease;
}

.floating-modal-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #0f172a 0%, #2563eb 55%, #ef4444 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.floating-modal-title {
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.floating-modal-close {
    background: rgba(0, 0, 0, 0.1);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 12px;
}

.floating-modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

.floating-modal-content {
    padding: 20px;
}

.floating-modal-badge {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(37, 99, 235, 0.14);
    color: #1d4ed8;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 12px;
}

.floating-modal-title-main {
    font-size: 16px;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 8px;
    line-height: 1.3;
}

.floating-modal-text {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 16px;
}

.floating-modal-code {
    background: #f3f4f6;
    border: 2px dashed #2563eb;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    margin-bottom: 12px;
    width: 100%;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-modal-code:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.18);
}

.floating-modal-code-label {
    font-size: 10px;
    color: #6b7280;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.floating-modal-code-value {
    font-size: 18px;
    font-weight: 900;
    color: #1d4ed8;
    font-family: monospace;
    letter-spacing: 2px;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.floating-modal-code-value.is-flash {
    opacity: 0.45;
    transform: scale(0.98);
}

.floating-modal-copy-hint {
    font-size: 11px;
    color: #64748b;
    margin-top: -4px;
    margin-bottom: 2px;
}

.floating-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.floating-modal-btn {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, #0f172a 0%, #2563eb 55%, #ef4444 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
}

.floating-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

/* ================================================================
   ANIMACIONES
   ================================================================ */

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes shimmer {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 768px) {
    .announcement-ribbon {
        padding: 8px 12px;
        font-size: 11px;
    }

    .ribbon-badge {
        display: none;
    }

    .ribbon-close-btn {
        right: 12px;
        width: 24px;
        height: 24px;
    }

    .floating-menu-container {
        --floating-card-width: 250px;
        --floating-tab-width: 48px;
        left: 0;
        right: auto !important;
        top: 56%;
        bottom: auto;
        transform: translateY(-50%);
        width: calc(var(--floating-card-width) + var(--floating-tab-width));
    }

    .floating-menu-trigger {
        width: var(--floating-tab-width);
        height: 56px;
        border-radius: 0 14px 14px 0;
        margin-top: -28px;
    }

    .floating-menu-items {
        left: 0;
        right: auto;
        top: 50%;
        transform: translateX(calc(-1 * var(--floating-card-width))) translateY(-50%);
        opacity: 0;
    }

    .floating-menu-container:hover .floating-menu-trigger,
    .floating-menu-container.is-open .floating-menu-trigger {
        transform: translateX(var(--floating-card-width)) translateY(-1px);
    }

    .floating-menu-container:hover .floating-menu-items,
    .floating-menu-container.is-open .floating-menu-items {
        opacity: 1;
        transform: translateX(0) translateY(-50%);
    }

    .floating-menu-card {
        width: 250px;
        padding: 12px;
    }

    .floating-menu-item {
        padding: 9px 10px;
        font-size: 12px;
    }

    .floating-modal {
        max-width: calc(100% - 32px);
        width: 100%;
        right: 16px;
        bottom: 80px;
    }
}

@media (max-width: 480px) {
    .announcement-ribbon {
        padding: 6px 8px;
        font-size: 10px;
    }

    .ribbon-text {
        font-size: 9px;
    }

    .floating-menu-trigger {
        width: var(--floating-tab-width);
        height: 50px;
        font-size: 16px;
        margin-top: -25px;
    }

    .floating-menu-items {
        left: 0;
        opacity: 0;
    }

    .floating-menu-container {
        --floating-card-width: 220px;
        --floating-tab-width: 42px;
        width: calc(var(--floating-card-width) + var(--floating-tab-width));
    }

    .floating-menu-container:hover .floating-menu-trigger,
    .floating-menu-container.is-open .floating-menu-trigger {
        transform: translateX(var(--floating-card-width)) translateY(-1px);
    }

    .floating-menu-container:hover .floating-menu-items,
    .floating-menu-container.is-open .floating-menu-items {
        opacity: 1;
        transform: translateX(0) translateY(-50%);
    }

    .floating-menu-card {
        width: 220px;
        padding: 10px;
    }

    .floating-modal {
        bottom: 60px;
        right: 12px;
        max-width: calc(100% - 24px);
    }

    .floating-modal-content {
        padding: 16px;
    }

    .floating-modal-title-main {
        font-size: 14px;
    }

    .floating-modal-text {
        font-size: 12px;
    }

    .floating-modal-code-value {
        font-size: 16px;
    }
}
