/* ==================== */
/* 1. VARIÁVEIS E RESET */
/* ==================== */
:root {
    --primary: #8b5cf6;
    --secondary: #d946ef;
    --dark: #1e1b4b;
    --light: #f5f3ff;
    --transition: all 0.3s ease;
    --header-height: 72px;
}

html {
    scroll-behavior: smooth;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', 'Noto Sans JP', sans-serif;
    width: 100%; /* Garante largura total */
    min-height: 100vh; /* Altura mínima da tela */
}

/* Estilizar o formulário de pesquisa */
.search-form {
    margin-bottom: 1.5rem;
}

.search-form input[type="search"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db; /* Equivalente a border-gray-300 */
    border-radius: 0.375rem;
    background-color: white;
    color: #1e1b4b;
}

.search-form input[type="search"]:focus {
    outline: none;
    ring: 2px solid var(--primary);
}

.dark .search-form input[type="search"] {
    background-color: #374151; /* Equivalente a dark:bg-gray-700 */
    border-color: #4b5563; /* Equivalente a dark:border-gray-600 */
    color: white;
}

.search-form button {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.search-form button:hover {
    background-color: var(--secondary);
}

/* ==================== */
/* 2. ESTILOS BASE */
/* ==================== */
body {
    background-color: var(--light);
    color: var(--dark);
}

main {
    position: relative;
    z-index: 10;
    margin-top: 0 !important;
    background-color: var(--light);
    color: var(--dark);
    flex: 3;
    min-width: 0;
}

.main {
    display: flex;
    gap: 2rem;
    align-items: flex-start
    flex-wrap: wrap;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

aside.sidebar {
    flex: 1;
    min-width: 15rem;
    max-width: 18rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    background-color: #f9fafb;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.sidebar {
    padding: 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

html.dark body,
html.dark main {
    background-color: var(--dark);
    color: white;
}
html.dark aside.sidebar {
    background-color: #1f2937;
    color: white;
}

@media (max-width: 768px) {
    .main {
        flex-direction: column;
    }

    main {
        margin-left: 0; /* Remove o margin-left em telas menores */
        flex: 1;
    }

    aside.sidebar {
        max-width: 100%; /* Garante que o sidebar ocupe a largura total */
        border-right: none; /* Remove a borda em telas menores, se desejar */
    }
}

@media (max-width: 1024px) {
    .main {
        flex-direction: column
	paddimg: 0;
    }

    main {
        margin-left: 0;
        flex: 1;
    }

    aside.sidebar {
        max-width: 100%;
        border-left: none;
        margin-bottom: 1rem;
    }
}

/* Ajustes para single-post.php */
.main-content {
    flex: 3;
    min-width: 0;
}

article {
    border-radius: 0.5rem;
    overflow: hidden;
}

header[role="banner"] {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
}

.prose {
    max-width: 100%; /* Garante que o conteúdo não ultrapasse o contêiner */
    padding: 0 1rem;
}

.prose img {
    max-width: 100%;
    height: auto;
}

.dark .prose {
    color: #d1d5db;
}

.dark .prose a {
    color: var(--primary);
}

@media (min-width: 1024px) {
    .main-content {
        padding-right: 2rem; /* Espaço para o sidebar */
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 0;
    }
}

/* ==================== */
/* 3. COMPONENTES */
/* ==================== */
/* Banner Styles */
.main-content .banner {
    position: relative;
    overflow: hidden;
}

.main-content .banner img {
    transition: transform 0.3s ease;
}

.main-content .banner:hover img {
    transform: scale(1.05);
}

.main-content .banner-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.main-content .banner-text {
    z-index: 20;
}

.main-content .banner-text h1 {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.main-content .banner-text a {
    text-decoration: none;
}

@media (max-width: 768px) {
    .main-content .banner {
        height: 48rem; /* Ajuste para telas menores, se necessário */
    }
}

/* Comments */
/* Comentários */
.comments-area {
    margin-top: 2.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.comments-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment-list .comment {
    padding: 1rem;
    background-color: #f9fafb;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
}

.dark .comment-list .comment {
    background-color: #2d3748;
    border-color: #4b5563;
    color: #e5e7eb;
}

.comment-author {
    font-weight: 600;
    color: var(--dark);
}

.dark .comment-author {
    color: #f3f4f6;
}

.comment-metadata {
    font-size: 0.875rem;
    color: #6b7280;
}

.dark .comment-metadata {
    color: #9ca3af;
}

.comment-reply-link {
    color: var(--primary);
    text-decoration: underline;
}

.comment-respond {
    margin-top: 2rem;
}

.comment-respond label {
    font-weight: 500;
}

.comment-respond input,
.comment-respond textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background-color: white;
}

.dark .comment-respond input,
.dark .comment-respond textarea {
    background-color: #374151;
    border-color: #4b5563;
    color: white;
}

.comment-respond .form-submit input {
    background-color: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
}

.comment-respond .form-submit input:hover {
    background-color: var(--secondary);
}

/* \Comments */

.gradient-text {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.gradient-bg {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

/* Cards */
.vtuber-card .vtuber-image,
.search-card .search-image {
    transition: var(--transition);
}

.vtuber-card:hover .vtuber-image,
.search-card:hover .search-image {
    transform: translateY(-10px) scale(1.05);
    filter: drop-shadow(0 10px 15px rgba(139, 92, 246, 0.3));
}

.live-indicator {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Agenda */
.schedule-day.active {
    background-color: var(--primary);
    color: white;
    border-color: transparent;
}


/* Swiper Gallery Styles */
.vtuber-gallery-swiper .swiper-slide {
    width: 80%;
    height: auto;
}

.vtuber-gallery-swiper .swiper-slide img {
    transition: transform 0.3s ease;
}

.vtuber-gallery-swiper .swiper-slide:hover img {
    transform: scale(1.05);
}

.gallery-next, .gallery-prev {
    color: var(--primary);
}

.gallery-pag .swiper-pagination-bullet {
    background-color: var(--primary);
    opacity: 0.5;
}

.gallery-pag .swiper-pagination-bullet-active {
    opacity: 1;
}

/* Live Videos Grid */
.live-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.live-videos-grid iframe {
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Schedule Table */
.schedule-table {
    width: 100%;
    border-collapse: collapse;
}

.schedule-table th,
.schedule-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.dark .schedule-table th,
.dark .schedule-table td {
    border-color: #4b5563;
}

/* Related VTubers */
.related-vtuber-swiper .swiper-slide {
    transition: transform 0.3s ease;
}

.related-vtuber-swiper .swiper-slide:hover {
    transform: scale(1.02);
}

.relVT-next, .relVT-prev {
    color: var(--primary);
}

.relVT-pag .swiper-pagination-bullet {
    background-color: var(--primary);
    opacity: 0.5;
}

.relVT-pag .swiper-pagination-bullet-active {
    opacity: 1;
}

/* ==================== */
/* 4. MENU E HEADER */
/* ==================== */
header {
    position: sticky;
    top: 0;
    width: 100%;
    margin-top: 0;
    padding-top: 0;
    z-index: 50;
    height: var(--header-height);
    transition: transform 0.3s ease;
    will-change: transform;
}

.header-hidden {
        transform: translateY(-100%);
}
/* Menu principal */
.header-nav ul {
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.header-nav a {
    position: relative;
    padding: 0.5rem 0;
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.header-nav a:hover {
    color: var(--primary);
}

.header-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.header-nav a:hover::after,
.header-nav .current-menu-item a::after {
    width: 100%;
}

.header-nav .current-menu-item a {
    color: var(--primary);
}

/* Menu mobile */
#mobileMenu {
    top: 0 !important;
    height: 100vh !important;
    z-index: 110;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobileMenu.-translate-x-full {
    transform: translateX(-100%);
}

#mobileMenu.translate-x-0 {
    transform: translateX(0);
}

#mobileMenu ul {
    gap: 0.75rem;
    padding: 1.5rem 0;
    margin: 0;
}

#mobileMenu a {
    padding: 1rem 1.5rem;
    margin: 0 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

#mobileMenu li a {
    padding: 0.75rem 1.5rem;
    margin: 0 0.5rem;
    border-radius: 0.375rem;
}

#mobileMenu a:hover {
    background: rgba(139, 92, 246, 0.15);
    transform: translateX(4px);
}

#mobileMenu .current-menu-item a {
    background: rgba(139, 92, 246, 0.2);
    font-weight: 600;
    border-left: 3px solid var(--primary);
}

#closeMobileMenu {
    color: var(--dark) !important;
    font-size: 1.5rem;
    padding: 0.5rem;
}

.dark #closeMobileMenu {
    color: white !important;
}

#mobileMenu .sub-menu {
    padding-left: 1rem;
    margin-top: 0.25rem;
    border-left: 2px solid rgba(139, 92, 246, 0.3);
}

#mobileMenu .sub-menu a {
    padding-left: 1.5rem !important;
    font-size: 0.9rem;
}

#mobileOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 100;
    background: rgba(0,0,0,0.85) !important;
    backdrop-filter: blur(8px);
    transition: opacity 0.3s ease, backdrop-filter 0.3s ease;
}

