*{margin:0;padding:0;box-sizing:border-box}
html, body {
    height: 100%;
}

body {
    font-family: system-ui, sans-serif;
    background: #fafafa;
    color: #262626;

    display: flex;
    flex-direction: column;
}
/* HEADER */
.app-header{background:#fff;padding:12px 24px;box-shadow:0 1px 3px rgba(0,0,0,.05);position:sticky;top:0;z-index:100}
.header-content{max-width:1200px;margin:auto;display:flex;justify-content:space-between;align-items:center}
.logo-section{display:flex;align-items:center;gap:12px}
.logo-icon{background:linear-gradient(135deg,#9c27b0,#e91e63);padding:8px;border-radius:12px;color:#fff}
.logo-text{font-size:24px;font-weight:700}
.icon-btn{background:none;border:none;cursor:pointer}

/* FILTERS */
.filters-bar{background:#fff;padding:12px 24px;border-bottom:1px solid #eee}
.filters-content{max-width:1200px;margin:auto;display:flex;flex-direction: row;align-items: center; gap:8px;overflow-x:auto}
.filter-chip{padding:8px 16px;border-radius:20px;background:#f5f5f5;text-decoration:none;color:#262626;font-size:14px}
.filter-chip.active{background:linear-gradient(135deg,#9c27b0,#e91e63);color:#fff;font-weight:600}

/* GRID */
.posts-container{
    max-width:1200px;
    margin:16px auto;
    padding:0 16px;
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:16px;
}
@media(max-width:1024px){.posts-container{grid-template-columns:repeat(2,1fr)}}
@media(max-width:600px){.posts-container{grid-template-columns:1fr}}

/* CARD */
.post-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    transition: transform .2s, box-shadow .2s;

    max-width: 720px;
    width: 100%;
    margin: 0 auto 24px;

    padding: 20px 26px;
}
.post-info {
    flex: 1;
}
.post-header {
    display: flex;
    align-items: flex-start; /* 🔥 permite crecer en vertical */
    gap: 14px;
}


/* HEADER POST */
.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.avatar-gradient{
    width:48px;height:48px;border-radius:50%;
    background:linear-gradient(135deg,#9c27b0,#e91e63);
    padding:2px;cursor:pointer;
}
.avatar{
    width:44px;height:44px;border-radius:50%;
    object-fit:cover;border:2px solid #fff;background:#ddd;
}
.post-info{flex:1}
.username{font-weight:600;font-size:14px}
.post-meta{font-size:12px;color:#888}
.post-type-badge{
    padding:4px 10px;border-radius:14px;
    font-size:10px;font-weight:600;color:#111;
}

/* IMAGE */
.post-image {
    width: 100%;
    height: 420px;
    object-fit: contain;
    background: white; /* fondo negro tipo IG */
    border: none;
}


/* ACTIONS */
.post-actions{padding:10px 12px;display:flex;gap:12px}
.action-btn{
    background:none;border:none;cursor:pointer;
    display:flex;align-items:center;gap:4px;font-weight:600;
}
.like-btn.active span{
    color:#e91e63;
    font-variation-settings:'FILL' 1;
}

/* TEXT */
.post-description {
    margin-top: 10px;
    line-height: 1.5;
}
.description-username,
.telefono{font-weight:600}
.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,.1);
}
/* FAB */
.fab{
    position:fixed;bottom:24px;right:24px;
    width:60px;height:60px;border-radius:30px;
    background:linear-gradient(135deg,#9c27b0,#e91e63);
    border:none;color:#fff;cursor:pointer;
    display:flex;align-items:center;justify-content:center;
    box-shadow:0 4px 12px rgba(156,39,176,.4);
}

/* MODAL AVATAR */
.avatar-modal{
    position:fixed;inset:0;background:rgba(0,0,0,.85);
    backdrop-filter:blur(6px);
    display:none;align-items:center;justify-content:center;
    z-index:9999;
}
.avatar-modal img{
    width:280px;height:280px;border-radius:50%;
    object-fit:cover;border:4px solid #fff;
    animation:zoom .25s ease;
}
@keyframes zoom{
    from{transform:scale(.7);opacity:0}
    to{transform:scale(1);opacity:1}
}

.image-modal{
    display:none;
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.9);
    z-index:9999;
    align-items:center;
    justify-content:center;
}

.image-modal.active{
    display:flex;
}

.modal-image{
    max-width:90%;
    max-height:90%;
    object-fit:contain;
    border-radius:12px;
}

.close-modal{
    position:absolute;
    top:20px;
    right:25px;
    color:white;
    font-size:40px;
    cursor:pointer;
    user-select:none;
}
.page-content {
    flex: 1;
}
.promo-chip {
    background: linear-gradient(135deg, #4caf50, #81c784);
    color: white;
    font-weight: 600;
}
.cargar-promo-btn {
    background: linear-gradient(135deg,#9c27b0,#e91e63);
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;

    display: block;
    margin: 12px auto 0;
}


.promo-form{
    background:#fff;
    padding:16px;
    border-radius:16px;
    box-shadow:0 4px 12px rgba(0,0,0,.08);
    margin-top:16px;
}

.promo-form .input-group{
    margin-bottom:12px;
}

.promo-form input,
.promo-form textarea{
    width:100%;
    padding:10px;
    border-radius:10px;
    border:1px solid #ddd;
}
.promo-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.promo-modal.active {
    display: flex;
}

.promo-modal-content {
    background: #fff;
    width: 100%;
    max-width: 420px;
    border-radius: 18px;
    padding: 24px;
    animation: scaleIn .25s ease;
}

@keyframes scaleIn {
    from { transform: scale(.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.promo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.close-btn {
    border: none;
    background: none;
    font-size: 20px;
    cursor: pointer;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.input-row {
    display: flex;
    gap: 12px;
}

.input-group input,
.input-group textarea {
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #ddd;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg,#9c27b0,#e91e63);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}
.promo-badge {
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    color: #fff;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
}
.file-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.file-input {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    cursor: pointer;
    transition: .2s;
    background: #fafafa;
}

.file-input:hover {
    border-color: #4caf50;
    background: #f1f8f4;
}

.file-input .material-symbols-outlined {
    font-size: 22px;
    color: #4caf50;
}

.file-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: #444;
}

.file-hint {
    font-size: 0.75rem;
    color: #777;
}
.promo-description {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #eee;

    font-size: 0.95rem;
    line-height: 1.6;
    color: #444;

    word-break: break-word; /* 🔥 textos largos */
}
.promo-card {
    min-height: 200px; /* evita cards aplastadas */
}
.promo-card{
    padding-bottom: 16px;
}

.promo-badge{
    background: linear-gradient(135deg,#4caf50,#2e7d32);
}

.post-description{
    line-height: 1.5;
    margin-top: 8px;
}
.fecha-centrada {
    text-align: center;
}
.promo-badge a{
    text-decoration: none;
    color: inherit;
    font-weight: 600;
}
.image-preview {
    margin-top: 12px;
    text-align: center;
}

.image-preview img {
    max-width: 100%;
    max-height: 220px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(0,0,0,.15);
}

.promo-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.promo-modal.active {
    display: flex;
}
.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.input-group label {
    font-size: 13px;
    font-weight: 600;
    color: #444;
}

.custom-select {
    position: relative;
}

.custom-select select {
    width: 100%;
    padding: 12px 40px 12px 12px;
    border-radius: 10px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    transition: all .2s ease;
}

.custom-select select:focus {
    border-color: #7c4dff;
    box-shadow: 0 0 0 3px rgba(124,77,255,.15);
}

.select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #666;
    font-size: 22px;
}.post-card {
    position: relative;
}

/* Contenedor */
.post-owner-actions {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    gap: 4px;
    z-index: 10;
}

/* Botón base */
.icon-action {
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #777;
}

/* Icono */
.icon-action span {
    font-size: 20px;
}

/* Hover */
.icon-action:hover {
    color: #000;
}

/* Eliminar un poco más agresivo */
.icon-action.delete:hover {
    color: #d32f2f;
}
