/* ============================================
   COMPONENTES REUTILIZÁVEIS — InoxMilk
   Botões Premium · Badges · Section Headers
   ============================================ */

/* ──────────────────────────────────────────
   1. BOTÃO PRIMÁRIO (Vermelho Degradê)
   Gradient + Shimmer + Glow + Hover FX
   ────────────────────────────────────────── */

.btn-cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 36px;
    font-family: var(--inoxmilk-typography-family-heading);
    font-weight: var(--inoxmilk-typography-weight-bold);
    font-size: 15px;
    color: #FFFFFF;
    text-decoration: none;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    overflow: hidden;
    z-index: 1;

    /* Degradê vermelho premium */
    background: linear-gradient(
        135deg,
        #E8000A 0%,
        var(--inoxmilk-color-primitive-red-500) 40%,
        #A00004 100%
    );
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;

    /* Sombra com glow */
    box-shadow:
        0 4px 15px rgba(205, 0, 6, 0.30),
        0 1px 3px rgba(0, 0, 0, 0.10);

    /* Transição suave */
    transition:
        transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        filter 0.3s ease;
}

/* Animação sutil do degradê */
@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Shimmer / brilho deslizante */
.btn-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(255, 255, 255, 0.15) 40%,
        rgba(255, 255, 255, 0.25) 50%,
        rgba(255, 255, 255, 0.15) 60%,
        transparent 100%
    );
    transition: left 0.6s ease;
    z-index: -1;
}

.btn-cta:hover::before {
    left: 100%;
}

/* Glow ring (no hover) */
.btn-cta::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    background: linear-gradient(135deg, #FF4D4D, #CD0006, #8B0004);
    z-index: -2;
    opacity: 0;
    filter: blur(12px);
    transition: opacity 0.4s ease;
}

.btn-cta:hover::after {
    opacity: 0.5;
}

/* Hover state */
.btn-cta:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 8px 30px rgba(205, 0, 6, 0.40),
        0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Active state */
