/*
 * Pagina da empresa (Guia Comercial)
 * Carrega em: pagina individual de cada empresa (ver inc/assets.php).
 */

/* ==========================================================================
   GUIA COMERCIAL (SINGLE EMPRESA)
   ========================================================================== */

.ct-empresa-header {
    position: relative;
    margin-bottom: 30px;
}

.ct-empresa-cover {
    position: relative;
    width: 100%;
    height: 280px;
    border-radius: 0;
    overflow: hidden;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
}

.ct-empresa-cover-overlay {
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 60%);
}

.ct-empresa-header-content {
    position: relative;
    padding: 0 30px;
    display: flex;
    align-items: flex-end;
    margin-top: -60px;
    z-index: 10;
}

.ct-empresa-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #fff;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.ct-empresa-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ct-empresa-title-wrapper {
    margin-left: 20px;
    padding-bottom: 25px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.ct-empresa-badges {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.ct-empresa-ribbon {
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    overflow: hidden;
    z-index: 5;
}

.ct-empresa-ribbon span {
    position: absolute;
    display: block;
    width: 225px;
    padding: 10px 0;
    background-color: #f39c12;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    text-align: center;
    left: -15px;
    top: 30px;
    transform: rotate(45deg);
}

.ct-empresa-ribbon span i {
    margin-right: 5px;
}

.ct-empresa-title {
    font-size: 32px;
    font-weight: 700;
    color: #333333;
    line-height: 26px;
    margin: 0;
    letter-spacing: -.8px;
}

.ct-empresa-body {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

.ct-empresa-info-box {}

.ct-empresa-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
    color: #444;
    line-height: 1.6;
}

.ct-empresa-info-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.ct-empresa-info-icon {
    color: var(--cor-primaria);
    margin-top: 4px;
    width: 15px;
    text-align: center;
}

.ct-empresa-info-address,
.ct-empresa-info-hours,

.ct-empresa-info-phone {
    padding: 12px;
    background: #f4f5f7;
    margin-bottom: 10px;
    display: flex;
    border-radius: 8px;
    align-items: center;
}

.ct-phone-number {
    font-size: 20px;
    font-weight: 800;
    color: #111;
    display: block;
    margin-top: 2px;
}

.ct-empresa-map {
    margin-top: 25px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eaeaea;
}

.ct-empresa-main-content {
    flex: 2;
    min-width: 300px;
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.ct-empresa-section-title {
    font-size: 22px;
    font-weight: 800;
    color: #333333;
    margin-bottom: 20px;
}

/* Vitrine de Produtos */
.ct-empresa-vitrine-wrapper {
    margin-bottom: 50px;
}

.ct-empresa-vitrine-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 10px;
}

.ct-empresa-vitrine-title {
    font-size: 24px;
    font-weight: 800;
    color: #333333;
    margin: 0;
}

.ct-empresa-vitrine-title i {
    color: var(--cor-primaria);
    margin-right: 10px;
}

/* =========================================================
   ESTILO LISTA: Alimentação / Produtos (Estilo iFood - Sem bordas redondas)
   ========================================================= */
.ct-vitrine-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 20px;
}

@media (min-width: 768px) {
    .ct-vitrine-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

.ct-produto-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-bottom: 1px solid #eaeaea;
    transition: background 0.2s;
    cursor: pointer;
}

.ct-produto-list-item:hover {
    background: #fcfcfc;
}

.ct-produto-list-info {
    flex: 1;
    padding-right: 20px;
}

.ct-produto-list-nome {
    font-size: 17px;
    font-weight: 600;
    color: #333;
    margin: 0 0 6px 0;
}

