/* 
========================================
Design System & Variables 
========================================
*/
:root {
    --q2-blue: #005b8e;
    --q2-blue-dark: #004b75;
    --q2-orange: #ff7e00;
    --q2-orange-hover: #e57100;
    --bg-light: #fafafa;
    --text-main: #343a40;
    --text-muted: #6c757d;
    --border-color: #e9ecef;
    --white: #ffffff;

    /* Ticket colors */
    --gold: #d4af37;
    --purple: #9c27b0;
    --red: #f44336;
    --silver: #e0e0e0;

    --font-main: 'Inter', sans-serif;
    --max-width: 1200px;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    color: #212529;
}

hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 30px 0;
}

.text-link {
    color: var(--q2-blue);
    text-decoration: underline;
}

.text-link:hover {
    color: var(--q2-blue-dark);
}

/* 
========================================
Header & Navbar 
========================================
*/
.navbar {
    background-color: var(--q2-blue);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 12px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

/* Logo & Nav links */
.logo-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--white);
    border-radius: 8px;
    padding: 4px 8px;
    color: var(--white);
    font-weight: 800;
    line-height: 1;
}

.logo-box .q2 {
    font-size: 24px;
    letter-spacing: -1px;
}

.logo-box .ingressos {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.main-nav {
    display: flex;
    gap: 20px;
    color: var(--white);
    font-size: 14px;
    font-weight: 500;
}

.main-nav a:hover {
    opacity: 0.8;
}

.nav-chevron {
    font-size: 10px;
    margin-left: 4px;
}

/* Search Bar */
.search-bar {
    flex: 1;
    max-width: 500px;
    display: flex;
    align-items: center;
    background-color: var(--white);
    border-radius: 30px;
    padding: 8px 16px;
    margin: 0 20px;
}

.search-bar input {
    border: none;
    outline: none;
    width: 100%;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-main);
}

.search-bar button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    margin-left: 8px;
}

