/* === VARIABLES Y DISEÑO BASE === */
:root {
    --bg-dark: #f1f5f9;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --nav-bg: #0f172a;
    --accent: #2563eb; /* Blue accent for Kavak-style professionalism */
    --accent-hover: #1d4ed8;
    --price-color: #0f172a;
    --whatsapp-color: #10b981;
    --whatsapp-hover: #059669;
    
    --font-main: 'Inter', sans-serif;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* === RESET Y BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* === TIPOGRAFÍA & GRADIENTES === */
.gradient-text {
    background: linear-gradient(135deg, #0f172a 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* === NAVEGACIÓN ULTRA-MODERNA === */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 1) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
    transition: all 0.4s ease;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 2rem;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: #ffffff;
}

.logo-img {
    height: 45px;
    width: auto;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.3);
}

.logo-text {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-links a {
    position: relative;
    text-decoration: none;
    color: #cbd5e1;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.7rem 1.2rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.nav-links a i {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.nav-links a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-links a:hover i {
    transform: translateY(-2px);
    color: var(--accent);
}

.nav-links a.active {
    color: #ffffff;
    background: rgba(37, 99, 235, 0.2);
    box-shadow: inset 0 0 10px rgba(37, 99, 235, 0.2);
}

.nav-links a.active i {
    color: var(--accent);
}

/* Indicador de barra inferior animada */
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 15px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--accent);
}

/* --- Botón Hamburguesa (Global) --- */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-btn span {
    width: 100%;
    height: 3px;
    background-color: #ffffff;
    border-radius: 10px;
    transition: all 0.3s linear;
}

/* Animación Hamburguesa Abierta */
.hamburger-btn.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger-btn.open span:nth-child(2) { opacity: 0; }
.hamburger-btn.open span:nth-child(3) { transform: rotate(-45deg) translate(7px, -8px); }

/* === HERO Y CARRUSEL === */
.hero, .hero-section {
    padding: 10px 0 0 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#search-title {
    background: #fff;
    margin: 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 1.5rem;
}

.hero-content {
    padding: 0 1rem;
    max-width: 98%;
    margin: 0 auto;
}

.hero-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    width: 100%;
}

.hero-text {
    flex: 1;
    min-width: 320px;
    max-width: 500px;
    z-index: 2;
}

.ads-column {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.ad-banner {
    width: 180px;
    height: 180px;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    transition: var(--transition);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0,0,0,0.05);
}

.ad-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ads-row-center {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1.2rem 0;
    width: 100%;
}

.ad-banner img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* CORRECCIÓN: No corta logos/imágenes */
    padding: 5px; /* Aire para que no pegue a los bordes */
}

.ad-banner:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

@media (min-width: 900px) {
    .ad-banner {
        display: flex;
    }
}

.ad-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--accent);
    color: white;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 2;
    letter-spacing: 0.5px;
}

/* === PUBLICIDAD CENTRAL (v3.2) === */
.ads-row-center {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 0.5rem 0; /* Menos margen vertical p/ compactar */
}

.ads-row-center .ad-banner {
    width: 320px; /* Estirado horizontalmente */
    height: 160px; /* Un poco más bajo para look banner */
}


.hero::before {
    content: '';
    position: absolute;
    top: 0; right: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at top right, rgba(15, 23, 42, 0.05), transparent 400px);
    pointer-events: none;
}

.hero-text {
    flex: 0 1 auto;
    min-width: 450px;
    margin-top: -10px; /* Pulling slightly into the space */
}

.hero-content h1 {
    font-size: 1.8rem;
    margin: 0; /* Zero margin top and bottom */
}

.hero-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 500px;
    margin: 0 auto 0.2rem;
}

/* === BUSCADOR GLOBAL === */
.search-container {
    max-width: 550px;
    margin: 0 auto 0.2rem;
}

.search-box {
    display: flex;
    align-items: center;
    padding: 1rem 1.8rem;
    gap: 1.2rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.12);
    transition: var(--transition);
    animation: searchPulse 3s infinite ease-in-out;
    position: relative; /* REQUERIDO PARA SUGERENCIAS (v3.8) */
}

