/* ===================================================
   REVISTA BARRIAL - Estilos Principales
   =================================================== */

:root {
    color-scheme: light;
    /* Tipografias Oficiales (Propuesta Editorial) */
    --font-editorial: 'DM Serif Display', Georgia, serif;
    --font-ui: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Paleta Oficial */
    --color-navy: #0F1B33;
    --color-blue: #1E426F;
    --color-editorial-red: #C9362B;
    --color-orange-cta: #F47B16;
    --color-green-open: #20B968;
    --color-bg: #F3F5F8;
    --color-surface: #FFFFFF;
    --color-text-main: #182338;
    --color-text-secondary: #667085;
    --color-border: #DCE2EA;

    /* Mapeo de compatibilidad */
    --bg-color: #F3F5F8;
    --surface-color: rgba(255, 255, 255, 0.95);
    --surface-solid: #FFFFFF;
    --text-primary: #182338;
    --text-secondary: #667085;
    --border-color: #DCE2EA;
    --accent-primary: #C9362B;
    --accent-secondary: #0F1B33;
    --accent-cta: #F47B16;
    --accent-green: #20B968;
    --glass-bg: rgba(255, 255, 255, 0.92);
    --glass-border: rgba(220, 226, 234, 0.8);
    --shadow-sm: 0 2px 6px rgba(15, 27, 51, 0.05);
    --shadow-md: 0 8px 20px rgba(15, 27, 51, 0.08);
    --shadow-lg: 0 16px 32px rgba(15, 27, 51, 0.12);
    --shadow-glow: 0 0 20px rgba(201, 54, 43, 0.15);
}

.header-logo:focus,
.header-logo *:focus,
.logo-title:focus,
.magazine-header h1:focus,
.logo-text *:focus {
    outline: none !important;
    box-shadow: none !important;
}


/* ========== RESET & BASE ========== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-ui);
    color: var(--text-primary);
    background-color: var(--bg-color);
    transition: background-color 0.3s, color 0.3s;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ========== SISTEMA DE MODALES ESTANDARIZADO ========== */
.app-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 27, 51, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    padding: 20px;
    animation: appModalFadeIn 0.2s ease-out;
}

.app-modal-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid var(--color-border);
    max-width: 600px;
    width: 100%;
    padding: 28px;
    box-shadow: 0 24px 48px rgba(15, 27, 51, 0.22);
    font-family: var(--font-ui);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.app-modal-title {
    font-family: var(--font-editorial);
    font-size: 1.6rem;
    color: var(--color-navy);
    margin: 0;
    line-height: 1.2;
}

@keyframes appModalFadeIn {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

/* ========== BANNER ========== */
.magazine-banner {
    background: linear-gradient(135deg, var(--accent-secondary) 0%, rgba(15, 52, 96, 0.8) 40%, var(--accent-primary) 150%);
    border-radius: 20px;
    padding: 28px 36px 36px;
    margin-bottom: 24px;
    color: white;
    position: relative;
    overflow: hidden;
}

.magazine-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(233, 69, 96, 0.2), transparent 70%);
    border-radius: 50%;
}

.magazine-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(243, 156, 18, 0.15), transparent 70%);
    border-radius: 50%;
}

.banner-content {
    position: relative;
    z-index: 1;
}

.banner-date {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: capitalize;
    margin-bottom: 12px;
    backdrop-filter: blur(10px);
}

.banner-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 6px;
    line-height: 1.15;
}

.banner-subtitle {
    font-size: 0.95rem;
    opacity: 0.85;
    font-weight: 300;
    margin-bottom: 4px;
}

.banner-stats {
    display: flex;
    gap: 32px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 900;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========== SEARCH ========== */
.search-container {
    margin-bottom: 20px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 18px;
    font-size: 1.2rem;
    pointer-events: none;
    opacity: 0.5;
}

.search-input {
    width: 100%;
    padding: 14px 50px 14px 50px;
    border: 2px solid #e0ddd8;
    border-radius: 14px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    background: var(--surface-solid);
    color: var(--text-primary);
    transition: all 0.2s ease;
    outline: none;
}

.search-input:focus {
    border-color: #e94560;
    box-shadow: 0 0 0 4px rgba(233, 69, 96, 0.1);
}

.search-input::placeholder {
    color: #aaa;
}

.search-clear {
    position: absolute;
    right: 14px;
    background: #e0e0e0;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.search-clear:hover {
    background: #ccc;
}

/* ========== TAG FILTER ========== */
.tag-filter-container {
    margin-bottom: 22px;
    position: relative;
}

.tag-filter-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 48px;
    height: 100%;
    background: linear-gradient(to right, transparent, var(--bg-color));
    pointer-events: none;
    border-radius: 0 12px 12px 0;
}