/* Nav Tools */
.nav-tools {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lang-flags {
    display: flex;
    gap: 8px;
}

.lang-flags img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

.btn-login {
    background-color: var(--q2-orange);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-login:hover {
    background-color: var(--q2-orange-hover);
}

.cart-icon {
    color: var(--white);
    font-size: 20px;
    position: relative;
}

/* 
========================================
Main Layout 
========================================
*/
.main-layout {
    padding: 40px 20px;
    min-height: 80vh;
}

.content-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    align-items: start;
}

/* 
========================================
Left Column (Event Info) 
========================================
*/
.banner-wrapper {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.event-banner {
    width: 100%;
    height: auto;
    display: block;
}

.event-title {
    font-size: 28px;
    margin-bottom: 15px;
}

.event-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 30px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.meta-item i {
    color: var(--q2-orange);
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.event-map {
    margin: 40px 0;
}

.event-map h2 {
    font-size: 22px;
    margin-bottom: 15px;
}

.event-map img {
    width: 100%;
    border-radius: 12px;
    display: block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.event-details h3 {
    font-size: 22px;
    margin-bottom: 20px;
}

.detail-block p {
    margin-bottom: 15px;
    font-size: 15px;
}

.detail-block ul {
    margin-bottom: 15px;
    padding-left: 20px;
    font-size: 15px;
}

.detail-block .sectors-list {
    list-style: none;
    padding-left: 0;
}

.detail-block .sectors-list li {
    margin-bottom: 15px;
}

.detail-block .bullet-list li {
    margin-bottom: 8px;
}

/* 
========================================
Right Column (Ticket Sidebar) 
========================================
*/
.ticket-sidebar {
    position: sticky;
    top: 100px;
}

.ticket-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
}

.ticket-header h2 {
    color: var(--q2-blue);
    font-size: 20px;
    margin-bottom: 8px;
}

.ticket-header p {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.ticket-options {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ticket-group {
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.ticket-group:last-child {
    border-bottom: none;
}

.ticket-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.ticket-subitems {
    display: none;
    padding-bottom: 16px;
}

.ticket-group.active .ticket-subitems {
    display: block;
}

.ticket-group.active .ticket-option i.fa-caret-down {
    transform: rotate(180deg);
}

.ticket-subitem {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.subitem-info {
    display: flex;
    flex-direction: column;
}

.subitem-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-main);
    margin-bottom: 4px;
}

.subitem-price {
    font-weight: 700;
    font-size: 14px;
    color: var(--q2-blue);
}

.subitem-tax {
    font-size: 12px;
    color: var(--text-muted);
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-qty {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #dcdcdc;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
}

.btn-qty:hover {
    background: #f0f0f0;
}

.btn-qty.plus {
    color: var(--q2-blue);
    border-color: #dcdcdc;
}

.btn-qty.plus:hover {
    background: #e6f0f5;
}

.qty-value {
    font-weight: 700;
    font-size: 15px;
    width: 20px;
    text-align: center;
}

.ticket-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.color-dot {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    flex-shrink: 0;
    margin-top: 4px;
}

.color-dot.gold {
    background-color: var(--gold);
}

.color-dot.purple {
    background-color: var(--purple);
}

.color-dot.red {
    background-color: var(--red);
}

.color-dot.silver {
    background-color: var(--silver);
    border: 1px solid #ccc;
}

.ticket-text {
    display: flex;
    flex-direction: column;
}

.ticket-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-main);
}

.ticket-price {
    font-size: 15px;
    color: var(--q2-orange);
    font-weight: 800;
    margin-top: 2px;
}

.ticket-old-price {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-top: 4px;
}

.ticket-option i {
    color: var(--q2-blue);
    font-size: 18px;
    transition: transform 0.3s ease;
}

.btn-checkout {
    width: 100%;
    margin-top: 20px;
    padding: 14px;
    border: none;
    border-radius: 6px;
    background-color: var(--q2-orange);
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-checkout:not(.disabled):hover {
    background-color: var(--q2-orange-hover);
}

.btn-checkout.disabled {
    background-color: #e9ecef;
    color: #adb5bd;
    cursor: not-allowed;
}

/* 
========================================
Footer 
========================================
*/
.site-footer {
    background-color: var(--q2-blue);
    color: var(--white);
    padding: 50px 20px 30px;
    font-size: 14px;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logos {
    display: flex;
    align-items: center;
    gap: 20px;
}

.separator-v {
    width: 1px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
}

.q2-bank {
    display: flex;
    flex-direction: column;
}

.em-group {
    font-size: 10px;
    opacity: 0.8;
}

.bank-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.footer-socials {
    display: flex;
    gap: 15px;
}

.footer-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    font-size: 16px;
}

.footer-socials a:hover {
    background-color: var(--white);
    color: var(--q2-blue);
}

.footer-hr {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 30px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--white);
    font-size: 16px;
    margin-bottom: 20px;
}

.app-badges {
    display: flex;
    gap: 10px;
}

.app-badges img {
    height: 35px;
    border-radius: 6px;
}

.btn-help {
    background-color: var(--q2-orange);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.btn-producer {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--white);
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.footer-col.links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col.links a {
    color: #e0e0e0;
    font-size: 13px;
}

.footer-col.links a:hover {
    color: var(--white);
    text-decoration: underline;
}

.badges-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.badge-item span {
    font-size: 10px;
    text-transform: uppercase;
    opacity: 0.8;
}

.badge-item strong {
    font-size: 18px;
}

.footer-bottom {
    text-align: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.8;
}

/* 
========================================
Floating WhatsApp Button 
========================================
*/
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: transform 0.3s;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
}

/* 
========================================
Responsive Design (Media Queries)
========================================
*/
@media (max-width: 992px) {
    .content-container {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .event-info-col {
        display: flex;
        flex-direction: column;
        order: 1;
        /* Main column is first */
    }

    .event-info-col .banner-wrapper {
        order: 1;
    }

    .event-info-col .event-title {
        order: 2;
    }

    .event-info-col .event-meta {
        order: 3;
    }

    /* We pull the ticket sidebar into the visual flow of event-info-col via absolute positioning or just keeping it in the main container but ordered correctly.
       Since .ticket-sidebar is a sibling of .event-info-col, we cannot interleave their children easily with just flex order on the parent. 
       We will need to change the HTML structure or use a script. Or, we make .content-container block and use flex on a wrapper?
       Actually, the simplest way without touching HTML structure is to use order on .content-container children and then pull the title/meta out, but they are inside .event-info-col. 
       Wait, let's use CSS Grid or display: contents! */

    .event-info-col {
        display: contents;
        /* This makes its children act as direct children of .content-container */
    }

    .banner-wrapper {
        order: 1;
    }

    .event-title {
        order: 2;
    }

    .event-meta {
        order: 3;
    }

    .ticket-sidebar {
        order: 4;
        width: 100%;
        margin-bottom: 20px;
        position: static;
    }

    .event-map {
        order: 5;
    }

    .event-details {
        order: 6;
    }
}

@media (max-width: 768px) {
    .search-bar {
        display: none;
        /* Hide search bar on mobile to save space */
    }

    .nav-tools {
        gap: 10px;
    }

    .btn-login span {
        display: none;
        /* Hide text, keep icon */
    }

    .btn-login {
        padding: 8px 12px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-top {
        flex-direction: column;
        gap: 20px;
    }

    .whatsapp-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 28px;
    }
}

/* 
========================================
Cart Page
========================================
*/
.cart-page {
    background-color: var(--white);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.cart-main {
    padding: 40px 20px;
    flex: 1;
}

.cart-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.cart-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.back-link {
    font-size: 24px;
    font-weight: 700;
    color: var(--q2-blue);
    display: flex;
    align-items: center;
    gap: 12px;
}

.back-link:hover {
    color: var(--q2-blue-dark);
}

.cart-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    align-items: start;
}

.cart-items-col {
    display: flex;
    flex-direction: column;
}

.cart-table-header {
    display: grid;
    grid-template-columns: 1fr 100px 150px;
    background-color: #f8f9fa;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 15px;
}

.cart-table-header span {
    display: block;
}

.th-qtde {
    text-align: center;
}

.th-valor {
    text-align: right;
}

.cart-items-list {
    display: flex;
    flex-direction: column;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr 100px 150px;
    gap: 20px;
    align-items: center;
    padding: 24px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item:last-child {
    border-bottom: none;
}

.item-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
}

.item-details {
    display: flex;
    flex-direction: column;
}

.item-title {
    font-size: 15px;
    color: var(--q2-blue);
    margin-bottom: 4px;
}

.item-subtitle {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 12px;
}

.item-meta-cart {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.item-meta-cart span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.item-meta-cart i {
    color: var(--q2-orange);
}

.item-qty {
    display: flex;
    justify-content: center;
}

.item-price-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.item-total-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--q2-orange);
}

.item-total-tax {
    font-size: 11px;
    color: var(--text-muted);
}

/* Summary Card */
.summary-card {
    background: var(--white);
    border-radius: 12px;
    padding: 30px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 100px;
}

.summary-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--q2-blue);
    margin-bottom: 16px;
}

.summary-header i {
    font-size: 20px;
}

.summary-header h3 {
    font-size: 18px;
    color: var(--q2-blue);
}

.summary-desc {
    font-size: 11px;
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.summary-hr {
    margin: 20px 0;
}

.total-row {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 20px;
}

.terms-text {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.5;
}

.terms-text a {
    text-decoration: underline;
    color: var(--text-muted);
}

.btn-identification {
    width: 100%;
    background-color: var(--q2-blue);
    color: var(--white);
    border: none;
    padding: 14px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    margin-bottom: 12px;
    transition: background-color 0.2s;
}

.btn-identification:hover {
    background-color: var(--q2-blue-dark);
}

.btn-continue {
    display: block;
    width: 100%;
    text-align: center;
    background-color: transparent;
    color: var(--q2-blue);
    border: 1px solid var(--q2-blue);
    padding: 14px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    font-family: inherit;
    transition: background-color 0.2s;
}

.btn-continue:hover {
    background-color: #f4f8fa;
}

/* Nav Badge */
.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: var(--q2-orange);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
}

@media (max-width: 992px) {
    .cart-grid {
        grid-template-columns: 1fr;
    }

    .cart-table-header {
        display: none;
    }

    .cart-item {
        grid-template-columns: 80px 1fr;
        grid-template-areas:
            "img details"
            "qty price";
        gap: 15px;
    }

    .item-img {
        grid-area: img;
    }

    .item-details {
        grid-area: details;
    }

    .item-qty {
        grid-area: qty;
        justify-content: flex-start;
    }

    .item-price-col {
        grid-area: price;
        align-items: flex-end;
    }
}

/* 
========================================
Checkout Page
========================================
*/
.checkout-section {
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    margin-bottom: 30px;
}

.checkout-section h3 {
    font-size: 20px;
    color: var(--q2-blue);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    outline: none;
}

.form-group input:focus {
    border-color: var(--q2-blue);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.payment-method {
    border: 2px solid var(--q2-blue);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: #f4f8fa;
    cursor: pointer;
}

.payment-method i {
    font-size: 24px;
    color: #32bcad;
    /* PIX color */
}

.payment-method-info {
    display: flex;
    flex-direction: column;
}

.payment-method-info strong {
    font-size: 15px;
    color: var(--text-main);
}

.payment-method-info span {
    font-size: 12px;
    color: var(--text-muted);
}

.btn-generate-pix {
    width: 100%;
    background-color: #32bcad;
    color: var(--white);
    border: none;
    padding: 16px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s;
}

.btn-generate-pix:hover {
    background-color: #2da699;
}