/* ==========================================
   Mundianuncios.net - Estilos principales
   ========================================== */

:root {
    --primary: #9ACD32;
    --primary-dark: #7BA428;
    --secondary: #4A4A4A;
    --accent: #7CB342;
    --warning: #FFD23F;
    --danger: #C1292E;
    --dark: #333333;
    --dark-light: #4A4A4A;
    --light: #F8F9FA;
    --gray: #6C757D;
    --gray-light: #E9ECEF;
    --gold: #FFB800;
    --gold-light: #FFF8E1;
    --radius: 16px;
    --radius-sm: 8px;
    --shadow: 0 10px 40px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    /* Soporte para viewport dinámico en móviles */
    height: 100%;
    height: -webkit-fill-available;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--light);
    color: var(--dark);
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
}

/* Prevenir scroll mientras la pantalla de carga está visible */
body.loading-active {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* ==========================================
   PANTALLA DE CARGA INICIAL
   ========================================== */

.loading-screen {
    position: fixed;
    /* Usar inset: 0 para garantizar cobertura completa en todos los navegadores */
    inset: 0;
    /* Fallbacks para navegadores que no soportan inset */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Fallback: 100vh para navegadores antiguos */
    width: 100vw;
    height: 100vh;
    /* Unidades modernas para móviles (maneja barra de direcciones dinámica) */
    height: 100dvh;
    min-height: -webkit-fill-available; /* Safari iOS */
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    /* Prevenir scroll mientras está visible */
    overflow: hidden;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-screen-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    text-align: center;
}

.loading-logo-container {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.loading-logo {
    max-width: 280px;
    height: auto;
}

.loading-spinner-large {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    font-weight: 500;
    max-width: 300px;
    line-height: 1.5;
}

@media (max-width: 480px) {
    .loading-logo {
        max-width: 220px;
    }
    
    .loading-text {
        font-size: 1rem;
    }
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,107,53,0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    bottom: -30%;
    left: -10%;
    width: 60%;
    height: 80%;
    background: radial-gradient(circle, rgba(0,201,167,0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ==========================================
   Header & Navigation
   ========================================== */

header {
    background: var(--dark);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    background: white;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
}

.logo-img {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-link {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 0.9rem;
}

.nav-link:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}

.credits-badge {
    background: linear-gradient(135deg, var(--gold), #E5A600);
    color: var(--dark);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    transition: var(--transition);
}

.credits-badge:hover {
    transform: scale(1.05);
}

/* ==========================================
   Buttons
   ========================================== */

.btn {
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255,107,53,0.4);
}

.btn-secondary { background: var(--secondary); color: white; }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-gold { background: linear-gradient(135deg, var(--gold), #E5A600); color: var(--dark); }
.btn-danger { background: var(--danger); color: white; }
.btn-warning { background: #f59e0b; color: white; }
.btn-warning:hover { background: #d97706; }
.btn-warning:disabled { background: #9ca3af; cursor: not-allowed; opacity: 0.6; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ==========================================
   Layout
   ========================================== */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

/* ==========================================
   Hero Section
   ========================================== */

.hero {
    text-align: center;
    padding: 2.5rem 1rem;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero h1 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    color: white;
    margin-bottom: 0.75rem;
    position: relative;
}

.hero h1 span { color: var(--primary); }

.hero p {
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
}

/* ==========================================
   Search Bar
   ========================================== */

.search-container { 
    max-width: 700px; 
    margin: 0 auto; 
    position: relative;
    padding: 0 1rem;
}

.search-bar {
    display: flex;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.search-bar input {
    flex: 1;
    padding: 1rem;
    border: none;
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    outline: none;
    min-width: 0;
}

.search-bar select {
    padding: 1rem;
    border: none;
    border-left: 1px solid var(--gray-light);
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    outline: none;
}

.search-bar button {
    padding: 1rem 1.25rem;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.search-bar button:hover { background: var(--primary-dark); }

/* ==========================================
   Categories Grid
   ========================================== */

.categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.category-card {
    background: white;
    padding: 1.25rem 0.75rem;
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.category-card.active {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(255,107,53,0.1), rgba(0,201,167,0.1));
}

.category-icon { font-size: 2rem; margin-bottom: 0.4rem; }
.category-card h3 { font-size: 0.85rem; font-weight: 600; }
.category-card span { font-size: 0.75rem; color: var(--gray); }

/* ==========================================
   Section Headers
   ========================================== */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.section-header h2 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header h2::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(to bottom, var(--primary), var(--accent));
    border-radius: 2px;
}

/* ==========================================
   Featured Section
   ========================================== */

.featured-section {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255,184,0,0.12) 0%, rgba(255,107,53,0.06) 100%);
    border-radius: var(--radius);
    border: 2px solid rgba(255,184,0,0.3);
    position: relative;
    overflow: hidden;
}

.featured-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.featured-section .section-header h2::before {
    background: linear-gradient(to bottom, var(--gold), var(--primary));
}

/* Carrusel de destacados */
.featured-carousel-wrapper {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.featured-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    transition: transform 0.4s ease;
    width: max-content;
}

.featured-grid .listing-card {
    flex: 0 0 auto;
    width: calc((100vw - 6rem) / 3);
    min-width: 280px;
    max-width: 400px;
}

.featured-carousel-controls {
    display: flex;
    gap: 0.5rem;
}

.carousel-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    background: white;
    color: var(--gold);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: var(--gold);
    color: white;
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.featured-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 1rem;
}

.featured-carousel-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 184, 0, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.featured-carousel-dots .dot.active {
    background: var(--gold);
    transform: scale(1.2);
}

.featured-carousel-dots .dot:hover {
    background: var(--gold);
}

/* Responsive carrusel destacados */
@media (max-width: 992px) {
    .featured-grid .listing-card {
        width: calc((100vw - 5rem) / 2);
        min-width: 260px;
    }
}

@media (max-width: 600px) {
    .featured-section {
        padding: 1rem;
    }
    
    .featured-grid .listing-card {
        width: calc(100vw - 4rem);
        min-width: unset;
        max-width: unset;
    }
    
    .featured-carousel-controls {
        display: none;
    }
}

/* ==========================================
   Ads Grid & Cards
   ========================================== */

.ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

/* Sección de Categoría Filtrada */
#categorySection {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--gray-light);
    border-radius: var(--radius);
}

#categorySection .section-header h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#categorySection .section-header h2::before {
    display: none;
}

/* Filtros de categoría */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.filter-group label {
    font-size: 0.85rem;
    color: var(--gray);
    font-weight: 500;
}

.filter-group select,
.filter-group input {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
}

.filter-group select {
    min-width: 150px;
}

.price-range-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-range-inputs input {
    width: 80px;
}

.price-range-inputs span {
    color: var(--gray);
}

/* Paginación */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary);
    background: white;
    color: var(--primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
}

.pagination-btn.active {
    background: var(--primary);
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    color: var(--gray);
    font-size: 0.9rem;
    margin: 0 0.5rem;
}

@media (max-width: 600px) {
    .category-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group select {
        width: 100%;
    }
    
    .price-range-inputs {
        width: 100%;
    }
    
    .price-range-inputs input {
        flex: 1;
    }
}

.listing-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    cursor: pointer;
    position: relative;
}

.listing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.listing-card.featured {
    border: 2px solid var(--gold);
    box-shadow: 0 4px 20px rgba(255,184,0,0.2);
}

.featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, var(--gold), #E5A600);
    color: var(--dark);
    padding: 0.3rem 0.7rem;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(255,184,0,0.4);
}

.listing-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: var(--gray-light);
    transition: opacity 0.2s ease;
}

/* Carrusel de imágenes */
.listing-carousel {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.listing-carousel .listing-image {
    width: 100%;
    height: 100%;
}

.carousel-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.carousel-dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.9);
}

.listing-content { padding: 1rem; }

.listing-category {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: linear-gradient(135deg, rgba(255,107,53,0.1), rgba(0,201,167,0.1));
    color: var(--primary);
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.listing-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.listing-price {
    font-family: 'Space Mono', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.listing-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--gray);
}

/* ==========================================
   Credit Packs Section
   ========================================== */

.credit-packs-section {
    margin: 2rem 0;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
}

.credit-packs-section h2 {
    color: white;
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    position: relative;
}

.credit-packs-section > p {
    color: rgba(255,255,255,0.7);
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
    font-size: 0.95rem;
}

.packs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    position: relative;
}

