/* ============================================================================
   ESTILOS PREMIUM MASTER - DETALLE DE PRODUCTO PANTALLA COMPLETA
   ============================================================================ */

/* 1. CONTENEDOR PRINCIPAL INTEGRADO */
.detalle-producto-container {
    width: 100%;
    min-height: 100vh;
    background-color: #f8fafc;
    box-sizing: border-box;
    padding-bottom: 100px; /* Evita que la barra inferior pise la info en celular */
}

/* 2. REJILLA ADAPTATIVA (MOBILE FIRST) */
.detalle-grid-principal {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 3. VISOR DE FOTOS E INTERACTIVIDAD SLIDER */
.bloque-multimedia {
    width: 100%;
}



/* 4. BLOQUE DE INFORMACIÓN (TÍTULO Y COMPARTIR) */
.bloque-informacion {
    display: flex;
    flex-direction: column;
    gap: 20px;
}


.detalle-publicacion-titulo {
    display: inline; 
    margin: 0;
    padding: 0;
}

.info-encabezado-fila {
     display: block; 
    width: 100%;
    align-items: center;    /* Centra verticalmente el botón con respecto al texto */
    gap: 12px;              /* Espacio de separación exacto entre el título y el botón */
    flex-wrap: wrap;
}

.btn-compartir-icono {
    background: none;
    border: none;
    width: 38px;          
    height: 38px;         
    border-radius: 50%;
    color: #084e88; 
    background-color: #e2e8f0;
    cursor: pointer;
    
    /* inline-flex lo convierte en un carácter tipográfico más dentro del texto */
    display: inline-flex; 
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s;
    flex-shrink: 0;       
    
    /* AJUSTES CLAVE DE ALINEACIÓN: */
    margin-left: 10px;      /* El espacio de separación exacto que quieres tras el punto final */
    vertical-align: middle; /* Alinea verticalmente la esfera para que no se vea caída */
}

.btn-compartir-icono:hover {
    background-color: #084e88;
    color: #ffffff;
}

.icono-compartir-svg {
    width: 20px;
    height: 20px;
}

/* 5. DISEÑO CROMÁTICO PREMIUM DE PRECIOS */
.detalle-seccion-precios {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Precio Principal Verde */
.tarjeta-precio-principal {
    background-color: #f0fdf4;
    border-left: 4px solid #16a34a;
    padding: 12px 16px;
    border-radius: 0 14px 14px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.precio-tipo-etiqueta {
    font-size: 12px;
    font-weight: 700;
    color: #16a34a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.precio-monto-principal {
    font-size: 22px;
    font-weight: 800;
    color: #14532d;
}

/* Precio en Efectivo Naranja */
.tarjeta-precio-efectivo {
    background-color: #fdf0e0;
    border-left: 4px solid #d66000;
    padding: 8px 16px;
    border-radius: 0 14px 14px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.precio-efectivo-etiqueta {
    font-size: 12px;
    font-weight: 700;
    color: #e47900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.precio-monto-efectivo {
    font-size: 22px;
    font-weight: 800;
    color: #e47900;
}

/* 6. DESCRIPCIÓN SECCIÓN */
.detalle-seccion-descripcion {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.02);
}


.descripcion-titulo {
    font-size: 16px;
    font-weight: 700;
    color: #334155;
    margin: 0 0 10px 0;
}

.descripcion-texto {
    font-size: 15px;
    line-height: 1.6;
    color: #475569;
    margin: 0;
    white-space: pre-line;
}

/* 7. ACORDEÓN DE LA FICHA COMERCIAL */
.acordeon-perfil-comercio {
    background-color: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.02);
}

.acordeon-perfil-cabecera {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 700;
    color: #1e293b;
    list-style: none; /* Elimina flecha nativa */
}

.acordeon-perfil-cabecera::-webkit-details-marker {
    display: none; /* Elimina flecha nativa en Safari */
}

.icono-flecha-acordeon {
    width: 16px;
    height: 16px;
    color: #64748b;
    transition: transform 0.3s ease;
}

.acordeon-perfil-comercio[open] .icono-flecha-acordeon {
    transform: rotate(180deg);
}

.acordeon-perfil-contenido {
    padding: 0 20px 20px 20px;
    border-top: 1px solid #f1f5f9;
}

/* 8. BARRA DE ACCIONES FIJA INFERIOR (EN TELEFONOS) */
.barra-acciones-inferior {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
    padding: 12px 16px;
    display: flex;
    gap: 12px;
    z-index: 100;
    box-sizing: border-box;
}

.btn-accion-volver {
    flex: 0 0 52px;
    height: 52px;
    background-color: #f1f5f9;
    color: #475569;
    text-decoration: none;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.btn-accion-volver span {
    display: none; /* Escondido en celular para dejar espacio al botón principal */
}

.btn-accion-volver:hover {
    background-color: #e2e8f0;
}

.btn-accion-whatsapp {
    flex: 1;
    height: 52px;
    background-color: #25D366;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
    transition: background-color 0.2s, transform 0.1s;
}

.btn-accion-whatsapp:hover {
    background-color: #20ba59;
}

.btn-accion-whatsapp:active {
    transform: scale(0.98);
}

.btn-icono-svg {
    width: 22px;
    height: 22px;
}

@media (max-width: 768px) {
    .detalle-publicacion-titulo{
        font-size: 28px;
    }
}
/* ============================================================================
   9. ADAPTACIÓN ASIMÉTRICA WEB (ESCRITORIO / PC)
   ============================================================================ */
@media (min-width: 768px) {
    .detalle-producto-container {
        padding-top: 40px;
        padding-bottom: 40px; /* Ya no requiere padding flotante gigante */
    }

    /* Transforma el flujo a cuadrícula dividida perfecta 50/50 */
    .detalle-grid-principal {
        display: grid;
        grid-template-columns: 4fr 6fr;
        gap: 48px;
        align-items: start;
    }

    /* Restricción extra opcional para que el visor principal no pase de un tamaño óptimo */
    .bloque-multimedia {
        max-width: 450px;
        margin: 0 auto; /* Centra el bloque si sobra espacio */
        width: 100%;
    }

    /* Muestra las flechas de control en la PC */
    .flecha-navegacion {
        display: flex;
    }

    /* Desactiva la barra fija de celular e integra los botones al flujo normal */
  .barra-acciones-inferior {
        position: static;
        box-shadow: none;
        padding: 8px 0 0 0;
        background: transparent;
        gap: 16px;
        display: flex;            /* Mantiene el contexto de caja flexible */
        justify-content: center;  /* <-- Centra los botones horizontalmente en pantallas web/PC */
        align-items: center;      /* Alinea verticalmente los botones en caso de diferencias de altura */
        width: 100%;   
        padding-bottom: 50px;           /* Asegura expandirse en su columna para calcular el punto medio */
    }

    .btn-accion-volver {
        flex: initial;
        padding: 0 20px;
        gap: 6px;
    }

    .btn-accion-volver span {
        display: inline; /* Muestra el texto en computadoras */
        font-weight: 600;
        font-size: 14px;
    }

    .btn-accion-whatsapp {
        flex: none;
        padding: 0 28px;
    }
}


/* ============================================================================
   ZONA DE DESPEJE MULTIMEDIA Y CONTENIDO (MOBILE-FIRST)
   ============================================================================ */

/* El contenedor raíz o la envoltura que agrupa la información de la ficha */
.detalle-producto-container,
.ficha-perfil-container {
    width: 100%;
    box-sizing: border-box;
    /* Añadimos un colchón de seguridad que sea ligeramente mayor al alto de tu barra fija */
    padding-bottom: 120px; 
}


/* ============================================================================
   ESTILOS PREMIUM - MODAL DE COMPARTIR ADAPTATIVO (BOTTOM-SHEET)
   ============================================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Mobile First: Se pega abajo en smartphones */
    z-index: 3000;
}

.modal-compartir-content {
    background-color: #ffffff;
    width: 100%;
    max-height: 50vh;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
    animation: deslizarAbajo 0.28s cubic-bezier(0.32, 0.94, 0.6, 1);
}

.modal-compartir-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-compartir-header h3 {
    font-size: 18px;
    color: #0f172a;
    font-weight: 700;
}

.btn-cerrar-modal {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

.btn-cerrar-modal svg {
    width: 16px;
    height: 16px;
}

.modal-compartir-opciones {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.opcion-compartir {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border: none;
    transition: background 0.2s ease;
}

.opcion-compartir.whatsapp { background-color: #e8fbf0; color: #128c7e; }
.opcion-compartir.facebook { background-color: #e8f2fe; color: #1877f2; }
.opcion-compartir.copiar { background-color: #f1f5f9; color: #475569; }

.icono-opcion { font-size: 18px; }

@keyframes deslizarAbajo {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* ADAPTACIÓN PARA ESCRITORIO (WEB / PC) */
@media (min-width: 768px) {
    .modal-overlay {
        align-items: center; /* Se centra en pantallas grandes */
    }
    .modal-compartir-content {
        width: 100%;
        max-width: 420px;
        border-radius: 20px;
        animation: escalaModal 0.2s ease-out;
    }
    @keyframes escalaModal {
        from { transform: scale(0.95); opacity: 0; }
        to { transform: scale(1); opacity: 1; }
    }
}