/**
 * Theme Name: Gevents
 * Theme URI: https://gevents.com.br
 * Author: Gevents
 * Author URI: https://gevents.com.br
 * Description: Tema WordPress leve e moderno para ticketeira de eventos. Compatível com WooCommerce e FooEvents. Sem Elementor.
 * Version: 1.0.0
 * Text Domain: gevents
 * Domain Path: /languages
 * Tags: events, tickets, woocommerce, fooevents, responsive, mobile-first
 * Tested up to: 6.4
 * Requires PHP: 7.4
 * License: GPL v2 or later
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 */

/* ===== CSS Reset e Variáveis ===== */
:root {
  --primary-color: #2563eb;
  --secondary-color: #1e40af;
  --background-color: #ffffff;
  --text-color: #1f2937;
  --text-light: #6b7280;
  --border-color: #e5e7eb;
  --success-color: #10b981;
  --error-color: #ef4444;
  --warning-color: #f59e0b;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --border-radius: 0.5rem;
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --max-width: 1280px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  overflow-x: hidden;
}

/* ===== Tipografia ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--spacing-md);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--secondary-color);
}

/* ===== Layout Base ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.site-content {
  min-height: 60vh;
  padding: var(--spacing-xl) 0;
}

/* ===== Header ===== */
.site-header {
  background-color: var(--background-color);
  border-bottom: 1px solid var(--border-color);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.site-branding .site-title {
    margin: 0;
    font-size: 1.8rem;
    line-height: 1;
}

.site-branding .site-title a {
    color: #111;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.site-branding .custom-logo-link {
    display: inline-flex;
    align-items: center;
    width: min(var(--header-logo-width), 60vw);
    max-width: 100%;
}

.site-branding .custom-logo {
    width: 100%;
    height: auto;
    max-height: var(--header-logo-height);
    object-fit: contain;
    display: block;
}

/* Navigation */
.main-navigation {
    position: relative;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
}

.main-navigation a {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
}

.main-navigation a:hover {
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
}

/* Header Search */
.site-header .header-left form[role="search"] {
    display: none;
}

.header-search .search-form {
    display: flex;
    align-items: center;
    background: #f3f4f6;
    border-radius: 50px;
    padding: 5px 15px;
    width: 250px;
    transition: width 0.3s;
}

.header-search .search-field {
    border: none;
    background: transparent;
    padding: 5px;
    width: 100%;
    outline: none;
    font-size: 0.9rem;
}

.header-search .search-submit {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

.gevents-autocomplete {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: none;
    z-index: 1100;
}

.gevents-autocomplete.is-open {
    display: block;
}

.gevents-autocomplete-item {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    color: var(--text-color);
    text-decoration: none;
    align-items: center;
}

.gevents-autocomplete-item:hover {
    background: #f3f4f6;
}

.gevents-autocomplete-thumb {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    flex: 0 0 auto;
    background: #f3f4f6;
}

.gevents-autocomplete-body {
    min-width: 0;
    flex: 1;
}

.gevents-autocomplete-title {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gevents-autocomplete-meta {
    display: flex;
    gap: 10px;
    margin-top: 2px;
    font-size: 0.8rem;
    color: var(--text-light);
    line-height: 1.2;
}

/* Header Icons/Links */
.header-cart-link {
    color: var(--text-color);
    position: relative;
}

.header-cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc2626;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1;
}

.header-user-logged {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background 0.2s;
    color: var(--text-color);
}

.header-user-logged:hover {
    background: rgba(0, 0, 0, 0.05);
}

.header-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
}

.header-user-dashboard {
    font-weight: 600;
    color: var(--text-color);
}

.header-links {
    display: flex;
    gap: 1rem;
}

.header-link-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 0.85rem;
    line-height: 1.2;
    font-weight: 500;
}

.header-link-item svg {
    color: var(--text-light);
}

.header-link-item:hover, .header-link-item:hover svg {
    color: var(--primary-color);
}

/* Buttons */
.button {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border: none;
}

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

.button-small {
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    border-radius: 50px; /* Pill shape for login button */
}

.site-footer {
    background: #1f2937;
    color: #cbd5e1;
    padding: 3.5rem 0 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.2fr;
    gap: 2.25rem;
}