#mobileOverlay.opacity-100 {
    opacity: 1;
    pointer-events: auto;
}

.menu-open {
    overflow: hidden;
    height: 100vh;
}

/* Search */
#mobileMenu input[type="search"] {
        background: white !important;
        color: #1e1b4b !important;
        padding: 12px !important;
        border: 2px solid #8b5cf6 !important;
}

.dark #mobileMenu input[type="search"] {
        background: #1e1b4b !important;
        color: white !important;
}

#mobileMenu .search-form {
    padding: 1.5rem;
    margin: 1rem 0.5rem 0;
    background: rgba(255,255,255,0.1);
    border-radius: 0.75rem;
}

#mobileMenu .search-form input {
    padding: 1rem 1.25rem !important;
    border-radius: 2rem !important;
}

.dark #mobileMenu .search-form input {
    background: var(--dark) !important;
    color: white !important;
    border-color: var(--secondary) !important;
}

.dark header {
    background-color: var(--dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dark #mobileMenu {
    background-color: var(--dark);
    color: var(--light);
}

.dark #mobileMenu a {
    color: #f3f4f6;
}

.dark #closeMobileMenu {
    color: #f3f4f6 !important;
}

/* ==================== */
/* 5. WOOCOMMERCE */
/* ==================== */
/* Container principal */
.woocommerce .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Galeria de produtos */
.woocommerce-product-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.woocommerce-product-gallery__image {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
}

