/* Cupones: contenedor blanco a todo el ancho (sin padding); header y carrusel con padding interno */
.home-cupones {
    --cupon-card-w: min(18rem, 320px);
    --cupon-card-h: 10rem;
    --cupon-gap: 1rem;
    --cupon-radius: 1rem;
    --cupon-arrow-size: 2.25rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: 1rem;
}
@media (max-width: 768px) {
    .home-cupones { margin-top: 0.25rem; }
}

/* Mobile: tarjetas más compactas */
@media (max-width: 767px) {
    .home-cupones {
        --cupon-card-w: 280px;
        --cupon-card-h: 8rem;
        --cupon-gap: 0.75rem;
        --cupon-radius: 0.75rem;
        margin-top: 0 !important;
    }
}

.home-cupones-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem 1rem;
    background: var(--card);
    gap: 1rem;
}

@media (max-width: 767px) {
    .home-cupones-header {
        padding: 0.75rem 1rem;
    }
}

.home-cupones-titles { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; }
.home-cupones-title {
    margin: 0;
    font-size: clamp(1rem, 2.5vw, 1.375rem);
    font-weight: 700;
    color: #1F2937;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: -0.02em;
}
.home-cupones-subtitle {
    margin: 0;
    font-size: clamp(0.8125rem, 1.5vw, 0.9375rem);
    color: #6B7280;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 500;
}
.home-cupones-ver {
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #FF1744;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    flex-shrink: 0;
    transition: color 0.2s, background 0.2s;
}

@media (max-width: 767px) {
    .home-cupones-ver {
        font-size: 0.8125rem;
        padding: 0.375rem 0.625rem;
    }
}

.home-cupones-ver:hover { color: #fff; background: #FF1744; }

/* Carrusel: padding interno a los lados para que el contenido no llegue al borde */
.home-cupones-carousel {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 0 1.25rem 0.75rem;
    min-height: calc(var(--cupon-card-h) + 0.5rem);
}

@media (max-width: 767px) {
    .home-cupones-carousel {
        padding: 0 1rem 0.5rem;
    }
}

/* Flechas: solo en PC; en móvil se desliza el carrusel */
@media (max-width: 1023px) {
    .home-cupones-arrow {
        display: none !important;
    }
}
@media (min-width: 1024px) {
    .home-cupones-arrow {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 40px;
        height: 40px;
        border: none;
        border-radius: 999px;
        background: #f1f5f9;
        color: #0f172a;
        cursor: pointer;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    }
}

.home-cupones-arrow:hover:not(:disabled) {
    background: #E5E7EB;
    color: #111827;
}
.home-cupones-arrow:active:not(:disabled) { background: #E5E7EB; }
.home-cupones-arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.home-cupones-arrow-left { margin-right: 0.5rem; }
.home-cupones-arrow-right { margin-left: 0.5rem; }

.home-cupones-scroll {
    display: flex;
    gap: var(--cupon-gap);
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.25rem 0;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    overscroll-behavior-x: contain;
    min-width: 0;
    flex: 1;
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* scroll suave controlado por JS con duración mayor */
}
.home-cupones-scroll::-webkit-scrollbar { display: none; height: 0; width: 0; }
.home-cupones-scroll a { touch-action: pan-x pan-y; }

/* Dots: mismos márgenes horizontales que .home-cupones-carousel; vertical simétrico */
.home-cupones-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--card);
}

@media (max-width: 767px) {
    .home-cupones-dots {
        gap: 0.375rem;
        padding: 0.5rem 1rem;
    }
}

/* Dots: misma altura siempre; solo el ancho y el color cambian para transición suave */
.home-cupon-dot {
    width: 0.5rem;
    height: 0.5rem;
    min-height: 0.5rem;
    border-radius: 9999px;
    background: #D1D5DB;
    border: none;
    padding: 0;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: width 0.35s ease-out, background-color 0.35s ease-out, box-shadow 0.35s ease-out, transform 0.2s ease-out;
}

@media (max-width: 767px) {
    .home-cupon-dot {
        width: 0.4375rem;
        height: 0.4375rem;
        min-height: 0.4375rem;
    }
}

.home-cupon-dot:hover:not(.active) {
    background: #9CA3AF;
    transform: scale(1.15);
}

.home-cupon-dot.active {
    background: #EC4899;
    width: 1.5rem;
    height: 0.5rem;
    min-height: 0.5rem;
    border-radius: 9999px;
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.35);
}

.home-cupon-dot.active:hover {
    background: #E11D48;
}

@media (max-width: 767px) {
    .home-cupon-dot.active {
        width: 1.25rem;
        height: 0.4375rem;
        min-height: 0.4375rem;
    }
}

/* Tarjeta cupón: estructura clara, tipografía en rem */
.home-cupon-card {
    flex: 0 0 var(--cupon-card-w);
    width: var(--cupon-card-w);
    min-width: var(--cupon-card-w);
    height: var(--cupon-card-h);
    background: #fff;
    border-radius: var(--cupon-radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.home-cupon-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border-color: #FECDD3;
}
.home-cupon-card .cupon-img-wrap {
    width: 38%;
    min-width: 38%;
    height: 100%;
    position: relative;
    background: #F3F4F6;
    overflow: hidden;
}
.home-cupon-card .cupon-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.home-cupon-card .cupon-img-wrap.no-img img { display: none; }
.home-cupon-card .cupon-img-wrap.no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9CA3AF;
    font-size: 1.5rem;
}

@media (max-width: 767px) {
    .home-cupon-card .cupon-img-wrap.no-img {
        font-size: 1.25rem;
    }
}

.home-cupon-card .cupon-img-wrap.no-img::after {
    content: '\f02b';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}
.home-cupon-card .cupon-badge-hot {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: linear-gradient(135deg, #EC4899, #F43F5E);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    letter-spacing: 0.02em;
}

@media (max-width: 767px) {
    .home-cupon-card .cupon-badge-hot {
        top: 0.375rem;
        left: 0.375rem;
        font-size: 0.5rem;
        padding: 0.1875rem 0.375rem;
        border-radius: 0.25rem;
    }
}

.home-cupon-card .cupon-body {
    width: 62%;
    display: flex;
    flex-direction: column;
    padding: 0.75rem 0.875rem;
    background: #fff;
    min-width: 0;
}

@media (max-width: 767px) {
    .home-cupon-card .cupon-body {
        padding: 0.5rem 0.625rem;
    }
}

.home-cupon-card .cupon-body-top {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
}

@media (max-width: 767px) {
    .home-cupon-card .cupon-body-top {
        gap: 0.375rem;
        margin-bottom: 0.25rem;
    }
}

.home-cupon-card .cupon-establishment {
    flex: 1;
    min-width: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #BE185D;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 767px) {
    .home-cupon-card .cupon-establishment {
        font-size: 0.625rem;
        -webkit-line-clamp: 1;
    }
}

.home-cupon-card .cupon-establishment span { display: block; }
.home-cupon-card .cupon-discount-badge {
    flex-shrink: 0;
    background: linear-gradient(135deg, #F43F5E, #EC4899);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
}

@media (max-width: 767px) {
    .home-cupon-card .cupon-discount-badge {
        font-size: 0.625rem;
        padding: 0.1875rem 0.375rem;
    }
}

.home-cupon-card .cupon-title,
.home-cupon-card .cupon-establishment,
.home-cupon-card .cupon-desc,
.home-cupon-card .cupon-price-line,
.home-cupon-card .cupon-ver-mas {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.home-cupon-card .cupon-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1F2937;
    line-height: 1.3;
    margin: 0 0 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 767px) {
    .home-cupon-card .cupon-title {
        font-size: 0.75rem;
        margin: 0 0 0.1875rem;
    }
}

.home-cupon-card .cupon-price-line {
    display: flex;
    align-items: baseline;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

@media (max-width: 767px) {
    .home-cupon-card .cupon-price-line {
        margin-bottom: 0.375rem;
    }
}

.home-cupon-card .cupon-price-line .soles {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748B;
}
.home-cupon-card .cupon-price-line .price-int {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0F172A;
    margin-left: 0.125rem;
}
.home-cupon-card .cupon-price-line .price-dec {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748B;
    margin-left: 0.0625rem;
}

@media (max-width: 767px) {
    .home-cupon-card .cupon-price-line .soles {
        font-size: 0.75rem;
    }
    .home-cupon-card .cupon-price-line .price-int {
        font-size: 1rem;
    }
    .home-cupon-card .cupon-price-line .price-dec {
        font-size: 0.75rem;
    }
}

.home-cupon-card .cupon-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.375rem;
    border-top: 1px solid #F3F4F6;
}

@media (max-width: 767px) {
    .home-cupon-card .cupon-footer {
        gap: 0.375rem;
        padding-top: 0.25rem;
    }
}

.home-cupon-card .cupon-desc {
    flex: 1;
    min-width: 0;
    font-size: 0.6875rem;
    color: #9CA3AF;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 767px) {
    .home-cupon-card .cupon-desc {
        font-size: 0.625rem;
        -webkit-line-clamp: 1;
    }
}

.home-cupon-card .cupon-ver-mas {
    flex-shrink: 0;
    background: linear-gradient(135deg, #EC4899, #F43F5E);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .home-cupon-card .cupon-ver-mas {
        font-size: 0.625rem;
        padding: 0.25rem 0.5rem;
        border-radius: 0.375rem;
    }
}

/* Stitch v2: etiqueta roja al ras del área blanca (anula layout legacy 38/62) */
.home-coastal-pulse .home-cupon-card--stitch-v2 {
    flex-direction: column !important;
    height: auto !important;
    gap: 0 !important;
}
.home-coastal-pulse .home-cupon-card--stitch-v2 .cupon-img-wrap {
    width: 100% !important;
    min-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}
.home-coastal-pulse .home-cupon-card--stitch-v2 .cupon-body {
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}
.home-coastal-pulse .home-cupon-card--stitch-v2 .cupon-brand-bar {
    margin: 0 !important;
    align-self: flex-start !important;
    border-radius: 0 10px 10px 0 !important;
}

/* divcupon: tarjeta vertical con clases propias (anula layout legacy 38/62) */
.home-coastal-pulse .home-cupon-card--divcupon {
    flex-direction: column !important;
    height: auto !important;
    gap: 0 !important;
}

/* ===== PUBLICACIONES RESPONSIVE ===== */
.home-feed {
    margin-bottom: 20px;
    padding: 0 1.25rem 1rem;
}

@media (max-width: 767px) {
    .home-feed {
        padding: 0 0 1rem;
    }
}

.section-title {
    font-size: clamp(1rem, 2vw, 1.375rem);
    font-weight: 700;
    color: #1F2937;
    margin: 0 0 1rem;
}

@media (max-width: 767px) {
    .section-title {
        margin: 0 0 0.75rem;
    }
}

.home-feed { max-width: 100%; }
.home-desktop-grid { width: 100%; }

/* Base mobile: ocultar panel lateral para mantener el orden como Facebook */
.home-left-col { display: none; }
.home-right-col { display: none; }
.home-middle-col { display: block; width: 100%; }

/* ===== Perfil + Vistos recientemente (panel izquierdo PC) ===== */
.home-profile-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.04);
    overflow: visible;
    padding: 14px 14px 12px;
}
.home-profile-top {
    display: flex;
    align-items: center;
    gap: 12px;
}
.home-profile-avatar {
    width: 46px;
    height: 46px;
    border-radius: 9999px;
    overflow: hidden;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.home-profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.home-profile-avatar-placeholder {
    color: #ffffff;
    font-weight: 900;
    font-size: 0.85rem;
}
.home-profile-info { min-width: 0; }
.home-profile-greeting {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}
.home-profile-name {
    font-weight: 900;
    color: #0f172a;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.home-profile-sub {
    color: #64748b;
    font-size: 0.75rem;
    margin-top: 2px;
}
.home-profile-sub-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 2px;
}
.home-theme-toggle-btn {
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
    flex-shrink: 0;
}
.home-theme-toggle-btn:hover {
    transform: translateY(-1px);
    border-color: #cbd5e1;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}
.home-theme-toggle-btn i { font-size: 0.95rem; }
.home-profile-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}
.home-profile-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 14px;
    border: 1px solid #f1f5f9;
    background: #ffffff;
    color: #0f172a;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 800;
    text-align: center;
    transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.home-profile-link:hover {
    transform: translateY(-1px);
    border-color: #e2e8f0;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
    background: #f8fafc;
}
.home-profile-link i { color: #2563eb; font-size: 0.9rem; }
.home-profile-link--accent {
    background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
    border-color: #fecdd3;
}
.home-profile-link--accent i { color: #e11d48; }

/* Tarjetas laterales compartidas */
.home-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 14px 10px;
    border-bottom: 1px solid #f1f5f9;
}
.home-card-head--compact { padding-bottom: 8px; }
.home-card-head-text { min-width: 0; }
.home-card-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.2;
}
.home-card-subtitle {
    margin: 4px 0 0;
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.3;
}
.home-card-link {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    font-size: 0.72rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}
.home-card-link:hover { background: #fff1f2; border-color: #fecdd3; color: #be123c; }

.home-estabs-card,
.home-spotlight-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.04);
    overflow: hidden;
    margin-top: 12px;
}
.home-estabs-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 12px 8px;
    padding: 0 12px;
    min-height: 38px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}