.tag-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 6px 2px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.tag-scroll::-webkit-scrollbar {
    height: 4px;
}

.tag-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.tag-pill {
    padding: 7px 18px;
    border-radius: 24px;
    border: 1.5px solid #e0ddd8;
    background: var(--surface-color);
    color: var(--text-secondary);
    backdrop-filter: blur(8px);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    white-space: nowrap;
    text-transform: capitalize;
    transition: all 0.2s ease;
}

.tag-pill:hover {
    border-color: #e94560;
    color: #e94560;
    background: #fff5f6;
}

.tag-active {
    background: #e94560 !important;
    color: white !important;
    border-color: #e94560 !important;
}

.tag-active:hover {
    background: #d63851 !important;
    color: white !important;
}

/* ========== ACTIVE FILTERS ========== */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #e94560;
    color: white;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
}

.filter-remove {
    background: rgba(255,255,255,0.3);
    border: none;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.filter-remove:hover {
    background: rgba(255,255,255,0.5);
}

/* ========== MAGAZINE GRID ========== */
/* ========== MAGAZINE GRID ========== */
.magazine-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-flow: dense;
    gap: 24px;
    margin-bottom: 48px;
    align-items: stretch;
}

/* ========== COVER SHOWCASE (PORTADA SPONSORS) ========== */
.cover-showcase-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 20px;
    padding: 24px 28px;
    margin-bottom: 32px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.cover-showcase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cover-badge-tag {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 5px 14px;
    border-radius: 20px;
}

.cover-edition-caption {
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.cover-showcase-track {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    grid-auto-flow: dense;
    gap: 20px;
    align-items: stretch;
}

/* ========== SEARCH ACTIVE HEADER ========== */
.search-active-header {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(15, 27, 51, 0.04);
    padding: 16px 22px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.search-active-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-active-icon {
    font-size: 1.4rem;
}

.search-active-info strong {
    font-size: 1rem;
    color: #0f172a;
    display: block;
}

.search-active-info p {
    margin: 2px 0 0 0;
    font-size: 0.85rem;
    color: #64748b;
}

.btn-clear-search-pill {
    background: white;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-clear-search-pill:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.section-divider-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 12px 0 20px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.section-divider-title h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.section-divider-title span {
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 600;
}

/* ========== NO RESULTS ========== */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.no-results-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.no-results h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 8px;
}

.no-results p {
    color: #888;
    margin-bottom: 20px;
}

/* ========== BUTTONS ========== */
.btn {
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, #e94560, #c0392b);
    color: white;
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.3);
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.4);
}

.btn-secondary {
    background: white;
    color: #555;
    border: 2px solid #e0e0e0;
}

.btn-secondary:hover {
    border-color: #e94560;
    color: #e94560;
    background: #fff5f6;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.btn-create {
    padding: 12px 28px;
    font-size: 1rem;
}

/* ========== PRICING SECTION ========== */
.pricing-section {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 40px;
}

.pricing-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 900;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.pricing-subtitle {
    color: #888;
    font-size: 1rem;
    margin-bottom: 36px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.pricing-card {
    background: var(--surface-color);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 28px 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

.pricing-featured {
    border-color: #e94560;
    border-width: 3px;
    box-shadow: 0 8px 24px rgba(233, 69, 96, 0.15);
}

.pricing-featured-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f39c12, #e74c3c);
    color: white;
    padding: 4px 18px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
}

.pricing-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}

.pricing-desc {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 16px;
}