.flex-control-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.flex-control-thumbs li {
    list-style: none;
    cursor: pointer;
}

.flex-control-thumbs img {
    border: 1px solid #e2e8f0;
    border-radius: 0.25rem;
    opacity: 0.7;
    transition: var(--transition);
}

.flex-control-thumbs img:hover,
.flex-control-thumbs .flex-active {
    opacity: 1;
    border-color: var(--primary);
}

/* Sumário do produto */
.woocommerce div.product .summary {
    padding: 0 1rem;
}

.woocommerce div.product .product_title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
}

.woocommerce div.product .price {
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* Botão de compra */
.woocommerce div.product form.cart .button {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.woocommerce div.product form.cart .button:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

/* Listagem de produtos */
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.woocommerce ul.products li.product {
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Abas do produto */
.woocommerce-tabs {
    margin-top: 3rem;
    width: 100%;
}

.wc-tabs {
    display: flex;
    margin: 0 0 2rem;
    padding: 0;
    border-bottom: 1px solid #e2e8f0;
    list-style: none;
}

.wc-tabs li {
    margin-right: 1rem;
    position: relative;
}

.wc-tabs li a {
    padding: 0.5rem 1rem;
    display: block;
    color: var(--dark);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.wc-tabs li.active a {
    border-bottom-color: var(--primary);
    color: var(--primary);
}

/* ==================== */
/* 6. UTILITÁRIOS */
/* ==================== */
.swiper {
    width: 100%;
    display: block;
}

.swiper-wrapper {
    display: flex;
}

/* ==================== */
/* 7. MEDIA QUERIES */
/* ==================== */
@media (max-width: 768px) {
    /* Layout de produto */
    .woocommerce div.product div.images,
    .woocommerce div.product div.summary {
        width: 100%;
        float: none;
    }

    /* Galeria */
    .flex-control-thumbs {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Listagem de produtos */
    .woocommerce ul.products {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1.5rem;
    }
}

/* ==================== */
/* 8. TAILWINDCSS */
/* ==================== */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Componentes Tailwind */
@layer components {
    .category-badge {
        @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
    }
    .tag-badge {
        @apply inline-flex items-center px-2 py-0.5 rounded text-xs font-medium;
    }
}