.btn-cta:active {
    transform: translateY(0) scale(0.98);
    box-shadow:
        0 2px 8px rgba(205, 0, 6, 0.25),
        0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Focus state (acessibilidade) */
.btn-cta:focus-visible {
    outline: 2px solid var(--inoxmilk-color-primitive-red-500);
    outline-offset: 3px;
}

/* Ícone dentro do botão */
.btn-cta .btn-icon {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.btn-cta:hover .btn-icon {
    transform: translateX(3px);
}

/* Ícone com seta animada */
.btn-cta .btn-icon-arrow {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-cta:hover .btn-icon-arrow {
    transform: translateX(5px);
}

/* ──────────────────────────────────────────
   1b. VARIANTES DE TAMANHO — btn-cta
   ────────────────────────────────────────── */

.btn-cta.btn-cta-sm {
    padding: 10px 24px;
    font-size: 13px;
    gap: 8px;
}

.btn-cta.btn-cta-sm .btn-icon {
    font-size: 14px;
}

.btn-cta.btn-cta-lg {
    padding: 18px 44px;
    font-size: 16px;
    gap: 12px;
}

.btn-cta.btn-cta-xl {
    padding: 22px 52px;
    font-size: 17px;
    gap: 14px;
    letter-spacing: 0.02em;
}

/* Full width */
.btn-cta.btn-cta-block {
    width: 100%;
    justify-content: center;
}


/* ──────────────────────────────────────────
   2. BOTÃO SECUNDÁRIO (Azul Institucional)
   ────────────────────────────────────────── */

.btn-institucional {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 36px;
    font-family: var(--inoxmilk-typography-family-heading);
    font-weight: var(--inoxmilk-typography-weight-bold);
    font-size: 15px;
    color: #FFFFFF;
    text-decoration: none;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    overflow: hidden;

    /* Degradê azul institucional */
    background: linear-gradient(
        135deg,
        var(--inoxmilk-color-primitive-blue-900) 0%,
        #164A7A 50%,
        var(--inoxmilk-color-primitive-blue-600) 100%
    );
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;

    box-shadow:
        0 4px 15px rgba(51, 65, 85, 0.30),
        0 1px 3px rgba(0, 0, 0, 0.10);

    transition:
        transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Shimmer */
.btn-institucional::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(255, 255, 255, 0.10) 40%,
        rgba(255, 255, 255, 0.20) 50%,
        rgba(255, 255, 255, 0.10) 60%,
        transparent 100%
    );
    transition: left 0.6s ease;
}

.btn-institucional:hover::before {
    left: 100%;
}

.btn-institucional:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 8px 30px rgba(51, 65, 85, 0.40),
        0 2px 8px rgba(0, 0, 0, 0.12);
}

.btn-institucional:active {
    transform: translateY(0) scale(0.98);
}

.btn-institucional:focus-visible {
    outline: 2px solid var(--inoxmilk-color-primitive-blue-900);
    outline-offset: 3px;
}

/* Size variants */
.btn-institucional.btn-cta-sm { padding: 10px 24px; font-size: 13px; }
.btn-institucional.btn-cta-lg { padding: 18px 44px; font-size: 16px; }


/* ──────────────────────────────────────────
   3. BOTÃO OUTLINE (Ghost / Transparente)
   ────────────────────────────────────────── */

.btn-outline-red {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 36px;
    font-family: var(--inoxmilk-typography-family-heading);
    font-weight: var(--inoxmilk-typography-weight-bold);
    font-size: 15px;
    color: var(--inoxmilk-color-primitive-red-500);
    text-decoration: none;
    border: 2px solid var(--inoxmilk-color-primitive-red-500);
    border-radius: 100px;
    cursor: pointer;
    background: transparent;
    overflow: hidden;

    transition:
        color 0.3s ease,
        background 0.3s ease,
        border-color 0.3s ease,
        transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.3s ease;
}

.btn-outline-red:hover {
    color: #FFFFFF;
    background: linear-gradient(135deg, #E8000A, var(--inoxmilk-color-primitive-red-500));
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(205, 0, 6, 0.30);
}

.btn-outline-red:active {
    transform: translateY(0) scale(0.98);
}

.btn-outline-red:focus-visible {
    outline: 2px solid var(--inoxmilk-color-primitive-red-500);
    outline-offset: 3px;
}

/* Size variants */
.btn-outline-red.btn-cta-sm { padding: 10px 24px; font-size: 13px; }
.btn-outline-red.btn-cta-lg { padding: 18px 44px; font-size: 16px; }


/* ──────────────────────────────────────────
   4. BOTÃO GLASSMORPHISM (para seções escuras)
   ────────────────────────────────────────── */

.btn-frosted {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 36px;
    font-family: var(--inoxmilk-typography-family-heading);
    font-weight: var(--inoxmilk-typography-weight-bold);
    font-size: 15px;
    color: #FFFFFF;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 100px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);

    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.3s ease;
}

.btn-frosted:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.32);
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.btn-frosted:active {
    transform: translateY(0) scale(0.98);
}

/* Size variants */
.btn-frosted.btn-cta-sm { padding: 10px 24px; font-size: 13px; }
.btn-frosted.btn-cta-lg { padding: 18px 44px; font-size: 16px; }


/* ──────────────────────────────────────────
   5. BOTÃO WhatsApp (CTA Conversão)
   ────────────────────────────────────────── */

.btn-whatsapp {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 36px;
    font-family: var(--inoxmilk-typography-family-heading);
    font-weight: var(--inoxmilk-typography-weight-bold);
    font-size: 15px;
    color: #FFFFFF;
    text-decoration: none;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    overflow: hidden;

    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;

    box-shadow:
        0 4px 15px rgba(37, 211, 102, 0.30),
        0 1px 3px rgba(0, 0, 0, 0.10);

    transition:
        transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-whatsapp::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(255, 255, 255, 0.12) 40%,
        rgba(255, 255, 255, 0.22) 50%,
        rgba(255, 255, 255, 0.12) 60%,
        transparent 100%
    );
    transition: left 0.6s ease;
}

.btn-whatsapp:hover::before {
    left: 100%;
}

.btn-whatsapp:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 8px 30px rgba(37, 211, 102, 0.40),
        0 2px 8px rgba(0, 0, 0, 0.12);
}

.btn-whatsapp:active {
    transform: translateY(0) scale(0.98);
}