.pricing-price {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 900;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.pricing-period {
    font-size: 0.85rem;
    color: #aaa;
    font-weight: 400;
    font-family: 'Inter', sans-serif;
}

.pricing-features {
    list-style: none;
    margin: 20px 0;
    text-align: left;
}

.pricing-features li {
    padding: 6px 0;
    font-size: 0.85rem;
    color: #555;
    border-bottom: 1px solid #f5f5f5;
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-card .btn {
    width: 100%;
    justify-content: center;
}

/* ========== ADMIN PAGE ========== */
.admin-page {
    max-width: 100%;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.admin-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: #1a1a2e;
}

.admin-subtitle {
    color: #888;
    font-size: 0.9rem;
    margin-top: 2px;
}

/* ========== MODAL ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 780px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
}

.modal-close {
    background: #f0f0f0;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

.modal-close:hover {
    background: #e0e0e0;
}

.modal-body {
    padding: 20px 28px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 28px 24px;
    border-top: 1px solid #f0f0f0;
}

/* ========== FORMS ========== */
.form-group {
    margin-bottom: 16px;
    flex: 1;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s;
    outline: none;
    background: #fafafa;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #e94560;
    background: white;
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row-3 {
    flex-wrap: wrap;
}

.form-row-3 .form-group {
    min-width: 180px;
}

.form-group-2 {
    flex: 2;
}

/* ========== SIZE SELECTOR ========== */
.size-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.size-option {
    padding: 14px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.size-option:hover {
    border-color: #bbb;
}

.size-selected {
    border-width: 3px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.size-option-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #333;
}

.size-option-desc {
    font-size: 0.75rem;
    color: #888;
    margin: 4px 0;
}

.size-option-price {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 1.1rem;
    color: #1a1a2e;
}

/* ========== PRIORITY SLIDER ========== */
.priority-slider {
    width: 100%;
    accent-color: #e94560;
}

.priority-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #aaa;
}

/* ========== COLOR PICKER ========== */
.color-picker {
    width: 60px !important;
    height: 42px;
    border-radius: 10px !important;
    padding: 2px !important;
    cursor: pointer;
    background: white !important;
}

/* ========== TAGS INPUT ========== */
.tags-input-wrapper {
    position: relative;
}

.tags-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.tag-preview-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: #e94560;
    color: white;
    border-radius: 14px;
    font-size: 0.8rem;
    font-weight: 500;
}

.tag-remove {
    cursor: pointer;
    opacity: 0.7;
    font-size: 0.7rem;
}

.tag-remove:hover {
    opacity: 1;
}

/* ========== HTML EDITOR ========== */
.html-editor {
    font-family: 'Courier New', monospace !important;
    font-size: 0.85rem !important;
    line-height: 1.5;
    tab-size: 2;
}

/* ========== LINK ROW ========== */
.link-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}

.link-row input {
    flex: 1;
}

/* ========== BUTTONS ICON ========== */
.btn-icon {
    background: #f0f0f0;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-edit:hover {
    background: #e8f4fd;
}

.btn-delete:hover {
    background: #fde8e8;
}

.btn-danger-icon:hover {
    background: #fde8e8;
}

/* ========== ADMIN AD LIST ========== */
.admin-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-ad-item {
    background: white;
    border: 2px solid #eee;
    border-radius: 14px;
    padding: 16px 20px;
    transition: all 0.2s;
}

.admin-ad-item:hover {
    border-color: #ddd;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.inactive-ad {
    opacity: 0.6;
    background: #fafafa;
}

.admin-ad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-ad-info {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.admin-ad-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: #333;
}

.admin-ad-size {
    font-size: 0.82rem;
    font-weight: 600;
    background: #f5f5f5;
    padding: 2px 10px;
    border-radius: 6px;
}

.admin-ad-priority {
    font-size: 0.8rem;
    color: #888;
}

.admin-ad-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-ad-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #888;
    flex-wrap: wrap;
}

.admin-ad-tags {
    font-style: italic;
}

.inactive-badge {
    background: #e74c3c;
    color: white;
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ========== TOGGLE SWITCH ========== */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    left: 3px;
    bottom: 3px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: #27ae60;
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.empty-state p {
    font-size: 1.1rem;
}

/* ========== NOT FOUND ========== */
.not-found {
    text-align: center;
    padding: 80px 20px;
}

.not-found h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #333;
    margin-bottom: 8px;
}

.not-found p {
    color: #888;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .magazine-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-flow: dense;
        gap: 18px;
        align-items: stretch;
    }

    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .size-selector {
        grid-template-columns: repeat(2, 1fr);
    }

    .banner-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .magazine-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .banner-title {
        font-size: 1.6rem;
    }

    .banner-stats {
        gap: 20px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-ad-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-ad-actions {
        align-self: flex-end;
    }

    .link-row {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 12px;
    }

    .magazine-banner {
        padding: 32px 20px;
        border-radius: 14px;
    }

    .banner-title {
        font-size: 1.3rem;
    }

    .banner-subtitle {
        font-size: 0.9rem;
    }
}

/* ===================================================
   REVISTA BARRIAL 2026 - EDITORIAL & CERCANIA PREMIUM
   =================================================== */

