/* CSS Customizado Adicional para MARINUS WordPress Theme */

/* Otimizações específicas do WordPress */
.admin-bar .fixed-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .fixed-header {
        top: 46px;
    }
}

/* Ocultar elementos WordPress desnecessários na landing page */
.marinus-landing-page #wpadminbar {
    display: none !important;
}

.marinus-landing-page body {
    margin-top: 0 !important;
}

/* Melhorias de performance */
.wp-block-library-css,
.wp-block-library-theme-css,
.wc-block-style-css {
    display: none !important;
}

/* Customizações específicas para WordPress */
.wp-block-group {
    margin: 0;
    padding: 0;
}

.wp-block-columns {
    margin: 0;
}

.wp-block-column {
    margin: 0;
    padding: 0;
}

/* Garantir que imagens sejam responsivas */
img {
    max-width: 100%;
    height: auto;
}

/* Melhorar carregamento de fontes */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hiJ-Ek-_EeA.woff2') format('woff2');
}

/* Otimizações de animação */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Melhorias de acessibilidade */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus states melhorados */
button:focus,
a:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Melhorias para dispositivos touch */
@media (hover: none) and (pointer: coarse) {
    .conversion-button:hover,
    .premium-button:hover {
        transform: none;
    }
    
    .conversion-button:active,
    .premium-button:active {
        transform: scale(0.98);
    }
}

/* Otimizações para impressão */
@media print {
    .fixed-header,
    .urgency-pulse,
    .social-proof-ticker,
    footer {
        display: none !important;
    }
    
    .hero-section {
        page-break-inside: avoid;
    }
    
    .price-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Customizações para diferentes navegadores */
/* Safari */
@supports (-webkit-appearance: none) {
    .conversion-button,
    .premium-button {
        -webkit-appearance: none;
    }
}

/* Firefox */
@-moz-document url-prefix() {
    .conversion-button,
    .premium-button {
        -moz-appearance: none;
    }
}

/* Edge */
@supports (-ms-ime-align: auto) {
    .conversion-button,
    .premium-button {
        -ms-appearance: none;
    }
}

/* Melhorias de carregamento */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy-load.loaded {
    opacity: 1;
}

/* Placeholder para imagens carregando */
.image-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Melhorias de SEO */
h1, h2, h3, h4, h5, h6 {
    font-weight: inherit;
    line-height: 1.2;
}

/* Garantir contraste adequado */
.text-gray-600 {
    color: #4a5568;
}

.text-gray-500 {
    color: #6b7280;
}

/* Melhorias para leitores de tela */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Customizações específicas para WordPress Customizer */
.customize-partial-edit-shortcut {
    display: none !important;
}

/* Melhorias de performance para animações */
.floating-animation,
.urgency-pulse,
.scarcity-blink {
    will-change: transform;
    transform: translateZ(0);
}

/* Otimizações para Core Web Vitals */
.price-card img,
.hero-section img {
    content-visibility: auto;
    contain-intrinsic-size: 300px 400px;
}

/* Melhorias para carregamento crítico */
.above-fold {
    contain: layout style paint;
}

.below-fold {
    content-visibility: auto;
    contain-intrinsic-size: 0 500px;
}


/* Estilos para Sistema de Pagamento */

/* Modal de Pagamento */
.payment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.payment-modal.show {
    opacity: 1;
    visibility: visible;
}

.payment-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.payment-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.payment-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.payment-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.payment-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.payment-modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.payment-modal-body {
    padding: 1.5rem;
}

/* Resumo do Produto */
.product-summary {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.product-summary h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.product-description {
    color: #6b7280;
    margin-bottom: 1rem;
}

.price-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.current-price {
    font-size: 1.5rem;
    font-weight: 900;
    color: #059669;
}

.original-price {
    font-size: 1rem;
    color: #9ca3af;
    text-decoration: line-through;
}

.savings {
    background: #dcfce7;
    color: #166534;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Métodos de Pagamento */
.payment-methods h4 {
    margin: 0 0 1rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
}

.payment-method-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.payment-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.payment-tab:hover {
    border-color: #d1d5db;
}

.payment-tab.active {
    border-color: #667eea;
    background: #f0f4ff;
    color: #667eea;
}

.payment-tab img {
    width: 20px;
    height: 20px;
}

/* Painéis de Pagamento */
.payment-content {
    position: relative;
}

.payment-panel {
    display: none;
}

.payment-panel.active {
    display: block;
}

/* PayPal */
#paypal-button-container-1-frasco,
#paypal-button-container-3-frascos,
#paypal-button-container-6-frascos {
    margin-bottom: 1rem;
}

/* Stripe */
#stripe-card-element-1-frasco,
#stripe-card-element-3-frascos,
#stripe-card-element-6-frascos {
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: border-color 0.2s ease;
}

#stripe-card-element-1-frasco:focus-within,
#stripe-card-element-3-frascos:focus-within,
#stripe-card-element-6-frascos:focus-within {
    border-color: #667eea;
}

