/* ===========================================
   DETALLES.CSS - ESTILOS PARA PÁGINA DE DETALLES
   =========================================== */

/* ========== VARIABLES ESPECÍFICAS ========== */
.anuncio-header { 
    border-bottom: 2px solid #e9ecef; 
    margin-bottom: 2rem; 
    padding-bottom: 1rem; 
}

.badge-operacion { 
    font-size: 0.9rem; 
    padding: 0.5rem 1rem; 
    border-radius: 50px; 
    font-weight: 500; 
}

.badge-operacion.venta { 
    background: #28a745; 
    color: white; 
}

.badge-operacion.alquiler { 
    background: #007bff; 
    color: white; 
}

/* ========== CARRUSEL (NO TOCAR) ========== */
.main-image-container { 
    background: #f8f9fa; 
    border-radius: 12px; 
    overflow: hidden; 
    aspect-ratio: 16/9; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    position: relative; 
}

.main-image-container img { 
    max-width: 100%; 
    max-height: 100%; 
    object-fit: contain; 
}

.thumbnail-item { 
    cursor: pointer; 
    border-radius: 8px; 
    overflow: hidden; 
    border: 2px solid transparent; 
    transition: all 0.2s; 
    width: 100px; 
    min-width: 100px; 
    height: 75px; 
}

.thumbnail-item.active { 
    border-color: #8a1a1a; 
}

.thumbnail-item img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

.thumbnail-item:hover { 
    opacity: 0.8; 
}

.thumbnails-scroll { 
    scrollbar-width: thin; 
    scrollbar-color: #888 #f1f1f1; 
}

.thumbnails-scroll::-webkit-scrollbar { 
    height: 8px; 
}

.thumbnails-scroll::-webkit-scrollbar-track { 
    background: #f1f1f1; 
    border-radius: 4px; 
}

.thumbnails-scroll::-webkit-scrollbar-thumb { 
    background: #888; 
    border-radius: 4px; 
}

.thumbnails-scroll::-webkit-scrollbar-thumb:hover { 
    background: #555; 
}

/* ========== VENDEDOR PANEL ========== */
.vendedor-panel { 
    position: sticky; 
    top: 20px; 
    z-index: 100; 
}

/* ========== CARACTERÍSTICAS PRINCIPALES Y DETALLES ADICIONALES - JUNTOS EN MISMO CUADRO ========== */
/* Grid para 4 columnas en pantallas grandes */
.detalles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
}