.home-estabs-search-wrap i { color: #94a3b8; font-size: 0.82rem; }
.home-estabs-search {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    outline: none;
    font-size: 0.82rem;
    color: #0f172a;
}
.home-estabs-search::placeholder { color: #94a3b8; }
.home-estabs-list {
    max-height: min(52vh, 420px);
    overflow: auto;
    padding: 4px 8px 10px;
}
.home-estabs-list--mobile {
    max-height: none;
    padding: 0;
}
.home-estabs-carousel-wrap {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0 0.5rem 0.75rem;
    min-width: 0;
    position: relative;
}
.home-estabs-carousel-scroll {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.75rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1 1 0;
    min-width: 0;
    max-height: none;
    padding: 0.25rem 0.125rem 0.5rem;
}
.home-estabs-carousel-scroll::-webkit-scrollbar {
    display: none;
    height: 0;
    width: 0;
}
.home-estabs-carousel-scroll .home-estab-item {
    flex: 0 0 clamp(260px, 78vw, 340px);
    scroll-snap-align: start;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
    min-height: 5.5rem;
}
.home-estabs-carousel-arrow {
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 999px;
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.12);
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease;
    position: relative;
    z-index: 3;
    flex-shrink: 0;
}
.home-estabs-carousel-arrow:hover:not(:disabled) {
    background: #f8fafc;
}
.home-estabs-carousel-arrow:disabled {
    opacity: 0.35;
    cursor: default;
}
.home-estabs-carousel-arrow .material-symbols-outlined {
    font-size: 1.25rem;
    line-height: 1;
}
@media (max-width: 767px) {
    .home-estabs-carousel-arrow {
        display: none;
    }
    .home-estabs-carousel-wrap {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}
@media (min-width: 768px) {
    .home-estabs-carousel-arrow {
        display: inline-flex !important;
    }
}
@media (min-width: 1280px) {
    .home-left-col .home-estabs-carousel-scroll .home-estab-item {
        flex: 0 0 calc(100% - 0.25rem);
    }
}
.home-estabs-state {
    padding: 14px 10px;
    text-align: center;
    font-size: 0.8rem;
    color: #64748b;
}
.home-estab-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 8px;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: background 0.12s ease, transform 0.12s ease;
}
.home-estab-item:hover {
    background: #f8fafc;
    transform: translateX(2px);
}
.home-estab-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #0f172a, #334155);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 900;
}
.home-estab-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.home-estab-avatar-fallback {
  font-size: 0.72rem;
  font-weight: 900;
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
}

