/*
Theme Name: Prismafind
Theme URI: https://prismafind.com
Description: Tema independiente Prismafind - Clasificados modernos, limpio y sin dependencias externas
Author: Adelino
Version: 1.5
*/

/* =============================================
   VARIABLES GLOBALES
   ============================================= */
:root {
    --pf-primary:      #2563eb;
    --pf-primary-dark: #1d4ed8;
    --pf-bg:           #f8fafc;
    --pf-text:         #1e293b;
    --pf-text-light:   #64748b;
    --pf-border:       #e2e8f0;
    --pf-shadow:       0 10px 25px -5px rgba(0,0,0,0.05);
    --pf-radius:       12px;
    --pf-vendido:      #ef4444;
    --pf-reservado:    #f59e0b;
}

/* =============================================
   RESET Y BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--pf-bg);
    margin: 0;
    color: var(--pf-text);
    overflow-x: hidden;
    line-height: 1.5;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }

/* =============================================
   NAVBAR
   ============================================= */
.pf-nav-custom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 5%;
    background: #fff;
    border-bottom: 1px solid var(--pf-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.logo {
    font-weight: 800;
    font-size: 22px;
    color: var(--pf-primary);
    letter-spacing: -0.5px;
    cursor: pointer;
    white-space: nowrap;
}

.search-bar { flex-grow: 1; margin: 0 25px; max-width: 500px; }
.search-bar input {
    width: 100%;
    padding: 10px 20px;
    border: 1px solid var(--pf-border);
    border-radius: 25px;
    background: #f1f5f9;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}
.search-bar input:focus {
    background: #fff;
    border-color: var(--pf-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.nav-actions { display: flex; align-items: center; gap: 12px; }

.btn-publicar, .x-custom-trigger-btn {
    background: var(--pf-primary);
    color: #fff;
    padding: 9px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    border: none;
    font-size: 14px;
    transition: 0.2s;
}
.btn-publicar:hover, .x-custom-trigger-btn:hover { background: var(--pf-primary-dark); transform: translateY(-1px); }

.x-custom-trigger-icon { font-size: 22px; cursor: pointer; color: var(--pf-text-light); }
.user-avatar-header { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--pf-primary); object-fit: cover; }

.nav-fav-link {
    font-size: 22px;
    color: #f59e0b;
    line-height: 1;
    transition: transform 0.2s;
}
.nav-fav-link:hover { transform: scale(1.2); }

/* =============================================
   CONTENEDORES
   ============================================= */
#pf-page-content, .pf-main-content { width: 100%; max-width: 100%; }

.pf-container {
    width: 90%;
    max-width: 1250px;
    margin: 0 auto;
    padding: 0;
    display: block;
}

/* =============================================
   TARJETAS DE ANUNCIO (GRID GENERAL)
   ============================================= */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.product-card, .ad-card {
    background: #fff;
    border-radius: var(--pf-radius);
    border: 1px solid var(--pf-border);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}
.product-card:hover, .ad-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

.ad-card--vendido { opacity: 0.85; }
.ad-card--reservado { opacity: 0.9; }

.card-img-wrapper, .ad-image-container {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
}
.card-img-wrapper img, .ad-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.product-card:hover .card-img-wrapper img,
.ad-card:hover .ad-image-container img { transform: scale(1.07); }

.card-content, .ad-content { padding: 14px; }
.card-title, .ad-title { font-size: 16px; font-weight: 600; color: #1e293b; margin: 0 0 10px; line-height: 1.3; }
.card-footer, .ad-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #f5f5f5;
    font-size: 12px;
    color: #777;
}

.ad-price-tag {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: #111;
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
}

.ad-subcat { font-size: 10px; font-weight: 700; color: var(--pf-primary); text-transform: uppercase; letter-spacing: 0.5px; display: block; margin-bottom: 5px; }

.btn-card { background: var(--pf-primary); color: #fff !important; padding: 5px 12px; border-radius: 6px; font-size: 12px; font-weight: 500; }
.card-price { font-weight: 700; color: #1e293b; font-size: 1rem; }

.pf-my-ad-card { display: flex; flex-direction: column; }

/* =============================================
   BOTÓN DE FAVORITO EN TARJETAS (ESTRELLA)
   ============================================= */
.pf-fav-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,0.92);
    border: none;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    line-height: 1;
}
.pf-fav-btn:hover { transform: scale(1.15); color: #f59e0b; background: #fff; }
.pf-fav-btn--activo { color: #f59e0b !important; background: #fff !important; }
.pf-fav-btn--loading { opacity: 0.5; pointer-events: none; }

/* Botón favorito en página single (grande) */
.pf-fav-btn-grande {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: 2px solid #f59e0b;
    background: transparent;
    color: #f59e0b;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.pf-fav-btn-grande:hover { background: #f59e0b; color: #fff; }
.pf-fav-btn-grande.pf-fav-btn--activo { background: #f59e0b; color: #fff; }

/* Botón quitar favorito en tarjeta (dashboard) */
.pf-fav-quitar {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 8px;
    font-size: 18px;
    color: #f59e0b;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: 0.2s;
}
.pf-fav-quitar:hover { background: #ef4444; color: #fff; transform: scale(1.1); }

/* =============================================
   BADGES DE ESTADO (VENDIDO / RESERVADO)
   ============================================= */
.pf-estado-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
}
.pf-estado-badge--vendido { background: var(--pf-vendido); }
.pf-estado-badge--reservado { background: var(--pf-reservado); }
.pf-estado-badge--grande { font-size: 14px; padding: 8px 18px; border-radius: 10px; }

.pf-galeria-estado {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
}

/* =============================================
   BOTONES DE ACCIÓN DEL PROPIETARIO (SINGLE)
   ============================================= */
.pf-owner-actions {
    background: #f8fafc;
    border: 2px solid var(--pf-border);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.pf-owner-label { font-size: 13px; font-weight: 700; color: var(--pf-text-light); }

.pf-estado-btns { display: flex; gap: 8px; flex-wrap: wrap; }

.pf-estado-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: 2px solid var(--pf-border);
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--pf-text-light);
    transition: all 0.2s;
}
.pf-estado-btn:hover { border-color: var(--pf-primary); color: var(--pf-primary); }
.pf-estado-btn.activo { background: var(--pf-primary); color: #fff; border-color: var(--pf-primary); }
.pf-estado-btn--reservado.activo { background: var(--pf-reservado); border-color: var(--pf-reservado); }
.pf-estado-btn--vendido.activo { background: var(--pf-vendido); border-color: var(--pf-vendido); }

.pf-owner-extra-btns { display: flex; gap: 8px; margin-left: auto; }

.pf-btn-fotos, .pf-btn-editar {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
}
.pf-btn-fotos { background: #e0f2fe; color: #0369a1; }
.pf-btn-fotos:hover { background: #bae6fd; }
.pf-btn-editar { background: #f0fdf4; color: #16a34a; }
.pf-btn-editar:hover { background: #dcfce7; }

/* =============================================
   MINI BOTONES DE ESTADO (DASHBOARD)
   ============================================= */
.pf-mini-estado-btns { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; }

.pf-mini-btn {
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid var(--pf-border);
    background: #f8fafc;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    color: var(--pf-text-light);
    transition: all 0.2s;
}
.pf-mini-btn.activo { background: var(--pf-primary); color: #fff; border-color: var(--pf-primary); }
.pf-mini-btn--reservado.activo { background: var(--pf-reservado); border-color: var(--pf-reservado); }
.pf-mini-btn--vendido.activo { background: var(--pf-vendido); border-color: var(--pf-vendido); }

/* Botones de acción en dashboard */
.pf-dash-btn {
    flex: 1;
    padding: 7px 10px;
    border-radius: 7px;
    border: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: 0.2s;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.pf-dash-btn--fotos { background: #e0f2fe; color: #0369a1; }
.pf-dash-btn--fotos:hover { background: #bae6fd; }
.pf-dash-btn--editar { background: #f0fdf4; color: #16a34a; }
.pf-dash-btn--editar:hover { background: #dcfce7; }
.pf-dash-btn--eliminar { background: #fee2e2; color: #dc2626; }
.pf-dash-btn--eliminar:hover { background: #fecaca; }

/* =============================================
   SECCIÓN HERO / SLIDER CATEGORÍAS
   ============================================= */
.slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 90%;
    max-width: 1250px;
    margin: 30px auto;
}
.categories-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 15px;
    padding: 10px 0;
    scrollbar-width: none;
}
.categories-container::-webkit-scrollbar { display: none; }

.cat-card {
    min-width: 200px;
    height: 120px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.3s;
}
.cat-card:hover { transform: scale(1.03); }
.overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.3); border-radius: 12px; }
.cat-card span { position: relative; color: #fff; font-weight: 700; z-index: 2; font-size: 15px; }

.nav-btn {
    position: absolute;
    z-index: 10;
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    font-size: 16px;
}
.prev-btn { left: -20px; }
.next-btn { right: -20px; }

/* =============================================
   SECCIÓN DE PRODUCTOS (HOME)
   ============================================= */
.product-section { margin-bottom: 50px; }
.section-title { font-size: 22px; font-weight: 800; color: #1e293b; margin-bottom: 20px; }

/* =============================================
   PÁGINA DE ANUNCIO ÚNICO (SINGLE)
   ============================================= */
.product-container.pf-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    margin-top: 40px !important;
    align-items: start;
}
.product-main-content { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; grid-column: 1; }
.product-gallery { max-width: 100%; }

.main-img {
    background-size: contain;
    background-repeat: no-repeat;
    background-color: #f8fafc;
    height: 260px;
    border-radius: 12px;
    position: relative;
    border: 1px solid var(--pf-border);
}
.badge-demo {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--pf-primary);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}
.pf-miniatures-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 10px;
}
.thumb-item { height: 60px; background-size: cover; border-radius: 8px; border: 1px solid #eee; transition: 0.2s; }
.thumb-item:hover { border-color: var(--pf-primary); }

.vendor-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid var(--pf-border);
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
    grid-column: 1 / -1;
}
.vendor-top-flex { display: flex; align-items: center; gap: 12px; }
.vendor-avatar-small { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; border: 2px solid var(--pf-primary); }
.vendor-name-meta h4 { margin: 0; font-size: 14px; color: #1e293b; }
.vendor-name-meta a { font-size: 12px; color: var(--pf-primary); }
.vendor-rating-meta { text-align: right; }
.stars-display { color: #f59e0b; font-size: 16px; letter-spacing: 2px; }

.pf-action-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 20px;
    background: #f1f5f9;
    border-radius: 14px;
    border: 1px solid var(--pf-border);
    margin: 25px 0;
    flex-wrap: wrap;
}
.price-info span:first-child { font-size: 13px; color: var(--pf-text-light); font-weight: 600; display: block; }
.price-tag { font-size: 28px; font-weight: 800; color: #0f172a; }

.pf-action-btns { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.btn-primary-large {
    background: var(--pf-primary);
    color: #fff;
    padding: 13px 22px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-size: 15px;
    transition: 0.2s;
    text-align: center;
}
.btn-primary-large:hover { background: var(--pf-primary-dark); transform: translateY(-1px); }

.pf-share-row { display: flex; align-items: center; gap: 12px; margin-top: 15px; font-size: 13px; color: var(--pf-text-light); font-weight: 600; }

.pf-divider { border: 0; border-top: 1px solid #eee; margin: 25px 0; }

.pf-reviews-section { margin-top: 35px; background: #fff; padding: 25px; border-radius: 14px; border: 1px solid var(--pf-border); }
.pf-reviews-section h3 { margin-top: 0; }
.pf-comment-item { border-bottom: 1px solid #eee; padding: 14px 0; display: flex; gap: 14px; }
.c-body { flex: 1; }
.c-body p { margin-top: 5px; color: #475569; font-size: 14px; }

.login-to-comment { text-align: center; padding: 30px; background: #f8fafc; border-radius: 12px; border: 2px dashed var(--pf-border); margin-bottom: 20px; }

/* =============================================
   SIDEBAR DEL ANUNCIO
   ============================================= */
.product-sidebar { grid-column: 2; grid-row: 1 / 10; }
.product-sidebar .security-card { background: #fff; padding: 20px; border-radius: 12px; border: 1px solid var(--pf-border); }
.product-sidebar .security-card h4 { margin-top: 0; color: #0f172a; }
.product-sidebar .security-card ul { padding-left: 16px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: #475569; }

/* =============================================
   CABECERA DE CATEGORÍA (ARCHIVE)
   ============================================= */
.page-header-anuncios { padding: 30px 0 15px; background: #fff; }
.pf-breadcrumb { font-size: 13px; color: #888; margin-bottom: 8px; }
.pf-sep { margin: 0 5px; }
.pf-page-title { font-size: 28px; font-weight: 800; color: #111; margin: 0; }
.pf-section-divider { width: 45px; height: 4px; background: var(--pf-primary); margin-top: 12px; border-radius: 2px; }
.anuncios-wrapper { padding: 0 0 60px; }

.pf-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 70px 20px;
    background: #f9f9f9;
    border-radius: 15px;
}
.pf-no-results-icon { font-size: 45px; margin-bottom: 12px; }

/* =============================================
   DASHBOARD (MI CUENTA)
   ============================================= */
.dashboard-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
    padding-bottom: 60px;
}

.dashboard-sidebar {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    border: 1px solid var(--pf-border);
    align-self: start;
    position: sticky;
    top: 80px;
}

.user-welcome-box { text-align: center; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #f1f5f9; }
.user-welcome-box img { border-radius: 50%; border: 3px solid var(--pf-primary); }
.user-welcome-box h4 { margin: 12px 0 5px; font-size: 1.1rem; color: #1e293b; }

.dash-nav { display: flex; flex-direction: column; gap: 5px; }
.dash-menu-item {
    text-decoration: none !important;
    padding: 10px 14px;
    border-radius: 10px;
    color: #64748b;
    font-weight: 600;
    font-size: 14px;
    transition: 0.2s;
    cursor: pointer;
    border: none;
    background: transparent;
    text-align: left;
}
.dash-menu-item:hover { background: #f1f5f9; color: #1e293b; }
.dash-menu-item.active { background: #eff6ff; color: var(--pf-primary); }
.dash-menu-item.pf-logout { color: #ef4444; }
.dash-menu-item.pf-logout:hover { background: #fee2e2; }

/* Badge de mensajes no leídos en el menú */
.pf-badge-unread {
    display: inline-flex; align-items: center; justify-content: center;
    background: #ef4444; color: #fff;
    font-size: 10px; font-weight: 800;
    width: 18px; height: 18px; border-radius: 50%;
    margin-left: 6px; vertical-align: middle;
}

/* ─── INBOX DE MENSAJES ─── */
.pf-inbox-wrap {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 0;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    min-height: 520px;
    background: #fff;
}

/* Lista de conversaciones */
.pf-inbox-list {
    border-right: 1px solid #e2e8f0;
    overflow-y: auto;
    max-height: 520px;
}
.pf-inbox-loading, .pf-inbox-empty {
    padding: 40px 20px; text-align: center; color: #94a3b8; font-size: 14px;
}
.pf-convo-item {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; cursor: pointer;
    border-bottom: 1px solid #f1f5f9; transition: background 0.15s;
}
.pf-convo-item:hover { background: #f8fafc; }
.pf-convo-item--active { background: #eff6ff; }
.pf-convo-item--unread { background: #fefce8; }
.pf-convo-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; object-fit: cover; border: 2px solid #e2e8f0; }
.pf-convo-info { flex: 1; min-width: 0; }
.pf-convo-top { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.pf-convo-name { font-weight: 700; font-size: 13px; color: #1e293b; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-convo-badge { background: #ef4444; color: #fff; font-size: 10px; font-weight: 800; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 4px; display: inline-flex; align-items: center; justify-content: center; }
.pf-convo-time { font-size: 11px; color: #94a3b8; white-space: nowrap; flex-shrink: 0; }
.pf-convo-anuncio { font-size: 11px; color: #3b82f6; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.pf-convo-preview { font-size: 12px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Panel de conversación activa */
.pf-convo-panel {
    display: flex; flex-direction: column;
    max-height: 520px;
}
.pf-convo-empty {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: #94a3b8; font-size: 14px; padding: 40px;
}
.pf-convo-header {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 18px; border-bottom: 1px solid #f1f5f9; background: #fafbfc;
}
.pf-convo-anuncio-link { font-size: 12px; color: #3b82f6; text-decoration: none; }
.pf-convo-anuncio-link:hover { text-decoration: underline; }
.pf-convo-hilo {
    flex: 1; overflow-y: auto; padding: 16px;
    display: flex; flex-direction: column; gap: 10px;
}
.pf-hilo-vacio { text-align: center; color: #94a3b8; font-size: 13px; padding: 20px 0; }

/* Burbujas de mensajes en el hilo del dashboard */
.pf-dash-bubble { display: flex; flex-direction: column; max-width: 75%; }
.pf-dash-bubble--out { align-self: flex-end; align-items: flex-end; }
.pf-dash-bubble--in { align-self: flex-start; align-items: flex-start; }
.pf-dash-bubble-text {
    padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5;
}
.pf-dash-bubble--out .pf-dash-bubble-text { background: #2563eb; color: #fff; border-bottom-right-radius: 4px; }
.pf-dash-bubble--in .pf-dash-bubble-text { background: #f1f5f9; color: #1e293b; border-bottom-left-radius: 4px; }
.pf-dash-bubble-meta { font-size: 10px; color: #94a3b8; margin-top: 3px; padding: 0 2px; }

.pf-convo-form {
    display: flex; gap: 10px; align-items: flex-end;
    padding: 12px 14px; border-top: 1px solid #f1f5f9; background: #fafbfc;
}
.pf-convo-form textarea {
    flex: 1; padding: 10px 12px; border: 1px solid #e2e8f0;
    border-radius: 10px; font-size: 14px; resize: none; font-family: inherit;
}
.pf-convo-form textarea:focus { outline: none; border-color: #2563eb; }
.pf-btn-send {
    background: #2563eb; color: #fff; border: none; border-radius: 10px;
    padding: 10px 16px; cursor: pointer; font-weight: 700;
    display: flex; align-items: center; gap: 6px; white-space: nowrap;
    font-size: 13px; transition: background 0.2s;
}
.pf-btn-send:hover { background: #1d4ed8; }

@media (max-width: 768px) {
    .pf-inbox-wrap { grid-template-columns: 1fr; }
    .pf-inbox-list { max-height: 260px; border-right: none; border-bottom: 1px solid #e2e8f0; }
    .pf-convo-panel { max-height: 400px; }
}

.dashboard-content { min-width: 0; }
.dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; border-bottom: 1px solid #f1f5f9; padding-bottom: 15px; }
.dash-header h2 { margin: 0; }

/* =============================================
   FORMULARIO PUBLICAR
   ============================================= */
.pf-page-wrapper { padding: 50px 20px; display: flex; justify-content: center; }
.pf-publish-container { width: 100%; max-width: 750px; }
.pf-publish-card { background: #fff; border-radius: 20px; box-shadow: var(--pf-shadow); padding: 40px; }
.pf-card-header h1 { font-size: 28px; font-weight: 800; margin: 0 0 5px; }
.pf-card-header p { color: var(--pf-text-light); margin: 0 0 30px; }

.section-label { font-size: 16px; font-weight: 700; margin: 30px 0 12px; display: flex; align-items: center; gap: 8px; }

.pf-upload-zone {
    border: 2px dashed #cbd5e1;
    padding: 35px;
    text-align: center;
    border-radius: 14px;
    cursor: pointer;
    background: #fdfdfd;
    transition: all 0.3s;
}
.pf-upload-zone:hover { border-color: var(--pf-primary); background: #f0f7ff; }

.pf-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; margin-top: 20px; }
.preview-slot { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--pf-border); }
.remove-btn {
    position: absolute; top: 5px; right: 5px; width: 22px; height: 22px;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 5px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 14px; color: #ef4444; font-weight: bold;
}
.remove-btn:hover { background: #ef4444; color: #fff; }

.pf-input-group { margin-bottom: 20px; }
.pf-input-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #475569; }
.pf-input-group input, .pf-input-group textarea, .pf-select-input {
    width: 100%; padding: 12px 15px; border: 1px solid var(--pf-border);
    border-radius: 10px; font-size: 14px; color: var(--pf-text);
    transition: all 0.2s; font-family: inherit;
}
.pf-input-group input:focus, .pf-input-group textarea:focus { outline: none; border-color: var(--pf-primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

.pf-grid-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* =============================================
   BOTONES GLOBALES
   ============================================= */
.pf-btn-primary {
    background: var(--pf-primary);
    color: #fff;
    padding: 13px 22px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
    text-align: center;
    text-decoration: none !important;
}
.pf-btn-primary:hover { background: var(--pf-primary-dark); transform: translateY(-2px); }

.pf-btn-secondary {
    background: #fff;
    color: #1e293b;
    padding: 12px 22px;
    border-radius: 12px;
    border: 1px solid var(--pf-border);
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}
.pf-btn-secondary:hover { background: #f8fafc; border-color: #cbd5e1; }

/* =============================================
   MODALES
   ============================================= */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15,23,42,0.7);
    backdrop-filter: blur(4px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}
.modal-content {
    background: #fff;
    width: 90%;
    max-width: 480px;
    border-radius: 20px;
    padding: 30px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}
.modal-title { font-size: 22px; font-weight: 700; margin: 0 0 20px; text-align: center; color: #1e293b; }
.close-box { position: absolute; top: 15px; right: 18px; font-size: 26px; cursor: pointer; color: #94a3b8; transition: 0.2s; }
.close-box:hover { color: #1e293b; }

/* SUB-CARDS (modales categoría) */
.sub-card {
    position: relative; height: 100px; border-radius: 12px;
    background-size: cover; background-position: center;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none !important; overflow: hidden; transition: transform 0.2s;
}
.sub-card:hover { transform: scale(1.03); }
.sub-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.4); }
.sub-card span { position: relative; z-index: 2; color: #fff !important; font-weight: 700; font-size: 14px; }

/* =============================================
   PRISMA-GATE (LOGIN MODAL)
   ============================================= */
.prisma-gate-wrapper {
    display: none;
    position: fixed;
    z-index: 9999999;
    left: 0; top: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    align-items: center; justify-content: center;
    backdrop-filter: blur(6px);
}
.prisma-gate-card {
    background: #fff; width: 90%; max-width: 370px;
    padding: 32px; border-radius: 22px; position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3); color: #1e293b;
}
.prisma-gate-close { position: absolute; top: 14px; right: 18px; font-size: 26px; cursor: pointer; color: #cbd5e1; }
.prisma-tabs { display: flex; gap: 5px; background: #f1f5f9; padding: 5px; border-radius: 12px; margin-bottom: 22px; }
.p-tab { flex: 1; padding: 9px; cursor: pointer; border-radius: 8px; font-weight: 700; color: #64748b; transition: 0.2s; text-align: center; font-size: 14px; }
.p-tab.active { background: #fff; color: var(--pf-primary); box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.p-social-box { display: flex; gap: 10px; margin-bottom: 18px; }
.p-social-btn { flex: 1; border: 1px solid #e2e8f0; padding: 9px; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 13px; font-weight: 600; cursor: pointer; transition: 0.2s; }
.p-social-btn:hover { background: #f8fafc; }
.p-divider { border-bottom: 1px solid #e2e8f0; margin: 18px 0; position: relative; }
.p-divider span { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); background: #fff; padding: 0 10px; color: #94a3b8; font-size: 11px; text-transform: uppercase; }
.p-pane { display: none; }
.p-pane.active { display: block; }
.p-pane input { width: 100%; padding: 11px 14px; margin: 6px 0; border: 1px solid #e2e8f0; border-radius: 10px; box-sizing: border-box; font-size: 14px; font-family: inherit; }
.p-pane input:focus { outline: none; border-color: var(--pf-primary); }
.p-submit { width: 100%; padding: 13px; background: var(--pf-primary); color: #fff; border: none; border-radius: 10px; font-weight: 700; cursor: pointer; margin-top: 12px; font-size: 15px; transition: 0.2s; }
.p-submit:hover { background: var(--pf-primary-dark); }

/* =============================================
   PERFIL DE AUTOR
   ============================================= */
.profile-header-card {
    background: #fff; border-radius: 18px; padding: 28px;
    box-shadow: var(--pf-shadow); display: flex; justify-content: space-between;
    align-items: center; margin: 35px 0; border: 1px solid #f1f5f9;
}
.profile-main-info { display: flex; align-items: center; gap: 22px; }
.profile-avatar img { border-radius: 50%; border: 4px solid #3b82f6; }
.profile-text h1 { font-size: 1.7rem; margin: 0; }
.profile-location { color: #64748b; display: flex; align-items: center; gap: 5px; margin: 4px 0; }
.profile-stats-mini { display: flex; gap: 10px; margin-top: 8px; }
.stat-badge { background: #f1f5f9; padding: 4px 12px; border-radius: 20px; font-size: 0.83rem; color: #475569; }
.profile-tabs { border-bottom: 2px solid #e2e8f0; margin-bottom: 28px; display: flex; gap: 25px; }
.tab-item { background: none; border: none; padding: 14px 5px; font-size: 0.95rem; font-weight: 600; color: #64748b; cursor: pointer; position: relative; }
.tab-item.active { color: #3b82f6; }
.tab-item.active::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 100%; height: 3px; background: #3b82f6; border-radius: 2px; }

/* =============================================
   FOOTER
   ============================================= */
#pf-main-footer { background: #0f172a; color: #fff; padding: 55px 5% 28px; margin-top: 80px; }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 40px; }
.footer-logo { color: #3b82f6; margin-bottom: 12px; font-size: 20px; margin-top: 0; }
#pf-main-footer p { color: #94a3b8; font-size: 14px; line-height: 1.6; }
.footer-open-source { background: rgba(255,255,255,0.05); padding: 22px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.1); }
.footer-open-source h4 { margin-top: 0; color: #f59e0b; font-size: 15px; }
.footer-donate-btn { background: #f59e0b; color: #fff; padding: 9px 18px; border-radius: 10px; text-decoration: none; font-size: 13px; font-weight: bold; display: inline-block; transition: 0.3s; }
.footer-donate-btn:hover { background: #d97706; }
.footer-bottom { text-align: center; margin-top: 45px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.1); color: #64748b; font-size: 12px; }
.footer-bottom a { color: #64748b; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
    .product-container.pf-container { grid-template-columns: 1fr; }
    .product-main-content { grid-template-columns: 1fr; }
    .product-sidebar { grid-column: 1; grid-row: auto; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-sidebar { position: static; }
    .pf-owner-actions { flex-direction: column; align-items: flex-start; }
    .pf-owner-extra-btns { margin-left: 0; }
}

@media (max-width: 640px) {
    .pf-nav-custom { flex-wrap: wrap; gap: 10px; padding: 10px 4%; }
    .search-bar { order: 3; width: 100%; margin: 0; max-width: 100%; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
    .pf-grid-2-col { grid-template-columns: 1fr; }
    .profile-header-card { flex-direction: column; text-align: center; }
    .profile-main-info { flex-direction: column; }
    .pf-action-card { flex-direction: column; }
    .pf-action-btns { width: 100%; }
    .pf-fav-btn-grande, .btn-primary-large { width: 100%; }
}

/* ═══════════════════════════════════════
   ANUNCIOS RELACIONADOS (single.php)
   ═══════════════════════════════════════ */
.pf-relacionados { margin-top: 36px; }
.pf-rel-title { font-size: 20px; font-weight: 800; color: #0f172a; margin: 0 0 18px; }
.pf-rel-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.pf-rel-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
    overflow: hidden; position: relative; transition: box-shadow 0.2s, transform 0.2s;
}
.pf-rel-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.1); transform: translateY(-2px); }
.pf-rel-link { text-decoration: none !important; display: block; }
.pf-rel-img { position: relative; height: 150px; overflow: hidden; background: #f1f5f9; }
.pf-rel-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-rel-badge {
    position: absolute; top: 8px; left: 8px;
    padding: 4px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; color: #fff;
}
.pf-rel-badge--vendido { background: #ef4444; }
.pf-rel-badge--reservado { background: #f59e0b; }
.pf-rel-info { padding: 12px 12px 14px; }
.pf-rel-name { font-size: 13px; font-weight: 700; color: #1e293b; margin: 0 0 4px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pf-rel-price { font-size: 14px; font-weight: 800; color: #2563eb; margin: 0; }
.pf-rel-card .pf-fav-star {
    position: absolute; top: 8px; right: 8px;
    background: rgba(255,255,255,0.9); border: none; border-radius: 50%;
    width: 30px; height: 30px; font-size: 16px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15); transition: 0.2s;
}
.pf-rel-card .pf-fav-star:hover { background: #fff; transform: scale(1.1); }
.pf-rel-card .pf-fav-star--activo { color: #f59e0b; }

@media (max-width: 900px) { .pf-rel-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .pf-rel-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

/* ═══════════════════════════════════════
   BUSCADOR HEADER (shortcode + form)
   ═══════════════════════════════════════ */
.pf-search-bar-sc {
    display: flex; align-items: center; gap: 8px;
    background: #fff; border: 1.5px solid #e2e8f0;
    border-radius: 10px; padding: 7px 8px 7px 12px;
    transition: border-color 0.2s;
}
.pf-search-bar-sc:focus-within { border-color: #2563eb; }
.pf-search-input-sc { flex: 1; border: none; outline: none; font-size: 14px; background: none; color: #1e293b; min-width: 0; }
.pf-search-btn-sc { background: #2563eb; color: #fff; border: none; padding: 8px 16px; border-radius: 7px; font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; }
.pf-search-btn-sc:hover { background: #1d4ed8; }

/* ═══════════════════════════════════════
   PAGINACIÓN (archive-anuncios.php)
   ═══════════════════════════════════════ */
.pf-paginacion-nav {
    display: flex; justify-content: center; gap: 8px;
    margin-top: 48px; flex-wrap: wrap;
}
.pf-paginacion-nav a, .pf-paginacion-nav span {
    padding: 9px 15px; border-radius: 9px;
    border: 1.5px solid #e2e8f0; background: #fff;
    color: #475569; font-weight: 600; font-size: 14px;
    text-decoration: none; transition: 0.2s; display: inline-block;
}
.pf-paginacion-nav a:hover { border-color: #2563eb; color: #2563eb; }
.pf-paginacion-nav .current { background: #2563eb; border-color: #2563eb; color: #fff; }