/* 3 columnas en tablets */
@media (max-width: 992px) {
    .detalles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 2 columnas en móviles grandes */
@media (max-width: 768px) {
    .detalles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 1 columna en móviles pequeños */
@media (max-width: 480px) {
    .detalles-grid {
        grid-template-columns: 1fr;
    }
}

/* Estilo de cada item - MÁS COMPACTO */
.detalle-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.8rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.detalle-item:hover {
    background: #e7f1ff;
    transform: translateX(3px);
}

.detalle-item i {
    font-size: 1rem;
    color: #8a1a1a;
    width: 24px;
    text-align: center;
    margin-right: 0;
}

.detalle-item .contenido {
    flex: 1;
    min-width: 0;
}

.detalle-item .label {
    font-size: 0.65rem;
    color: #6c757d;
    margin-bottom: 0.15rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.detalle-item .valor {
    font-weight: 600;
    color: #212529;
    font-size: 0.85rem;
    word-break: break-word;
    line-height: 1.3;
}

/* ========== CARACTERÍSTICAS ADICIONALES (CHECKBOX) - MÁS COMPACTAS ========== */
.caracteristica-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.8rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.2s;
}

.caracteristica-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.caracteristica-item i {
    color: #8a1a1a;
    margin-right: 0.6rem;
    font-size: 0.9rem;
    width: 20px;
    text-align: center;
}

.caracteristica-item span {
    font-size: 0.85rem;
    color: #495057;
}

/* Grid para características adicionales - 3 columnas */
.caracteristicas-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
}

@media (max-width: 992px) {
    .caracteristicas-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* ========== DESCRIPCIÓN MEJORADA - SIN SCROLL Y SIN RAYA ROJA ========== */
.descripcion-card {
    margin-bottom: 1.5rem;
}

.descripcion-texto {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    color: #333;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Limpiar espacios en blanco excesivos */
.descripcion-texto p {
    margin-bottom: 0.75rem;
    white-space: normal;
    word-wrap: break-word;
}

.descripcion-texto p:last-child {
    margin-bottom: 0;
}

/* Estilo para viñetas en la descripción */
.descripcion-texto ul, 
.descripcion-texto .lista {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.descripcion-texto li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

/* ========== MAPA ========== */
#map { 
    height: 250px; 
    border-radius: 8px; 
    overflow: hidden; 
}

/* ========== MODAL FULLSCREEN ========== */
.fullscreen-modal { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.95); 
    z-index: 10000; 
    display: none; 
    align-items: center; 
    justify-content: center; 
}

.fullscreen-modal.active { 
    display: flex; 
}

.fullscreen-modal img { 
    max-width: 90%; 
    max-height: 90%; 
    object-fit: contain; 
}

.fullscreen-close { 
    position: absolute; 
    top: 20px; 
    right: 20px; 
    background: white; 
    border: none; 
    border-radius: 50%; 
    width: 50px; 
    height: 50px; 
    font-size: 24px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
}

/* ========== ESTILOS PARA RESALTADO ========== */
.resaltado-badge-detalle {
    position: absolute;
    top: 0px;
    left: 20px;
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.resaltado-badge-detalle-img {
    height: 100px;
    width: auto;
}

.badge-resaltado {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.badge-resaltado-oro {
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: #333;
}

.badge-resaltado-plata {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
    color: #333;
}

.badge-resaltado-bronce {
    background: linear-gradient(135deg, #cd7f32, #b87333);
    color: white;
}

.badge-resaltado i {
    font-size: 0.85rem;
}

/* ========== ANUNCIOS RELACIONADOS ========== */
.anuncios-relacionados .card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.anuncios-relacionados .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* ========== VENDEDOR PANEL - REDISEÑADO ========== */
.vendedor-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vendedor-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.vendedor-header {
    background: linear-gradient(135deg, #8a1a1a 0%, #6a1414 100%);
    padding: 1.25rem 1.5rem;
    border-bottom: none;
}

.vendedor-header h5 {
    color: white;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vendedor-header h5 i {
    font-size: 1.25rem;
}

.vendedor-body {
    padding: 1.5rem;
    background: white;
}

/* Perfil del vendedor */
.perfil-vendedor {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eef2f6;
}

.avatar-vendedor {
    position: relative;
    flex-shrink: 0;
}

.avatar-vendedor img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #8a1a1a;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.avatar-vendedor img:hover {
    transform: scale(1.02);
}

.verificado-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #28a745;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.verificado-badge i {
    font-size: 10px;
    color: white;
}

.info-vendedor h6 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #1a1e2b;
}

.info-vendedor .tipo-usuario {
    display: inline-block;
    background: #f0f2f5;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 500;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.info-vendedor .miembro-desde {
    font-size: 0.7rem;
    color: #8a1a1a;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.info-vendedor .miembro-desde i {
    font-size: 0.7rem;
}

/* Estadísticas del vendedor */
.stats-vendedor {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1.5rem;
    padding: 0.75rem 0;
    background: #f8f9fc;
    border-radius: 12px;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1e2b;
    display: block;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.65rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Botones de contacto */
.contacto-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.btn-contacto {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.btn-contacto i {
    font-size: 1rem;
}

.btn-telefono {
    background: #f0f2f5;
    color: #1a1e2b;
}

.btn-telefono:hover {
    background: #e4e6e9;
    transform: translateY(-1px);
    color: #1a1e2b;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}

.btn-whatsapp:hover {
    background: #20b859;
    transform: translateY(-1px);
    color: white;
}

.btn-mensaje {
    background: #8a1a1a;
    color: white;
}

.btn-mensaje:hover {
    background: #6a1414;
    transform: translateY(-1px);
    color: white;
}

.btn-ver-anuncios {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    background: transparent;
    border: 1px solid #e0e4e8;
    color: #6c757d;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-ver-anuncios:hover {
    background: #f8f9fc;
    border-color: #8a1a1a;
    color: #8a1a1a;
}

.btn-ver-anuncios i {
    font-size: 0.9rem;
}

/* ========== PRECIO EN COLOR ROJO ========== */
/* Para el precio en el header del anuncio */
.anuncio-header .h2 {
    color: #8a1a1a !important;
}

/* Para el precio en las tarjetas de anuncios relacionados */
.card .text-success {
    color: #8a1a1a !important;
}

/* Para cualquier otro precio que use la clase text-success */
.text-success {
    color: #8a1a1a !important;
}

/* Precio en el panel del vendedor si existe */
.vendedor-card .precio {
    color: #8a1a1a;
    font-weight: 700;
}

/* ========== RESPONSIVE ADICIONAL ========== */
@media (max-width: 768px) {
    .thumbnail-item {
        width: 80px;
        min-width: 80px;
        height: 60px;
    }
    
    .detalle-item {
        padding: 0.5rem 0.6rem;
    }
    
    .detalle-item .label {
        font-size: 0.6rem;
    }
    
    .detalle-item .valor {
        font-size: 0.8rem;
    }
    
    .vendedor-body {
        padding: 1rem;
    }
    
    .perfil-vendedor {
        gap: 0.75rem;
    }
    
    .avatar-vendedor img {
        width: 55px;
        height: 55px;
    }
    
    .info-vendedor h6 {
        font-size: 1rem;
    }
    
    .descripcion-texto {
        padding: 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .thumbnail-item {
        width: 70px;
        min-width: 70px;
        height: 55px;
    }
    
    .resaltado-badge-detalle-img {
        height: 30px;
    }
    
    .stats-vendedor {
        margin-bottom: 1rem;
    }
    
    .stat-number {
        font-size: 1rem;
    }
    
    .descripcion-texto {
        padding: 0.875rem;
        font-size: 0.8rem;
    }
}
/* Estadísticas del vendedor */
.stats-vendedor {
    display: flex;
    justify-content: space-around;
    gap: 15px;
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-number {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color, #8a1a1a);
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 0.7rem;
    color: #666;
    margin-top: 4px;
}

.stat-label i {
    margin-right: 2px;
}