/* ============================================
   CheckedIn — assets/css/negocio.css
   Página pública de detalle del negocio
   ============================================ */

/* ===== GALERÍA ===== */
.galeria-wrap {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 16px 24px 0;
}

.galeria-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 170px 170px;
    gap: 8px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    height: 348px; /* 170 + 170 + 8px */
}

.gal-main {
    grid-row: 1 / 3;
    height: 348px;
    overflow: hidden;
}

.gal-item {
    height: 170px;
    overflow: hidden;
}

.gal-main img,
.gal-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.gal-main:hover img,
.gal-item:hover img { transform: scale(1.04); }

.gal-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0efed, #e8e5e0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
}

.btn-ver-fotos {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: white;
    border: none;
    padding: 9px 16px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    transition: box-shadow 0.15s;
}

.btn-ver-fotos:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.2); }
.btn-ver-fotos svg { width: 15px; height: 15px; }

/* ===== LAYOUT DETALLE ===== */
.detalle-wrap {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 32px 24px 0;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 56px;
    align-items: start;
}

/* ===== COLUMNA IZQUIERDA ===== */
.detalle-header {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.detalle-cat {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.detalle-nombre {
    font-size: 32px;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -1px;
    line-height: 1.15;
    margin-bottom: 12px;
}

.detalle-rating-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.detalle-stars  { color: var(--warning); font-size: 16px; letter-spacing: 1px; }
.detalle-score  { font-size: 16px; font-weight: 800; color: var(--dark); }
.detalle-count {
    font-size: 14px;
    color: var(--gray);
    text-decoration: none;
}

.badge-verificado {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #00A69915;
    color: var(--success);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 100px;
}

.badge-verificado svg { width: 12px; height: 12px; }

/* ===== SECCIÓN DESCRIPCIÓN ===== */
.detalle-section {
    padding-bottom: 28px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border);
}

.detalle-section:last-child { border-bottom: none; }

.detalle-section h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.4px;
    margin-bottom: 14px;
}

.detalle-desc {
    font-size: 15px;
    color: var(--dark);
    line-height: 1.75;
}

/* ===== INFO RÁPIDA ===== */
.info-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.info-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 9px 14px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
    text-decoration: none;
    transition: border-color 0.15s;
}

.info-pill:hover { border-color: var(--dark); }
.info-pill svg { width: 15px; height: 15px; color: var(--gray); flex-shrink: 0; }

/* ===== PUNTUACIONES ===== */
.rating-summary {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    margin-bottom: 28px;
}

.rating-big-num {
    text-align: center;
    flex-shrink: 0;
}

.big-score {
    font-size: 60px;
    font-weight: 800;
    color: var(--dark);
    line-height: 1;
    letter-spacing: -3px;
}

.big-stars {
    font-size: 18px;
    color: var(--warning);
    margin: 6px 0 4px;
    letter-spacing: 2px;
}

.big-total {
    font-size: 12px;
    color: var(--gray);
    white-space: nowrap;
}

.rating-bars-wrap {
    flex: 1;
}

.r-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 7px;
    font-size: 13px;
}

.r-bar-label { width: 32px; color: var(--gray); font-weight: 600; }