.home-estab-avatar-fallback.is-visible {
  display: flex;
}
.home-estab-body { min-width: 0; flex: 1; }
.home-estab-titles {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.home-estab-empresa {
    font-size: 0.82rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.25;
    word-break: break-word;
}
.home-estab-sede {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    line-height: 1.25;
    word-break: break-word;
}
.home-estab-name {
    font-size: 0.82rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.25;
    word-break: break-word;
}
.home-estab-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 3px;
}
.home-estab-sub {
    font-size: 0.7rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.home-estab-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.home-estab-pill--open { background: #ecfdf5; color: #047857; }
.home-estab-pill--closed { background: #fef2f2; color: #b91c1c; }
.home-estab-pill--rating { background: #fffbeb; color: #b45309; }
.home-estab-chevron {
    color: #cbd5e1;
    font-size: 0.72rem;
    flex-shrink: 0;
}
.home-estabs-spotlight {
    padding: 6px 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.home-estabs-spotlight .home-estab-item {
    padding: 8px 8px;
}
.home-estabs-mobile {
    display: none;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.04);
    overflow: hidden;
    margin-top: 12px;
}
.home-spotlight-middle {
    display: block;
    width: 100%;
    max-width: 720px;
    margin: 12px auto 0;
}
.home-estabs-mobile .home-card-head { padding-left: 16px; padding-right: 16px; }
.home-estabs-search-wrap--mobile { margin-left: 16px; margin-right: 16px; }

.home-recent-card {
    margin-top: 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.04);
    overflow: hidden;
    padding: 12px 12px 10px;
}
.home-recent-title {
    font-weight: 900;
    color: #0f172a;
    font-size: 0.9rem;
    margin-bottom: 10px;
}
.home-recent-scroll {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 44vh;
    overflow: auto;
    padding-right: 4px;
}
.home-recent-chip {
    width: 100%;
    border: 1px solid #f1f5f9;
    background: #fff;
    border-radius: 14px;
    padding: 8px 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    cursor: pointer;
    color: #0f172a;
}
.home-recent-chip:hover { background: #f8fafc; }
.home-recent-chip-avatar {
    width: 34px;
    height: 34px;
    border-radius: 9999px;
    overflow: hidden;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #ffffff;
    font-weight: 900;
    font-size: 0.75rem;
}
.home-recent-chip-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.home-recent-chip-body { min-width: 0; }
.home-recent-chip-name {
    font-weight: 900;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.home-recent-chip-meta {
    margin-top: 2px;
    font-size: 0.72rem;
    color: #64748b;
    display: flex;
    gap: 6px;
    align-items: center;
}
.home-recent-chip-meta i { color: #64748b; font-size: 0.7rem; }

/* Móvil y tablet: listado de sedes en columna central */
@media (max-width: 1279px) {
    .home-estabs-mobile {
        display: block;
        width: 100%;
        max-width: 720px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ==========================
   Layout tablet: feed centrado
   ========================== */
@media (min-width: 768px) and (max-width: 1279px) {
    .fragment-body.home-desktop-grid {
        display: block;
        max-width: 820px;
        margin-left: auto;
        margin-right: auto;
        padding: 0 20px;
        box-sizing: border-box;
    }
    .home-left-col,
    .home-right-col {
        display: none;
    }
    .home-middle-col {
        display: block;
        width: 100%;
    }
    .home-middle-col .home-feed,
    .home-middle-col .home-cupones {
        width: 100%;
        max-width: 720px;
        margin-left: auto;
        margin-right: auto;
    }
    .feed-list-app {
        max-width: 720px;
    }
    .home-cupones { margin-top: 0 !important; }
    .home-cupones-carousel {
        flex-direction: row !important;
        padding: 0 1.25rem 0.75rem !important;
        min-height: calc(var(--cupon-card-h) + 0.5rem) !important;
    }
    #cuponesDots { display: flex !important; }
    .home-cupones-scroll {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0.25rem 0;
        touch-action: pan-x pan-y;
        flex: 1;
        width: auto;
    }
}

/* ==========================
   Layout PC: cupones vertical + panel derecho
   ========================== */
@media (min-width: 1280px) {
    .fragment-body.home-desktop-grid {
        display: grid;
        grid-template-columns: minmax(260px, 300px) minmax(0, 1.4fr) minmax(300px, 340px);
        gap: 24px;
        align-items: start;
        max-width: 1440px;
        margin-left: auto;
        margin-right: auto;
        padding: 0 20px;
        box-sizing: border-box;
    }
    .home-right-col {
        display: flex;
        flex-direction: column;
        gap: 14px;
        position: sticky;
        top: 60px;
        align-self: start;
        align-content: flex-start;
        max-height: calc(100vh - 72px);
        max-height: calc(100dvh - 72px);
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
        padding-right: 2px;
    }
    .home-right-col::-webkit-scrollbar { width: 6px; }
    .home-right-col::-webkit-scrollbar-thumb {
        background: rgba(100, 116, 139, 0.4);
        border-radius: 6px;
    }

    /* Banner wizard: mismo toggle que el home (body.home-theme-light / body.home-theme-dark) */
    body.home-theme-light .home-page .home-wizard-banner {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        text-decoration: none;
        color: #111111;
        border-radius: 10px;
        padding: 0.75rem 0.85rem 0.8rem;
        background: #fafafa;
        border: 1px solid #e8e8e8;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.05);
        overflow: hidden;
        position: relative;
        transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    }
    body.home-theme-light .home-page .home-wizard-banner:focus-visible {
        outline: 2px solid #dc2626;
        outline-offset: 3px;
    }
    body.home-theme-light .home-page .home-wizard-banner::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 3px;
        background: #dc2626;
        pointer-events: none;
    }
    body.home-theme-light .home-page .home-wizard-banner:hover {
        transform: translateY(-1px);
        background: #ffffff;
        box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06), 0 8px 20px rgba(220, 38, 38, 0.08);
        border-color: #fecaca;
        color: #111111;
    }
    body.home-theme-light .home-page .home-wizard-banner-head {
        position: relative;
        z-index: 1;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.35rem 0.5rem;
        margin-bottom: 0.15rem;
        padding-bottom: 0.45rem;
        border-bottom: 1px solid #e4e4e7;
    }
    body.home-theme-light .home-page .home-wizard-banner-body {
        position: relative;
        z-index: 1;
        display: flex;
        flex-direction: column;
        gap: 0.55rem;
        margin-top: 0.45rem;
        flex: 1 1 auto;
        min-height: 0;
    }
    body.home-theme-light .home-page .home-wizard-banner-body p {
        margin: 0;
    }
    body.home-theme-light .home-page .home-wizard-banner-actions {
        margin: 0;
    }
    body.home-theme-light .home-page .home-wizard-banner-kicker {
        position: relative;
        z-index: 1;
        display: inline-block;
        font-size: 0.58rem;
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: #b91c1c;
        padding: 0.12rem 0.4rem;
        border-radius: 9999px;
        background: rgba(220, 38, 38, 0.1);
        border: 1px solid rgba(220, 38, 38, 0.18);
        margin-bottom: 0;
    }
    body.home-theme-light .home-page .home-wizard-banner-title {
        position: relative;
        z-index: 1;
        font-size: clamp(0.98rem, 2vw, 1.12rem);
        font-weight: 800;
        line-height: 1.22;
        letter-spacing: -0.02em;
        margin-bottom: 0;
        color: #0f172a;
        flex: 1 1 auto;
        min-width: 0;
    }
    body.home-theme-light .home-page .home-wizard-banner-text {
        position: relative;
        z-index: 1;
        font-size: 0.8125rem;
        line-height: 1.45;
        color: #3f3f46;
        flex: 0 0 auto;
    }
    body.home-theme-light .home-page .home-wizard-banner-cta {
        position: relative;
        z-index: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
        align-self: flex-start;
        width: auto;
        padding: 0.42rem 0.85rem;
        border-radius: 8px;
        background: #dc2626;
        border: 1px solid #dc2626;
        color: #ffffff;
        font-size: 0.78rem;
        font-weight: 700;
        letter-spacing: 0.02em;
        text-transform: none;
        transition: background 0.15s ease, border-color 0.15s ease;
    }
    body.home-theme-light .home-page .home-wizard-banner:hover .home-wizard-banner-cta {
        background: #b91c1c;
        border-color: #b91c1c;
    }
    body.home-theme-light .home-page .home-wizard-banner-cta i { font-size: 0.68rem; opacity: 0.9; }
    body.home-theme-light .home-page .home-wizard-banner-note {
        position: relative;
        z-index: 1;
        margin-top: 0;
        font-size: 0.7rem;
        line-height: 1.4;
        color: #52525b;
        text-align: left;
    }

    body.home-theme-dark .home-page .home-wizard-banner {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        text-decoration: none;
        color: #f8fafc;
        border-radius: 10px;
        padding: 0.8rem 0.85rem 0.85rem;
        background: linear-gradient(165deg, #1e293b 0%, #151f2e 55%, #0f172a 100%);
        border: 1px solid #334155;
        box-shadow:
            0 1px 0 rgba(255, 255, 255, 0.04) inset,
            0 4px 14px rgba(0, 0, 0, 0.35);
        overflow: hidden;
        position: relative;
        transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    }
    body.home-theme-dark .home-page .home-wizard-banner:focus-visible {
        outline: 2px solid #f87171;
        outline-offset: 3px;
    }
    body.home-theme-dark .home-page .home-wizard-banner::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 3px;
        background: #ef4444;
        pointer-events: none;
    }
    body.home-theme-dark .home-page .home-wizard-banner:hover {
        transform: translateY(-1px);
        border-color: #64748b;
        box-shadow:
            0 1px 0 rgba(255, 255, 255, 0.06) inset,
            0 6px 22px rgba(0, 0, 0, 0.45),
            0 0 0 1px rgba(248, 113, 113, 0.12);
        color: #ffffff;
    }
    body.home-theme-dark .home-page .home-wizard-banner-head {
        position: relative;
        z-index: 1;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.35rem 0.5rem;
        margin-bottom: 0.15rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    }
    body.home-theme-dark .home-page .home-wizard-banner-body {
        position: relative;
        z-index: 1;
        display: flex;
        flex-direction: column;
        gap: 0.55rem;
        margin-top: 0.5rem;
        flex: 1 1 auto;
        min-height: 0;
    }
    body.home-theme-dark .home-page .home-wizard-banner-body p {
        margin: 0;
    }
    body.home-theme-dark .home-page .home-wizard-banner-actions {
        margin: 0;
    }
    body.home-theme-dark .home-page .home-wizard-banner-kicker {
        position: relative;
        z-index: 1;
        display: inline-block;
        font-size: 0.58rem;
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: #fecaca;
        padding: 0.12rem 0.4rem;
        border-radius: 9999px;
        background: rgba(239, 68, 68, 0.15);
        border: 1px solid rgba(248, 113, 113, 0.25);
        margin-bottom: 0;
    }
    body.home-theme-dark .home-page .home-wizard-banner-title {
        position: relative;
        z-index: 1;
        font-size: clamp(1rem, 2.1vw, 1.15rem);
        font-weight: 800;
        line-height: 1.22;
        letter-spacing: -0.02em;
        margin-bottom: 0;
        color: #f1f5f9;
        flex: 1 1 auto;
        min-width: 0;
    }
    body.home-theme-dark .home-page .home-wizard-banner-text {
        position: relative;
        z-index: 1;
        font-size: 0.875rem;
        line-height: 1.48;
        color: #e2e8f0;
        flex: 0 0 auto;
    }
    body.home-theme-dark .home-page .home-wizard-banner-cta {
        position: relative;
        z-index: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
        align-self: flex-start;
        width: auto;
        padding: 0.45rem 0.95rem;
        border-radius: 8px;
        background: #dc2626;
        border: 1px solid #f87171;
        color: #ffffff;
        font-size: 0.8125rem;
        font-weight: 700;
        letter-spacing: 0.02em;
        text-transform: none;
        transition: background 0.15s ease, border-color 0.15s ease;
    }
    body.home-theme-dark .home-page .home-wizard-banner:hover .home-wizard-banner-cta {
        background: #b91c1c;
        border-color: #fca5a5;
    }
    body.home-theme-dark .home-page .home-wizard-banner-cta i { font-size: 0.72rem; opacity: 0.95; }
    body.home-theme-dark .home-page .home-wizard-banner-note {
        position: relative;
        z-index: 1;
        margin-top: 0;
        font-size: 0.75rem;
        line-height: 1.42;
        color: #cbd5e1;
        text-align: left;
    }

    .home-left-col {
        display: flex;
        flex-direction: column;
        gap: 12px;
        position: sticky;
        top: 60px;
        z-index: 1;
        align-self: start;
        align-content: flex-start;
        max-height: calc(100vh - 72px);
        max-height: calc(100dvh - 72px);
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
        padding-right: 2px;
    }
    .home-left-col > *,
    .home-right-col > * {
        flex: 0 0 auto;
        flex-shrink: 0;
        min-height: min-content;
    }
    .home-left-col::-webkit-scrollbar { width: 6px; }
    .home-left-col::-webkit-scrollbar-thumb {
        background: rgba(100, 116, 139, 0.4);
        border-radius: 6px;
    }
    .home-left-col .home-estabs-card { margin-top: 0; }
    .home-right-col .home-integrations-card { margin-top: 0; }
    /* Una sola barra de scroll por columna lateral (no scroll anidado) */
    .home-left-col .home-estabs-list,
    .home-right-col .home-integrations-tree {
        max-height: none;
        overflow: visible;
    }

    .home-middle-col {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        min-width: 0;
    }
    .home-middle-col .home-feed {
        padding-left: 0;
        padding-right: 0;
        width: 100%;
        max-width: 720px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Asegurar que el carrusel de cupones ocupe SOLO el ancho del centro */
    .home-middle-col .home-cupones,
    .home-middle-col .home-spotlight-middle {
        width: 100%;
        max-width: 720px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Panel derecho */
    .home-integrations-card {
        background: #ffffff;
        border: 1px solid #e5e7eb;
        border-radius: 18px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.04);
        overflow: hidden;
    }
    .home-integrations-header {
        padding: 14px 14px 10px;
        border-bottom: 1px solid #f1f5f9;
    }
    .home-integrations-title {
        margin: 0;
        font-size: 1rem;
        font-weight: 800;
        color: #0f172a;
    }
    .home-integrations-subtitle {
        margin: 6px 0 0;
        font-size: 0.8125rem;
        color: #64748b;
        line-height: 1.25;
    }
    .home-integrations-tree {
        max-height: min(42vh, 360px);
        overflow: auto;
        padding: 10px 10px 14px;
    }
    .home-integrations-group {
        padding: 10px 10px;
        border: 1px solid #f1f5f9;
        border-radius: 14px;
        background: #fbfdff;
        margin-bottom: 10px;
    }
    .home-integrations-group--accordion {
        padding: 0;
        overflow: hidden;
    }
    .home-integrations-group-trigger {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin: 0;
        padding: 10px 12px;
        border: none;
        background: transparent;
        cursor: pointer;
        text-align: left;
        font-family: inherit;
        color: inherit;
    }
    .home-integrations-group-trigger-main {
        display: flex;
        align-items: center;
        gap: 4px;
        min-width: 0;
        flex: 1 1 auto;
    }
    .home-integrations-group-chevron {
        font-size: 1.25rem;
        line-height: 1;
        color: #64748b;
        flex-shrink: 0;
        transition: transform 0.22s ease;
    }
    .home-integrations-group.is-open .home-integrations-group-chevron {
        transform: rotate(180deg);
    }
    .home-integrations-group-panel {
        display: grid;
        grid-template-rows: 0fr;
        transition: grid-template-rows 0.28s ease;
    }
    .home-integrations-group.is-open .home-integrations-group-panel {
        grid-template-rows: 1fr;
    }
    .home-integrations-group-panel-inner {
        overflow: hidden;
        min-height: 0;
        padding: 0 10px;
    }
    .home-integrations-group.is-open .home-integrations-group-panel-inner {
        padding: 0 10px 12px;
    }
    .home-integrations-group-title {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 8px;
    }
    .home-integrations-group-title-name {
        font-weight: 900;
        color: #0f172a;
        font-size: 0.93rem;
    }
    .home-integrations-group-title-count {
        font-size: 0.78rem;
        color: #64748b;
        font-weight: 600;
        white-space: nowrap;
    }

    .home-integrations-sub-title {
        font-size: 0.86rem;
        font-weight: 800;
        color: #2563eb;
        margin: 10px 0 6px;
    }
    .home-integrations-est-list {
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding-bottom: 2px;
    }
    .home-integrations-est {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px 10px;
        border-radius: 12px;
        border: 1px solid #f1f5f9;
        background: #ffffff;
        text-decoration: none;
        color: inherit;
        transition: background 0.12s ease;
    }
    .home-integrations-est:hover {
        background: #f8fafc;
    }
    .home-integrations-est .home-estab-avatar {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        flex-shrink: 0;
    }
    .home-integrations-est .home-estab-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
    .home-integrations-est-avatar-wrap {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        background: linear-gradient(135deg, #0f172a, #334155);
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        flex-shrink: 0;
    }
    .home-integrations-est-avatar-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
    .home-integrations-est-avatar-fallback {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 900;
        font-size: 0.72rem;
        color: #64748b;
        user-select: none;
    }
    .home-integrations-est-name {
        font-size: 0.8125rem;
        color: #0f172a;
        font-weight: 700;
        min-width: 0;
        flex: 1;
        max-width: 220px;
    }
    .home-integrations-est-chevron {
        flex-shrink: 0;
        color: #cbd5e1;
        font-size: 1.1rem;
    }
    .home-integrations-est-name .home-estab-empresa {
        font-size: 0.8125rem;
    }
    .home-integrations-est-name .home-estab-sede {
        font-size: 0.72rem;
    }

    /* Cupones horizontales (carrusel) en PC */
    .home-cupones { margin-top: 0 !important; }
    .home-cupones-carousel {
        flex-direction: row !important;
        padding: 0 1.25rem 0.75rem !important;
        min-height: calc(var(--cupon-card-h) + 0.5rem) !important;
    }
    #cuponesDots { display: flex !important; }
    .home-cupones-scroll {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0.25rem 0;
        touch-action: pan-x pan-y;
        flex: 1;
        width: auto;
    }
}

/* Celular en horizontal: mantener layout móvil (evitar 3 columnas) */
@media (min-width: 768px) and (max-height: 500px) and (pointer: coarse) {
    .fragment-body.home-desktop-grid {
        display: block !important;
        max-width: none !important;
        padding: 0 !important;
    }
    .home-left-col,
    .home-right-col {
        display: none !important;
    }
    .home-middle-col {
        display: block !important;
        width: 100% !important;
    }
    .home-middle-col .home-cupones,
    .home-middle-col .home-feed {
        width: 100% !important;
        max-width: 680px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    .home-middle-col .home-feed {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    .home-middle-col .home-cupones {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
}

@media (max-width: 767px) {
  .home-right-col { display: none; }
}

.feed-list-app {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

@media (max-width: 767px) {
    .feed-list-app {
        gap: 0;
        padding: 0 0 24px;
        max-width: 100%;
    }
}

.post-app {
    background: #fff;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

@media (max-width: 767px) {
    .post-app {
        border-radius: 0;
        box-shadow: none;
    border: none;
        border-bottom: 1px solid #E5E7EB;
        width: 100%;
        max-width: 100%;
    }
}

/* Bloque único: avatar + meta + caption (estilo Instagram/Facebook) */
.post-top {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 0;
    align-items: start;
    padding: 12px 14px 10px;
    border-bottom: 1px solid #E5E7EB;
}
.post-top-avatar {
    grid-row: 1 / -1;
    align-self: start;
}
.post-top-avatar-link {
    display: block;
    line-height: 0;
    border-radius: 50%;
}
.post-top-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.post-top-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 6px;
    line-height: 1.2;
}
.post-meta-sep {
    color: #9CA3AF;
    font-weight: 700;
    font-size: 0.75rem;
    user-select: none;
    line-height: 1;
}

@media (max-width: 767px) {
    .post-top {
        grid-template-columns: 36px minmax(0, 1fr);
        column-gap: 10px;
        padding: 10px 12px 8px;
    }
}

.post-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

@media (max-width: 767px) {
    .post-avatar {
        width: 2.25rem;
        height: 2.25rem;
    }
}

.post-avatar-wrap {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9CA3AF;
    font-size: 1.125rem;
    flex-shrink: 0;
}

@media (max-width: 767px) {
    .post-avatar-wrap {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 1rem;
    }
}

.post-header-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1F2937;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

@media (max-width: 767px) {
    .post-header-name {
        font-size: 0.8125rem;
    }
}

.post-header-name a {
    color: inherit;
    text-decoration: none;
}

.post-header-name a:hover {
    color: inherit;
    text-decoration: underline;
}

.post-header-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    line-height: 1.3;
    margin-top: 0.125rem;
}
.post-header-title a {
    color: inherit;
    text-decoration: none;
}
.post-header-title a:hover {
    text-decoration: underline;
    color: inherit;
}

.post-header-time {
    font-size: 0.75rem;
    font-weight: 400;
    color: #9CA3AF;
    margin-top: 0;
    line-height: 1.2;
}

@media (max-width: 767px) {
    .post-header-time {
        font-size: 0.6875rem;
    }
}

.post-image-wrap {
    position: relative;
    width: 100%;
    background: #F9FAFB;
}

.post-image-wrap img {
    width: 100%;
    height: auto;
    display: block;
}

/* Imagen de publicación sin deformación (estilo letterbox tipo Instagram) */
.post-image-wrap--image {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #ffffff;
}
body.home-theme-dark .post-image-wrap--image {
    background: #0b1220;
}
.post-image-wrap--image > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}
.post-image-wrap--image .post-media-slider,
.post-image-wrap--image .post-slider-inner,
.post-image-wrap--image .post-slider-slide {
    height: 100%;
}
.post-image-wrap--image .post-slider-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}
.post-image-wrap--image .post-slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* Carga de medios en publicaciones recién insertadas (tiempo real) */
.post-image-wrap.chancay-media-pending {
    min-height: 220px;
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}
body.home-theme-light .post-image-wrap.chancay-media-pending {
    background: linear-gradient(145deg, #e2e8f0 0%, #f1f5f9 50%, #e2e8f0 100%);
}
.post-image-wrap.chancay-media-pending > :not(.chancay-media-loader) {
    opacity: 0;
    transition: opacity 0.45s ease;
}
.post-image-wrap.chancay-media-ready > :not(.chancay-media-loader) {
    opacity: 1;
}
.chancay-media-loader {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}
.chancay-media-loader::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        110deg,
        transparent 0%,
        rgba(99, 102, 241, 0.08) 40%,
        rgba(14, 165, 233, 0.12) 50%,
        rgba(99, 102, 241, 0.08) 60%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: chancayShimmer 1.8s ease-in-out infinite;
}
@keyframes chancayShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.chancay-media-loader-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 28px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
body.home-theme-light .chancay-media-loader-inner {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(148, 163, 184, 0.35);
}
.chancay-media-loader-ring {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid rgba(148, 163, 184, 0.25);
    border-top-color: #6366f1;
    border-right-color: #0ea5e9;
    animation: chancaySpin 0.85s linear infinite;
}
@keyframes chancaySpin {
    to { transform: rotate(360deg); }
}
.chancay-media-loader-text {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #e2e8f0;
}
body.home-theme-light .chancay-media-loader-text {
    color: #475569;
}
.post-image-wrap.chancay-media-ready .chancay-media-loader {
    opacity: 0;
    visibility: hidden;
}
.post-image-wrap.chancay-media-ready {
    min-height: 0;
}

/* Sliders de imágenes en posts */
.post-media-slider,
.post-media-video-slider,
.post-embedded-slider-wrap {
    position: relative;
    overflow: hidden;
}

.post-slider-inner,
.post-embedded-slider {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-slider-slide,
.post-embedded-slide {
    flex: 0 0 100%;
    width: 100%;
}

.post-slider-slide img,
.post-slider-slide video,
.post-embedded-slide iframe,
.post-embedded-slide video {
    width: 100%;
    height: auto;
    display: block;
}

.post-media-embedded iframe,
.post-media-video video,
.feed-video-player .feed-video-el {
    width: 100%;
    aspect-ratio: 16/9;
}

/* Reproductor MP4 en feed — controles personalizados */
.feed-video-player {
    position: relative;
    width: 100%;
    background: #0a0f14;
    overflow: hidden;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.feed-video-player .feed-video-el {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #0a0f14;
    vertical-align: top;
}
.feed-video-big-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 3.5rem;
    height: 3.5rem;
    border: none;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    cursor: pointer;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: transform 0.2s ease, opacity 0.25s ease, background 0.2s ease;
}
.feed-video-big-play i {
    font-size: 1.15rem;
    margin-left: 0.15rem;
}
.feed-video-big-play:hover {
    transform: translate(-50%, -50%) scale(1.06);
    background: rgba(188, 0, 31, 0.88);
}
.feed-video-player.is-playing .feed-video-big-play {
    opacity: 0;
    pointer-events: none;
}
.feed-video-player .feed-video-controls {
    z-index: 4;
}
.feed-video-player.is-paused .feed-video-controls,
.feed-video-player:hover .feed-video-controls,
.feed-video-player:focus-within .feed-video-controls {
    opacity: 1;
}
.feed-video-player.is-playing:not(:hover):not(:focus-within) .feed-video-controls {
    opacity: 0;
}
.feed-video-player.is-playing:not(:hover):not(:focus-within) .feed-video-controls:focus-within {
    opacity: 1;
}
.publication-modal-video-wrap.is-playing:not(:hover):not(:focus-within) .pub-video-controls {
    opacity: 0;
}
.publication-modal-video-wrap.is-playing:not(:hover):not(:focus-within) .pub-video-controls:focus-within {
    opacity: 1;
}

@media (max-width: 767px) {
    .post-app .post-media-video,
    .post-app .post-media-video-slider .post-slider-slide {
        min-height: 0;
        max-height: none;
    }
    .post-app .feed-video-player .feed-video-el {
        aspect-ratio: unset;
        min-height: 50vh;
        max-height: 85vh;
        object-fit: contain;
    }
    .post-app .post-media-video-slider {
        min-height: 0;
        max-height: none;
    }
    .feed-video-big-play {
        width: 3rem;
        height: 3rem;
    }
    .feed-video-big-play i {
        font-size: 1rem;
    }
}

/* Reproductor EN VIVO (HLS) — feed y modal */
.post-media-live,
.post-app .post-media-live {
    width: 100%;
    background: #0a0f14;
}
.feed-live-player {
    position: relative;
    width: 100%;
    background: #0a0f14;
    overflow: hidden;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    border-radius: 0;
}
.feed-live-player .feed-live-el {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #0a0f14;
    vertical-align: top;
}
.feed-live-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px 5px 8px;
    border-radius: 999px;
    background: rgba(188, 0, 31, 0.92);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: 0 4px 16px rgba(188, 0, 31, 0.45);
    pointer-events: none;
}
.feed-live-badge--modal {
    top: 14px;
    left: 14px;
}
.feed-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    flex-shrink: 0;
    animation: feed-live-pulse 1.2s ease-in-out infinite;
}
@keyframes feed-live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.82); }
}
.feed-live-big-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 4rem;
    height: 4rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    background: rgba(188, 0, 31, 0.88);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    cursor: pointer;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.45);
    transition: transform 0.2s ease, opacity 0.25s ease, background 0.2s ease;
}
.feed-live-big-play i {
    font-size: 1.25rem;
    margin-left: 0.2rem;
}
.feed-live-big-play:hover {
    transform: translate(-50%, -50%) scale(1.06);
    background: rgba(220, 20, 50, 0.95);
}
.feed-live-player.is-playing .feed-live-big-play,
.feed-live-player.is-loading .feed-live-big-play {
    opacity: 0;
    pointer-events: none;
}
.feed-live-loading {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(10, 15, 20, 0.72);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    pointer-events: none;
}
.feed-live-player.is-loading .feed-live-loading {
    display: flex;
}
.feed-live-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: #bc001f;
    border-radius: 50%;
    animation: feed-live-spin 0.75s linear infinite;
}
@keyframes feed-live-spin {
    to { transform: rotate(360deg); }
}
.feed-live-error {
    position: absolute;
    inset: 0;
    z-index: 7;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    text-align: center;
    background: rgba(10, 15, 20, 0.88);
    color: #fff;
    font-size: 0.85rem;
}
.feed-live-error i {
    font-size: 1.5rem;
    color: #fbbf24;
}
.feed-live-retry {
    margin-top: 4px;
    padding: 8px 16px;
    border: none;
    border-radius: 999px;
    background: #bc001f;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}
.feed-live-retry:hover {
    background: #d40024;
}
.feed-live-controls {
    z-index: 4;
}
.feed-live-player.is-paused .feed-live-controls,
.feed-live-player:hover .feed-live-controls,
.feed-live-player:focus-within .feed-live-controls {
    opacity: 1;
}
.feed-live-player.is-playing:not(:hover):not(:focus-within) .feed-live-controls {
    opacity: 0;
}
.feed-live-player.is-playing:not(:hover):not(:focus-within) .feed-live-controls:focus-within {
    opacity: 1;
}
.pub-video-live-pill {
    flex: 1;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(188, 0, 31, 0.55);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.publication-modal-video-wrap.is-live .pub-video-progress-wrap {
    display: none !important;
}
.publication-modal-video-wrap.is-live .pub-video-live-pill,
.publication-modal-video-wrap.is-live [data-pub-modal-live-pill] {
    display: inline-flex !important;
}
.publication-modal-video-wrap.is-live [data-pub-modal-live-badge] {
    display: inline-flex !important;
}
.publication-modal-video-wrap.is-live .feed-live-loading--modal,
.publication-modal-video-wrap.is-loading .feed-live-loading--modal {
    display: flex;
    position: absolute;
    inset: 0;
    z-index: 6;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(10, 15, 20, 0.72);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
}
.publication-modal-video-wrap.has-error .feed-live-error--modal {
    display: flex;
    position: absolute;
    inset: 0;
    z-index: 7;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    background: rgba(10, 15, 20, 0.88);
    color: #fff;
    text-align: center;
}

@media (max-width: 767px) {
    .feed-live-player .feed-live-el {
        aspect-ratio: unset;
        min-height: 50vh;
        max-height: 85vh;
        object-fit: contain;
    }
    .feed-live-big-play {
        width: 3.25rem;
        height: 3.25rem;
    }
    .feed-live-big-play i {
        font-size: 1rem;
    }
    .feed-live-badge {
        top: 10px;
        left: 10px;
        font-size: 0.62rem;
        padding: 4px 9px 4px 7px;
    }
    .pub-video-live-pill {
        font-size: 0.62rem;
        padding: 3px 8px;
    }
    .pub-video-btn {
        width: 34px;
        height: 34px;
    }
}

.post-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #1F2937;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.2s;
    z-index: 2;
}

@media (max-width: 767px) {
    .post-slider-arrow {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.75rem;
    }
}

.post-slider-arrow:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.post-slider-arrow.prev {
    left: 0.75rem;
}

.post-slider-arrow.next {
    right: 0.75rem;
}

@media (max-width: 767px) {
    .post-slider-arrow.prev {
        left: 0.5rem;
    }
    .post-slider-arrow.next {
        right: 0.5rem;
    }
}

.post-slider-dots {
    position: absolute;
    bottom: 0.75rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.375rem;
    z-index: 2;
}

@media (max-width: 767px) {
    .post-slider-dots {
        bottom: 0.5rem;
        gap: 0.3125rem;
    }
}

.post-slider-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s;
}

@media (max-width: 767px) {
    .post-slider-dot {
        width: 0.4375rem;
        height: 0.4375rem;
    }
}

.post-slider-dot.active {
    background: #fff;
    width: 1rem;
    border-radius: 0.25rem;
}

@media (max-width: 767px) {
    .post-slider-dot.active {
        width: 0.875rem;
    }
}

.post-slider-counter {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    z-index: 2;
}

@media (max-width: 767px) {
    .post-slider-counter {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 0.6875rem;
        padding: 0.1875rem 0.4375rem;
    }
}

.post-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #F3F4F6;
    min-height: 0;
}

@media (max-width: 767px) {
    .post-actions {
        padding: 0.4375rem 0.875rem;
    }
}

.post-actions-counts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    width: 100%;
}