/* HEADER TOP BAR & LOGO EMBLEM */
.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 6px 20px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.logo-emblem {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #e94560, #0f3460);
    color: white;
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 900;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.3);
}

/* BANNER STATS BAR & EDITION BADGES */
.edition-header-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.badge-edition {
    background: #e94560;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
}

/* QUICK NEARBY FILTERS & CONTROLS */
.controls-section {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.quick-filters-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    background: var(--surface-color);
    padding: 10px 16px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
}

.btn-quick-filter {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-quick-filter:hover, .btn-quick-filter.active {
    background: #0f3460;
    color: white;
    border-color: #0f3460;
    box-shadow: 0 4px 12px rgba(15, 52, 96, 0.2);
}

.view-mode-selector {
    margin-left: auto;
    display: flex;
    gap: 4px;
    background: rgba(0,0,0,0.04);
    padding: 3px;
    border-radius: 10px;
}

.btn-mode {
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
}

.btn-mode.active {
    background: white;
    color: var(--accent-primary);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* INMERSIVE EDITORIAL MODAL */
.ad-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.ad-modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 24px;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.ad-modal-header {
    padding: 20px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.header-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.modal-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.08);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.modal-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.ad-modal-body {
    padding: 28px;
}

.ad-editorial-hero {
    display: flex;
    gap: 24px;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.hero-image-wrapper {
    width: 240px;
    height: 180px;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.editorial-category {
    font-size: 0.72rem;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 1.5px;
}

.editorial-business-title {
    font-family: var(--font-editorial, 'DM Serif Display', Georgia, serif);
    font-size: 2.2rem;
    font-weight: 400;
    margin: 4px 0 8px 0;
    line-height: 1.15;
    color: var(--color-navy, #0F1B33);
}

.editorial-headline {
    font-size: 1.15rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 12px;
}

.editorial-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: #f59e0b;
    font-weight: 700;
}

.view-stats {
    color: #94a3b8;
    font-weight: 500;
}

.editorial-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 28px;
}

@media (max-width: 768px) {
    .editorial-grid {
        grid-template-columns: 1fr;
    }
    .ad-editorial-hero {
        flex-direction: column;
    }
    .hero-image-wrapper {
        width: 100%;
        height: 200px;
    }
}

.editorial-main h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #1e293b;
}

.editorial-description p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #475569;
}

/* COUPON BOX EDITORIAL */
.editorial-coupon-box {
    background: linear-gradient(135deg, #fff5f5, #fed7d7);
    border: 2px dashed #f56565;
    border-radius: 16px;
    padding: 20px;
    margin: 24px 0;
    display: flex;
    gap: 16px;
    align-items: center;
}

.coupon-icon {
    font-size: 2.2rem;
}

.coupon-label {
    font-size: 0.72rem;
    font-weight: 800;
    color: #c53030;
    letter-spacing: 1px;
}

.coupon-text {
    font-size: 1.05rem;
    font-weight: 700;
    color: #742a2a;
    margin: 2px 0 8px 0;
}

.coupon-code-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.coupon-code {
    background: #ffffff;
    padding: 6px 14px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: 800;
    color: #9b2c2c;
    border: 1px solid #feb2b2;
}

.btn-copy-coupon {
    background: #c53030;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

/* WHATSAPP ACTION BUTTON */
.btn-whatsapp-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25d366;
    color: white;
    text-decoration: none;
    padding: 14px 20px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 0.95rem;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
    margin-bottom: 20px;
    transition: transform 0.2s;
}

.btn-whatsapp-action:hover {
    transform: translateY(-2px);
    background: #22c55e;
}

.sidebar-card {
    background: #f8fafc;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

.contact-details-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 16px 0;
}

.contact-detail-item {
    display: flex;
    gap: 12px;
    font-size: 0.88rem;
    color: #475569;
}

.detail-icon {
    font-size: 1.2rem;
}

.neighborhood-map-card {
    margin-top: 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    padding: 16px;
    text-align: center;
}

.map-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.map-pin {
    font-size: 2rem;
}

.map-location-text {
    font-weight: 700;
    font-size: 0.9rem;
    color: #1e3a8a;
}

.map-subtext {
    font-size: 0.78rem;
    color: #3b82f6;
}

.ad-modal-footer {
    padding: 16px 28px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #94a3b8;
}

/* ADMIN METRICS SUMMARY */
.admin-metrics-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.metric-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--accent-primary);
}