.pack-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.pack-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.pack-card.popular {
    border: 3px solid var(--gold);
}

.pack-popular-badge {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--gold), #E5A600);
    color: var(--dark);
    padding: 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
}

/* Badge genérico para todos los packs */
.pack-badge {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
}

.pack-badge-basic {
    background: linear-gradient(135deg, #e0e5ec, #cfd5de);
    color: var(--dark);
}

.pack-badge-premium {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

/* Todos los packs con badge necesitan margin-top en content */
.pack-card .pack-badge ~ .pack-content,
.pack-card.popular .pack-content { margin-top: 0.5rem; }

.pack-credits {
    font-family: 'Space Mono', monospace;
    line-height: 1.2;
}

.pack-credits .credits-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    display: inline;
}

.pack-credits .credits-label {
    font-size: 0.9rem;
    color: var(--gray);
    font-weight: 400;
    margin-left: 0.5rem;
}

.pack-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0.75rem 0;
}

.pack-price small { font-size: 0.8rem; color: var(--gray); font-weight: 400; display: block; }

.pack-savings {
    background: rgba(0,201,167,0.15);
    color: #00856b;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: inline-block;
}

/* Texto para pack sin descuento */
.pack-no-discount {
    color: var(--gray);
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    display: inline-block;
}

.pack-features {
    text-align: left;
    margin: 1rem 0;
    font-size: 0.85rem;
    color: var(--gray);
}

.pack-features li {
    padding: 0.35rem 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.pack-features li::before { content: '✓'; color: var(--accent); font-weight: 700; }

.paypal-btn {
    background: #0070BA;
    color: white;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: var(--transition);
}

.paypal-btn:hover { background: #005ea6; }

/* ==========================================
   Modals
   ========================================== */

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(26,26,46,0.85);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
    overflow-y: auto;
}

.modal-overlay.active { display: flex; }

.modal {
    background: white;
    border-radius: var(--radius);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlide 0.3s ease;
}

.modal-large { max-width: 850px; }

@keyframes modalSlide {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.modal-header h2 { font-size: 1.25rem; }

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--gray-light);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover { background: var(--danger); color: white; }

.modal-body { 
    padding: 1.25rem; 
    overflow-x: hidden;
    max-width: 100%;
}

.modal-footer {
    padding: 1rem 1.25rem 1.5rem;
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    border-top: 1px solid var(--gray-light);
    background: var(--light);
    border-radius: 0 0 var(--radius) var(--radius);
}

/* ==========================================
   Forms
   ========================================== */

.form-group { margin-bottom: 1rem; }

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary);
}

