/*
Theme Name: Talhadas Perfeitas Theme
Theme URI: https://talhadasperfeitas.pt
Author: Agilstore
Description: Tema Premium em Tailwind CSS para as Talhadas Perfeitas.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: talhadasperfeitas
*/

html {
    scroll-behavior: smooth;
    scroll-padding-top: 112px;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Botão Flutuante do WhatsApp */
.tp-whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    /* Movido para a direita */
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: #fff !important;
    border-radius: 50px;
    text-align: center;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    animation: wapp-pulse 2s infinite;
}

.tp-whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
    box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.4);
    color: #fff !important;
}

.tp-whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

/* Micro-animação de pulso sutil no botão flutuante */
@keyframes wapp-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Customizer - Logotipo Customizado */
.custom-logo-link {
    display: inline-flex;
    align-items: center;
    max-height: 50px;
    /* Reduzido no mobile */
    transition: transform 0.3s ease;
}

.custom-logo-link:hover {
    transform: scale(1.02);
}

.custom-logo {
    max-height: 50px;
    /* Reduzido no mobile */
    width: auto;
    object-fit: contain;
}

@media (min-width: 1024px) {
    .custom-logo-link {
        max-height: 80px;
        /* Tamanho original no desktop */
    }

    .custom-logo {
        max-height: 80px;
        /* Tamanho original no desktop */
    }
}

/* Tamanhos específicos para o rodapé */
footer .custom-logo-link {
    max-height: 70px;
}

footer .custom-logo {
    max-height: 70px;
}

/* Tamanhos específicos para o menu lateral mobile */
#mobile-menu .custom-logo-link {
    max-height: 56px;
}

#mobile-menu .custom-logo {
    max-height: 56px;
}

/* Bento Grid Layout para o Destaque no Desktop */
@media (min-width: 1024px) {
    .tp-grid-destaque {
        grid-row: span 2 / span 2;
        height: 536px;
        /* 256px (h-64) + 256px (h-64) + 24px (gap) */
    }
}

/* Conteúdo Rich Text do Produto (Quill) */
.product-rich-content ul {
    list-style-type: disc !important;
    padding-left: 1.5rem !important;
    margin-top: 0.5rem !important;
    margin-bottom: 0.5rem !important;
}

.product-rich-content ol {
    list-style-type: decimal !important;
    padding-left: 1.5rem !important;
    margin-top: 0.5rem !important;
    margin-bottom: 0.5rem !important;
}

.product-rich-content strong {
    font-weight: bold !important;
}

.product-rich-content u {
    text-decoration: underline !important;
}

/* Tamanhos de Fonte do Quill */
.product-rich-content .ql-size-small {
    font-size: 0.75em !important;
}

.product-rich-content .ql-size-large {
    font-size: 1.5em !important;
}

.product-rich-content .ql-size-huge {
    font-size: 2.25em !important;
}

/* ==========================================================================
   TIPOGRAFIA GLOBAL: UNIFICAÇÃO PARA A FONTE INTER
   ========================================================================== */

*,
body,
button,
input,
select,
textarea {
    font-family: 'Inter', system-ui, sans-serif !important;
}

/* Exceção explícita para manter a exibição de ícones do Material Symbols */
.material-symbols-outlined,
[class*="Material_Symbols_Outlined"] {
    font-family: 'Material Symbols Outlined' !important;
}

/* ==========================================================================
   SISTEMA DE DESIGN: CANTOS ARREDONDADOS (BOTÕES, CARDS E FOTOS)
   ========================================================================== */

/* 1. Botões e Ações (Arredondamento de 8px) */
button,
input[type="submit"],
input[type="button"],
a[class*="bg-[#B91C1C]"],
a[class*="border-[#B91C1C]"],
a[class*="border-2"],
a[href="#contactos"] {
    border-radius: 8px !important;
}

/* 2. Inputs de Formulário e Caixas de Texto (Arredondamento de 8px) */
input[type="text"],
input[type="email"],
textarea,
select {
    border-radius: 8px !important;
}

/* 3. Cards de Produtos, Depoimentos e Outros Contêineres (Arredondamento de 12px) */
a[href*="/produtos/"],
a[class*="bg-[#222121]"],
div[class*="bg-[#222121]"],
div[class*="border-[#1C1B1B]"].bg-white,
div[class*="border-[#B91C1C]"].bg-white,
div[class*="border-2"][class*="border-solid"][class*="border-[#1C1B1B]"],
div[class*="border-2"][class*="border-solid"][class*="border-[#B91C1C]"] {
    border-radius: 12px !important;
    overflow: hidden !important;
}

/* 4. Fotos, Imagens e seus Wrappers de Estouro (Arredondamento de 12px) */
img:not(.custom-logo):not([src*="logo"]):not([class*="rounded-full"]):not([class*="h-[22px]"]),
.wp-post-image,
.h-48.sm\:h-64.overflow-hidden,
.w-full.lg\:w-1\/2.h-52.sm\:h-72.lg\:h-96.overflow-hidden,
.aspect-square.overflow-hidden {
    border-radius: 12px !important;
}