.metric-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.admin-ad-metrics {
    display: flex;
    gap: 14px;
    margin-top: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #0f3460;
}

.form-section-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f3460;
    margin: 18px 0 10px 0;
    padding-bottom: 4px;
    border-bottom: 2px solid #e2e8f0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ========== RESPONSIVE WORKSPACE COTIZADOR (MERCHANT PANEL) ========== */
.quote-workspace-grid {
    display: grid;
    grid-template-columns: 1.65fr 1fr;
    gap: 24px;
    align-items: start;
}

.quote-col-config {
    background: #fff;
    padding: 24px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-height: 75vh;
    overflow-y: auto;
}

.quote-col-summary {
    background: #fff;
    padding: 24px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 0;
}

@media (max-width: 960px) {
    .quote-workspace-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .quote-col-config {
        max-height: none;
        overflow-y: visible;
        padding: 16px;
    }

    .quote-col-summary {
        position: static;
        padding: 16px;
    }
}

/* ========== MAPAS Y SELECTORES DE UBICACION (LEAFLET) ========== */
.leaflet-container,
.leaflet-container.leaflet-grab,
.leaflet-container.leaflet-grab:active,
.leaflet-container.leaflet-grabbing {
    cursor: crosshair !important;
}

.leaflet-marker-icon.leaflet-marker-draggable {
    cursor: move !important;
}

.leaflet-popup-content-wrapper {
    border-radius: 8px;
    font-size: 0.85rem;
}

/* ========== MOBILE STICKY CONTACT BAR (FICHA COMERCIO) ========== */
.mobile-sticky-bar {
    display: none;
}

@media (max-width: 768px) {
    .mobile-sticky-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #ffffff;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
        border-top: 1px solid #e2e8f0;
        padding: 10px 14px;
        gap: 10px;
        z-index: 1000;
        align-items: center;
    }
    .sticky-action-btn {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 12px 8px;
        border-radius: 8px;
        font-weight: 700;
        font-size: 0.88rem;
        text-decoration: none;
        text-align: center;
    }
    .sticky-btn-wa {
        background: #25d366;
        color: #ffffff !important;
    }
    .sticky-btn-call {
        background: #0f172a;
        color: #ffffff !important;
    }
    .sticky-btn-map {
        background: #f1f5f9;
        color: #1e293b !important;
        border: 1px solid #cbd5e1;
    }
    .business-profile-page {
        padding-bottom: 75px !important;
    }
}

/* ========== RESPONSIVE MODALS & FORMS ========== */
.modal-backdrop-custom {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.modal-dialog-custom {
    background: #f8fafc;
    border-radius: 20px;
    max-width: 1440px;
    width: 96vw;
    max-height: 94vh;
    overflow-y: auto;
    padding: 28px 32px;
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.35);
    border: 1px solid #e2e8f0;
}

.form-two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* MODAL DE PREVISUALIZACION REAL */
.preview-backdrop-custom {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    padding: 20px;
    overflow-y: auto;
}

.preview-dialog-custom {
    background: #f8fafc;
    border-radius: 20px;
    max-width: 1080px;
    width: 95vw;
    max-height: 94vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.5);
    border: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
    .modal-backdrop-custom {
        padding: 0;
        align-items: flex-start;
    }
    .modal-dialog-custom {
        width: 100vw;
        min-height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        padding: 16px 14px 28px;
    }
    .preview-backdrop-custom {
        padding: 0;
        align-items: flex-start;
    }
    .preview-dialog-custom {
        width: 100vw;
        min-height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        padding: 14px 12px 28px;
    }
    .form-two-col-grid {
        grid-template-columns: 1fr;
    }
}

/* OFICIAL CHANNELS & LINKTREE STYLES */
.official-link-card {
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.official-link-card:hover {
    border-color: #cbd5e1 !important;
    background: #ffffff !important;
    box-shadow: 0 6px 18px rgba(15, 27, 51, 0.08) !important;
    transform: translateY(-2px);
}

/* ========== FLOATING SALES ASSISTED WIDGET (WHATSAPP) ========== */
.floating-sales-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
}

.floating-wa-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25d366;
    color: #ffffff !important;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.92rem;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-wa-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.6);
}

@media (max-width: 768px) {
    .floating-sales-widget {
        bottom: 75px;
        right: 14px;
    }
    .floating-wa-btn {
        padding: 9px 14px;
        font-size: 0.8rem;
        gap: 6px;
    }
}