.stripe-pay-button {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.stripe-pay-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.stripe-pay-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.payment-info {
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
}

/* Badges de Segurança */
.security-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.security-badge {
    background: #f0fdf4;
    color: #166534;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid #bbf7d0;
}

/* Modal de Sucesso */
.success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.success-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.success-modal-content h3 {
    color: #059669;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.order-details {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
    text-align: left;
}

.order-details p {
    margin: 0.5rem 0;
    color: #374151;
}

.next-steps {
    text-align: left;
    margin: 1.5rem 0;
}

.next-steps h4 {
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.next-steps ul {
    color: #6b7280;
    padding-left: 1.5rem;
}

.next-steps li {
    margin-bottom: 0.5rem;
}

.success-close-btn {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.success-close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(5, 150, 105, 0.4);
}

/* Modal de Erro */
.payment-error {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
}

.error-message {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.error-message h4 {
    color: #dc2626;
    margin-bottom: 1rem;
}

.error-message p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.error-message button {
    background: #dc2626;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
}

/* Responsividade para Modais */
@media (max-width: 640px) {
    .payment-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .payment-modal-header,
    .payment-modal-body {
        padding: 1rem;
    }
    
    .product-summary {
        padding: 1rem;
    }
    
    .payment-method-tabs {
        flex-direction: column;
    }
    
    .payment-tab {
        justify-content: center;
    }
    
    .price-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .security-badges {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .success-modal-content {
        padding: 1.5rem;
    }
}

/* Animações para os modais */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.payment-modal.show .payment-modal-content {
    animation: modalSlideIn 0.3s ease-out;
}

/* Melhorias de acessibilidade */
.payment-tab:focus,
.stripe-pay-button:focus,
.success-close-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Estados de loading */
.stripe-pay-button.loading {
    position: relative;
    color: transparent;
}

.stripe-pay-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}


/* Botão Flutuante WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.whatsapp-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #25D366;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    animation: whatsapp-pulse 2s infinite;
}

.whatsapp-button:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.6);
    text-decoration: none;
    color: white;
}

.whatsapp-button svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.whatsapp-text {
    white-space: nowrap;
}

/* Animação de pulso para o WhatsApp */
@keyframes whatsapp-pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4), 0 0 0 8px rgba(37, 211, 102, 0.1);
    }
}

/* Responsividade para o botão WhatsApp */
@media (max-width: 640px) {
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
    }
    
    .whatsapp-button {
        padding: 0.625rem 0.875rem;
        font-size: 0.8rem;
    }
    
    .whatsapp-button svg {
        width: 18px;
        height: 18px;
    }
    
    /* Versão compacta no mobile */
    .whatsapp-text {
        display: none;
    }
    
    .whatsapp-button {
        border-radius: 50%;
        padding: 0.75rem;
        width: 50px;
        height: 50px;
        justify-content: center;
    }
}

/* Melhorar acessibilidade */
.whatsapp-button:focus {
    outline: 2px solid #25D366;
    outline-offset: 2px;
}

/* Animação de entrada */
.whatsapp-float {
    animation: whatsapp-slide-in 0.5s ease-out 1s both;
}

@keyframes whatsapp-slide-in {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}


/* Logo Profissional e Discreto */
.fixed-header img {
    transition: all 0.3s ease;
    filter: brightness(1.1);
}

.fixed-header img:hover {
    filter: brightness(1.2);
    transform: scale(1.02);
}

/* Garantir que o logo não quebre o layout */
.fixed-header .flex.items-center:first-child {
    min-width: 0;
    flex-shrink: 1;
}

/* Logo responsivo mais refinado */
@media (max-width: 480px) {
    .fixed-header img {
        max-height: 0.875rem !important;
        max-width: 60px !important;
    }
    
    .fixed-header .text-xs {
        display: none;
    }
    
    .fixed-header .space-x-3 {
        gap: 0.25rem;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .fixed-header img {
        max-height: 1rem !important;
        max-width: 70px !important;
    }
}

@media (min-width: 769px) {
    .fixed-header img {
        max-height: 1.25rem !important;
        max-width: 90px !important;
    }
}

/* Melhorar o alinhamento do logo com o texto */
.fixed-header .flex.items-center.space-x-3 {
    align-items: center;
    justify-content: flex-start;
}

/* Garantir que o logo tenha boa qualidade */
.fixed-header img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}


/* Logo Ultra-Compacto - Correção Definitiva */
.fixed-header img {
    max-height: 1rem !important;
    max-width: 80px !important;
    height: auto !important;
    width: auto !important;
}

/* Forçar tamanho pequeno em todas as resoluções */
@media (max-width: 320px) {
    .fixed-header img {
        max-height: 0.75rem !important;
        max-width: 50px !important;
    }
}

@media (min-width: 321px) and (max-width: 640px) {
    .fixed-header img {
        max-height: 0.875rem !important;
        max-width: 60px !important;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .fixed-header img {
        max-height: 1rem !important;
        max-width: 70px !important;
    }
}

@media (min-width: 1025px) {
    .fixed-header img {
        max-height: 1.125rem !important;
        max-width: 80px !important;
    }
}

/* Garantir que o logo não cresça além do especificado */
.fixed-header img[src*="marinus-logo"] {
    max-height: 1rem !important;
    max-width: 80px !important;
    object-fit: contain !important;
    object-position: left center !important;
}

/* Header mais compacto */
.fixed-header {
    padding: 0.25rem 0 !important;
}

.fixed-header .container {
    padding: 0 0.5rem !important;
}

/* Reduzir espaçamento entre elementos */
.fixed-header .space-x-3 {
    gap: 0.375rem !important;
}

.fixed-header .space-x-4 {
    gap: 0.5rem !important;
}