.ct-produto-list-desc {
    font-size: 14px;
    color: #777;
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ct-produto-list-preco {
    font-size: 16px;
    font-weight: 700;
    color: #111;
}

/* "a partir de" antes do valor (opção marcada no cadastro do produto). */
.ct-preco-a-partir {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
}

.ct-produto-list-img {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    /* sem cantos arredondados */
    border-radius: 0;
    overflow: hidden;
    background: #f5f5f5;
}

.ct-produto-list-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================================
   ESTILO CARDS VERTICAIS: Acomodações / Hotéis
   ========================================================= */
.ct-vitrine-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 576px) {
    .ct-vitrine-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .ct-vitrine-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

.ct-acomodacao-card {
    position: relative;
    border-radius: var(--ct-img-radius);
    overflow: hidden;
    background: #000;
    aspect-ratio: 3 / 4;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    cursor: pointer;
}

.ct-acomodacao-card > img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: filter var(--ct-img-hover-duracao) ease;
}

.ct-acomodacao-card:hover > img {
    filter: var(--ct-img-hover-filtro);
}

.ct-acomodacao-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 70%;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0) 100%);
    z-index: 2;
}

.ct-acomodacao-top-icons {
    position: absolute;
    top: 15px; left: 15px; right: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 3;
}

.ct-acomodacao-pin {
    background: rgba(255,255,255,0.25);
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    backdrop-filter: blur(4px);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
}

.ct-acomodacao-gallery-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #4ab39b;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.ct-acomodacao-content {
    position: relative;
    z-index: 3;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.ct-acomodacao-title {
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 6px 0;
    line-height: 1.2;
    text-transform: uppercase;
}

.ct-acomodacao-subtitle {
    color: #e0e0e0;
    font-size: 14px;
    margin: 0 0 15px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ct-acomodacao-btn {
    background: #4ab39b;
    color: #fff;
    font-weight: 700;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    text-transform: uppercase;
    font-size: 13px;
    transition: background 0.3s;
    width: 100%;
}

.ct-acomodacao-card:hover .ct-acomodacao-btn {
    background: #39917d;
}

@media (max-width: 768px) {
    .ct-empresa-header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0 15px;
        margin-top: -80px;
    }

    .ct-empresa-title-wrapper {
        margin-left: 0;
        align-items: center;
        padding-top: 15px;
    }
}

.ct-empresa-info-box-sidebar {
    margin: 0;
}

.ct-widget-ad {
    text-align: center;
    padding: 10px;
}

/* =========================================================
   MODAL DE PRODUTO / ACOMODAÇÃO (Estilo iFood)
   ========================================================= */
.ct-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
}

.ct-modal.show { opacity: 1; }

.ct-modal-content {
    background: #fff;
    width: 95%; max-width: 850px;
    border-radius: 8px;
    position: relative;
    transform: translateY(-20px) scale(0.98);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ct-modal.show .ct-modal-content { 
    transform: translateY(0) scale(1); 
}

/* Header (Título e Fechar) */
.ct-modal-header {
    background: #fff;
    padding: 20px;
    border-bottom: 1px solid #f1f1f1;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.ct-modal-title { 
    font-size: 24px; 
    margin: 0; 
    color: #333; 
    font-weight: 700; 
    font-family: var(--font-heading);
    line-height: 1.2;
}

.ct-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    transition: color 0.2s ease;
    color: #777;
    line-height: 1;
}

.ct-modal-close:hover {
    color: #111;
}

/* Corpo do Modal */
.ct-modal-body {
    padding: 10px 20px;
    font-size: 15px;
    color: #444;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    overflow-y: auto;
    background: #fff;
}

/* Coluna Imagem */
.ct-modal-img-container {
    width: 100%;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
}

.ct-modal-img {
    width: 100%; height: auto;
    border-radius: 8px;
    overflow: hidden;
    background: #f9f9f9;
}

.ct-modal-img img {
    width: 100%; height: auto; max-height: 350px; object-fit: cover; display: block;
}

/* Miniaturas Galeria */
.ct-modal-gallery-thumbs {
    display: flex; gap: 10px; padding: 15px 0; overflow-x: auto;
}

.ct-modal-thumb {
    width: 50px; height: 50px; border-radius: 8px; cursor: pointer;
    object-fit: cover; border: 2px solid transparent; transition: all 0.2s; opacity: 0.6;
}