.footer-brand-title a,
.footer-col-title {
    color: #fff;
    font-weight: 800;
    letter-spacing: -0.3px;
    text-decoration: none;
}

.footer-brand-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.footer-logo-link {
    display: inline-flex;
    align-items: center;
}

.footer-logo-img {
    width: 340px;
    height: auto;
    max-height: 100px;
    object-fit: contain;
    display: block;
}

.footer-brand-desc {
    color: rgba(203, 213, 225, 0.85);
    margin-bottom: 1.25rem;
    max-width: 340px;
}

.footer-social-title {
    color: #fff;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.footer-social-links {
    display: flex;
    gap: 10px;
}

.footer-social-link {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    border: 1px solid rgba(203, 213, 225, 0.18);
    background: rgba(255, 255, 255, 0.02);
}

.footer-social-link:hover {
    color: #fff;
    border-color: rgba(203, 213, 225, 0.35);
    background: rgba(255, 255, 255, 0.04);
}

.footer-col-title {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links a {
    color: rgba(203, 213, 225, 0.85);
    text-decoration: none;
}

.footer-links a:hover {
    color: #fff;
}

.footer-info-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-info-item {
    display: flex;
    gap: 10px;
    text-decoration: none;
    color: rgba(203, 213, 225, 0.9);
}

.footer-info-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(203, 213, 225, 0.14);
    color: #cbd5e1;
    flex: 0 0 auto;
}

.footer-info-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.footer-info-title {
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.footer-info-desc {
    color: rgba(203, 213, 225, 0.75);
    font-size: 0.9rem;
    line-height: 1.35;
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(203, 213, 225, 0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    color: rgba(203, 213, 225, 0.75);
    font-size: 0.95rem;
}

.footer-bottom-right a {
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    margin-left: 6px;
}

.footer-bottom-right a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 1024px) {
    .header-left { gap: 1rem; }
    .header-search { display: none; } /* Hide search on smaller screens or move to icon */
    .header-links { display: none; }
    .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; }
    
    /* Logo footer em tablet */
    .footer-logo-img {
        width: 280px;
        max-height: 90px;
    }
}