.form-group textarea { min-height: 100px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.form-hint { font-size: 0.8rem; color: var(--gray); margin-top: 0.2rem; }

/* ==========================================
   Featured Toggle
   ========================================== */

.featured-toggle {
    background: var(--gold-light);
    border: 2px solid var(--gold);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.featured-toggle.disabled {
    background: var(--gray-light);
    border-color: var(--gray);
    opacity: 0.6;
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--gray-light);
    transition: var(--transition);
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--transition);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--gold), #E5A600);
}

.toggle-switch input:checked + .toggle-slider:before { transform: translateX(22px); }
.toggle-switch input:disabled + .toggle-slider { cursor: not-allowed; }

.toggle-info { flex: 1; }
.toggle-info h4 { font-size: 0.9rem; margin-bottom: 0.15rem; }
.toggle-info p { font-size: 0.75rem; color: var(--gray); margin: 0; }

/* ==========================================
   Image Upload
   ========================================== */

.image-upload {
    border: 2px dashed var(--gray-light);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.image-upload:hover { border-color: var(--primary); }
.image-upload input { display: none; }
.image-upload-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }

.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.preview-item img { width: 100%; height: 100%; object-fit: cover; }

.preview-item button {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 22px;
    height: 22px;
    border: none;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.75rem;
}

/* ==========================================
   Tabs
   ========================================== */

.tabs {
    display: flex;
    border-bottom: 2px solid var(--gray-light);
    margin-bottom: 1rem;
    overflow-x: auto;
}

.tab {
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    white-space: nowrap;
}