.post-actions-count-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    min-width: 0;
}

.post-actions-count-label { display: none; }

.post-actions-count-col--left {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    gap: 0.35rem;
    width: 100%;
}

.post-actions-count-col--right {
    align-items: flex-end;
    justify-content: flex-end;
    text-align: right;
    width: 100%;
}

.post-actions-counts-right-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    width: 100%;
}

.post-actions-count-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
}

.post-actions-count-item i {
    font-size: 1rem;
}

.post-actions-count-fav-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6B7280;
    line-height: 1.1;
}

.post-actions-count-heart {
    font-size: 1rem;
    color: #6B7280;
    line-height: 1;
}

/* Corazón superior (fila decorativa): siempre rojo */
.post-actions-count-col--left .post-actions-count-heart {
    color: #EF4444 !important;
}

.post-actions-count-col--left .post-action-count {
    color: #6B7280 !important;
}

.home-page .post-actions-count-heart,
.home-page .post-actions-count-fav-text {
    color: var(--text-muted) !important;
}

.post-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    justify-items: center;
    width: 100%;
    gap: 0;
}

.post-actions--2cols .post-actions-grid { grid-template-columns: 1fr 1fr; justify-items: center; }

.post-action-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: none;
    border: none;
    color: #6B7280;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
    justify-content: center;
    width: auto;
    flex-direction: row;
    white-space: nowrap;
}