@keyframes searchPulse {
    0% { box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.12); border-color: rgba(255, 255, 255, 0.5); }
    50% { box-shadow: 0 12px 50px 0 rgba(249, 115, 22, 0.15); border-color: rgba(249, 115, 22, 0.3); }
    100% { box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.12); border-color: rgba(255, 255, 255, 0.5); }
}

.search-box:focus-within {
    animation: none;
    background: #ffffff;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
    transform: translateY(-3px) scale(1.02);
    border-color: var(--accent);
}

.search-icon {
    font-size: 1.4rem;
    color: var(--accent);
}

.search-box input {
    border: none;
    background: transparent;
    width: 100%;
    font-size: 1.1rem;
    color: var(--text-primary);
    outline: none;
    font-family: var(--font-main);
    font-weight: 500;
}

.search-box input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* === FILTROS POR SECCIÓN === */
.filters-container, .section-filters {
    display: flex;
    flex-direction: column; /* Una fila para subsecciones, otra para filtros */
    gap: 0;
    margin-bottom: 2rem;
    background: #ffffff;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid #e2e8f0;
    align-items: stretch;
    box-shadow: var(--shadow-sm);
}

.main-filters-row {
    display: flex;
    flex-wrap: wrap; /* Permitir que bajen si no hay espacio */
    gap: 1.2rem;
    align-items: flex-end;
    width: 100%;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 180px; /* Ancho base para que entren bien labels y inputs */
}