@media (max-width: 768px) {
    /* Logo footer mobile - maior */
    .footer-logo-img {
        width: 240px;
        max-height: 80px;
    }
    
    .menu-toggle { 
        display: block; 
        background: none; 
        border: none; 
        font-size: 1.5rem; 
        cursor: pointer;
        z-index: 1202;
        position: relative;
        padding: 0.5rem;
        color: #333;
        transition: color 0.2s ease;
    }
    
    .menu-toggle:hover {
        color: var(--primary-color);
    }
    
    .main-navigation ul { 
        display: none;
    }
    
    /* Mobile Menu Overlay */
    .main-navigation.toggled::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1199;
        animation: fadeIn 0.3s ease-out;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    
    @keyframes slideInLeft {
        from { transform: translateX(-100%); }
        to { transform: translateX(0); }
    }
    
    /* CORREÇÃO: Mobile Sidebar Menu - ESQUERDA não direita */
    .main-navigation.toggled ul { 
        display: flex;
        flex-direction: column;
        position: fixed; 
        top: 0; 
        left: 0;
        bottom: 0;
        width: 320px;
        max-width: 85vw;
        background: #fff; 
        padding: 1.5rem;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
        z-index: 1200;
        overflow-y: auto;
        animation: slideInLeft 0.3s ease-out;
        gap: 0;
    }
    
    /* Mobile Menu Header */
    .main-navigation.toggled ul::before {
        content: 'Menu';
        display: block;
        font-size: 1.25rem;
        font-weight: 700;
        padding: 1rem 0 1.5rem;
        border-bottom: 1px solid #e5e7eb;
        margin-bottom: 1rem;
        color: var(--text-color);
    }
    
    /* Mobile Menu Items */
    .main-navigation.toggled ul li {
        margin: 0;
        border-bottom: 1px solid #f3f4f6;
    }
    
    .main-navigation.toggled ul li:last-child {
        border-bottom: none;
    }
    
    .main-navigation.toggled ul li a {
        display: block;
        padding: 1rem 0;
        color: var(--text-color);
        font-weight: 500;
        transition: color 0.2s ease, padding-left 0.2s ease;
    }
    
    .main-navigation.toggled ul li a:hover {
        color: var(--primary-color);
        padding-left: 0.5rem;
        background: transparent;
    }
    
    /* Mobile: Incluir busca no menu */
    .header-search {
        display: none;
    }
    
    .main-navigation.toggled .mobile-search-wrapper {
        display: block;
        padding: 1rem 0;
        border-bottom: 1px solid #e5e7eb;
        margin-bottom: 1rem;
    }
    
    .main-navigation.toggled .mobile-search-wrapper .search-form {
        display: flex;
        width: 100%;
    }
    
    .main-navigation.toggled .mobile-search-wrapper .search-field {
        flex: 1;
        padding: 0.75rem 1rem;
        border: 1px solid #e5e7eb;
        border-radius: 8px 0 0 8px;
        font-size: 0.9375rem;
    }
    
    .main-navigation.toggled .mobile-search-wrapper .search-submit {
        padding: 0.75rem 1.25rem;
        background: var(--primary-color);
        border: none;
        border-radius: 0 8px 8px 0;
        color: #fff;
        cursor: pointer;
        transition: background 0.2s ease;
    }
    
    .main-navigation.toggled .mobile-search-wrapper .search-submit:hover {
        background: var(--secondary-color);
    }
    
    /* Mobile: Language selector wrapper */
    .main-navigation.toggled .mobile-language-wrapper {
        padding: 1rem 0;
        border-bottom: 1px solid #e5e7eb;
        margin-bottom: 1rem;
    }
    
    .main-navigation.toggled .mobile-language-wrapper::before {
        content: 'Idioma / Language';
        display: block;
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
        color: var(--text-light);
        margin-bottom: 0.75rem;
        letter-spacing: 0.5px;
    }
    
    /* Mobile: Links adicionais */
    .header-links { display: none; }
    .header-login .header-user-dashboard { display: none; }
    
    /* Esconder itens extras no header mobile */
    .header-right > .header-cart-link,
    .header-right > .header-login {
        display: flex !important;
    }
    @keyframes slideInRight {
        from {
            transform: translateX(100%);
        }
        to {
            transform: translateX(0);
        }
    }
    
    /* Mobile menu items */
    .main-navigation.toggled ul li {
        margin: 0;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .main-navigation.toggled ul li a {
        display: block;
        padding: 1rem 0;
        color: #333;
        font-size: 1rem;
        font-weight: 500;
    }
    
    .main-navigation.toggled ul li a:hover {
        color: var(--primary-color);
    }
    
    /* Overlay backdrop */
    .main-navigation.toggled::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1199;
        animation: fadeIn 0.3s ease-out;
    }
    
    @keyframes fadeIn {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }
    
    .header-right { gap: 0.5rem; }
    .site-branding .custom-logo-link { width: min(var(--header-logo-width), 45vw); }
    
    /* Footer Mobile Layout */
    .footer-grid { 
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    /* Footer brand takes full width */
    .footer-grid .footer-brand {
        grid-column: 1 / -1;
    }
    
    .footer-brand-desc { 
        max-width: none;
        margin-left: auto;
        margin-right: auto;
    }
    
    .footer-social-links {
        justify-content: center;
    }
    
    /* Other columns in 2x2 grid */
    .footer-grid .footer-col {
        text-align: center;
    }
    
    .footer-col ul {
        list-style: none;
        padding: 0;
    }
    
    .footer-bottom { 
        flex-direction: column; 
        align-items: center;
        text-align: center;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .site-branding .custom-logo-link { 
        width: min(var(--header-logo-width), 40vw); 
    }
    
    .header-right {
        gap: 0.25rem;
    }
    
    /* Make buttons and links more touch-friendly */
    .main-navigation a,
    .header-cart-link,
    .header-login a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}

/* Ajuste do botão voltar ao topo para não colidir com chat */
.back-to-top,
.scroll-top,
#scroll-top,
.go-top {
    bottom: 110px !important;
    z-index: 999 !important;
}