.tab:hover { color: var(--dark); }
.tab.active { color: var(--primary); }

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0; right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* Forgot Password */
.forgot-password-link {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.forgot-password-link a {
    color: var(--primary);
    text-decoration: none;
}

.forgot-password-link a:hover {
    text-decoration: underline;
}

.forgot-instructions {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.back-to-login {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.back-to-login a {
    color: var(--gray);
    text-decoration: none;
}

.back-to-login a:hover {
    color: var(--primary);
}

/* ==========================================
   User Panel
   ========================================== */

.panel {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.panel-header {
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--dark), var(--dark-light));
    color: white;
}

.user-info { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.user-details { flex: 1; min-width: 120px; }
.user-details h3 { font-size: 1.1rem; margin-bottom: 0.15rem; }
.user-details span { font-size: 0.85rem; opacity: 0.7; }

.user-credits-display {
    background: rgba(255,184,0,0.2);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    text-align: center;
}

.user-credits-display .count {
    font-family: 'Space Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1;
}

.user-credits-display span { font-size: 0.75rem; opacity: 0.8; }

.panel-body { padding: 1.25rem; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.stat-card {
    background: var(--light);
    padding: 1rem 0.5rem;
    border-radius: var(--radius-sm);
    text-align: center;
}

.stat-card.gold { background: var(--gold-light); border: 2px solid var(--gold); }

.stat-number {
    font-family: 'Space Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.stat-card.gold .stat-number { color: #B8860B; }
.stat-label { font-size: 0.75rem; color: var(--gray); margin-top: 0.2rem; }

/* ==========================================
   My Ads List
   ========================================== */

.my-ad-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    transition: var(--transition);
}

.my-ad-item:hover { border-color: var(--primary); }
.my-ad-item.featured-item { border-color: var(--gold); background: var(--gold-light); }
.my-ad-item.expired-item { 
    border-color: #dc3545; 
    background: rgba(220, 53, 69, 0.05);
    opacity: 0.8;
}
.my-ad-item.expired-item:hover { border-color: #dc3545; }

/* Badges de caducidad */
.expired-badge {
    background: linear-gradient(135deg, #dc3545, #c82333) !important;
    color: white !important;
}

.expiry-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 0.3rem;
}

.expiry-badge.expired {
    background: #dc3545;
    color: white;
}

.expiry-badge.expiring-soon {
    background: #ffc107;
    color: #000;
}

.expiry-info {
    display: inline-block;
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 0.3rem;
}

/* Botón reactivar */
.btn-icon.reactivate {
    background: #28a745 !important;
    color: white !important;
}
.btn-icon.reactivate:hover {
    background: #218838 !important;
}

.my-ad-image,
.my-listing-image {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    background: var(--gray-light);
}

.my-ad-info { flex: 1; min-width: 0; }

.my-ad-info h4 {
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.my-ad-info h4 .mini-badge {
    background: linear-gradient(135deg, var(--gold), #E5A600);
    color: var(--dark);
    padding: 0.1rem 0.4rem;
    border-radius: 8px;
    font-size: 0.6rem;
    font-weight: 700;
}

.my-ad-info .price {
    font-family: 'Space Mono', monospace;
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
}

.my-ad-info small { color: var(--gray); font-size: 0.75rem; }

.my-ad-actions { 
    display: flex; 
    gap: 0.4rem; 
    align-items: flex-start;
    flex-shrink: 0;
}

.btn-icon {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 0.9rem;
}

.btn-icon:hover { transform: scale(1.1); }
.btn-icon.delete { background: var(--danger); color: white; }
.btn-icon.star { background: linear-gradient(135deg, var(--gold), #E5A600); color: var(--dark); }
.btn-icon.bump { background: var(--accent); color: white; }
.btn-icon.edit { background: var(--secondary); color: white; }

/* ==========================================
   Ad Detail View
   ========================================== */

.ad-detail { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 1.5rem; 
    max-width: 100%;
    overflow: hidden;
}

.ad-detail-main-image {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: var(--radius);
    background: var(--gray-light);
}

.ad-detail-thumbs {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.75rem;
    overflow-x: auto;
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.ad-detail-thumb {
    width: calc((100% - 1.6rem) / 5); /* 5 thumbnails con gaps */
    min-width: 50px;
    max-width: 70px;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    opacity: 0.6;
    transition: var(--transition);
    flex-shrink: 0;
}

.ad-detail-thumb:hover, .ad-detail-thumb.active { opacity: 1; }

/* Ajustes responsive para thumbnails */
@media (max-width: 400px) {
    .ad-detail-thumb {
        width: calc((100% - 1.2rem) / 5);
        min-width: 45px;
    }
    
    .ad-detail-thumbs {
        gap: 0.3rem;
    }
}

/* YouTube Embed */
.youtube-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin-top: 1rem;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--dark);
}

.youtube-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.ad-detail-info h1 { font-size: 1.5rem; margin-bottom: 0.4rem; }

.ad-detail-price {
    font-family: 'Space Mono', monospace;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.ad-detail-meta {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--gray-light);
    border-bottom: 1px solid var(--gray-light);
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: var(--gray);
    flex-wrap: wrap;
}

.ad-detail-description { line-height: 1.6; font-size: 0.95rem; }

.seller-card {
    background: var(--light);
    padding: 1.25rem;
    border-radius: var(--radius);
    margin-top: 1.25rem;
}

.seller-card h3 { margin-bottom: 0.75rem; font-size: 1rem; }

/* ==========================================
   Alerts & Toasts
   ========================================== */

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.alert-success { background: rgba(0,201,167,0.1); color: #00856b; border-left: 4px solid var(--accent); }
.alert-error { background: rgba(193,41,46,0.1); color: var(--danger); border-left: 4px solid var(--danger); }
.alert-warning { background: rgba(255,210,63,0.15); color: #8a6d00; border-left: 4px solid var(--warning); }

.toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--dark);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: toastIn 0.3s ease;
    font-size: 0.9rem;
}

.toast.success { border-left: 4px solid var(--accent); }
.toast.error { border-left: 4px solid var(--danger); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

/* ==========================================
   PayPal Modal
   ========================================== */

.paypal-summary {
    background: var(--light);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
}

.paypal-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.paypal-summary-item.total {
    border-top: 2px solid var(--gray-light);
    margin-top: 0.5rem;
    padding-top: 1rem;
    font-size: 1.25rem;
}

.paypal-summary-item.total strong {
    color: var(--primary);
    font-family: 'Space Mono', monospace;
}

.paypal-info {
    text-align: center;
    padding: 1rem;
    background: rgba(0, 112, 186, 0.1);
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.paypal-info p {
    font-weight: 600;
    color: #0070BA;
    margin-bottom: 0.25rem;
}

.paypal-info small {
    color: var(--gray);
    font-size: 0.8rem;
}

#paypalButtonContainer {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.paypal-footer {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-light);
}

.paypal-footer small {
    color: var(--gray);
    font-size: 0.75rem;
}

.paypal-footer a {
    color: var(--primary);
}

/* ==========================================
   Chat System
   ========================================== */

/* Conversations List */
.conversation-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem;
    border-bottom: 1px solid var(--gray-light);
    cursor: pointer;
    transition: var(--transition);
}

.conversation-item:hover {
    background: var(--light);
}

.conversation-item.unread {
    background: rgba(255, 107, 53, 0.05);
}

.conversation-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.conversation-info {
    flex: 1;
    min-width: 0;
}

.conversation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.15rem;
}

.conversation-name {
    font-weight: 600;
    color: var(--dark);
}

.conversation-time {
    font-size: 0.75rem;
    color: var(--gray);
}

.conversation-ad {
    font-size: 0.75rem;
    color: var(--primary);
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-preview {
    font-size: 0.85rem;
    color: var(--gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-item.unread .conversation-preview {
    color: var(--dark);
    font-weight: 500;
}

.conversation-badge {
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* Chat Modal */
.chat-modal .modal {
    max-width: 500px;
    height: 80vh;
    max-height: 600px;
    display: flex;
    flex-direction: column;
}

.chat-modal .modal-header {
    border-bottom: 1px solid var(--gray-light);
    flex-shrink: 0;
}

.chat-header-info {
    display: flex;
    flex-direction: column;
}

.chat-header-info h2 {
    font-size: 1.1rem;
    margin: 0;
}

.chat-header-info small {
    font-size: 0.75rem;
    color: var(--gray);
}

.chat-modal .modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

/* Chat Messages */
#chatMessages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-warning {
    background: linear-gradient(135deg, rgba(255, 210, 63, 0.15), rgba(255, 107, 53, 0.1));
    border: 1px solid rgba(255, 210, 63, 0.4);
    border-radius: var(--radius);
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.chat-warning-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.chat-warning p {
    font-size: 0.8rem;
    color: #8a6d00;
    margin: 0;
    line-height: 1.4;
}

.chat-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-size: 0.9rem;
}

.chat-message {
    display: flex;
    max-width: 80%;
}

.chat-message.own {
    align-self: flex-end;
}

.chat-message.other {
    align-self: flex-start;
}

.message-bubble {
    padding: 0.6rem 0.875rem;
    border-radius: var(--radius);
    position: relative;
}

.chat-message.own .message-bubble {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.other .message-bubble {
    background: var(--gray-light);
    color: var(--dark);
    border-bottom-left-radius: 4px;
}

.chat-message.reported .message-bubble {
    background: rgba(193, 41, 46, 0.1);
    border: 1px dashed var(--danger);
}

.message-content {
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.message-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.message-time {
    font-size: 0.65rem;
    opacity: 0.7;
}

.report-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.7rem;
    opacity: 0.5;
    padding: 0;
    transition: var(--transition);
}

.report-btn:hover {
    opacity: 1;
    transform: scale(1.2);
}

.reported-badge {
    font-size: 0.65rem;
    color: var(--danger);
}

/* Chat Input */
.chat-input-container {
    padding: 0.75rem;
    border-top: 1px solid var(--gray-light);
    background: white;
    flex-shrink: 0;
}

.chat-input-form {
    display: flex;
    gap: 0.5rem;
}

.chat-input-form input {
    flex: 1;
    padding: 0.6rem 1rem;
    border: 2px solid var(--gray-light);
    border-radius: 25px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.chat-input-form input:focus {
    border-color: var(--primary);
}

.chat-input-form button {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition);
}

.chat-input-form button:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.chat-input-form button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Chat Button in Nav */
.chat-nav-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

/* Seller Card Chat Button */
.seller-chat-btn {
    background: var(--accent);
    margin-top: 0.5rem;
}

.seller-chat-btn:hover {
    background: #00a88a;
}

/* ==========================================
   Empty States & Loading
   ========================================== */

.empty-state { text-align: center; padding: 2rem; color: var(--gray); }
.empty-state-icon { font-size: 3rem; margin-bottom: 0.75rem; }

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================
   Footer
   ========================================== */

footer {
    background: var(--dark);
    color: white;
    padding: 3rem 1.5rem 1.5rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.footer-section p {
    font-size: 0.9rem;
    color: var(--gray);
    line-height: 1.6;
}

.footer-section nav {
    display: flex;
    flex-direction: column;
}

.footer-section a {
    color: var(--gray);
    text-decoration: none;
    padding: 0.35rem 0;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-about {
    max-width: 280px;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.footer-social a {
    font-size: 1.3rem;
    padding: 0.5rem;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.footer-bottom p {
    color: var(--gray);
    font-size: 0.85rem;
    margin: 0.25rem 0;
}

.footer-seo-text {
    font-size: 0.75rem !important;
    opacity: 0.6;
}

/* ==========================================
   Country Selector
   ========================================== */

.country-selector {
    position: relative;
    margin-right: 0.5rem;
}

.country-current {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    color: white;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    transition: var(--transition);
}

.country-current:hover {
    background: rgba(255,255,255,0.2);
}

.country-flag {
    font-size: 1.2rem;
}

.country-name {
    font-weight: 500;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.country-arrow {
    font-size: 0.6rem;
    opacity: 0.7;
    transition: var(--transition);
}

.country-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}

.country-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.country-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.7rem 1rem;
    border: none;
    background: none;
    color: var(--dark);
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.country-option:hover {
    background: var(--light);
}

.country-option.active {
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary);
    font-weight: 600;
}

/* ==========================================
   Location Autocomplete
   ========================================== */

.location-autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 0.25rem;
}

.location-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--gray-light);
}

.location-item:last-child {
    border-bottom: none;
}

.location-item:hover,
.location-item.selected {
    background: var(--light);
}

.location-item.selected {
    background: rgba(255, 107, 53, 0.1);
}

.location-city {
    font-weight: 500;
    color: var(--dark);
}

.location-region {
    font-size: 0.8rem;
    color: var(--gray);
}

/* Country display in forms */
.country-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--light);
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-sm);
    color: var(--dark);
}

.country-display .country-flag {
    font-size: 1.3rem;
}

.country-display .country-name {
    font-weight: 500;
}

.location-input-wrapper {
    position: relative;
}

/* ==========================================
   Welcome Modal
   ========================================== */

.modal-welcome {
    max-width: 600px;
    animation: welcomeSlideIn 0.4s ease;
}

@keyframes welcomeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-welcome .modal-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    text-align: center;
    padding: 1.5rem;
}

.modal-welcome .modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.welcome-intro {
    text-align: center;
    color: var(--gray);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.welcome-steps {
    min-height: 300px;
}

.welcome-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.welcome-step.active {
    display: block;
}

.welcome-step h3 {
    text-align: center;
    color: var(--dark);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    max-height: 350px;
    overflow-y: auto;
    padding: 0.5rem;
}

.country-grid-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--light);
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.country-grid-item:hover {
    border-color: var(--primary);
    background: white;
}

.country-grid-item .country-flag {
    font-size: 1.4rem;
}

.country-grid-item .country-name {
    font-weight: 500;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.selected-country-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(255,107,53,0.1), rgba(0,184,148,0.1));
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.selected-country-display .country-flag {
    font-size: 2rem;
}

#welcomeLocation {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius);
    transition: var(--transition);
}

#welcomeLocation:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,107,53,0.15);
}

.welcome-hint {
    text-align: center;
    color: var(--gray);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.welcome-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: space-between;
}

.welcome-actions .btn {
    flex: 1;
    padding: 0.875rem 1.5rem;
}

#welcomeConfirmBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Radius Filter */
.search-radius-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1rem;
    border-left: 1px solid var(--gray-light);
    height: 100%;
}

.search-radius-wrapper label {
    font-size: 0.85rem;
    color: var(--primary);
    white-space: nowrap;
    font-weight: 500;
}

.search-radius-wrapper select {
    padding: 0.4rem 0.5rem;
    border: none;
    font-size: 0.85rem;
    background: transparent;
    cursor: pointer;
    outline: none;
    color: var(--dark);
}

/* Distance badge on ad cards */
.listing-distance {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--gray);
    background: var(--light);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    margin-top: 0.25rem;
}

.listing-distance.nearby {
    color: var(--secondary);
    background: rgba(0,184,148,0.1);
}

/* Current location display */
.current-location-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(255,107,53,0.08), rgba(0,184,148,0.08));
    border: 2px solid rgba(0,184,148,0.3);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
}

.current-location-display .location-icon {
    font-size: 1.5rem;
}

.current-location-display .location-details {
    flex: 1;
}

.current-location-display .location-city-name {
    font-weight: 600;
    color: var(--dark);
    font-size: 1rem;
}

.current-location-display .location-country-name {
    font-size: 0.85rem;
    color: var(--gray);
}

.current-location-display .location-not-set {
    color: var(--gray);
    font-style: italic;
}

.current-location-display .btn-change-location {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
}

/* ==========================================
   Geo Config Panel (Admin)
   ========================================== */

.geo-config-panel {
    background: var(--light);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.geo-config-panel h3 {
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.geo-mode-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.geo-mode-option {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.geo-mode-option:has(input:checked) {
    border-color: var(--primary);
    background: rgba(255, 107, 53, 0.05);
}

.geo-mode-option input {
    margin-top: 0.25rem;
}

.geo-mode-label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.geo-mode-label strong {
    color: var(--dark);
}

.geo-mode-label small {
    color: var(--gray);
    font-size: 0.8rem;
}

.geo-countries-list {
    margin-bottom: 1.5rem;
}

.geo-countries-list h4 {
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.geo-hint {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 1rem;
}

.geo-country-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.geo-country-item:hover {
    border-color: var(--primary);
}

.geo-country-item.enabled {
    border-color: var(--primary);
    background: rgba(255, 107, 53, 0.03);
}

.geo-country-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.geo-country-item .country-name {
    flex: 1;
    color: var(--dark);
}

.geo-country-item .btn-set-default {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.4;
    transition: var(--transition);
}

.geo-country-item .btn-set-default:hover,
.geo-country-item .btn-set-default.active {
    opacity: 1;
}

.geo-no-data {
    font-size: 0.75rem;
    color: var(--gray);
    font-style: italic;
}

.geo-actions {
    padding-top: 1rem;
    border-top: 1px solid var(--gray-light);
}

/* ==========================================
   Language Selector
   ========================================== */

.lang-selector {
    position: relative;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.6rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    color: white;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    transition: var(--transition);
}

.lang-current:hover {
    background: rgba(255,255,255,0.2);
}

.lang-flag {
    font-size: 1.1rem;
}

.lang-code {
    font-weight: 600;
}

.lang-arrow {
    font-size: 0.6rem;
    opacity: 0.7;
    transition: var(--transition);
}

.lang-dropdown.open + .lang-current .lang-arrow,
.lang-selector:has(.lang-dropdown.open) .lang-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}

.lang-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.65rem 1rem;
    border: none;
    background: none;
    color: var(--dark);
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.lang-option:hover {
    background: var(--light);
}

.lang-option.active {
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary);
    font-weight: 600;
}

.lang-option .lang-flag {
    font-size: 1.2rem;
}

.lang-name {
    flex: 1;
}

/* Loading state during language change */
.lang-loading {
    pointer-events: none;
    opacity: 0.7;
}

.lang-loading::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
    background-size: 200% 100%;
    animation: langLoadingBar 1s ease-in-out infinite;
    z-index: 9999;
}

@keyframes langLoadingBar {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==========================================
   Responsive
   ========================================== */

@media (max-width: 768px) {
    .header-content { 
        justify-content: center; 
        flex-direction: column;
        gap: 0.75rem;
    }
    
    /* Logo grande en móvil con banda blanca */
    .logo {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        border-radius: 0;
        margin: 0 -1rem;
        width: calc(100% + 2rem);
    }
    
    .logo-img {
        height: auto;
        width: 85%;
        max-width: 320px;
    }
    
    nav { width: 100%; justify-content: center; }
    .search-bar { flex-direction: column; }
    .search-bar select { border-left: none; border-top: 1px solid var(--gray-light); }
    .search-radius-wrapper { 
        border-left: none; 
        border-top: 1px solid var(--gray-light); 
        padding: 0.75rem 1rem;
        justify-content: center;
    }
    .form-row { grid-template-columns: 1fr; }
    .ad-detail { grid-template-columns: 1fr; }
    .ad-detail > div:first-child { max-width: 100%; overflow: hidden; }
    .ad-detail-thumbs { 
        max-width: 100%; 
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .ad-detail-thumb {
        width: 60px;
        min-width: 60px;
        max-width: 60px;
        height: 45px;
        aspect-ratio: auto;
    }
    .my-ad-item { flex-direction: column; }
    .my-ad-image,
    .my-listing-image { width: 100%; height: 140px; }
    .my-ad-actions { justify-content: flex-end; }
    .toast-container { left: 1rem; right: 1rem; }
    .user-info { justify-content: center; text-align: center; }
    .user-credits-display { width: 100%; margin-top: 0.5rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================
   Utilities
   ========================================== */

.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }

/* ==========================================
   Adblock Detection Modal
   ========================================== */

.adblock-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.adblock-overlay.active {
    display: flex;
}

.adblock-modal {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
}

.adblock-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.adblock-modal h2 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.adblock-modal p {
    color: var(--gray);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.adblock-reasons {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin: 1.5rem 0;
    text-align: left;
}

.adblock-reasons p {
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.adblock-reasons ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.adblock-reasons li {
    padding: 0.25rem 0;
    color: #856404;
}

.adblock-instructions {
    background: var(--gray-light);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin: 1.5rem 0;
    text-align: left;
}

.adblock-instructions p {
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.adblock-instructions ol {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--gray);
}

.adblock-instructions li {
    padding: 0.25rem 0;
}

.adblock-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    margin-top: 1rem;
}

.adblock-note {
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 1rem;
    font-style: italic;
}

.adblock-error {
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* ==========================================
   Modales de Spam / Avisos
   ========================================== */

/* Modal de Aviso de Spam */
.spam-warning-modal {
    max-width: 480px;
}

.spam-warning-header {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
    border-bottom: 2px solid #ffc107;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem !important;
    text-align: center;
}

.spam-warning-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.spam-warning-header h2 {
    color: #856404;
    font-size: 1.25rem;
}

.spam-warning-content {
    text-align: center;
}

.spam-warning-text {
    font-size: 1rem;
    color: var(--dark);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.spam-warning-details {
    background: var(--light);
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    border: 1px solid var(--gray-light);
}

.spam-warning-count,
.spam-warning-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.spam-warning-count {
    border-bottom: 1px solid var(--gray-light);
}

.spam-warning-count strong {
    font-size: 1.5rem;
    color: var(--danger);
}

.spam-warning-action span:last-child {
    color: var(--danger);
    font-weight: 500;
}

.spam-warning-rules {
    text-align: left;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
}

.spam-warning-rules h4 {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.spam-warning-rules ul {
    margin: 0;
    padding-left: 1.5rem;
    font-size: 0.85rem;
    color: var(--gray);
}

.spam-warning-rules li {
    padding: 0.25rem 0;
}

/* Modal de Cuenta Bloqueada */
.spam-blocked-modal {
    max-width: 480px;
}

.spam-blocked-header {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-bottom: 2px solid var(--danger);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem !important;
    text-align: center;
}

.spam-blocked-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.spam-blocked-header h2 {
    color: var(--danger);
    font-size: 1.25rem;
}

.spam-blocked-content {
    text-align: center;
}

.spam-blocked-text {
    font-size: 1rem;
    color: var(--dark);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.spam-blocked-actions {
    background: #f8d7da;
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    border: 1px solid #f5c6cb;
}

.spam-blocked-actions ul {
    margin: 0;
    padding-left: 1.5rem;
    text-align: left;
    font-size: 0.9rem;
    color: #721c24;
}

.spam-blocked-actions li {
    padding: 0.25rem 0;
}

.spam-blocked-contact {
    background: var(--light);
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-light);
}

.spam-blocked-contact p {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 1rem;
}

.spam-blocked-contact .btn {
    width: 100%;
}

/* ==========================================
   MODAL DE DENUNCIA DE ANUNCIOS
   ========================================== */

.report-reasons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0;
}

.report-reason-option {
    cursor: pointer;
}

.report-reason-option input[type="radio"] {
    display: none;
}

.report-reason-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--light);
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.report-reason-option input[type="radio"]:checked + .report-reason-label {
    border-color: var(--danger);
    background: rgba(193, 41, 46, 0.05);
}

.report-reason-option:hover .report-reason-label {
    border-color: var(--gray);
}

.report-reason-icon {
    font-size: 1.25rem;
    width: 2rem;
    text-align: center;
}

.report-reason-text {
    font-size: 0.95rem;
    color: var(--dark);
}

.report-details-container {
    margin-top: 1rem;
}

.report-details-container label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

.report-details-container textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    transition: var(--transition);
}

.report-details-container textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Botón de denuncia en detalle de anuncio */
.report-ad-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background: transparent;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-sm);
    color: var(--gray);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 0.5rem;
}

.report-ad-btn:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: rgba(193, 41, 46, 0.05);
}

/* ==========================================
   CAMPO DE PRECIO CON MONEDA
   ========================================== */

.price-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
}

.price-input-wrapper input {
    flex: 1;
    text-align: right;
    padding-right: 2.5rem !important;
}

.price-input-wrapper input::-webkit-inner-spin-button,
.price-input-wrapper input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.price-input-wrapper input[type=number] {
    -moz-appearance: textfield;
}

.price-currency-prefix,
.price-currency-suffix {
    position: absolute;
    color: var(--text-light);
    font-weight: 600;
    pointer-events: none;
    font-size: 1rem;
}

.price-currency-prefix {
    left: 1rem;
}

.price-currency-suffix {
    right: 1rem;
}

.price-currency-prefix:empty + input {
    padding-left: 1rem;
}

.price-currency-suffix:empty {
    display: none;
}

/* Ajuste cuando el símbolo está delante */
.price-input-wrapper.currency-before input {
    padding-left: 2.5rem !important;
    padding-right: 1rem !important;
    text-align: left;
}

/* Ajuste cuando el símbolo está detrás */
.price-input-wrapper.currency-after input {
    padding-left: 1rem !important;
    padding-right: 2.5rem !important;
    text-align: right;
}

/* Nota de moneda PayPal */
.paypal-currency-note {
    background: var(--warning-light, #fff3cd);
    color: var(--warning-dark, #856404);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    text-align: center;
}

/* ==========================================
   MEJORAS PACKS DE CRÉDITOS
   ========================================== */

.pack-per-credit {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.pack-card .pack-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.pack-card .pack-savings {
    background: var(--primary-light);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    margin: 0.5rem 0;
}

.pack-card.popular .pack-savings {
    background: var(--gold-light, #fff9e6);
    color: var(--gold, #d4a516);
}

.mini-packs .pack-card {
    padding: 0.75rem;
    padding-top: 0;
}

/* Badges en mini-packs */
.mini-packs .pack-badge,
.mini-packs .pack-popular-badge {
    position: relative;
    border-radius: 8px 8px 0 0;
    margin: 0 -0.75rem;
    padding: 0.3rem;
    font-size: 0.8rem;
}

.mini-packs .pack-content {
    padding-top: 0.75rem;
}

.mini-packs .pack-credits .credits-amount {
    font-size: 2rem;
}

.mini-packs .pack-credits .credits-label {
    font-size: 0.75rem;
    display: block;
    margin-left: 0;
    margin-top: -0.25rem;
}

.mini-packs .pack-price {
    font-size: 1.1rem;
    margin: 0.5rem 0;
}

.mini-packs .paypal-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* ==========================================
   SISTEMA DE FAVORITOS
   ========================================== */

/* Botón de favoritos en tarjeta de anuncio */
.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.favorite-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.favorite-btn:active {
    transform: scale(0.95);
}

.favorite-btn.is-favorite {
    background: #fff0f0;
}

/* Contador de favoritos en tarjeta */
.favorite-count-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 0.85rem;
    color: #e74c3c;
}

.favorite-count {
    font-weight: 600;
}

/* Botón grande de favoritos en detalle */
.ad-detail-favorites {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 1rem 0;
    padding: 1rem;
    background: #fafafa;
    border-radius: 10px;
}

.favorite-btn-large {
    padding: 12px 20px;
    border-radius: 8px;
    border: 2px solid #e74c3c;
    background: white;
    color: #e74c3c;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.favorite-btn-large:hover {
    background: #fff5f5;
    transform: translateY(-1px);
}

.favorite-btn-large.is-favorite {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border-color: transparent;
}

.favorite-btn-large.is-favorite:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
}

/* Badge contador de interesados */
.favorite-count-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.9rem;
    color: #666;
}

.favorite-count-badge span {
    font-weight: 600;
    color: #e74c3c;
}

/* Sección de favoritos vacía */
.favorites-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #888;
}

.favorites-empty .empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Animación de corazón */
@keyframes heartPulse {
    0% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(1); }
    75% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.favorite-btn.is-favorite {
    animation: heartPulse 0.4s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .favorite-btn {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .ad-detail-favorites {
        padding: 0.75rem;
    }
    
    .favorite-btn-large {
        padding: 10px 16px;
        font-size: 0.95rem;
    }
}

/* ==========================================
   GOOGLE ADSENSE
   ========================================== */

.adsense-container {
    width: 100%;
    max-width: 100%;
    margin: 1.5rem auto;
    text-align: center;
    overflow: hidden;
}

.adsense-container .adsbygoogle {
    display: block;
    width: 100%;
}

.adsense-header {
    max-width: 1200px;
    padding: 0 1rem;
    margin: 1rem auto;
}

.adsense-footer {
    max-width: 1200px;
    padding: 0 1rem;
    margin: 2rem auto 1rem;
}

.adsense-featured {
    max-width: 1200px;
    padding: 0 1.5rem;
    margin: 1.5rem auto;
}

.adsense-listing {
    grid-column: 1 / -1;
    padding: 1rem;
    background: var(--light);
    border-radius: var(--radius);
    margin: 0.5rem 0;
}

.adsense-detail {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--light);
    border-radius: var(--radius);
}

/* En móviles, reducir márgenes */
@media (max-width: 768px) {
    .adsense-container {
        margin: 1rem auto;
    }
    
    .adsense-header,
    .adsense-footer,
    .adsense-featured {
        padding: 0 0.5rem;
    }
}

/* Estado Desactivado */
.btn-icon.deactivate { color: #f59e0b; }
.expiry-badge.deactivated { background:#6b7280; color:#fff; }
.my-ad-item.deactivated-item { opacity:.75; border-left:3px solid #6b7280; }

/* Corrección de fondos de botones */
.btn-icon.deactivate { background: #f59e0b; }
.btn-icon.star { background: #2196F3; }