/* Size variants */
.btn-whatsapp.btn-cta-sm { padding: 10px 24px; font-size: 13px; }
.btn-whatsapp.btn-cta-lg { padding: 18px 44px; font-size: 16px; }
.btn-whatsapp.btn-cta-block { width: 100%; }


/* ══════════════════════════════════════════════
   6. SECTION HEADER — Componente Reutilizável
   ══════════════════════════════════════════════ */

.im-section-header {
    text-align: center;
    margin-bottom: 60px;
}

.im-section-tag {
    display: inline-block;
    font-family: var(--inoxmilk-typography-family-heading);
    font-size: 12px;
    font-weight: var(--inoxmilk-typography-weight-bold);
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--inoxmilk-color-semantic-action-primary-default);
    padding: 8px 20px;
    background: rgba(205, 0, 6, 0.06);
    border-radius: 100px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

/* Shimmer sutil no tag */
.im-section-tag::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(205, 0, 6, 0.06) 45%,
        rgba(205, 0, 6, 0.10) 50%,
        rgba(205, 0, 6, 0.06) 55%,
        transparent 100%
    );
    animation: tagShimmer 4s ease-in-out infinite;
}

@keyframes tagShimmer {
    0%   { left: -100%; }
    50%  { left: 100%; }
    100% { left: 100%; }
}

.im-section-title {
    font-size: clamp(28px, 4vw, 44px);
    color: var(--inoxmilk-color-primitive-steel-900);
    margin-bottom: 16px;
    line-height: 1.12;
}

.im-section-desc {
    font-size: 17px;
    color: var(--inoxmilk-color-primitive-steel-400);
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Versão para seções escuras */
.im-section-header.dark .im-section-tag {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.08);
}

.im-section-header.dark .im-section-title {
    color: #FFFFFF;
}

.im-section-header.dark .im-section-desc {
    color: rgba(255, 255, 255, 0.55);
}


/* ══════════════════════════════════════════════
   7. TEXT GRADIENT — Vermelho premium
   ══════════════════════════════════════════════ */

.im-text-gradient {
    background: linear-gradient(135deg, var(--inoxmilk-color-semantic-action-primary-default), #FF4D4D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.im-text-gradient-blue {
    background: linear-gradient(135deg, var(--inoxmilk-color-primitive-blue-900), var(--inoxmilk-color-primitive-blue-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* ══════════════════════════════════════════════
   8. DIVIDER LINE — Linha decorativa com glow
   ══════════════════════════════════════════════ */

.im-divider {
    width: 60px;
    height: 3px;
    border: none;
    border-radius: 100px;
    margin: 24px auto;
    background: linear-gradient(90deg, var(--inoxmilk-color-primitive-red-500), #FF4D4D);
    box-shadow: 0 0 12px rgba(205, 0, 6, 0.20);
}

.im-divider.left {
    margin-left: 0;
    margin-right: auto;
}

.im-divider.wide {
    width: 100px;
}


/* ══════════════════════════════════════════════
   9. BADGE / PILL — Componente reutilizável
   ══════════════════════════════════════════════ */

.im-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--inoxmilk-typography-family-heading);
    font-size: 12px;
    font-weight: var(--inoxmilk-typography-weight-bold);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 6px 16px;
    border-radius: 100px;
}

.im-badge-red {
    color: var(--inoxmilk-color-primitive-red-500);
    background: rgba(205, 0, 6, 0.07);
}

.im-badge-blue {
    color: var(--inoxmilk-color-primitive-blue-900);
    background: rgba(51, 65, 85, 0.07);
}

.im-badge-green {
    color: #25D366;
    background: rgba(37, 211, 102, 0.08);
}

.im-badge-dark {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

/* Dot pulsante */
.im-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: badgeDotPulse 2s ease-in-out infinite;
}

.im-badge-red .im-badge-dot {
    background: var(--inoxmilk-color-primitive-red-500);
    box-shadow: 0 0 0 0 rgba(205, 0, 6, 0.4);
}

.im-badge-green .im-badge-dot {
    background: #25D366;
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
}

.im-badge-dark .im-badge-dot {
    background: var(--inoxmilk-color-primitive-red-500);
}

@keyframes badgeDotPulse {
    0%, 100% { box-shadow: 0 0 0 0 currentColor; }
    50%      { box-shadow: 0 0 0 6px transparent; }
}


/* ══════════════════════════════════════════════
   10. CARD — Base reutilizável premium
   ══════════════════════════════════════════════ */

.im-card {
    position: relative;
    border-radius: 20px;
    padding: 36px;
    overflow: hidden;
    background: var(--inoxmilk-color-semantic-background-surface);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition:
        transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.35s ease;
}

.im-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.07);
}

/* Glow decorativo nos cards */
.im-card-glow {
    position: absolute;
    top: -60%;
    right: -30%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(205, 0, 6, 0.06) 0%, transparent 70%);
    pointer-events: none;
    transition: transform 0.6s ease;
}