.filter-group label {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.filter-group select, 
.filter-group input {
    padding: 0.6rem 1rem;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    font-family: var(--font-main);
    font-size: 0.9rem;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.filter-group select:focus, 
.filter-group input:focus {
    border-color: var(--accent);
    background: white;
}

.btn-clear-filters {
    background: #f1f5f9;
    color: var(--text-secondary);
    border: 1px solid #cbd5e1;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    height: fit-content;
}

.btn-clear-filters:hover {
    background: #e2e8f0;
    color: var(--text-primary);
}

/* === BOTÓN GEOLOCALIZACIÓN === */
.btn-geo {
    background: var(--nav-bg);
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-geo:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

.btn-geo.active {
    background: var(--whatsapp-color);
}

.btn-geo.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.btn-geo.loading::after {
    content: "";
    width: 12px;
    height: 12px;
    border: 2px solid white;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.carousel-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 350px; /* Reducido de 420px a 350px */
    margin: 0.5rem auto 0; 
    overflow: hidden;
    background: transparent;
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
}

.carousel-card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(70vw, 750px);
    margin: 0;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
    transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: var(--radius-lg);
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.carousel-card.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    z-index: 10;
    pointer-events: auto;
}

.carousel-card.prev-slide {
    opacity: 0.6;
    left: 20%;
    transform: translate(-50%, -50%) scale(0.8);
    z-index: 5;
}

.carousel-card.next-slide {
    opacity: 0.6;
    left: 80%;
    transform: translate(-50%, -50%) scale(0.8);
    z-index: 5;
}

.carousel-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.carousel-card .card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    text-align: left;
}

.carousel-card .card-content h3,
.carousel-card .card-content .price {
    color: #ffffff;
    margin: 0; /* Para asegurar buen espaciado */
}

.carousel-card .card-content .price {
    font-weight: 800;
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

.badge {
    display: inline-block;
/* === BOTÓN DE BÚSQUEDA INTERACTIVO (v4.0) === */
.search-icon {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.2s;
}

.search-icon:hover {
    transform: scale(1.3) rotate(15deg);
    color: var(--accent);
}

.search-icon:active {
    transform: scale(0.9);
}

/* === BOTÓN FLOTANTE DE INICIO (v4.2) === */
.btn-floating-home {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(249, 115, 22, 0.4);
    z-index: 5000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-floating-home:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 12px 40px rgba(249, 115, 22, 0.5);
}

.btn-floating-home:active {
    transform: scale(0.9);
}

/* Ocultar botón si estamos en el inicio mismo */
body:has(#inicio.active-page) .btn-floating-home {
    display: none;
}

.suggestion-item {
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: 0.2s;
    border-bottom: 1px solid #f1f5f9;
}

.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background: #f8fafc; }

.suggestion-icon { font-size: 1.2rem; min-width: 25px; }
.suggestion-text { font-size: 0.95rem; color: var(--text-primary); }
.suggestion-cat { 
    font-size: 0.75rem; 
    text-transform: uppercase; 
    color: var(--accent); 
    font-weight: 700;
    margin-left: auto;
}

.suggestion-item.category-suggest { background: rgba(249, 115, 22, 0.05); }
.suggestion-item.category-suggest:hover { background: rgba(249, 115, 22, 0.1); }
    background: var(--accent);
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: var(--transition);
    z-index: 20;
}

.carousel-btn:hover {
    background: var(--accent);
}

.prev { left: 4vw; z-index: 30; }
.next { right: 4vw; z-index: 30; }

/* === CONTENEDOR PRINCIPAL Y SISTEMA DE PÁGINAS (SPA) === */
.page-section {
    display: none;
}

.page-section.active-page {
    display: block;
    animation: fadeInPage 0.4s ease-out forwards;
}

/* === NEWSLETTER === */
.newsletter-section {
    padding: 2.5rem 0;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.newsletter-container {
    max-width: 1600px;
    width: 95%;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.newsletter-content {
    text-align: left;
    flex: 1;
}

.newsletter-content h2 {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
    text-transform: capitalize;
}

.newsletter-content p {
    color: #64748b;
    margin-bottom: 0;
    font-size: 0.95rem;
}

.newsletter-form {
    display: flex;
    flex-direction: row-reverse; /* Invertir orden para botón a la izquierda */
    gap: 0;
    min-width: 450px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.newsletter-form input {
    flex: 1;
    padding: 0.8rem 1.2rem;
    border: 1px solid #cbd5e1;
    border-left: none;
    border-radius: 0 10px 10px 0;
    font-size: 0.95rem;
}

.newsletter-form input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.1);
}

.btn-subscribe {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.8rem 1.8rem;
    border-radius: 10px 0 0 10px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-subscribe:hover {
    background: #ea580c;
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(249, 115, 22, 0.2);
}

.newsletter-message {
    margin-top: 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.newsletter-message.success { color: #059669; }
.newsletter-message.error { color: #dc2626; }

@media (max-width: 600px) {
    .newsletter-container { padding: 2rem 1.5rem; }
    .newsletter-form { flex-direction: column; }
    .btn-subscribe { padding: 1.1rem; }
    .hero-grid { grid-template-columns: 1fr; }
    .ad-banner { display: none; }
}

.container {
    max-width: 1600px;
    width: 95%;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.catalog-section {
    padding: 1rem 0 5rem; /* Reducido de 3rem a 1rem */
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--accent);
    padding-left: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.emoji {
    font-size: 1.8rem;
}

/* === MARKETPLACE CARD REFINEMENTS (KAVAK STYLE) === */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card.marketplace {
    background: var(--bg-card);
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
}

.card.marketplace:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.card-img-container {
    height: 200px;
    overflow: hidden;
    background: #f8fafc;
}

.card-img-container img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Cambiado de cover a contain para centralizar y no cortar */
    object-position: center;
    transition: transform 0.5s ease;
    padding: 10px; /* Un poco de aire para que no pegue a los bordes */
}

.card.marketplace:hover .card-img-container img {
    transform: scale(1.03);
}

.card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.3;
}

/* Específicaciones Inline (v5.0) */
.specs-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.spec-dot {
    color: #cbd5e1;
}

.price-container {
    margin-top: auto;
    margin-bottom: 1rem;
}

.price-prefix {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: block;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.price-main {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
}

/* Footer Profesional (Ubicación) */
.card-location-footer {
    border-top: 1px solid #f1f5f9;
    padding: 0.75rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafafa;
}

.location-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.btn-whatsapp-minimal {
    flex: 1;
    background: #000000;
    color: white;
    border: none;
    padding: 0.7rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
}

.btn-whatsapp-minimal:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.btn-icon-only {
    padding: 0.6rem;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-icon-only:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* Zoom en tarjetas */
.card-img img, .card-slider-track img {
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: zoom-in;
}

.card:hover .card-img img, .card:hover .card-slider-track img {
    transform: scale(1.08);
}

/* === LIGHTBOX MODAL === */
.lightbox-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(8px);
    z-index: 9999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    animation: fadeInModal 0.3s ease-out;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    border-radius: var(--radius-md);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    transform: scale(0.9);
    animation: scaleUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes scaleUp {
    to { transform: scale(1); }
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2.5rem;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.lightbox-close:hover {
    transform: rotate(90deg) scale(1.2);
    color: var(--accent);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(5px);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10001;
}

.lightbox-nav:hover {
    background: var(--accent);
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev { left: 2.5rem; }
.lightbox-nav.next { right: 2.5rem; }

.lightbox-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.8rem;
    z-index: 10001;
}

.lightbox-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transition: var(--transition);
}

.lightbox-dot.active {
    background: white;
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.card-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* === NUEVA ESTÉTICA MARKETPLACE (v5.0 - Kavak Style) === */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

.marketplace {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-align: center; /* Centrar todo el texto */
}

.marketplace:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1 !important;
}

/* Sub-navegación por pastillas (Pills) */
.sub-category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 0.5rem 0;
}

.btn-sub {
    background: #ffffff;
    color: var(--text-primary);
    border: 1px solid #e2e8f0;
    padding: 0.6rem 1.2rem;
    border-radius: 50px; /* Pill shape */
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn-sub:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.btn-sub.active {
    background: var(--accent) !important;
    color: #ffffff !important;
    border-color: var(--accent) !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Detalle Inline Especificaciones */
.specs-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

/* === REFINAMIENTO DE DATOS (v6.0 - High End Marketplace) === */
.marketplace .card-body {
    padding: 1.5rem 1.25rem !important;
}

.marketplace .card-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.6rem;
    line-height: 1.25;
    letter-spacing: -0.4px;
}

.specs-inline {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centrar especificaciones */
    gap: 0.35rem;
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
    color: #0f172a;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.price-display {
    display: block;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--accent);
    margin: 0.5rem 0 1rem;
    letter-spacing: -1px;
}

.card-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1rem;
}

.btn-whatsapp-modern {
    flex: 2;
    background: #25d366;
    color: white !important;
    text-decoration: none;
    font-weight: 800;
    padding: 0.8rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-whatsapp-modern:hover {
    background: #128c7e;
    transform: translateY(-2px);
}

.btn-share-modern {
    flex: 1;
    background: #f1f5f9;
    color: #475569 !important;
    border: 1px solid #e2e8f0;
    padding: 0.8rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-share-modern:hover {
    background: #e2e8f0;
}

.card-description-mini {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-description-mini strong {
    color: #475569;
    font-weight: 600;
}

.spec-dot {
    color: #cbd5e1;
    font-weight: 900;
}

.price-container {
    margin-top: auto;
    margin-bottom: 1.5rem;
}

.price-prefix {
    font-size: 0.65rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 800;
    display: block;
    margin-bottom: 0.25rem;
}

.price-main {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.2px;
}

/* Acciones Premium */
.card-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.btn-primary.whatsapp-btn {
    flex: initial;
    background: #00b894 !important;
    color: #ffffff;
    border: none;
    padding: 0.45rem 1rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    box-shadow: 0 4px 6px -1px rgba(0, 184, 148, 0.2);
}

.btn-primary.whatsapp-btn:hover {
    background: #00a884 !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 184, 148, 0.3);
}

.btn-icon-only, .btn-outline-share {
    background: #ffffff;
    color: #64748b;
    border: 1px solid #e2e8f0;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline-share:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

/* Footer Refinado */
.card-location-footer {
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.location-text {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* === BOTÓN WHATSAPP === */
.whatsapp-btn {
    background-color: var(--whatsapp-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.whatsapp-btn::before {
    content: "💬";
    font-size: 1.2rem;
}

.whatsapp-btn:hover {
    background-color: var(--whatsapp-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

/* === QUIÉNES SOMOS === */
.about-section {
    background: #ffffff;
    padding: 5rem 0;
    margin-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.about-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 4rem;
}

.about-text {
    flex: 1;
}

.about-text p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-logo {
    width: 100%;
    max-width: 500px;
    opacity: 1;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.08));
    border-radius: var(--radius-md);
    transition: transform 0.3s ease;
}

.about-logo:hover {
    transform: scale(1.05);
}

/* === FILTROS EN BARRA LATERAL (Sidebar - v8.0) === */
.catalog-layout {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
    margin-top: 1.5rem;
}

.filters-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    padding: 1.8rem;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    height: fit-content;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.filter-group label {
    font-size: 0.8rem;
    font-weight: 800;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-left: 0.2rem;
}

.filter-select {
    width: 100%;
    padding: 0.85rem 1.2rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    box-shadow: var(--shadow-sm);
}

.filter-select:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.filter-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.catalog-layout .grid-layout {
    flex: 1;
    margin: 0;
}

@media (max-width: 1024px) {
    .catalog-layout {
        flex-direction: column;
    }
    .filters-sidebar {
        width: 100%;
        position: relative;
        top: 0;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }
    .filter-group {
        flex: 1;
        min-width: 200px;
    }
}

@media (max-width: 600px) {
    .filters-sidebar {
        flex-direction: column;
    }
}

/* === FOOTER === */
.footer {
    text-align: center;
    padding: 2rem;
    background: #e2e8f0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid #cbd5e1;
}

/* --- SECCIÓN CONTACTO --- */
.contact-section { padding: 5rem 0; background: white; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; margin-top: 3rem; }
.contact-card { 
    background: #f8fafc; padding: 2.5rem; border-radius: 20px; text-align: center; text-decoration: none; color: inherit;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); border: 1px solid #e2e8f0;
}
.contact-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.05); border-color: var(--accent); }
.contact-icon { width: 60px; height: 60px; background: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem; box-shadow: 0 10px 20px rgba(0,0,0,0.05); overflow: hidden; padding: 10px; }
.contact-icon img { width: 100%; height: 100%; object-fit: contain; }
.contact-card.insta .contact-icon { color: #e1306c; }
.contact-card.wapp .contact-icon { color: #25d366; }
.contact-card h3 { margin-bottom: 0.5rem; font-size: 1.25rem; font-weight: 800; }
.contact-card p { color: #64748b; margin-bottom: 1.5rem; }
.contact-btn { display: inline-block; padding: 0.6rem 1.2rem; background: white; border-radius: 50px; font-weight: 700; font-size: 0.85rem; border: 1px solid #e2e8f0; transition: 0.3s; }
.contact-card:hover .contact-btn { background: var(--accent); color: white; border-color: var(--accent); }

.nav-social { color: #64748b; transition: 0.3s; }
.nav-social:hover { color: var(--accent); transform: scale(1.1); }
.nav-contact { font-weight: 800; color: var(--accent) !important; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Simplificado para móvil */
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .carousel-card img {
        height: 250px;
    }

    .about-container {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .about-section .section-title {
        justify-content: center;
        border-left: none;
        border-bottom: 4px solid var(--accent);
        padding-left: 0;
        padding-bottom: 0.5rem;
    }
}

/* === BOTÓN FLOTANTE DE INICIO === */
.btn-inicio {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--nav-bg);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    display: none; /* Controlado estrictamente por JS */
    align-items: center;
    gap: 0.5rem;
    z-index: 999;
    transition: var(--transition);
}


.btn-inicio:hover {
    background: var(--accent);
    transform: translateY(-5px);
}

/* === LIGHTBOX / VISOR DE IMÁGENES === */
#lightboxModal {
    display: none;
    position: fixed;
    z-index: 5000;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    animation: fadeInLightbox 0.3s ease;
}

@keyframes fadeInLightbox {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-img-container {
    position: relative;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#lightboxImage {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    user-select: none;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2.5rem;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    font-weight: bold;
    line-height: 1;
    z-index: 5100;
    transition: 0.3s;
}
.lightbox-close:hover { color: var(--accent); transform: scale(1.1); }

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: 0.3s;
    z-index: 5050;
}

.lightbox-nav:hover { background: rgba(255, 255, 255, 0.2); transform: translateY(-50%) scale(1.1); }
#btnLightboxPrev { left: 2rem; }
#btnLightboxNext { right: 2rem; }

.lightbox-dots {
    display: flex;
    gap: 12px;
    margin-top: 2.5rem;
    z-index: 5050;
}

.lightbox-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    cursor: pointer;
    transition: 0.3s;
    border: 1px solid rgba(255,255,255,0.1);
}

.lightbox-dot.active { 
    background: var(--accent); 
    transform: scale(1.4); 
    box-shadow: 0 0 10px var(--accent);
}

/* === MARKETPLACE FILTERS (v5.2 - Kavak Style) === */
.sub-category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 0.5rem 0;
}

.btn-sub {
    background: #ffffff;
    color: var(--text-primary);
    border: 1px solid #e2e8f0;
    padding: 0.6rem 1.2rem;
    border-radius: 50px; /* Pill shape */
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn-sub:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.btn-sub.active {
    background: var(--accent) !important;
    color: #ffffff !important;
    border-color: var(--accent) !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.main-filters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    align-items: flex-end;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.8px;
}

.filter-group input, 
.filter-group select {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-primary);
    transition: all 0.2s;
    background-color: #f8fafc;
}

.filter-group input:focus, 
.filter-group select:focus {
    outline: none;
    border-color: var(--accent);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-geo {
    width: 100%;
    padding: 0.65rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #ffffff;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-geo:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.btn-geo.active {
    background: #10b981;
    color: #ffffff;
    border-color: #059669;
}

.btn-clear-filters {
    padding: 0.65rem 1rem;
    background: transparent;
    border: 1px solid #e2e8f0;
    color: #94a3b8;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-clear-filters:hover {
    color: #475569;
    border-color: #cbd5e1;
    background: #f8fafc;
}

/* === ADAPTACIÓN TOTAL PARA CELULARES (v10.0 - Mobile Premium) === */
@media (max-width: 900px) {
    .navbar-content {
        padding: 0.8rem 1.5rem;
    }

    .hero-grid {
        flex-direction: column;
        gap: 2rem;
    }
    
    .hero-text {
        order: 1; /* El buscador va primero en el flujo visual principal */
        width: 100%;
        min-width: 100%;
    }

    .ads-column {
        order: 2; /* Las publicidades van debajo del buscador en móvil */
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* 3 columnas compactas */
        width: 100%;
        gap: 0.5rem;
    }
    
    .ad-banner {
        width: 100%;
        height: 100px; /* Banners más pequeños para que entren 3 */
    }
    
    .ad-tag { font-size: 0.5rem; padding: 1px 4px; }
}

@media (max-width: 768px) {
    /* Navbar Hamburguesa */
    .navbar-content {
        flex-direction: row; /* Logo a la izq, Hamburguesa a la der */
        justify-content: space-between;
        padding: 0.8rem 1.2rem;
    }

    .hamburger-btn {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--nav-bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        z-index: 1000;
        padding-top: 50px;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.5rem;
        text-transform: uppercase;
        letter-spacing: 2px;
    }

    .logo-text { font-size: 1.6rem; }
    .logo-img { height: 45px; }

    .carousel-container {
        height: 320px;
        margin-top: 1rem;
    }
    
    .carousel-card {
        width: 85vw;
    }
    
    .carousel-card img {
        height: 220px;
    }

    .grid-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .newsletter-container {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .newsletter-form {
        width: 100%;
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .ads-column {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas en pantallas muy pequeñas p/ legibilidad */
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .logo-text { font-size: 1.4rem; }
}

.spec-label {
    font-weight: 800;
    color: var(--text-primary);
    margin-right: 4px;
}