/* Alinear botones a sus lados tipo Facebook */
.post-actions-grid .btn-like { justify-content: center; }
.post-actions-grid .btn-comments { justify-content: center; }
.post-actions-grid .btn-fav { justify-content: center; }

/* Contadores dentro del botón (estilo Facebook) */
.post-action-btn .post-action-count {
    display: inline-block;
    margin-left: 6px;
}

.post-actions-grid .btn-like .post-action-count { text-align: left; }
.post-actions-grid .btn-fav .post-action-count { text-align: right; }

@media (max-width: 767px) {
    .post-action-btn {
        gap: 0.3125rem;
        font-size: 0.8125rem;
        padding: 0.25rem 0.375rem;
    }
}

.post-action-btn:hover {
    background: #F3F4F6;
    color: #374151;
}

.post-action-btn i {
    font-size: 1.375rem;
}

/* En este diseño, los contadores se muestran arriba (fuera del botón),
   así que el botón solo muestra icono. */
.post-actions-grid .post-action-btn {
    padding: 0.2rem 0.5rem;
    width: 100%;
    min-width: 0;
}

@media (max-width: 767px) {
    .post-action-btn i {
        font-size: 1.25rem;
    }
}

.post-action-count {
    font-size: 0.875rem;
    color: #6B7280;
}

.post-actions-count-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6B7280;
    line-height: 1;
}

.post-actions-count-text.fav-active-text {
    color: #EAB308 !important;
}

.post-action-count.like-active-count {
    color: #EF4444 !important;
}

.post-actions-count-heart.like-active {
    color: #EF4444 !important;
}

.post-actions-count-col--left .post-actions-count-heart.like-active {
    color: #EF4444 !important;
}

.post-action-count.fav-active-count {
    color: #EAB308 !important;
}

.post-actions-count-bookmark.fav-active {
    color: #EAB308 !important;
}

.post-actions-grid .post-action-btn:hover i { color: inherit; }

.post-action-btn-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6B7280;
    line-height: 1;
}

@media (max-width: 767px) {
    .post-action-count {
        font-size: 0.8125rem;
    }
}

.btn-fav.fav-active {
    color: #EAB308 !important;
    transform: scale(1.08);
}
.btn-like.like-active {
    color: #EF4444 !important;
    transform: scale(1.08);
}
.post-action-btn.btn-like,
.post-action-btn.btn-fav {
    transition: color 0.2s, transform 0.2s;
}
.post-action-btn.btn-like:active,
.post-action-btn.btn-fav:active {
    transform: scale(0.95);
}
.post-action-btn.btn-like.like-active:active,
.post-action-btn.btn-fav.fav-active:active {
    transform: scale(1.02);
}

.post-likes-line {
    padding: 0.625rem 1rem;
    border-bottom: 1px solid #F3F4F6;
}

@media (max-width: 767px) {
    .post-likes-line {
        padding: 0.5rem 0.875rem;
    }
}

.like-count-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1F2937;
}

@media (max-width: 767px) {
    .like-count-text {
        font-size: 0.8125rem;
    }
}

.post-caption {
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: #1F2937;
}

/* Caption dentro del bloque unificado: sin padding extra (compacto) */
.post-top-main .post-caption {
    padding: 0;
    margin: 0;
    border: none;
    font-size: 0.875rem;
    line-height: 1.45;
    letter-spacing: -0.01em;
    color: #1F2937;
}

/* Descripción bajo nombre·tiempo (feed unificado) */
.post-caption-below-date {
    margin-bottom: 0;
}

@media (max-width: 767px) {
    .post-caption {
        padding: 0.625rem 0.875rem;
        font-size: 0.875rem;
        line-height: 1.45;
    }
    .post-top-main .post-caption {
        font-size: 0.8125rem;
        line-height: 1.42;
    }
}

.post-caption-name {
    font-weight: 600;
    color: #1F2937;
}

.post-caption-name a {
    color: inherit;
    text-decoration: none;
}

.post-caption-name a:hover {
    color: inherit;
    text-decoration: underline;
}

.post-caption-more-wrap,
.post-caption-less {
    cursor: pointer;
}

.post-caption-more,
.post-caption-less {
    color: #000;
    font-weight: 700;
    text-decoration: none;
}

.post-caption-more-wrap:hover .post-caption-more,
.post-caption-less:hover {
    color: #000;
    text-decoration: underline;
}

.post-view-comments {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: #9CA3AF;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: left;
    padding: 0.625rem 1rem;
    cursor: pointer;
    transition: color 0.2s;
}

@media (max-width: 767px) {
    .post-view-comments {
        font-size: 0.8125rem;
        padding: 0.5rem 0.875rem;
    }
}

.post-view-comments:hover {
    color: #6B7280;
}

.post-comments-box {
    border-top: 1px solid #F3F4F6;
    padding: 0.75rem 1rem;
}

@media (max-width: 767px) {
    .post-comments-box {
        padding: 0.625rem 0.875rem;
    }
}

.comments-list {
    margin-bottom: 0.75rem;
}

@media (max-width: 767px) {
    .comments-list {
        margin-bottom: 0.625rem;
    }
}

.post-comment-item {
    padding: 0.5rem 0;
    font-size: 0.875rem;
    line-height: 1.45;
    color: #374151;
}

@media (max-width: 767px) {
    .post-comment-item {
        padding: 0.4375rem 0;
        font-size: 0.8125rem;
    }
}

.post-comment-form {
    display: flex;
    gap: 0.625rem;
    align-items: center;
}

@media (max-width: 767px) {
    .post-comment-form {
        gap: 0.5rem;
    }
}

.comment-input {
    flex: 1;
    padding: 0.625rem 0.875rem;
    border: 1px solid #E5E7EB;
    border-radius: 1.25rem;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s;
}

@media (max-width: 767px) {
    .comment-input {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }
}

.comment-input:focus {
    border-color: #EC4899;
}