.im-card:hover .im-card-glow {
    transform: scale(1.5);
}

/* Card icon wrap */
.im-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(205, 0, 6, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--inoxmilk-color-semantic-action-primary-default);
    margin-bottom: 20px;
    transition: background 0.3s ease, transform 0.3s ease;
}

.im-card-icon.blue {
    background: rgba(51, 65, 85, 0.06);
    color: var(--inoxmilk-color-primitive-blue-900);
}

.im-card:hover .im-card-icon {
    background: rgba(205, 0, 6, 0.10);
    transform: scale(1.05);
}

.im-card:hover .im-card-icon.blue {
    background: rgba(51, 65, 85, 0.12);
}


/* ══════════════════════════════════════════════
   11. FLOATING WHATSAPP BUTTON (FAB)
   ══════════════════════════════════════════════ */

.im-fab-whatsapp {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #FFFFFF;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    z-index: 9999;

    box-shadow:
        0 4px 20px rgba(37, 211, 102, 0.40),
        0 2px 6px rgba(0, 0, 0, 0.15);

    transition:
        transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.3s ease;

    animation: fabBounce 3s ease-in-out infinite;
}

.im-fab-whatsapp:hover {
    transform: scale(1.1);
    box-shadow:
        0 8px 32px rgba(37, 211, 102, 0.50),
        0 4px 12px rgba(0, 0, 0, 0.15);
    animation: none;
}

.im-fab-whatsapp:active {
    transform: scale(0.95);
}

/* Ring pulsante */
.im-fab-whatsapp::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(37, 211, 102, 0.40);
    animation: fabRingPulse 2.5s ease-in-out infinite;
}

@keyframes fabBounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

@keyframes fabRingPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.2); opacity: 0; }
}

/* Admin bar offset */
body.admin-bar .im-fab-whatsapp {
    bottom: 60px;
}


/* ══════════════════════════════════════════════
   12. LOADING SPINNER — Componente premium
   ══════════════════════════════════════════════ */

.im-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: spinnerRotate 0.7s linear infinite;
}

.im-spinner.red {
    border-color: rgba(205, 0, 6, 0.2);
    border-top-color: var(--inoxmilk-color-primitive-red-500);
}

@keyframes spinnerRotate {
    to { transform: rotate(360deg); }
}

/* Botão com loading */
.btn-cta.is-loading,
.btn-whatsapp.is-loading {
    pointer-events: none;
    opacity: 0.85;
}

.btn-cta.is-loading .btn-label,
.btn-whatsapp.is-loading .btn-label {
    visibility: hidden;
}

.btn-cta.is-loading .im-spinner,
.btn-whatsapp.is-loading .im-spinner {
    position: absolute;
}


/* ══════════════════════════════════════════════
   13. RESPONSIVO — Componentes
   ══════════════════════════════════════════════ */

@media (max-width: 768px) {
    .btn-cta {
        padding: 14px 28px;
        font-size: 14px;
    }

    .btn-cta.btn-cta-lg {
        padding: 16px 36px;
        font-size: 15px;
    }

    .btn-cta.btn-cta-xl {
        padding: 18px 40px;
        font-size: 16px;
    }

    .im-section-header {
        margin-bottom: 40px;
    }

    .im-fab-whatsapp {
        width: 52px;
        height: 52px;
        font-size: 24px;
        bottom: 20px;
        right: 20px;
    }
}