.ct-modal-thumb:hover, .ct-modal-thumb.active { opacity: 1; border-color: var(--cor-secundaria, #e3262e); }

.ct-modal-gallery-thumbs::-webkit-scrollbar { height: 4px; }

.ct-modal-gallery-thumbs::-webkit-scrollbar-thumb { background: #bbb; border-radius: 8px; }

/* Coluna Info */
.ct-modal-info { 
    padding: 0; 
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ct-modal-price {
    font-size: 22px; 
    font-weight: 700; 
    color: #111;
    margin-bottom: 20px;
}

.ct-modal-scrollable-desc {
    flex: 1;
    margin-bottom: 25px;
}

.ct-modal-desc { 
    color: #666; 
    line-height: 1.6; 
    font-size: 15px; 
    margin:0;
}

.ct-modal-desc p { margin: 0 0 10px; }

/* Rodapé / Botão */
.ct-modal-footer {
    padding: 0;
    text-align: center;
    margin-top: auto;
    padding-top: 25px;
    display: flex;
    justify-content: flex-end;
}

.ct-modal-btn-comprar {
    background: #f1f1f1;
    color: #333;
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s ease;
    border: none;
}

.ct-modal-btn-comprar:hover {
    background: #e0e0e0;
}

.ct-produto-clickable { cursor: pointer; }

/* Layout Desktop */
@media (min-width: 768px) {
    .ct-modal-body { 
        flex-direction: row; 
        overflow: hidden; 
        align-items: flex-start;
    }
    .ct-modal-img-container { 
        width: 50%; 
        position: sticky; top: 0;
        padding-bottom: 30px;
    }
    .ct-modal-img img { max-height: none; aspect-ratio: 1/1; }
    .ct-modal-info { 
        width: 50%; 
        padding-left: 20px;
        max-height: 70vh; 
        overflow-y: auto;
    }
    /* Scroll interno para direita */
    .ct-modal-info::-webkit-scrollbar { width: 6px; }
    .ct-modal-info::-webkit-scrollbar-track { background: transparent; }
    .ct-modal-info::-webkit-scrollbar-thumb { background: #ddd; border-radius: 8px; }
}

/* =========================================================
   COMPARTILHAR A EMPRESA (sidebar-empresa.php)
   Uma fileira só, colunas de largura igual — com 3 botões no
   computador ou 4 no celular (o "Mais" só aparece onde o
   aparelho tem menu de compartilhar), todos ficam alinhados.
   Ícone redondo em cima, nome curto embaixo, como o menu de
   compartilhar do próprio celular.
   ========================================================= */
.ct-empresa-compartilhar {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.ct-empresa-compartilhar h4 {
    margin: 0 0 12px;
    font-size: 14px;
}

.ct-empresa-compartilhar-botoes {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 8px;
}

.ct-compartilhar-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    min-width: 0;
    padding: 10px 4px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    color: #374151;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}

.ct-compartilhar-btn:hover,
.ct-compartilhar-btn:focus-visible {
    border-color: #9ca3af;
    background: #f9fafb;
    color: #111827;
}

.ct-compartilhar-icone {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #374151;
    color: #fff;
    font-size: 16px;
}

.ct-compartilhar-btn.is-whatsapp .ct-compartilhar-icone {
    background: #25d366;
    font-size: 19px;
}

.ct-compartilhar-btn.is-facebook .ct-compartilhar-icone {
    background: #1877f2;
}

.ct-compartilhar-rotulo {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ct-compartilhar-btn.is-copiado .ct-compartilhar-icone {
    background: #16a34a;
}

.ct-compartilhar-btn[hidden] {
    display: none;
}

.ct-empresa-info-phone a.ct-phone-number {
    color: inherit;
    text-decoration: none;
}

.ct-empresa-info-phone a.ct-phone-number:hover {
    text-decoration: underline;
}