.btn-send {
    background: linear-gradient(135deg, #EC4899, #F43F5E);
    color: #fff;
    border: none;
    padding: 0.625rem 1rem;
    border-radius: 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .btn-send {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
    }
}

.btn-send:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

/* ===== BOTTOM SHEET COMENTARIOS (estilo Instagram/Facebook) ===== */
.comments-sheet {
    position: fixed;
    inset: 0;
    z-index: 1000;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0.25s;
}
.comments-sheet.is-open {
    visibility: visible;
    pointer-events: auto;
}
.comments-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.comments-sheet.is-open .comments-sheet-backdrop { opacity: 1; }
.comments-sheet-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 85vh;
    background: var(--card, #fff);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}
.comments-sheet.is-open .comments-sheet-panel { transform: translateY(0); }
.comments-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border, #eee);
    flex-shrink: 0;
}
.comments-sheet-title { margin: 0; font-size: 1rem; font-weight: 600; color: var(--text, #111); }
.comments-sheet-close {
    width: 36px; height: 36px;
    border: none; background: none;
    color: #666; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}
.comments-sheet-close:hover { background: #f3f4f6; color: #111; }
@media (max-width: 767px) {
    .comments-sheet-close {
        width: 40px;
        height: 40px;
        font-size: 1.125rem;
    }
}
.comments-sheet-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    min-height: 80px;
    max-height: 50vh;
}
.comments-sheet-form-wrap {
    padding: 12px 16px 16px;
    border-top: 1px solid var(--border, #eee);
    flex-shrink: 0;
    background: var(--card, #fff);
}
.comments-sheet-form {
    display: flex;
    gap: 10px;
    align-items: center;
}
.comments-sheet-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #E5E7EB;
    border-radius: 20px;
    font-size: 0.9375rem;
    outline: none;
    transition: border-color 0.2s;
}
.comments-sheet-input:focus { border-color: #EC4899; }
.comments-sheet-send {
    background: linear-gradient(135deg, #EC4899, #F43F5E);
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

/* ===== OVERLAY FOTO + COMENTARIOS ===== */
.photo-overlay {
    position: fixed;
    inset: 0;
    z-index: 1001;
    background: #000;
    display: none;
    flex-direction: column;
}
.photo-overlay.is-open { display: flex; }
.photo-overlay-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(0,0,0,0.5);
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: background 0.2s;
}
.photo-overlay-close:hover { background: rgba(0,0,0,0.7); }
.photo-overlay-comments-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.photo-overlay-close-panel {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #374151;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    transition: background 0.2s, color 0.2s;
}
.photo-overlay-close-panel:hover { background: #f3f4f6; color: #111; }
.photo-overlay-content {
    flex: 1;
    display: flex;
    min-height: 0;
}
.photo-overlay-media {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    min-width: 0;
}
.photo-overlay-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}
.photo-overlay-comments {
    width: 360px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    background: var(--card, #fff);
    border-left: 1px solid var(--border, #eee);
}
.photo-overlay-comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border, #eee);
}
.photo-overlay-comments-title { font-size: 0.9375rem; font-weight: 600; color: var(--text, #111); }
.photo-overlay-open-sheet {
    background: none;
    border: none;
    color: #EC4899;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
}
.photo-overlay-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    min-height: 60px;
}
.photo-overlay-form-wrap {
    padding: 12px 16px;
    border-top: 1px solid var(--border, #eee);
}
.photo-overlay-form {
    display: flex;
    gap: 8px;
    align-items: center;
}
.photo-overlay-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #E5E7EB;
    border-radius: 20px;
    font-size: 0.875rem;
    outline: none;
}
.photo-overlay-send {
    background: linear-gradient(135deg, #EC4899, #F43F5E);
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
}
@media (max-width: 767px) {
    .photo-overlay-close {
        top: 8px;
        right: 8px;
        width: 40px;
        height: 40px;
        font-size: 1.125rem;
    }
    .photo-overlay-content { flex-direction: column; }
    .photo-overlay-comments {
        width: 100%;
        max-height: 45vh;
        border-left: none;
        border-top: 1px solid var(--border, #eee);
    }
    .photo-overlay-close-panel {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
}

/* ===== VENTANA FLOTANTE PUBLICACIÓN (estilo Facebook) ===== */
.publication-modal {
    position: fixed;
    inset: 0;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0.2s;
}
.publication-modal.is-open {
    visibility: visible;
    pointer-events: auto;
}
.publication-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.publication-modal.is-open .publication-modal-backdrop { opacity: 1; }
.publication-modal-panel {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    background: var(--card, #fff);
    border-radius: 12px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.publication-modal.is-open .publication-modal-panel {
    transform: scale(1);
    opacity: 1;
}
.publication-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0,0,0,0.5);
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    transition: background 0.2s;
}
.publication-modal-close:hover { background: rgba(0,0,0,0.7); }
.publication-modal-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}
.publication-modal-media {
    flex-shrink: 0;
    width: 100%;
    max-height: 58vh;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    position: relative;
}
.publication-modal-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.publication-modal-gallery-nav:hover {
    background: #ffffff;
}
.publication-modal-gallery-prev {
    left: 12px;
}
.publication-modal-gallery-next {
    right: 12px;
}
.publication-modal-gallery-counter {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 4;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    align-items: center;
}
.publication-modal-img {
    max-width: 100%;
    max-height: 58vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}
.publication-modal-video-wrap {
    position: relative;
    width: 100%;
    max-height: 58vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}
.publication-modal-video-wrap .publication-modal-video {
    max-width: 100%;
    max-height: 58vh;
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    vertical-align: top;
}
.pub-video-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 28px 12px 10px;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.55) 45%, rgba(0, 0, 0, 0.88) 100%);
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 1;
    transition: opacity 0.25s ease;
}
.publication-modal-video-wrap.is-paused .pub-video-controls,
.publication-modal-video-wrap:hover .pub-video-controls {
    opacity: 1;
}
.publication-modal-video-wrap .pub-video-controls.hide-controls {
    opacity: 0;
}
.publication-modal-video-wrap:hover .pub-video-controls.hide-controls {
    opacity: 1;
}
.pub-video-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.95);
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
    flex-shrink: 0;
}
.pub-video-btn:hover {
    background: rgba(255,255,255,0.18);
    color: #fff;
    transform: scale(1.05);
}
.pub-video-btn:active {
    transform: scale(0.96);
}
.pub-video-btn i {
    font-size: 0.95rem;
    pointer-events: none;
}
.pub-video-play i.fa-play { display: inline-block; }
.pub-video-play i.fa-pause { display: none; }
.is-playing .pub-video-play i.fa-play,
.feed-video-player.is-playing .pub-video-play i.fa-play,
.publication-modal-video-wrap.is-playing .pub-video-play i.fa-play { display: none; }
.is-playing .pub-video-play i.fa-pause,
.feed-video-player.is-playing .pub-video-play i.fa-pause,
.publication-modal-video-wrap.is-playing .pub-video-play i.fa-pause { display: inline-block; }
.pub-video-progress-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pub-video-progress {
    flex: 1;
    height: 5px;
    background: rgba(255,255,255,0.28);
    border-radius: 999px;
    cursor: pointer;
    overflow: hidden;
    min-width: 48px;
    position: relative;
}
.pub-video-progress:hover {
    height: 7px;
}
.pub-video-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #bc001f, #ef4444);
    border-radius: 999px;
    transition: width 0.05s linear;
    box-shadow: 0 0 8px rgba(188, 0, 31, 0.45);
}
.pub-video-time,
.pub-video-duration {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.92);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.pub-video-volume i.fa-volume-mute { display: none; }
.pub-video-volume.is-muted i.fa-volume-up { display: none; }
.pub-video-volume.is-muted i.fa-volume-mute { display: inline-block; }
.publication-modal-video,
.publication-modal-embed {
    max-width: 100%;
    max-height: 58vh;
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}
.publication-modal-embed {
    min-height: 280px;
    border: none;
}
.publication-modal-side {
    flex-shrink: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border, #eee);
}
.publication-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border, #eee);
    flex-shrink: 0;
}
.publication-modal-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.publication-modal-avatar-wrap {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
}
.publication-modal-info { flex: 1; min-width: 0; }
.publication-modal-name { font-weight: 600; font-size: 0.9375rem; color: var(--text, #111); }
.publication-modal-time { font-size: 0.8125rem; margin-top: 2px; }
.publication-modal-caption {
    padding: 12px 16px;
    font-size: 0.9375rem;
    line-height: 1.45;
    color: var(--text, #374151);
    border-bottom: 1px solid var(--border, #eee);
    flex-shrink: 0;
    overflow-y: auto;
    max-height: 120px;
}
.publication-modal-actions {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border, #eee);
    flex-shrink: 0;
}
.publication-modal-stats {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-muted, #6b7280);
    margin-bottom: 8px;
}
.publication-modal-buttons {
    display: flex;
    gap: 8px;
}
.publication-modal-btn {
    background: none;
    border: none;
    color: #65676b;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}
.publication-modal-btn:hover { color: var(--text, #111); }
.publication-modal-btn.btn-like-modal.like-active { color: #ef4444; }
.publication-modal-btn.btn-like-modal.like-active i { font-weight: 900; }
.publication-modal-comments-wrap {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}
.publication-modal-comments-list {
    flex-shrink: 0;
    padding: 12px 16px;
    min-height: 60px;
    max-width: 100%;
    overflow: visible;
}
/* Comentario estilo Facebook: avatar + nombre + texto + fecha */
.comment-item-fb {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border, #f0f2f5);
}
.comment-item-fb:last-child { border-bottom: none; }
.comment-item-fb-avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--border, #e4e6eb);
    display: flex;
    align-items: center;
    justify-content: center;
}
.comment-item-fb-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.comment-item-fb-avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #65676b;
    font-size: 0.875rem;
}
.comment-item-fb-body {
    flex: 1;
    min-width: 0;
}
.comment-item-fb-name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text, #050505);
    margin-bottom: 2px;
}
.comment-item-fb-text {
    font-size: 0.9375rem;
    line-height: 1.35;
    color: var(--text, #050505);
    word-wrap: break-word;
}
.comment-item-fb-meta {
    font-size: 0.8125rem;
    color: var(--text-muted, #65676b);
    margin-top: 4px;
}
.publication-modal-comments-list .post-comment-item {
    padding: 8px 0;
    font-size: 0.9375rem;
    line-height: 1.4;
    color: var(--text, #1c1e21);
    border-bottom: none;
}
.publication-modal-comments-list .post-comment-item strong {
    font-weight: 600;
    margin-right: 4px;
}
.publication-modal-comments-list .post-comment-item .text-muted {
    font-weight: 400;
    color: var(--text-muted, #65676b);
    font-size: 0.8125rem;
}
.publication-modal-form-wrap {
    padding: 12px 16px;
    border-top: 1px solid var(--border, #eee);
    flex-shrink: 0;
}
.publication-modal-form {
    display: flex;
    align-items: center;
    gap: 10px;
}
.publication-modal-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #E5E7EB;
    border-radius: 20px;
    font-size: 0.9375rem;
    outline: none;
    transition: border-color 0.2s;
}
.publication-modal-input:focus { border-color: #EC4899; }
.publication-modal-send {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #65676b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    border-radius: 50%;
    transition: color 0.2s, background 0.2s;
}
.publication-modal-send:hover { color: #EC4899; background: rgba(236,72,153,0.08); }
@media (max-width: 767px) {
    .publication-modal {
        padding: 12px;
        align-items: center;
    }
    .publication-modal-panel {
        max-height: 88vh;
        width: 100%;
        border-radius: 16px;
        box-shadow: 0 16px 56px rgba(0,0,0,0.3);
    }
    .publication-modal-media {
        max-height: 45vh;
        min-height: 120px;
    }
    .publication-modal-img,
    .publication-modal-video-wrap .publication-modal-video,
    .publication-modal-embed {
        max-height: 45vh;
    }
    .publication-modal-video-wrap {
        max-height: 45vh;
    }
    .pub-video-controls {
        padding: 10px 12px 12px;
        gap: 8px;
    }
    .pub-video-btn {
        width: 32px;
        height: 32px;
    }
    .pub-video-btn i { font-size: 0.8rem; }
    .pub-video-time, .pub-video-duration { font-size: 0.65rem; }
    .publication-modal-side {
        border-top: 1px solid var(--border, #eee);
    }
    .publication-modal-close {
        top: 8px;
        right: 8px;
        background: rgba(0,0,0,0.6);
    }
}

/* ===== Modo oscuro minimalista (Index Home) ===== */
.home-page {
    --card: #0b1220;
    --surface: #070a12;
    --border: #1f2937;
    --text: #e5e7eb;
    --text-muted: #94a3b8;

    background: var(--surface);
    color: var(--text);
}

.app-header {
    /* Header oscuro estilo mapa (alto fijo 60px) */
}

@media (min-width: 768px) {
    /* Mantener el mismo alto del header en claro y oscuro */
    .app-header {
        padding: 0 16px !important;
        height: 60px !important;
        min-height: 60px !important;
        max-height: 60px !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 1000 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        overflow: visible !important;
    }

    body.home-theme-dark .app-header {
        background: #0f172a !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    body.home-theme-dark .app-header .header-nav {
        justify-content: space-evenly !important;
        padding: 0 12px !important;
        gap: 0 !important;
    }

    /* Ajustar tamaños para que quepa dentro de 60px sin ocultar banner */
    body.home-theme-dark .app-header .header-logo-img {
        width: 40px !important;
        height: 40px !important;
        border-radius: 10px !important;
    }
    /* Barra de búsqueda con campo visible (PC / tablet / móvil vertical) */
    body.home-theme-dark .app-header .header-search-wrap {
        height: 36px !important;
        min-width: 140px !important;
        max-width: min(280px, 32vw) !important;
        width: auto !important;
        flex: 1 1 auto !important;
        background: #0b1220 !important;
        border: 1px solid rgba(148,163,184,0.25) !important;
        border-radius: 10px !important;
    }
    body.home-theme-dark .app-header .header-search-btn {
        width: 36px !important;
        height: auto !important;
        min-height: 100% !important;
        color: rgba(229,231,235,0.9) !important;
    }
    /* Solo móvil horizontal: icono compacto (coherente con header.php) */
    @media (max-width: 768px) and (orientation: landscape) {
        body.home-theme-dark .app-header .header-search-wrap {
            min-width: 36px !important;
            max-width: 36px !important;
            width: 36px !important;
            flex: 0 0 auto !important;
            border-radius: 999px !important;
        }
        body.home-theme-dark .app-header .header-search-btn {
            width: 100% !important;
            height: 100% !important;
        }
    }
    body.home-theme-dark .app-header .header-notif-btn,
    body.home-theme-dark .app-header .header-fav-btn,
    body.home-theme-dark .app-header .header-profile-btn {
        background: #0b1220 !important;
        border-color: rgba(148,163,184,0.25) !important;
        color: rgba(229,231,235,0.95) !important;
    }

    body.home-theme-dark .app-header .header-nav a {
        padding: 6px 12px 8px !important;
        min-width: 58px !important;
    }

    /* Inactivos: texto e iconos blancos (sin fondo); foto Ajustes sin filtro */
    body.home-theme-dark .app-header .header-nav a:not(.active) {
        color: #ffffff !important;
    }
    body.home-theme-dark .app-header .header-nav a:not(.active) span {
        color: #ffffff !important;
    }
    body.home-theme-dark .app-header .header-nav a:not(.active) .header-nav-fa {
        color: #ffffff !important;
    }
    body.home-theme-dark .app-header .header-nav a:not(.active) .header-nav-icon:not(.header-nav-icon-user) {
        filter: brightness(0) invert(1) !important;
        transition: all 0.2s ease !important;
    }
    body.home-theme-dark .app-header .header-nav a:not(.active) .header-nav-icon-user {
        filter: none !important;
    }
    body.home-theme-dark .app-header .header-nav a:not(.active):hover {
        color: #FF1744 !important;
    }
    body.home-theme-dark .app-header .header-nav a:not(.active):hover span {
        color: #FF1744 !important;
    }
    body.home-theme-dark .app-header .header-nav a:not(.active):hover .header-nav-fa {
        color: #FF1744 !important;
    }
    body.home-theme-dark .app-header .header-nav a:not(.active):hover .header-nav-icon:not(.header-nav-icon-user) {
        filter: brightness(0) saturate(100%) invert(27%) sepia(98%) saturate(5000%) hue-rotate(350deg) brightness(95%) contrast(89%) !important;
    }

    body.home-theme-dark .app-header .header-nav a.active {
        color: #FF1744 !important;
    }

    body.home-theme-dark .app-header .header-nav a.active span {
        color: #FF1744 !important;
    }

    body.home-theme-dark .app-header .header-nav a.active .header-nav-fa {
        color: #FF1744 !important;
    }

    body.home-theme-dark .app-header .header-nav a.active .header-nav-icon:not(.header-nav-icon-user) {
        filter: brightness(0) saturate(100%) invert(27%) sepia(98%) saturate(5000%) hue-rotate(350deg) brightness(95%) contrast(89%) !important;
    }

    body.home-theme-dark .app-header .header-nav a.active .header-nav-icon-user {
        filter: none !important;
    }

    body.home-theme-dark .app-header .header-nav a.active::after {
        background: #FF1744 !important;
    }
}

@media (max-width: 767px) {
    body.home-theme-dark .app-header {
        background: #0f172a !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    body.home-theme-dark .app-header .header-search-wrap {
        background: #0b1220 !important;
        border: 1px solid rgba(148,163,184,0.25) !important;
    }
    body.home-theme-dark .app-header .header-search-btn {
        color: rgba(229,231,235,0.95) !important;
    }

    body.home-theme-dark .app-header .header-notif-btn,
    body.home-theme-dark .app-header .header-fav-btn,
    body.home-theme-dark .app-header .header-profile-btn {
        background: #0b1220 !important;
        border-color: rgba(148,163,184,0.25) !important;
        color: rgba(229,231,235,0.95) !important;
    }
}

.home-page .section-title { color: var(--text) !important; }
.home-page .text-muted { color: var(--text-muted) !important; }

/* Cupones */
.home-page .home-cupones-header { background: var(--card) !important; }
.home-page .home-cupones-title {
    color: var(--text) !important;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
}
.home-page .home-cupones-subtitle {
    color: var(--text-muted) !important;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* Modo oscuro: un solo fondo en todo el bloque (título + carrusel + puntos), mismo negro que la franja de cupones */
body.home-theme-dark .home-page .home-cupones {
    background: #000000 !important;
    border-radius: 0;
}
body.home-theme-dark .home-page .home-cupones-header,
body.home-theme-dark .home-page .home-cupones-carousel,
body.home-theme-dark .home-page .home-cupones-dots {
    background: transparent !important;
}
@media (min-width: 1024px) {
    body.home-theme-dark .home-page .home-cupones-arrow {
        background: #1e293b !important;
        color: #e2e8f0 !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.4) !important;
    }
    body.home-theme-dark .home-page .home-cupones-arrow:hover:not(:disabled) {
        background: #334155 !important;
        color: #fff !important;
    }
}
/* Puntos visibles sobre negro (antes parecían “otra franja” por --card) */
body.home-theme-dark .home-page .home-cupon-dot:not(.active) {
    background: rgba(255, 255, 255, 0.28) !important;
}
body.home-theme-dark .home-page .home-cupon-dot:hover:not(.active) {
    background: rgba(255, 255, 255, 0.45) !important;
}
.home-page .home-cupon-card {
    background: #0f172a !important;
    border: 1px solid var(--border) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.45) !important;
}
.home-page .home-cupon-card:hover { border-color: rgba(96,165,250,0.55) !important; }
.home-page .home-cupon-card .cupon-img-wrap { background: #111827 !important; }
.home-page .home-cupon-card .cupon-img-wrap.no-img { color: #64748b !important; }
.home-page .home-cupon-card .cupon-body { background: #0f172a !important; }
.home-page .home-cupon-card .cupon-title { color: var(--text) !important; }
.home-page .home-cupon-card .cupon-establishment { color: #FB7185 !important; }
.home-page .home-cupon-card .cupon-price-line .soles { color: var(--text-muted) !important; }
.home-page .home-cupon-card .cupon-price-line .price-int { color: var(--text) !important; }
.home-page .home-cupon-card .cupon-price-line .price-dec { color: var(--text-muted) !important; }
.home-page .home-cupon-card .cupon-desc { color: var(--text-muted) !important; }
.home-page .home-cupon-card .cupon-footer { border-top: 1px solid rgba(148,163,184,0.25) !important; }
.home-page .home-cupon-card .cupon-ver-mas { color: #ffffff !important; }

/* Perfil + Vistos recientes */
.home-page .home-profile-card,
.home-page .home-recent-card,
.home-page .home-estabs-card,
.home-page .home-spotlight-card,
.home-page .home-estabs-mobile,
.home-page .home-integrations-card {
    background: var(--card) !important;
    border: 1px solid var(--border) !important;
}
.home-page .home-profile-name,
.home-page .home-recent-title,
.home-page .home-card-title,
.home-page .home-integrations-title { color: var(--text) !important; }
.home-page .home-profile-greeting,
.home-page .home-profile-sub,
.home-page .home-card-subtitle,
.home-page .home-recent-chip-meta,
.home-page .home-integrations-subtitle,
.home-page .home-cupones-subtitle { color: var(--text-muted) !important; }
.home-page .home-card-head { border-bottom-color: var(--border) !important; }
.home-page .home-card-link {
    background: #0f172a !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
}
.home-page .home-estabs-search-wrap {
    background: #0f172a !important;
    border-color: var(--border) !important;
}
.home-page .home-estabs-search { color: var(--text) !important; }
.home-page .home-estab-item:hover { background: rgba(255,255,255,0.04) !important; }
.home-page .home-estab-empresa { color: var(--text) !important; }
.home-page .home-estab-sede { color: var(--text-muted) !important; }
.home-page .home-estab-name { color: var(--text) !important; }
.home-page .home-estab-sub { color: var(--text-muted) !important; }
.home-page .home-estabs-state { color: var(--text-muted) !important; }

.home-page .home-profile-link,
.home-page .home-recent-chip {
    background: #0f172a !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
}
.home-page .home-profile-link i { color: #60a5fa !important; }
.home-page .home-theme-toggle-btn {
    background: #0b1220 !important;
    border: 1px solid rgba(148,163,184,0.25) !important;
    color: rgba(229,231,235,0.95) !important;
}
.home-page .home-theme-toggle-btn:hover {
    border-color: rgba(96,165,250,0.55) !important;
}
.home-page .home-recent-chip:hover { background: #0b1220 !important; }
.home-page .home-recent-chip-meta i { color: var(--text-muted) !important; }

/* Integraciones */
.home-page .home-integrations-header { border-bottom: 1px solid var(--border) !important; }
.home-page .home-integrations-tree { color: var(--text) !important; }
.home-page .home-integrations-group {
    background: #0f172a !important;
    border: 1px solid var(--border) !important;
}
.home-page .home-integrations-sub-title { color: #60a5fa !important; }
.home-page .home-integrations-est { color: var(--text) !important; }
.home-page .home-integrations-est {
    background: #0f172a !important;
    border: 1px solid var(--border) !important;
}
.home-page .home-integrations-est-avatar-wrap,
.home-page .home-integrations-est .home-estab-avatar { background: #111827 !important; }
.home-page .home-integrations-est-avatar-fallback,
.home-page .home-integrations-est .home-estab-avatar-fallback { color: #e5e7eb !important; }
.home-page .home-integrations-est-name { color: var(--text) !important; }
.home-page .home-integrations-group-title-name { color: var(--text) !important; }
.home-page .home-integrations-group-title-count { color: var(--text-muted) !important; }
.home-page .home-integrations-est:hover { background: rgba(255,255,255,0.03) !important; }

/* Feed / Publicaciones */
.home-page .post-app {
    background: #0f172a !important;
    border: 1px solid var(--border) !important;
}
.home-page .post-header-name { color: var(--text) !important; }
.home-page .post-header-title { color: var(--text-muted) !important; }
.home-page .post-header-time { color: var(--text-muted) !important; }
.home-page .post-meta-sep { color: var(--text-muted) !important; }
.home-page .post-top { border-bottom-color: var(--border) !important; }
.home-page .post-avatar-wrap { background: #111827 !important; color: #64748b !important; }
.home-page .post-image-wrap { background: #0b1220 !important; }
.home-page .post-image-wrap.chancay-media-pending {
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 50%, #0f172a 100%) !important;
}
.home-page .post-image-wrap.chancay-media-ready {
    background: #0b1220 !important;
}
.home-page .post-actions,
.home-page .post-likes-line { border-bottom: 1px solid var(--border) !important; }
.home-page .post-action-btn { color: var(--text-muted) !important; }
.home-page .post-action-btn:hover { background: rgba(255,255,255,0.04) !important; color: var(--text) !important; }
.home-page .post-actions-count-label { color: var(--text-muted) !important; }
.home-page .post-action-count { color: var(--text-muted) !important; }
.home-page .post-actions-count-col--left .post-actions-count-heart { color: #EF4444 !important; }
.home-page .post-actions-count-text { color: var(--text-muted) !important; }
.home-page .post-actions-count-text.fav-active-text { color: #EAB308 !important; }
.home-page .post-action-count.like-active-count { color: #EF4444 !important; }
.home-page .post-actions-count-heart.like-active { color: #EF4444 !important; }
.home-page .post-action-count.fav-active-count { color: #EAB308 !important; }
.home-page .post-actions-count-bookmark.fav-active { color: #EAB308 !important; }
.home-page .post-action-btn.btn-like.like-active { color: #EF4444 !important; }
.home-page .post-action-btn.btn-fav.fav-active { color: #EAB308 !important; }
.home-page .post-caption,
.home-page .post-caption-name,
.home-page .post-view-comments,
.home-page .like-count-text { color: var(--text) !important; }
.home-page .post-caption-more,
.home-page .post-caption-less { color: var(--text) !important; }

/* Scrollbars pro (Home) */
.home-page .home-integrations-tree,
.home-page .home-recent-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(96,165,250,0.55) rgba(31,41,55,0.25);
}
.home-page .home-integrations-tree::-webkit-scrollbar,
.home-page .home-recent-scroll::-webkit-scrollbar {
    width: 10px;
}
.home-page .home-integrations-tree::-webkit-scrollbar-track,
.home-page .home-recent-scroll::-webkit-scrollbar-track {
    background: rgba(31,41,55,0.18);
    border-radius: 999px;
}
.home-page .home-integrations-tree::-webkit-scrollbar-thumb,
.home-page .home-recent-scroll::-webkit-scrollbar-thumb {
    background: rgba(96,165,250,0.55);
    border-radius: 999px;
    border: 2px solid rgba(31,41,55,0.18);
    background-clip: content-box;
}

/* ===== Modo Claro Overrides (Index Home) ===== */
body.home-theme-light .home-page {
    --card: #ffffff !important;
    --surface: #f8fafc !important;
    --border: #e2e8f0 !important;
    --text: #0f172a !important;
    --text-muted: #64748b !important;
    background: #f8fafc !important;
    color: #0f172a !important;
}

body.home-theme-light .app-header {
    background: var(--card, #ffffff) !important;
    border-bottom: 1px solid var(--border, #e2e8f0) !important;
    backdrop-filter: none !important;
}

body.home-theme-light .home-page .section-title { color: #0f172a !important; }
body.home-theme-light .home-page .text-muted { color: #64748b !important; }

body.home-theme-light .home-page .home-cupones-header { background: #ffffff !important; }
body.home-theme-light .home-page .home-cupones-title {
    color: #1F2937 !important;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
}
body.home-theme-light .home-page .home-cupones-subtitle {
    color: #6B7280 !important;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

@media (min-width: 1024px) {
    body.home-theme-light .home-page .home-cupones-arrow {
        background: #f1f5f9 !important;
        color: #0f172a !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important;
    }
    body.home-theme-light .home-page .home-cupones-arrow:hover:not(:disabled) {
        background: #e2e8f0 !important;
    }
}

body.home-theme-light .home-page .home-cupon-card {
    background: #ffffff !important;
    border: 1px solid #E5E7EB !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
}
body.home-theme-light .home-page .home-cupon-card .cupon-img-wrap { background: #F3F4F6 !important; }
body.home-theme-light .home-page .home-cupon-card .cupon-img-wrap.no-img { color: #9CA3AF !important; }
body.home-theme-light .home-page .home-cupon-card .cupon-body { background: #ffffff !important; }
body.home-theme-light .home-page .home-cupon-card .cupon-title { color: #1F2937 !important; }
body.home-theme-light .home-page .home-cupon-card .cupon-establishment { color: #BE185D !important; }
body.home-theme-light .home-page .home-cupon-card .cupon-price-line .soles,
body.home-theme-light .home-page .home-cupon-card .cupon-price-line .price-dec { color: #64748B !important; }
body.home-theme-light .home-page .home-cupon-card .cupon-price-line .price-int { color: #0F172A !important; }
body.home-theme-light .home-page .home-cupon-card .cupon-desc { color: #9CA3AF !important; }
body.home-theme-light .home-page .home-cupon-card .cupon-footer { border-top: 1px solid #F3F4F6 !important; }

body.home-theme-light .home-page .home-profile-card,
body.home-theme-light .home-page .home-recent-card,
body.home-theme-light .home-page .home-estabs-card,
body.home-theme-light .home-page .home-spotlight-card,
body.home-theme-light .home-page .home-estabs-mobile,
body.home-theme-light .home-page .home-integrations-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}
body.home-theme-light .home-page .home-profile-name,
body.home-theme-light .home-page .home-recent-title,
body.home-theme-light .home-page .home-card-title,
body.home-theme-light .home-page .home-integrations-title { color: #0f172a !important; }
body.home-theme-light .home-page .home-profile-greeting,
body.home-theme-light .home-page .home-profile-sub,
body.home-theme-light .home-page .home-card-subtitle,
body.home-theme-light .home-page .home-recent-chip-meta,
body.home-theme-light .home-page .home-integrations-subtitle,
body.home-theme-light .home-page .home-cupones-subtitle { color: #64748b !important; }
body.home-theme-light .home-page .home-card-head { border-bottom-color: #f1f5f9 !important; }
body.home-theme-light .home-page .home-card-link {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
}
body.home-theme-light .home-page .home-estabs-search-wrap {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}
body.home-theme-light .home-page .home-estab-item:hover { background: #f8fafc !important; }
body.home-theme-light .home-page .home-estab-empresa { color: #0f172a !important; }
body.home-theme-light .home-page .home-estab-sede { color: #64748b !important; }
body.home-theme-light .home-page .home-estab-name { color: #0f172a !important; }

body.home-theme-light .home-page .home-profile-link,
body.home-theme-light .home-page .home-recent-chip {
    background: #ffffff !important;
    border: 1px solid #f1f5f9 !important;
    color: #0f172a !important;
}
body.home-theme-light .home-page .home-profile-link i { color: #2563eb !important; }
body.home-theme-light .home-page .home-recent-chip:hover { background: #f8fafc !important; }
body.home-theme-light .home-page .home-recent-chip-meta i { color: #64748b !important; }

body.home-theme-light .home-page .home-integrations-header { border-bottom: 1px solid #f1f5f9 !important; }
body.home-theme-light .home-page .home-integrations-group { background: #fbfdff !important; border: 1px solid #f1f5f9 !important; }
body.home-theme-light .home-page .home-integrations-tree { color: #0f172a !important; }
body.home-theme-light .home-page .home-integrations-sub-title { color: #2563eb !important; }
body.home-theme-light .home-page .home-integrations-est {
    background: #ffffff !important;
    border: 1px solid #f1f5f9 !important;
}
body.home-theme-light .home-page .home-integrations-est-avatar-wrap,
body.home-theme-light .home-page .home-integrations-est .home-estab-avatar { background: linear-gradient(135deg, #0f172a, #334155) !important; }
body.home-theme-light .home-page .home-integrations-est-avatar-fallback,
body.home-theme-light .home-page .home-integrations-est .home-estab-avatar-fallback { color: #ffffff !important; }
body.home-theme-light .home-page .home-integrations-est-name { color: #0f172a !important; }

body.home-theme-light .home-page .post-app {
    background: #ffffff !important;
    border: 1px solid #E5E7EB !important;
}
body.home-theme-light .home-page .post-image-wrap.chancay-media-pending {
    background: linear-gradient(145deg, #e2e8f0 0%, #f8fafc 50%, #e2e8f0 100%) !important;
}
body.home-theme-light .home-page .post-image-wrap.chancay-media-ready {
    background: #F9FAFB !important;
}

body.home-theme-light .home-theme-toggle-btn {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    color: #0f172a !important;
}

body.home-theme-light .home-page .home-integrations-tree,
body.home-theme-light .home-page .home-recent-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(148,163,184,0.75) rgba(226,232,240,0.95);
}
body.home-theme-light .home-page .home-integrations-tree::-webkit-scrollbar,
body.home-theme-light .home-page .home-recent-scroll::-webkit-scrollbar {
    width: 10px;
}
body.home-theme-light .home-page .home-integrations-tree::-webkit-scrollbar-track,
body.home-theme-light .home-page .home-recent-scroll::-webkit-scrollbar-track {
    background: rgba(226,232,240,0.95);
    border-radius: 999px;
}
body.home-theme-light .home-page .home-integrations-tree::-webkit-scrollbar-thumb,
body.home-theme-light .home-page .home-recent-scroll::-webkit-scrollbar-thumb {
    background: rgba(148,163,184,0.75);
    border-radius: 999px;
    border: 2px solid rgba(226,232,240,0.95);
    background-clip: content-box;
}

/* Para que el dropdown del perfil no quede tapado en PC (index) */
.app-header .header-profile-dropdown { z-index: 20000 !important; }

/*
 * Index — horizontal en móvil (<768px): barra global a la izquierda ~20%, contenido ~80%.
 * No aplica con header coastal (page-coastal-nav): ahí manda css/coastal-header.css.
 * En tablet/PC (≥768px) se mantiene el header arriba y el grid según breakpoint.
 */
@media (orientation: landscape) and (max-width: 767px) {
    /* Altura fija en el viewport: cada columna hace scroll por su cuenta */
    body.page-home:not(.page-coastal-nav) {
        display: flex !important;
        flex-direction: row !important;
        align-items: stretch !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100vh !important;
        max-height: 100dvh !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }
    body.page-home:not(.page-coastal-nav) .app-header {
        position: relative !important;
        top: auto !important;
        inset: auto !important;
        flex: 0 0 clamp(140px, 22vw, 260px) !important;
        width: clamp(140px, 22vw, 260px) !important;
        max-width: min(260px, 28%) !important;
        min-width: 0 !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100vh !important;
        max-height: 100dvh !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        border-bottom: none !important;
        border-right: 1px solid var(--border) !important;
        padding: 12px 8px 14px !important;
        gap: 12px !important;
        z-index: 100 !important;
        scrollbar-width: thin;
        scrollbar-color: rgba(148, 163, 184, 0.55) transparent;
    }
    body.page-home:not(.page-coastal-nav) .app-header::-webkit-scrollbar { width: 6px; }
    body.page-home:not(.page-coastal-nav) .app-header::-webkit-scrollbar-thumb {
        background: rgba(100, 116, 139, 0.45);
        border-radius: 6px;
    }
    body.home-theme-dark.page-home:not(.page-coastal-nav) .app-header {
        border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    }
    body.page-home:not(.page-coastal-nav) .app-header .header-logo {
        order: 1 !important;
        width: 100% !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
    }
    body.page-home:not(.page-coastal-nav) .app-header .header-logo-img {
        width: 40px !important;
        height: 40px !important;
    }
    body.page-home:not(.page-coastal-nav) .app-header .header-nav {
        order: 2 !important;
        width: 100% !important;
        flex: 1 1 auto !important;
        min-height: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: center !important;
        gap: 6px !important;
        margin: 0 !important;
        padding: 4px 2px !important;
        max-height: none !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    body.page-home:not(.page-coastal-nav) .app-header .header-nav.header-nav-hidden {
        max-height: none !important;
        padding-top: 4px !important;
        padding-bottom: 4px !important;
        overflow-y: auto !important;
    }
    /* Ítems tipo app: icono arriba, texto centrado */
    body.page-home:not(.page-coastal-nav) .app-header .header-nav a {
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 4px !important;
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px 6px !important;
        min-height: 48px !important;
        border-radius: 10px !important;
        flex: 0 0 auto !important;
    }
    /* Indicador activo: barra izquierda (no subrayado ancho abajo) */
    body.page-home:not(.page-coastal-nav) .app-header .header-nav a.active::after {
        left: 0 !important;
        right: auto !important;
        bottom: auto !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 3px !important;
        height: 70% !important;
        max-height: 36px !important;
        border-radius: 0 3px 3px 0 !important;
    }
    body.page-home:not(.page-coastal-nav) .app-header .header-nav a span {
        font-size: 0.625rem !important;
        font-weight: 600 !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        text-align: center !important;
        line-height: 1.15 !important;
        max-width: 100% !important;
    }
    body.page-home:not(.page-coastal-nav) .app-header .header-nav a .header-nav-icon {
        width: 24px !important;
        height: 24px !important;
        flex-shrink: 0 !important;
    }
    body.page-home:not(.page-coastal-nav) .app-header .header-actions {
        order: 3 !important;
        width: 100% !important;
        flex: 0 0 auto !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        align-items: center !important;
        min-width: 0 !important;
        padding-top: 4px !important;
    }
    /* Barra lateral home: solo en móvil (≤768px) forzar buscador compacto; tablet landscape puede usar campo */
    @media (max-width: 768px) {
        body.page-home:not(.page-coastal-nav) .app-header .header-search-wrap {
            width: 36px !important;
            max-width: 36px !important;
            min-width: 36px !important;
            flex: 0 0 auto !important;
        }
        body.page-home:not(.page-coastal-nav) .app-header .header-search-inner {
            min-width: 260px !important;
        }
    }
    body.page-home:not(.page-coastal-nav) .app-header .header-profile-wrap {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 10px !important;
        width: 100% !important;
    }
    /* Móvil horizontal: header lateral en 2 columnas internas */
    @media (max-width: 768px) {
        body.page-home:not(.page-coastal-nav) .app-header {
            display: grid !important;
            grid-template-columns: 52px minmax(86px, 1fr) !important;
            grid-auto-rows: min-content !important;
            align-items: start !important;
            justify-content: start !important;
            gap: 8px !important;
            padding: 10px 6px 12px !important;
        }
        body.page-home:not(.page-coastal-nav) .app-header .header-logo {
            grid-column: 1 !important;
            grid-row: 1 !important;
            width: 52px !important;
            justify-content: center !important;
        }
        body.page-home:not(.page-coastal-nav) .app-header .header-actions {
            grid-column: 1 !important;
            grid-row: 2 !important;
            width: 52px !important;
            display: flex !important;
            flex-direction: column !important;
            align-items: center !important;
            justify-content: flex-start !important;
            gap: 8px !important;
            padding-top: 2px !important;
        }
        body.page-home:not(.page-coastal-nav) .app-header .header-search-wrap {
            width: 32px !important;
            min-width: 32px !important;
            max-width: 32px !important;
            height: 32px !important;
        }
        body.page-home:not(.page-coastal-nav) .app-header .header-fav-btn,
        body.page-home:not(.page-coastal-nav) .app-header .header-notif-btn,
        body.page-home:not(.page-coastal-nav) .app-header .header-profile-btn {
            width: 32px !important;
            height: 32px !important;
        }
        body.page-home:not(.page-coastal-nav) .app-header .header-profile-wrap {
            width: 52px !important;
            flex-direction: column !important;
            align-items: center !important;
            gap: 8px !important;
        }
        body.page-home:not(.page-coastal-nav) .app-header .header-nav {
            grid-column: 2 !important;
            grid-row: 1 / span 2 !important;
            width: 100% !important;
            flex: 0 0 auto !important;
            display: flex !important;
            flex-direction: column !important;
            align-items: stretch !important;
            justify-content: flex-start !important;
            gap: 6px !important;
            padding: 2px 0 !important;
            overflow-y: auto !important;
            overflow-x: hidden !important;
        }
        body.page-home:not(.page-coastal-nav) .app-header .header-nav a {
            width: 100% !important;
            max-width: 100% !important;
            min-height: 38px !important;
            padding: 8px 8px !important;
            border-radius: 10px !important;
            flex-direction: row !important;
            justify-content: flex-start !important;
            align-items: center !important;
            gap: 8px !important;
        }
        body.page-home:not(.page-coastal-nav) .app-header .header-nav a span {
            font-size: 0.68rem !important;
            white-space: nowrap !important;
            text-align: left !important;
        }
        body.page-home:not(.page-coastal-nav) .app-header .header-nav a .header-nav-icon,
        body.page-home:not(.page-coastal-nav) .app-header .header-nav a .header-nav-fa {
            width: 18px !important;
            height: 18px !important;
            font-size: 0.9rem !important;
        }
    }
    body.page-home:not(.page-coastal-nav) .main-content {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        min-height: 0 !important;
        width: auto !important;
        max-width: none !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100vh !important;
        max-height: 100dvh !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        margin: 0 !important;
    }
    /* Un solo carril de feed (como móvil vertical), no grid de 3 columnas */
    body.page-home:not(.page-coastal-nav) .fragment-body.home-desktop-grid {
        display: block !important;
        grid-template-columns: none !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding: 0 12px !important;
        box-sizing: border-box !important;
    }
    body.page-home:not(.page-coastal-nav) .home-left-col,
    body.page-home:not(.page-coastal-nav) .home-right-col {
        display: none !important;
    }
    body.page-home:not(.page-coastal-nav) .home-middle-col {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    body.page-home:not(.page-coastal-nav) .home-middle-col .home-feed,
    body.page-home:not(.page-coastal-nav) .home-middle-col .home-cupones {
        width: 100% !important;
        max-width: 720px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