.r-bar-track {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.r-bar-fill {
    height: 100%;
    background: var(--dark);
    border-radius: 3px;
}

.r-bar-pct { width: 32px; text-align: right; color: var(--gray); font-size: 12px; }

/* Subcategorías */
.subcats-rating {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 0;
}

.subcat-rating-item {
    text-align: center;
}

.subcat-rating-label {
    font-size: 12px;
    color: var(--gray);
    font-weight: 500;
    margin-bottom: 4px;
}

.subcat-rating-val {
    font-size: 18px;
    font-weight: 800;
    color: var(--dark);
}

/* ===== OPINIONES ===== */
.opinion-item {
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
}

.opinion-item:first-child { padding-top: 0; }
.opinion-item:last-child  { border-bottom: none; }

.op-header-pub {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
}

.op-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.op-avatar-pub {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}

.op-user-name  { font-weight: 700; font-size: 15px; color: var(--dark); margin-bottom: 2px; }
.op-user-date  { font-size: 13px; color: var(--gray); }

.op-score-pub {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.op-stars-pub   { color: var(--warning); font-size: 14px; letter-spacing: 1px; }
.op-verified-pub {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--success);
}

.op-verified-pub svg { width: 11px; height: 11px; }

.op-comment {
    font-size: 15px;
    color: #3F3F46;
    line-height: 1.75;

    margin: 14px 0;
    padding: 0 0 0 16px;

    border-left: 3px solid #D8DEE8;
}

.op-subcats-pub {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #555;
    font-weight: 600;
}

.op-subcats-pub span strong { color: var(--dark); }

/* ===== CARD STICKY DERECHA ===== */
.sticky-card {
    position: sticky;
    top: 150px;
}

.info-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    margin-bottom: 16px;
}

.info-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.info-data-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 14px;
    font-size: 14px;
}

.info-data-row:last-child { margin-bottom: 0; }

.info-data-row svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--gray);
    margin-top: 1px;
}

.info-data-row a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.info-data-row a:hover { text-decoration: underline; }

/* CTA opinar */
.cta-opinar-card {
    background: var(--dark);
    border-radius: 20px;
    padding: 22px 24px;
    text-align: center;
    color: white;
    
    
}

.cta-opinar-card h4 {
    font-size: 19px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.cta-opinar-card p {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 16px;
    line-height: 1.6;
    font-weight: 700;
}

.btn-opinar {
    display: block;
    background: var(--primary);
    color: white;
    text-decoration: none;
    padding: 13px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    transition: background 0.15s;
}

.btn-opinar:hover { background: var(--primary-dark); }

/* ===== MAPA PLACEHOLDER ===== */
.mapa-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #e8f0e8, #d8e8d8);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--gray);
    font-size: 13px;
    margin-top: 16px;
    border: 1px solid var(--border);
}

.mapa-placeholder svg { width: 28px; height: 28px; color: var(--success); }

/* ===== MODAL GALERÍA ===== */
.galeria-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 500;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
}

.galeria-modal.open { display: flex; }

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.1);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
}

.modal-close svg { width: 20px; height: 20px; }

.modal-img-wrap {
    max-width: 900px;
    width: 100%;
    text-align: center;
}

.modal-img-wrap img {
    max-height: 70vh;
    max-width: 100%;
    border-radius: 12px;
    object-fit: contain;
}

.modal-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.modal-thumb {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    border: 2px solid transparent;
    transition: opacity 0.15s, border-color 0.15s;
}

.modal-thumb.active { opacity: 1; border-color: white; }
.modal-thumb:hover  { opacity: 0.9; }
.modal-thumb img    { width: 100%; height: 100%; object-fit: cover; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1000px) {
    .detalle-wrap   { grid-template-columns: 1fr; gap: 32px; }
    .sticky-card    { position: static; }
    .subcats-rating { grid-template-columns: repeat(2, 1fr); }
}



.negocio-cat-icon,
.detalle-cat-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--cat-bg);
    color: var(--cat-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.negocio-cat-icon svg,
.detalle-cat-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.3;
}

.negocio-cat-icon.grande {
    width: 76px;
    height: 76px;
}

.negocio-cat-icon.grande svg {
    width: 36px;
    height: 36px;
}

.detalle-cat {
    display: flex;
    align-items: center;
    gap: 8px;
}


/* ===== PAGINACIÓN OPINIONES ===== */
.pub-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 28px;
}

.pub-page-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--dark);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
}

.pub-page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-soft);
}

.pub-page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 8px 20px rgba(255, 56, 92, 0.25);
}


.reply-icon {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: #FF385C14;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.reply-icon svg {
    width: 14px;
    height: 14px;
}


.subcat-star {
    display: inline-block;
    margin-left: 4px;
    color: #F6C453;
}


