/* =========================================
   PÁGINA DE DETALHES DO INGRESSO
   Arquivo: static/css/evento/detalhes_ingresso.css
   ========================================= */

/* --- 1. CONFIGURAÇÃO GERAL --- */
.detalhe-section {
    padding: 60px 20px;
    background-color: #e2e2e2;
    min-height: 80vh;
}

.detalhe-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Link Voltar */
.btn-back {
    display: inline-block;
    text-decoration: none;
    color: #666;
    margin-bottom: 20px;
    font-weight: 500;
    transition: color 0.2s;
    font-family: var(--body-font-family);
}

.btn-back:hover {
    color: var(--secondary-color);
}

/* --- 2. CARD DO PRODUTO (DESKTOP) --- */
.product-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 40px rgba(0, 51, 102, 0.1);
    
    /* Layout Flex: Lado a Lado no Desktop */
    display: flex; 
    flex-direction: row; 
    gap: 50px;
    align-items: flex-start;
}

/* --- 3. COLUNA DA IMAGEM --- */
.product-image-col {
    flex: 1; /* Ocupa 50% do espaço */
    min-width: 300px;
}

/* Imagem Desktop */
.product-image-col img {
    width: 100%;
    height: 450px; /* Altura fixa bonita para desktop */
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Placeholder */
.product-placeholder {
    width: 100%;
    height: 450px;
    background-color: #eee;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    color: #aaa;
    font-size: 3rem;
}

.product-placeholder small {
    font-size: 1rem;
    margin-top: 10px;
}

/* --- 4. COLUNA DE INFO --- */
.product-info-col {
    flex: 1; /* Ocupa os outros 50% */
}

.product-title {
    font-family: var(--title-font-family);
    color: color-mix(in srgb, var(--primary-color), grey 50%);
    font-size: 2.5rem;
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.1;
}

.product-price {
    font-family: var(--title-font-family);
    font-size: 2.5rem;
    color: black;
    font-weight: bold;
    margin-bottom: 25px;
}

.product-desc {
    font-family: var(--body-font-family);
    color: #555;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    
    /* Scroll na descrição se for muito longa */
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Scrollbar */
.product-desc::-webkit-scrollbar { width: 6px; }
.product-desc::-webkit-scrollbar-track { background: #f1f1f1; }
.product-desc::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }

/* Box do Kit */
.kit-box {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.kit-box h4 {
    margin-top: 0;
    color: color-mix(in srgb, var(--primary-color), grey 50%);
    margin-bottom: 15px;
    font-family: var(--title-font-family);
}

.kit-box ul { padding-left: 20px; margin-bottom: 0; }
.kit-box li { color: #555; margin-bottom: 8px; font-family: var(--body-font-family); }

/* --- 5. BOTÕES --- */
.product-actions { margin-top: 20px; }

.btn-sold-out-large,
.btn-buy,
.btn-login-required {
    display: block;
    width: 100%; /* Largura total da coluna */
    text-align: center;
    padding: 18px;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 50px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--body-font-family);
    box-sizing: border-box; /* Previne que padding aumente a largura */
}

/* Cores dos Botões */
.btn-sold-out-large {
    background-color: #6b6b6b;
    color: white;
    cursor: not-allowed;
}

.btn-buy {
    background-color: var(--secondary-color);
    color: white;
    box-shadow: inset 0px 2px 2px rgba(255, 255, 255, 0.4), inset 0px -2px 5px rgba(189, 66, 20, 0.2), 0px 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}
.btn-buy:hover { transform: translateY(-3px); }

.btn-login-required {
    background-color: color-mix(in srgb, rgb(199, 73, 0), black 20%);
    color: white;
}
.btn-login-required:hover { background-color: #002244; }

.security-note {
    display: block;
    margin-top: 15px;
    color: #999;
    text-align: center;
    font-size: 0.9rem;
}


/* =========================================
   6. RESPONSIVIDADE (A CORREÇÃO)
   ========================================= */

@media (max-width: 900px) {
    
    .detalhe-section {
        padding: 20px 15px; /* Menos padding na borda da tela */
    }

    .product-card {
        display: flex;
        flex-direction: column; /* FORÇA UM EMBAIXO DO OUTRO */
        padding: 25px;
        gap: 25px;
        height: auto; /* Deixa o card crescer conforme o conteúdo */
    }

    /* --- IMAGEM NO MOBILE --- */
    .product-image-col {
        width: 100%;
        min-width: 0; /* Evita que o flex force largura */
        flex: none; /* Não tenta dividir espaço, ocupa o que precisa */
    }

    .product-image-col img, 
    .product-placeholder {
        width: 100%;
        /* Remove a altura fixa de 450px para não estourar ou cortar */
        height: auto; 
        /* Define uma proporção agradável (4:3 ou 1:1) */
        aspect-ratio: 4/3; 
        object-fit: cover;
        border-radius: 12px;
    }

    /* --- INFO NO MOBILE --- */
    .product-info-col {
        width: 100%;
        flex: none;
    }

    .product-title {
        font-size: 2rem;
        text-align: center; /* Centraliza título no celular */
    }

    .product-price {
        font-size: 2.2rem;
        text-align: center;
        margin-bottom: 20px;
    }

    /* Botões */
    .btn-buy, .btn-sold-out-large, .btn-login-required {
        width: 100%;
        font-size: 1rem; /* Fonte um pouco menor para não quebrar */
        padding: 15px;
    }
}