/* ==========================================================================
   BAZAR DETALHES — Estilos Específicos e Layout em Grid
   ========================================================================== */

/* --- SISTEMA DE GRID SEGURO --- */
.container, .row, [class^="col-"] {
    box-sizing: border-box;
}

.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
    max-width: 1200px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

[class^="col-"] {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

/* Colunas (Mobile First: 6 = 50%, 12 = 100%) */
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

@media (min-width: 768px) {
    .col-md-3 { flex: 0 0 25%; max-width: 25%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .vit-pl-custom { padding-left: 3rem !important; }
}

/* Utilitários Gerais */
.align-items-center { align-items: center; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }
.my-5 { margin-top: 3rem !important; margin-bottom: 3rem !important; }
.pb-4 { padding-bottom: 1.5rem !important; }
.text-center { text-align: center !important; }
.w-100 { width: 100% !important; }

/* --- TIPOGRAFIA GERAL --- */
.modern-section {
    padding: 3rem 0 1rem;
}

.modern-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--vit-title, #111);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.modern-text {
    line-height: 1.6 !important;
    color: var(--vit-text, #444);
    font-size: 1.05rem;
}

.modern-text p {
    margin-bottom: 0.8rem !important;
}

/* --- CABEÇALHO DO ANÚNCIO --- */
.vit-bazar-header {
    border-bottom: 1px solid var(--vit-border, #eaeaea);
}

.vit-bazar-hero-img {
    width: 100%;
    border-radius: 0.8rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background-color: #f4f4f4;
}

.vit-bazar-hero-img img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 4 / 3; /* Proporção fotográfica clássica */
    display: block;
}

.vit-img-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Informações ao lado da imagem */
.vit-bazar-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.vit-bazar-badges {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.vit-price-tag {
    font-size: 2rem;
    font-weight: 900;
    color: var(--vit-accent, #cc5500);
    background: #fff3ed; /* Fundo alaranjado bem clarinho */
    padding: 5px 15px;
    border-radius: 0.4rem;
}

.vit-condition-tag {
    padding: 6px 15px;
    border-radius: 4px;
    font-weight: bold;
    color: #fff;
    font-size: 0.9rem;
    text-transform: uppercase;
}
.vit-badge-novo { background-color: #28a745; }
.vit-badge-usado { background-color: #f0ad4e; }

/* Card do Vendedor */
.vit-seller-card {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    border-left: 5px solid var(--vit-accent, #cc5500);
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    border-top: 1px solid #f0f0f0;
    border-right: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.vit-seller-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.vit-seller-name {
    font-size: 1.4rem;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
}

.vit-seller-name i {
    color: var(--vit-accent, #cc5500);
    font-size: 1.8rem;
    margin-right: 10px;
}

.vit-seller-meta {
    font-size: 0.95rem;
    color: #555;
    margin-top: 0.5rem;
    margin-left: 42px; /* Alinha com o texto ignorando o ícone acima */
}

.vit-seller-meta i {
    color: var(--vit-accent, #cc5500);
    margin-right: 5px;
}

.vit-seller-date {
    font-size: 0.8rem;
    color: #999;
    margin-top: 1rem;
    margin-left: 42px;
}

/* Botão Whatsapp */
.vit-btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #25D366;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: background 0.3s ease, transform 0.2s ease;
    width: 100%;
}

.vit-btn-whatsapp i {
    font-size: 1.4rem;
    margin-right: 10px;
}

.vit-btn-whatsapp:hover {
    background: #20bd5a;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

/* --- DESCRIÇÃO --- */
.vit-description-section {
    border-top: 1px solid #eee;
}

.vit-description-box {
    background: #fdfdfd;
    padding: 2rem;
    border-radius: 0.8rem;
    border: 1px solid #eaeaea;
}

/* --- GALERIA DE FOTOS --- */
.vit-gallery-link {
    display: block;
    overflow: hidden;
    border-radius: 0.5rem;
    border: 1px solid #eee;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vit-gallery-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.vit-gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1 / 1; /* Força quadrados perfeitos (tipo Instagram) */
    display: block;
    transition: transform 0.4s ease;
}

.vit-gallery-link:hover .vit-gallery-img {
    transform: scale(1.05); /* Leve zoom interno ao passar o mouse */
}

/* --- BOTÃO DE VOLTAR --- */
.vit-btn-outline {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--vit-accent, #cc5500);
    color: var(--vit-title, #111);
    font-weight: bold;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.vit-btn-outline i { margin-right: 0.5rem; }

.vit-btn-outline:hover {
    background-color: var(--vit-accent, #cc5500);
    color: #fff;
    text-decoration: none;
}

/* Correção do cursor na galeria (Transformando div em botão visual) */
.vit-gallery-trigger {
    cursor: pointer;
}

/* ==========================================================================
   MODAL DA GALERIA (LIGHTBOX COM CARROSSEL)
   ========================================================================== */
.vit-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: none; /* Oculto por padrão */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vit-modal.is-active {
    display: flex;
    opacity: 1;
}

/* Fundo escuro desfocado */
.vit-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px); /* Efeito vidro opaco (iOS style) */
    cursor: zoom-out;
}

/* Container que segura o player e controles */
.vit-modal-content {
    position: relative;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    height: 100%;
    padding: 20px;
    pointer-events: none; /* Impede que clique no vazio afete o overlay */
}

/* Área da Imagem */
.vit-modal-img-container {
    pointer-events: auto;
    position: relative;
    max-width: 85vw;
    max-height: 85vh;
}

#vit-modal-img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    user-select: none; /* Impede arrastar a imagem azulzinha no celular */
}

/* --- BOTÕES DA MODAL --- */
.vit-modal-btn {
    pointer-events: auto;
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.2s ease;
    border-radius: 50%;
}

.vit-modal-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.vit-modal-prev,
.vit-modal-next {
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
}

.vit-modal-prev { left: 20px; }
.vit-modal-next { right: 20px; }

.vit-modal-close {
    top: 20px;
    right: 30px;
    width: 40px;
    height: 40px;
    font-size: 2rem;
    line-height: 1;
}

.vit-modal-close:hover {
    background: #d9534f;
    transform: scale(1.1);
}

/* Contador (ex: 1 / 4) */
.vit-modal-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    letter-spacing: 2px;
    background: rgba(0,0,0,0.5);
    padding: 5px 15px;
    border-radius: 20px;
}

/* Responsividade da Modal */
@media (max-width: 767px) {
    .vit-modal-content { padding: 10px; }
    .vit-modal-prev { left: 10px; }
    .vit-modal-next { right: 10px; }
    .vit-modal-prev, .vit-modal-next { width: 40px; height: 40px; font-size: 1.2rem; }
    #vit-modal-img { max-height: 75vh; }
}