/* 5. Hover dos Botões de Ação Primária (Fundo vermelho -> Fundo branco e texto vermelho) */
a[class*="bg-[#B91C1C]"],
button[class*="bg-[#B91C1C]"],
a.bg-\[\#B91C1C\],
button.bg-\[\#B91C1C\] {
    border: 2px solid #B91C1C !important;
    transition: all 0.3s ease-in-out !important;
}

a[class*="bg-[#B91C1C]"]:hover,
button[class*="bg-[#B91C1C]"]:hover,
a.bg-\[\#B91C1C\]:hover,
button.bg-\[\#B91C1C\]:hover {
    background-color: #FFFFFF !important;
    color: #B91C1C !important;
    border-color: #B91C1C !important;
}

/* Forçar a mudança de cor do texto em elementos filhos nos botões primários no hover */
a[class*="bg-[#B91C1C]"]:hover *,
button[class*="bg-[#B91C1C]"]:hover *,
a.bg-\[\#B91C1C\]:hover *,
button.bg-\[\#B91C1C\]:hover * {
    color: #B91C1C !important;
}

/* ==========================================================================
   INTERATIVIDADE: SWIPER SLIDER DE DEPOIMENTOS
   ========================================================================== */

/* Transições e estados dos slides */
.tp-testimonials-swiper .swiper-slide {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
    opacity: 0.35 !important;
    transform: scale(0.85) !important;
}

/* O slide ativo (centralizado) ganha opacidade total e tamanho cheio */
.tp-testimonials-swiper .swiper-slide-active {
    opacity: 1 !important;
    transform: scale(1) !important;
}

/* Paginação Global do Swiper - Bolinhas (Dots) Espaçadas e Vermelhas */
.swiper-pagination {
    position: relative !important;
    margin-top: 24px !important;
    bottom: 0 !important;
}

.swiper-pagination-bullet {
    background: #1C1B1B !important;
    opacity: 0.25 !important;
    width: 10px !important;
    height: 10px !important;
    margin: 0 8px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.swiper-pagination-bullet-active {
    background: #B91C1C !important;
    opacity: 1 !important;
    width: 28px !important;
    border-radius: 6px !important;
}

.swiper-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet,
.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet {
    margin: 0 8px !important;
}

/* Botões de Navegação Swiper (Setas) */
.tp-testimonials-swiper .swiper-button-next::after,
.tp-testimonials-swiper .swiper-button-prev::after {
    font-size: 20px !important;
    font-weight: bold;
}

.tp-testimonials-swiper .swiper-button-next,
.tp-testimonials-swiper .swiper-button-prev {
    color: #B91C1C !important;
    transition: transform 0.3s ease, color 0.3s ease;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

.tp-testimonials-swiper .swiper-button-next:hover {
    transform: translateY(-50%) translateX(4px) !important;
    color: #1C1B1B !important;
}

.tp-testimonials-swiper .swiper-button-prev:hover {
    transform: translateY(-50%) translateX(-4px) !important;
    color: #1C1B1B !important;
}

/* ==========================================================================
   ANIMAÇÃO DE ENTRADA SUAVE NO SCROLL (REVEAL ON SCROLL)
   ========================================================================== */
.tp-reveal {
    opacity: 0 !important;
    transform: translateY(30px) !important;
    transition: opacity 0.8s cubic-bezier(0.215, 0.61, 0.355, 1), transform 0.8s cubic-bezier(0.215, 0.61, 0.355, 1) !important;
    will-change: transform, opacity;
}

.tp-reveal.tp-revealed {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* ==========================================================================
   PLYR: PLAYER DE VÍDEO LIMPO (SEM BRANDING YOUTUBE)
   ========================================================================== */
.plyr__video-embed {
    position: relative;
    background-color: #1C1B1B;
}

/* Esconder iframe fallback (evita flash do YouTube) */
.plyr__video-embed>iframe {
    opacity: 0;
    pointer-events: none;
}

/* Plyr começa invisível, fade-in quando pronto */
.plyr__video-embed .plyr {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.plyr__video-embed .plyr.plyr--initialized {
    opacity: 1;
}

/* Centrar vídeo em cover na div quadrada (16:9 → 1:1) */
.plyr__video-embed .plyr__video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.plyr__video-embed .plyr__video-wrapper iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 177.78%;
    height: 100%;
    max-width: none;
}

.tp-video-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    cursor: default;
    pointer-events: auto;
}

.plyr--video .plyr__controls,
.plyr--video .plyr__control--overlaid {
    display: none !important;
}

/* ==========================================================================
   HERO DAS PÁGINAS LEGAIS (PRIVACIDADE E LITÍGIOS)
   ========================================================================== */
.page-hero-slider,
.page-hero-slider .swiper,
.page-hero-slider .swiper-wrapper,
.page-hero-slider .swiper-slide,
.page-hero-slider img,
.page-hero-slider [class*="slider"] {
    height: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
}