/* ==============================================================
   CAQUETÁ VENDE - HOJA DE ESTILOS PRINCIPAL
   ============================================================== */

:root {
    --primary: #008069;      
    --secondary: #ea0037;    
    --bg: #f0f2f5;           
    --text-main: #111b21;    
    --white: #ffffff;
}

body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background-color: var(--bg); color: var(--text-main); margin: 0; padding: 0; }

/* --------------------------------------------------------------
   BARRA SUPERIOR Y CAMPANA DE NOTIFICACIONES 🔔
   -------------------------------------------------------------- */
.top-bar { background-color: var(--white); padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.menu-btn { background: none; border: none; font-size: 24px; color: var(--primary); cursor: pointer; padding: 0; }
.logo-title { margin: 0; font-size: 1.5rem; color: #000; font-weight: 900; letter-spacing: -0.5px; cursor: pointer; }
.logo-title span { color: #000; }

.cart-btn { background: none; border: none; font-size: 24px; position: relative; cursor: pointer; padding: 0; }
.cart-badge { position: absolute; top: -5px; right: -8px; background-color: var(--secondary); color: var(--white); font-size: 11px; font-weight: bold; padding: 2px 6px; border-radius: 10px; border: 2px solid var(--white); }

/* NOTIFICACIONES ESTILO FACEBOOK */
.bell-container { position: relative; display: none; margin-right: 15px; } /* Oculto por defecto hasta loguearse */
.bell-btn { background: none; border: none; font-size: 24px; cursor: pointer; padding: 0; position: relative; transition: transform 0.2s; }
.bell-btn:hover { transform: scale(1.1); }
.bell-badge { position: absolute; top: -4px; right: -4px; background: #ea0037; color: white; font-size: 10px; font-weight: bold; width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid white; }

.notif-panel { 
    position: fixed; /* Se desliga del botón y flota en la pantalla */
    top: 75px; 
    left: 50%; 
    transform: translateX(-50%); /* Lo centra perfectamente */
    width: 92%; 
    max-width: 380px; 
    background: white; 
    border-radius: 12px; 
    box-shadow: 0 8px 30px rgba(0,0,0,0.3); 
    border: 1px solid #ddd; 
    display: none; 
    flex-direction: column; 
    z-index: 2000; 
    overflow: hidden; 
    animation: slideDownCentered 0.2s ease forwards; 
}
.notif-panel.active { display: flex; }
@keyframes slideDownCentered { 
    from { opacity: 0; transform: translate(-50%, -10px); } 
    to { opacity: 1; transform: translate(-50%, 0); } 
}

.notif-header { background: var(--primary); color: white; padding: 12px 15px; font-size: 14px; font-weight: bold; display: flex; justify-content: space-between; align-items: center; }
.notif-body { max-height: 350px; overflow-y: auto; background: #f9f9f9; }
.notif-item { padding: 12px 15px; border-bottom: 1px solid #eee; display: flex; gap: 12px; align-items: flex-start; cursor: pointer; transition: background 0.2s; background: white; }
.notif-item:hover { background: #f0f2f5; }
.notif-icon { width: 35px; height: 35px; border-radius: 50%; background: #e6f7f5; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.notif-text { flex: 1; font-size: 12px; color: #444; line-height: 1.4; }
.notif-title { font-weight: bold; color: #111b21; display: block; font-size: 13px; margin-bottom: 2px; }
.notif-time { font-size: 10px; color: #999; display: block; margin-top: 4px; }
.notif-empty { padding: 30px; text-align: center; color: #999; font-size: 13px; }

/* --------------------------------------------------------------
   MENÚ LATERAL (SIDEBAR)
   -------------------------------------------------------------- */
.overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 999; opacity: 0; transition: opacity 0.3s; }
.sidebar { position: fixed; top: 0; left: -280px; width: 280px; height: 100%; background: var(--white); z-index: 1000; transition: left 0.3s ease; box-shadow: 2px 0 15px rgba(0,0,0,0.1); }
.sidebar.open { left: 0; }
.sidebar-header { background: var(--primary); color: var(--white); padding: 20px; }
.sidebar-header h2 { margin: 0; font-size: 1.2rem; }
.sidebar-menu { list-style: none; padding: 0; margin: 0; }
.sidebar-menu li a { display: flex; align-items: center; padding: 15px 20px; color: var(--text-main); text-decoration: none; border-bottom: 1px solid #eee; font-weight: 600; transition: background 0.2s; }
.sidebar-menu li a:hover { background: #f9f9f9; }
.sidebar-menu li a i { margin-right: 15px; font-size: 20px; font-style: normal; }

/* --------------------------------------------------------------
   CONTENEDOR PRINCIPAL Y BUSCADOR
   -------------------------------------------------------------- */
.container { padding: 15px; max-width: 1200px; margin: 0 auto; overflow-x: hidden; }
.search-container { margin-bottom: 15px; }
.search-bar { width: 100%; padding: 15px 20px; border-radius: 25px; border: 1px solid #ddd; font-size: 16px; outline: none; box-shadow: 0 4px 10px rgba(0,0,0,0.03); box-sizing: border-box; transition: border-color 0.3s; }
.search-bar:focus { border-color: var(--primary); }

/* --------------------------------------------------------------
   CARRUSELES HORIZONTALES (VISTA DE INICIO)
   -------------------------------------------------------------- */
.carousel-track { display: flex; overflow-x: auto; gap: 15px; padding-bottom: 10px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > * { scroll-snap-align: start; flex-shrink: 0; }

.promo-banner { width: 280px; height: 130px; border-radius: 12px; object-fit: cover; box-shadow: 0 4px 10px rgba(0,0,0,0.1); cursor: pointer; border: 1px solid #eee; }
@media (min-width: 768px) { .promo-banner { width: 400px; height: 180px; } }

.cat-item { display: flex; flex-direction: column; align-items: center; cursor: pointer; text-decoration: none; width: 70px; }
.cat-circle { width: 60px; height: 60px; border-radius: 50%; background: white; display: flex; align-items: center; justify-content: center; font-size: 28px; box-shadow: 0 4px 10px rgba(0,0,0,0.04); border: 1px solid #f0f2f5; margin-bottom: 8px; transition: transform 0.2s; }
.cat-item:hover .cat-circle { transform: translateY(-3px); border-color: var(--primary); }
.cat-label { font-size: 11px; color: #111b21; font-weight: 600; text-align: center; }

/* --------------------------------------------------------------
   TARJETAS DE TIENDA 
   -------------------------------------------------------------- */
.store-card { display: flex; align-items: center; background: white; padding: 12px; border-radius: 16px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: 1px solid #f0f2f5; width: 280px; box-sizing: border-box; position: relative; overflow: hidden; }
.store-card-bg { position: absolute; top:0; left:0; width: 100%; height: 40px; background: var(--primary); z-index: 0; opacity: 0.1; }
.store-card-img { width: 50px; height: 50px; border-radius: 12px; object-fit: cover; border: 2px solid white; margin-right: 12px; background: #fafafa; z-index: 1; position: relative; box-shadow: 0 2px 5px rgba(0,0,0,0.1); flex-shrink: 0; }
.store-card-info { flex: 1; display: flex; flex-direction: column; justify-content: center; z-index: 1; position: relative; min-width: 0; padding-right: 5px; }
.store-card-title { font-size: 14px; font-weight: 800; margin: 0 0 2px 0; color: #111b21; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-card-subtitle { font-size: 11px; color: #667781; margin: 0 0 4px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-btn { background: var(--primary); color: white; font-weight: 800; border: none; padding: 8px 12px; border-radius: 8px; font-size: 11px; cursor: pointer; z-index: 1; position: relative; flex-shrink: 0; }

/* --------------------------------------------------------------
   TARJETAS DE PRODUCTO (Carrusel y Grilla)
   -------------------------------------------------------------- */
.product-card { background: var(--white); border-radius: 12px; overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,0.04); border: 1px solid #e9edef; display: flex; flex-direction: column; transition: transform 0.2s; position: relative; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 15px rgba(0,0,0,0.08); }
.carousel-track .product-card { width: 150px; }
@media (min-width: 768px) { .carousel-track .product-card { width: 200px; } }
.store-grid .product-card { width: 100%; }

.product-img { width: 100%; height: 140px; object-fit: contain; background: #ffffff; padding: 10px; box-sizing: border-box; border-bottom: 1px solid #f0f2f5; cursor: pointer; }
.product-info { padding: 12px; flex: 1; display: flex; flex-direction: column; cursor: pointer; }
.store-name { font-size: 10px; color: var(--primary); text-transform: uppercase; font-weight: 800; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-title { margin: 0 0 5px 0; font-size: 13px; color: var(--text-main); font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 34px; }
.product-price { font-weight: 900; color: var(--text-main); font-size: 15px; margin-top: auto; }
.btn-add { background: #e6f7f5; color: var(--primary); border: none; padding: 10px; font-weight: 900; font-size: 13px; cursor: pointer; border-top: 1px solid #e9edef; transition: background 0.2s; width: 100%; }
.btn-add:hover { background: var(--primary); color: var(--white); }

/* --------------------------------------------------------------
   GRILLA DE TIENDA PROFESIONAL Y CATEGORÍAS 
   -------------------------------------------------------------- */
.store-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 5px 0; }
@media (min-width: 768px) { .store-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }

.internal-category-bar { display: flex; overflow-x: auto; gap: 8px; padding: 10px 0; margin-bottom: 15px; scrollbar-width: none; }
.internal-category-bar::-webkit-scrollbar { display: none; }
.cat-pill { padding: 8px 16px; background: white; border: 1px solid #ddd; border-radius: 20px; font-size: 12px; font-weight: bold; white-space: nowrap; cursor: pointer; transition: 0.2s; }
.cat-pill.active { background: var(--primary); color: white; border-color: var(--primary); }

.portada-tienda-header { height: 160px; background-color: var(--primary); background-size: cover; background-position: center; border-radius: 12px; margin-bottom: 40px; position: relative; }
.logo-tienda-header { width: 80px; height: 80px; border-radius: 50%; border: 4px solid white; position: absolute; bottom: -30px; left: 20px; background: #eee; object-fit: cover; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
@media (min-width: 768px) { .portada-tienda-header { height: 320px; border-radius: 16px; } .logo-tienda-header { width: 120px; height: 120px; bottom: -40px; left: 30px; border-width: 5px; } }

/* --------------------------------------------------------------
   PIE DE PÁGINA Y TÍTULOS
   -------------------------------------------------------------- */
.site-footer { background: var(--text-main); color: white; text-align: center; padding: 30px 20px; margin-top: 40px; font-size: 12px; border-top-left-radius: 20px; border-top-right-radius: 20px; }
.section-header { display: flex; justify-content: space-between; align-items: flex-end; margin: 25px 0 15px; }
.section-title { font-size: 15px; color: #111b21; font-weight: 900; margin: 0; }
.section-link { font-size: 12px; color: var(--primary); font-weight: bold; cursor: pointer; text-decoration: none; }

/* --------------------------------------------------------------
   MODALES Y FORMULARIOS
   -------------------------------------------------------------- */
.modal-base { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 1000; justify-content: center; align-items: flex-end; }
.modal-content-base { background: white; width: 100%; border-radius: 20px 20px 0 0; padding: 20px; position: relative; max-width: 600px; animation: slideUp 0.3s; max-height: 90vh; overflow-y: auto; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.close-modal-btn { position: absolute; top: 10px; right: 15px; font-size: 28px; font-weight: bold; color: #666; cursor: pointer; background: white; border: none; border-radius: 50%; width: 35px; height: 35px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); z-index: 10; display: flex; align-items: center; justify-content: center; line-height: 1; }

.form-checkout { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; margin-bottom: 12px; font-size: 14px; outline: none; background: #f9f9f9; box-sizing: border-box; }
.form-checkout:focus { border-color: var(--primary); background: white; }

.cart-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 1001; opacity: 0; transition: opacity 0.3s; }
.cart-sidebar-panel { position: fixed; top: 0; right: -350px; width: 100%; max-width: 350px; height: 100%; background: white; z-index: 1002; transition: right 0.3s ease; box-shadow: -5px 0 15px rgba(0,0,0,0.1); display: flex; flex-direction: column; }
.cart-sidebar-panel.open { right: 0; }
.cart-header { background: var(--primary); color: white; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; }
.cart-body { flex: 1; overflow-y: auto; padding: 20px; }
.cart-footer { padding: 20px; border-top: 1px solid #eee; background: #f9f9f9; }
.btn-checkout { width: 100%; background: var(--secondary); color: white; border: none; padding: 15px; border-radius: 25px; font-weight: bold; font-size: 16px; cursor: pointer; }
.qty-btn { background: #eee; border: none; width: 25px; height: 25px; border-radius: 5px; font-weight: bold; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.qty-display { font-weight: bold; width: 25px; text-align: center; font-size: 14px; }

/* ==============================================================
   EFECTO DE TIENDA CERRADA O PAUSADA 🚫
   ============================================================== */
.producto-bloqueado {
    filter: grayscale(100%);
    opacity: 0.5;
    pointer-events: none; /* Esto desactiva todos los clics y botones */
    position: relative;
}

.etiqueta-cerrado {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(234, 0, 55, 0.9);
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: 900;
    font-size: 14px;
    z-index: 10;
    letter-spacing: 1px;
}

/* ==================================================== */
/* 📇 TARJETAS DEL DIRECTORIO HÍBRIDO (TIENDA + CITAS)  */
/* ==================================================== */

.grid-directorio {
    display: grid;
    /* Adaptable: 1 columna en celulares pequeños, 2 en más grandes */
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); 
    gap: 12px;
    padding: 15px;
}

.tarjeta-directorio {
    background: #1f2c34; /* Gris oscuro exacto de las tarjetas de tu app */
    border-radius: 12px;
    border: 1px solid #2a3942; /* Borde sutil del modo oscuro */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

/* Portada superior de la tarjeta */
.dir-portada {
    width: 100%;
    height: 75px;
    background-color: #111b21;
    background-size: cover;
    background-position: center;
}

/* Contenedor de información (Logo + Textos) */
.dir-info-body {
    padding: 0 10px 12px;
    text-align: center;
    flex: 1; 
    display: flex;
    flex-direction: column;
}

.dir-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #1f2c34; /* Mismo fondo de la tarjeta para fusionarse */
    margin: -30px auto 8px; 
    background: #ffffff;
}

.dir-nombre {
    font-size: 1.4rem;
    font-weight: 700;
    color: #e9edef; /* Blanco suave del modo oscuro */
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.dir-verificado {
    color: #2b73f6; /* El azul exacto del logo "Caquetá Vende" de tu header */
    font-size: 0.9rem;
}

.dir-categoria {
    font-size: 0.75rem;
    color: #8696a0; /* Gris texto secundario */
    margin-bottom: 12px;
    text-transform: capitalize;
}

/* Contenedor dinámico de botones */
.dir-botones-wrapper {
    display: flex;
    gap: 8px;
    padding: 0 10px 12px;
}

.btn-dir {
    flex: 1; 
    padding: 10px 5px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    color: #ffffff;
}

/* Colores integrados con la paleta de Caquetá Vende */
.btn-dir-tienda { 
    background: #00a884; /* Verde acento principal de tu plataforma */
} 

.btn-dir-citas { 
    background: #2b73f6; /* Azul corporativo de tu marca */
} 

.btn-dir-basico { 
    background: #111b21; /* Fondo principal de la app */
    color: #00a884; 
    border: 1px solid #00a884; 
}

/* =========================================
   SISTEMA DE PESTAÑAS (INICIO)
========================================= */
.tabs-container {
    display: flex;
    background: white;
    border-bottom: 2px solid #e9edef;
    position: sticky;
    top: 0;
    z-index: 50;
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 15px 10px;
    font-weight: bold;
    color: #54656f;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-size: 15px;
}

.tab-item.active {
    color: #ea0037; 
    border-bottom: 3px solid #ea0037;
    background: #fffafa; 
}

/* =========================================
   DISEÑO DEL MURO DE PROMOCIONES
========================================= */
.promo-card {
    background: white;
    border-radius: 12px;
    margin: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid #e9edef;
}

.promo-header {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    gap: 10px;
}

.promo-logo {
    width: 40px; 
    height: 40px; 
    border-radius: 50%; 
    object-fit: cover;
    border: 1px solid #eee;
}

.promo-negocio-nombre {
    font-weight: 800; 
    font-size: 14px; 
    color: #111b21; 
    margin: 0;
}

.promo-tiempo {
    font-size: 12px; 
    color: #8696a0; 
    margin: 0;
}

.promo-img {
    width: 100%; 
    height: auto; 
    max-height: 400px; 
    object-fit: cover;
}

.promo-body {
    padding: 15px;
}

.promo-titulo {
    font-size: 16px; 
    font-weight: bold; 
    margin: 0 0 15px 0; 
    color: #111b21;
}

.promo-actions {
    display: flex; 
    gap: 10px;
}

.btn-like {
    flex: 1; 
    padding: 12px; 
    background: #f0f2f5; 
    border: none; 
    border-radius: 8px; 
    font-weight: bold; 
    color: #54656f; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 5px; 
    cursor: pointer; 
    transition: 0.2s;
    font-size: 15px;
}

.btn-like.liked {
    color: #ea0037; 
    background: #ffe3e3;
}

.btn-comprar {
    flex: 2; 
    padding: 12px; 
    background: #ea0037; 
    color: white; 
    border: none; 
    border-radius: 8px; 
    font-weight: bold; 
    cursor: pointer;
    font-size: 15px;
    box-shadow: 0 4px 10px rgba(234, 0, 55, 0.2);
}

/* 🏠 ESTILOS LANDING PAGE DIRECTORIO */
.portada-pauta {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #ccc;
}

.contenedor-perfil-dir {
    position: relative;
    padding: 0 20px;
    margin-top: -50px; /* Sube el logo sobre la portada */
}

.logo-perfil-dir {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    border: 5px solid #f0f2f5;
    background: white;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.grid-botones-contacto {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.btn-contacto-dir {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border-radius: 12px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 13px;
    gap: 5px;
}

/* =========================================
   BOTONES DE CARRUSEL (VISTA PC)
========================================= */

/* Envoltorio relativo para poder posicionar los botones encima */
.carrusel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* Diseño base del botón (Oculto en móviles por defecto) */
.btn-carrusel {
    display: none; 
    position: absolute;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    color: #008069;
    border: 1px solid #ddd;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
}

.btn-carrusel:hover {
    background: #008069;
    color: white;
    transform: scale(1.1);
}

/* Posiciones a los lados */
.btn-carrusel.left { left: -20px; }
.btn-carrusel.right { right: -20px; }

/* 🔥 SOLO MOSTRAR EN COMPUTADORES (Pantallas mayores a 768px) 🔥 */
@media (min-width: 768px) {
    .btn-carrusel {
        display: flex;
    }
    
    /* Opcional: Oculta la barra de scroll de abajo en PC para que se vea más limpio */
    .carrusel-wrapper > div::-webkit-scrollbar {
        display: none;
    }
    .carrusel-wrapper > div {
        -ms-overflow-style: none;
        scrollbar-width: none;
        scroll-behavior: smooth;
    }
}