.badge-verificado .verified-icon,
.op-verified-pub .verified-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.mapa-negocio {
    width: 100%;
    height: 190px;
    margin-top: 22px;
    border-radius: 18px;
    overflow: hidden;
    background: #eef7ef;
    border: 1px solid #e5e5e5;
}

.mapa-negocio iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}


/* ===== NEGOCIO RESPONSIVE MÓVIL ===== */
@media (max-width: 768px) {

    .galeria-wrap {
        padding: 12px 22px 0;
    }

    .galeria-grid {
        display: block;
        height: 260px;
        border-radius: 20px;
    }

    .gal-main {
        height: 260px;
    }

    .gal-item {
        display: none;
    }

    .btn-ver-fotos {
        bottom: 12px;
        right: 12px;
        padding: 9px 13px;
        font-size: 12px;
    }

    .detalle-wrap {
        display: block;
        padding: 28px 22px 0;
    }

    .detalle-header {
        margin-bottom: 22px;
        padding-bottom: 22px;
    }

    .detalle-cat {
        font-size: 12px;
        gap: 8px;
    }

    .detalle-cat-icon {
        width: 34px;
        height: 34px;
    }

    .detalle-cat-icon svg {
        width: 18px;
        height: 18px;
    }

    .detalle-nombre {
        font-size: 32px;
        line-height: 1.12;
        letter-spacing: -1.1px;
        margin-bottom: 14px;
    }

    .detalle-rating-row {
        gap: 8px;
    }

    .detalle-section {
        padding-bottom: 24px;
        margin-bottom: 24px;
    }

    .detalle-section h3 {
        font-size: 22px;
        line-height: 1.2;
    }

    .detalle-desc {
        font-size: 16px;
        line-height: 1.7;
    }

    .info-pills {
        gap: 8px;
    }

    .info-pill {
        width: 100%;
        border-radius: 14px;
        padding: 13px 14px;
        font-size: 15px;
    }

    .rating-summary {
        flex-direction: column;
        gap: 22px;
    }

    .rating-big-num {
        text-align: left;
    }

    .big-score {
        font-size: 56px;
    }

    .subcats-rating {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .subcat-rating-item {
        background: var(--bg);
        border: 1px solid var(--border);
        border-radius: 16px;
        padding: 14px 10px;
    }

    .opinion-item {
        padding: 22px 0;
    }

    .op-header-pub {
        flex-direction: column;
        gap: 10px;
    }

    .op-score-pub {
        align-items: flex-start;
    }

    .op-comment {
        font-size: 15px;
        line-height: 1.7;
        padding-left: 14px;
    }

    .op-subcats-pub {
        gap: 10px;
        font-size: 14px;
    }

    .sticky-card {
        position: static;
        margin-top: 28px;
    }

    .info-card,
    .cta-opinar-card {
        border-radius: 20px;
        padding: 22px 18px;
    }

    .info-data-row {
        font-size: 15px;
    }

    .btn-opinar {
        padding: 15px;
        font-size: 16px;
        border-radius: 14px;
    }

    .mapa-negocio {
        height: 220px;
        border-radius: 18px;
    }
}


/* ===== VALORACIONES MÓVIL MEJORADAS ===== */
@media (max-width: 768px) {

    .rating-summary {
        display: grid;
        grid-template-columns: 120px 1fr;
        gap: 24px;
        align-items: center;
        width: 100%;
    }

    .rating-big-num {
        text-align: left;
    }

    .big-score {
        font-size: 64px;
    }

    .rating-bars-wrap {
        width: 100%;
    }

    .r-bar-row {
        display: grid;
        grid-template-columns: 38px 1fr 42px;
        gap: 8px;
        align-items: center;
        margin-bottom: 9px;
    }

    .r-bar-label {
        width: auto;
        font-size: 15px;
    }

    .r-bar-track {
        width: 100%;
        height: 7px;
    }

    .r-bar-pct {
        width: auto;
        font-size: 14px;
        text-align: right;
    }
}

@media (max-width: 430px) {

    .rating-summary {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .rating-big-num {
        text-align: center;
    }
}