/* ==========================================================================
   DESIGN SYSTEM - GUIA PILAR
   Vanilla CSS with CSS variables, HSL Colors and premium Glassmorphic styles
   ========================================================================== */

:root {
    --font-scale: 1.0;
    /* Base configuration (unchanging) */
    --primary: 217 95% 59%;      /* MercadoLibre Blue (#3483fa) */
    --primary-glow: 217 95% 59% / 0.15;
    
    --secondary: 48 100% 50%;    /* Saturated Warm Yellow (#ffe600) */
    --success: 149 100% 33%;      /* MercadoLibre Green (#00a650) */
    --danger: 346 87% 60%;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --border-radius-sm: 8px;
    --border-radius-md: 14px;
    --border-radius-lg: 24px;
    
    --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Spacing Scale - Premium layout rhythm */
    --space-2xs: 0.25rem;
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1.25rem;
    --space-lg: 2rem;
    --space-xl: 3.5rem;
    
    /* Theme Default (Light Yellow/Navy Theme) */
    --bg-dark: 0 0% 92%;         /* MercadoLibre light gray background (#ebebeb) */
    --card-bg: 0 0% 100%;        /* White cards */
    --card-border: 0 0% 90%;     /* Soft gray card border (#e6e6e6) */
    --text-main: 0 0% 20%;       /* Dark charcoal main text (#333333) */
    --text-secondary: 0 0% 35%;  /* Charcoal gray (#595959) */
    --text-muted: 0 0% 40%;      /* Gray muted body text (#666666) */
    --text-dark: 0 0% 55%;       /* Muted gray technical text (#888888) */
    --glow-violet: 217 95% 59% / 0.04;
    --glow-blue: 48 100% 50% / 0.04;
    
    --gold: 48 100% 50%;
    --gold-glow: 48 100% 50% / 0.18;
    
    --card-label: 37 90% 43%;     /* High-contrast amber gold for light cards */
}

.dark-theme {
    /* Dark Theme overrides when toggled */
    --bg-dark: 240 25% 6%;
    --card-bg: 240 20% 10%;
    --card-border: 240 15% 18%;
    --text-main: 0 0% 98%;
    --text-secondary: 240 10% 78%;
    --text-muted: 240 10% 68%;
    --text-dark: 240 10% 48%;
    --primary: 217 95% 65%;       /* Bright Blue for dark mode */
    --primary-glow: 217 95% 65% / 0.15;
    --secondary: 48 100% 45%;    /* Saturated Yellow adapted for dark mode */
    --glow-violet: 217 95% 65% / 0.12;
    --glow-blue: 48 100% 45% / 0.12;
    --card-label: 48 100% 50%;   /* Bright yellow gold for dark cards */
}

html {
    font-size: calc(16px * var(--font-scale, 1.0));
    scroll-behavior: smooth;
}
html.font-scale-md {
    --font-scale: 1.15;
}
html.font-scale-lg {
    --font-scale: 1.30;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

*:focus-visible {
    outline: 2.5px solid hsl(var(--primary));
    outline-offset: 3px;
}


html, body {
    background-color: hsl(var(--bg-dark));
    color: hsl(var(--text-main));
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

/* --- PREMIUM BACKDROP GLOW EFFECTS --- */
.glow-bg-1, .glow-bg-2 {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(150px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.65;
}

.glow-bg-1 {
    top: -200px;
    left: -100px;
    background: radial-gradient(circle, hsl(var(--glow-violet)) 0%, transparent 70%);
    animation: pulseGlow 12s infinite alternate;
}

.glow-bg-2 {
    top: 400px;
    right: -200px;
    background: radial-gradient(circle, hsl(var(--glow-blue)) 0%, transparent 70%);
    animation: pulseGlow 15s infinite alternate-reverse;
}

@keyframes pulseGlow {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.15) translate(40px, 30px); }
}

/* App Container */
.app-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- HEADER SECTION --- */
.main-header {
    position: sticky;
    top: 1rem;
    z-index: 1000;
    background-color: hsl(var(--secondary)); /* MercadoLibre Yellow */
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    padding: 0.5rem 0;
    margin: 1rem auto 1.5rem auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    overflow: visible; /* Allows autocomplete dropdown to float above content */
    transition: all var(--transition-normal);
    min-height: auto;
    width: calc(100% - 3rem);
    max-width: 1280px;
}

.dark-theme .main-header {
    background-color: #1a1a24;
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: none;
}

.header-content {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    width: 100%;
    margin-bottom: 0.25rem;
}

.header-actions-container {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.theme-toggle-btn-inline {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #333333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.theme-toggle-btn-inline:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #000;
    transform: scale(1.05);
}

.dark-theme .theme-toggle-btn-inline {
    background: transparent;
    border: none;
    color: hsl(var(--text-muted));
}

.dark-theme .theme-toggle-btn-inline:hover {
    background: rgba(255, 255, 255, 0.08);
    color: hsl(var(--text-main));
}

.theme-toggle-btn {
    position: absolute;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #1c1c24;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.theme-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #000;
    transform: scale(1.08);
}

.dark-theme .theme-toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: hsl(var(--text-muted));
}

.dark-theme .theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: hsl(var(--text-main));
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
}

.header-logo-img {
    height: 55px;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
    transition: transform 0.2s;
    border: none;
    position: relative;
    z-index: 10;
}

.dark-theme .header-logo-img {
    background-color: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
}

@keyframes playful-wiggle {
    0% { transform: scale(1) rotate(0deg); }
    15% { transform: scale(3.0) rotate(-10deg); }
    30% { transform: scale(3.0) rotate(8deg); }
    45% { transform: scale(3.0) rotate(-6deg); }
    60% { transform: scale(3.0) rotate(4deg); }
    75% { transform: scale(3.0) rotate(-2deg); }
    90% { transform: scale(3.0) rotate(1deg); }
    100% { transform: scale(3.0) rotate(0deg); }
}

.header-logo-img:hover {
    animation: playful-wiggle 0.75s ease-in-out forwards;
}

.header-subtitle {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(28, 28, 36, 0.7);
    margin-bottom: 2.5rem;
}

.dark-theme .header-subtitle {
    color: hsl(var(--text-muted));
}

/* --- SEARCH & CONTROLS SECTION --- */
.controls-section {
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    width: 100%;
    z-index: 5;
    scroll-margin-top: 90px; /* Leaves clean margin for the sticky header when auto-scrolling */
}

.filter-controls-row {
    display: flex;
    gap: 1.5rem;
    width: 100%;
    margin: 0 auto;
    align-items: center;
}

/* Premium Search Wrapper */
.search-wrapper {
    position: relative;
    flex: 1;
    border-radius: var(--border-radius-lg);
    background: hsl(var(--card-bg));
    border: 1px solid hsl(var(--card-border));
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem 0.75rem 1.75rem; /* Larger padding for premium feel */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: var(--transition-normal);
}

.search-wrapper:focus-within {
    border-color: hsl(var(--primary));
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05), 0 0 0 3px var(--primary-glow);
}

.dark-theme .search-wrapper {
    background: rgba(20, 20, 28, 0.45);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Autocomplete Dropdown styles */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    background: hsl(var(--card-bg));
    border: 1px solid hsl(var(--card-border));
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem 0;
    backdrop-filter: blur(10px);
    transition: var(--transition-normal);
}

.dark-theme .autocomplete-dropdown {
    background: rgba(20, 20, 28, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.autocomplete-item {
    display: flex;
    align-items: center;
    padding: 0.65rem 1.25rem;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: hsl(var(--foreground));
    transition: var(--transition-fast);
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background: var(--primary-glow);
    color: hsl(var(--primary));
}

.dark-theme .autocomplete-item:hover,
.dark-theme .autocomplete-item.active {
    background: rgba(255, 255, 255, 0.05);
    color: hsl(var(--primary-light, var(--primary)));
}

.autocomplete-item i {
    width: 18px;
    height: 18px;
    opacity: 0.7;
    flex-shrink: 0;
}

.autocomplete-item .item-type {
    margin-left: auto;
    font-size: 0.8rem;
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.autocomplete-header {
    padding: 0.4rem 1.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.5;
    color: hsl(var(--foreground));
}

/* Select dropdown wrapper */
.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: hsl(var(--card-bg));
    border: 1px solid hsl(var(--card-border));
    border-radius: var(--border-radius-lg);
    padding: 0.75rem 1.25rem; /* Larger padding for premium feel */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: var(--transition-normal);
    min-width: 240px;
}

.select-wrapper:focus-within {
    border-color: hsl(var(--primary));
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05), 0 0 0 3px var(--primary-glow);
}

.dark-theme .select-wrapper {
    background: rgba(20, 20, 28, 0.45);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.select-icon {
    position: absolute;
    left: 1.25rem;
    color: hsl(var(--text-muted));
    pointer-events: none;
    width: 18px;
    height: 18px;
}

#barrio-select {
    width: 100%;
    height: 40px;
    padding-left: 2rem;
    padding-right: 1.5rem;
    background: transparent;
    border: none;
    color: hsl(var(--text-main));
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

#barrio-select option {
    background-color: hsl(var(--card-bg));
    color: hsl(var(--text-main));
    font-family: var(--font-body);
}

/* Custom arrow for select dropdown */
.select-wrapper::after {
    content: '';
    position: absolute;
    right: 1.25rem;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid hsl(var(--text-muted));
    pointer-events: none;
}

.search-icon {
    color: hsl(var(--text-muted));
    width: 20px;
    height: 20px;
    margin-right: 1rem;
}

#search-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: hsl(var(--text-main));
    font-family: var(--font-body);
    font-size: 1.2rem;
    padding: 0.5rem 0;
}

#search-input::placeholder {
    color: hsl(var(--text-dark));
}

.clear-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: hsl(var(--text-muted));
    display: none; /* Toggled in JS */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.clear-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: hsl(var(--text-main));
}

/* Categories Scroll List */
.categories-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 1rem 0;
}

/* Fades to make scroll edges look soft - disabled for clean contrast */
.categories-container::before,
.categories-container::after {
    display: none !important;
}

.categories-scroll {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 1.25rem 2rem;
    align-items: center;
    scrollbar-width: none; /* Firefox */
}

.categories-scroll::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.category-pill {
    background: hsl(var(--card-bg));
    border: 1px solid hsl(var(--card-border));
    color: hsl(var(--text-secondary));
    padding: 0.5rem 1.1rem;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-flex;
    align-items: center;
    flex-shrink: 0; /* Prevents layout squeezing text in horizontal containers */
}

.dark-theme .category-pill {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
    color: hsl(var(--text-muted));
}

.category-pill:hover {
    background: rgba(0, 0, 0, 0.04);
    color: hsl(var(--text-main));
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.15);
}

.dark-theme .category-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: hsl(var(--text-main));
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.category-pill.active {
    background: hsl(var(--primary));
    border-color: hsl(var(--primary));
    color: #ffffff;
    box-shadow: 0 4px 12px var(--primary-glow);
    font-weight: 600;
}

.dark-theme .category-pill.active {
    background: hsl(var(--primary));
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 4px 12px var(--primary-glow);
    font-weight: 600;
}

.category-count {
    font-size: 0.72rem;
    font-weight: 600;
    margin-left: 0.4rem;
    background: rgba(0, 0, 0, 0.05);
    color: hsl(var(--text-muted));
    padding: 0.15rem 0.45rem;
    border-radius: 10px;
    display: inline-block;
}

.category-pill.active .category-count {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.dark-theme .category-count {
    background: rgba(255, 255, 255, 0.1);
    color: hsl(var(--text-muted));
}

/* Stats and indicators bar */
.stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 1rem;
    margin-top: 0.5rem;
}

.stats-text {
    font-size: 0.95rem;
    color: hsl(var(--text-muted));
    font-weight: 500;
}

.active-category-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(120, 50, 250, 0.1);
    border: 1px solid rgba(120, 50, 250, 0.25);
    color: hsl(var(--primary));
    padding: 0.3rem 0.8rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}

.active-category-indicator button {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.active-category-indicator i {
    width: 14px;
    height: 14px;
}

/* --- MAIN BUSINESSES GRID --- */
.grid-section {
    flex-grow: 1;
    margin-bottom: 3rem;
}

.businesses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Premium Business Card */
.business-card {
    background: hsl(var(--card-bg));
    border: 1px solid hsl(var(--card-border));
    border-radius: var(--border-radius-md);
    padding: 0; /* padding removed to allow full-bleed cover image */
    display: flex;
    flex-direction: column;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.dark-theme .business-card {
    background: rgba(30, 30, 42, 0.5);
    backdrop-filter: blur(10px);
    box-shadow: none;
}

.business-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, hsl(var(--primary)), hsl(var(--secondary)));
    opacity: 0;
    transition: var(--transition-normal);
    z-index: 10;
}

/* Featured / Premium Card styles */
.business-card.featured {
    border: 1px solid hsl(var(--gold));
    box-shadow: 0 4px 20px hsl(var(--gold-glow));
    background: linear-gradient(135deg, rgba(255, 160, 0, 0.04) 0%, hsl(var(--card-bg)) 100%);
}

.dark-theme .business-card.featured {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, rgba(30, 30, 42, 0.6) 100%);
}

.business-card.featured:hover {
    box-shadow: 0 12px 35px rgba(255, 160, 0, 0.22), 0 0 0 1px hsl(var(--gold) / 0.3);
    border-color: hsl(var(--gold));
}

.business-card.featured::before {
    background: linear-gradient(to right, hsl(var(--gold)), #ff9f00);
}

/* Image wrapper and layout */
.card-image-wrapper {
    width: 100%;
    height: 160px;
    overflow: hidden;
    position: relative;
    background: rgba(0, 0, 0, 0.03);
}

.card-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-normal);
}

.business-card:hover .card-cover-img {
    transform: scale(1.06);
}

.card-cover-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, hsl(var(--primary) / 0.08) 0%, hsl(var(--secondary) / 0.08) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: hsl(var(--text-dark));
}

.card-cover-placeholder.event-placeholder {
    background: linear-gradient(135deg, hsl(var(--primary) / 0.08) 0%, hsl(var(--danger) / 0.08) 100%);
}

.placeholder-icon {
    width: 38px;
    height: 38px;
    opacity: 0.35;
    stroke-width: 1.5;
}

/* Featured Badge Star */
.featured-badge-star {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    color: hsl(var(--gold));
    background: rgba(8, 8, 12, 0.45);
    backdrop-filter: blur(4px);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: var(--transition-normal);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.featured-badge-star i {
    width: 16px;
    height: 16px;
    fill: hsl(var(--gold));
    stroke-width: 1.5;
}

.business-card:hover .featured-badge-star {
    transform: scale(1.1) rotate(15deg);
}

.card-content-area {
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex-grow: 1;
}

.card-category-location {
    font-size: 0.75rem;
    color: hsl(var(--card-label));
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.8px;
}

.card-footer-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.business-card:hover {
    transform: translateY(-5px);
    border-color: rgba(120, 50, 250, 0.3);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(120, 50, 250, 0.1);
}

.business-card:hover::before {
    opacity: 1;
}

.card-top {
    margin-bottom: 1rem;
}

.card-category {
    font-size: 0.75rem;
    color: hsl(var(--secondary));
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.8px;
    margin-bottom: 0.5rem;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    color: hsl(var(--text-main));
    /* Limit title to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-desc {
    color: hsl(var(--text-muted));
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    /* Limit description to 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-address {
    color: hsl(var(--text-dark));
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.75rem;
}

.card-address i {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.card-source {
    font-size: 0.7rem;
    color: hsl(var(--text-dark));
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

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

.action-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: hsl(var(--text-muted));
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.action-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: hsl(var(--text-main));
    transform: scale(1.1);
}

.action-icon-btn.wa {
    color: hsl(var(--success));
}

.action-icon-btn.wa:hover {
    background: hsl(var(--success) / 0.1);
    border-color: hsl(var(--success) / 0.3);
}

/* Pagination container */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.load-more-btn {
    background: rgba(120, 50, 250, 0.1);
    border: 1px solid rgba(120, 50, 250, 0.25);
    color: hsl(var(--text-main));
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: var(--transition-normal);
}

.load-more-btn:hover {
    background: hsl(var(--primary));
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(120, 50, 250, 0.35);
    transform: translateY(-2px);
}

.load-more-btn i {
    width: 18px;
    height: 18px;
}

/* Empty State / Not found */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    background: rgba(30, 30, 42, 0.25);
    border: 1px dashed hsl(var(--card-border));
    border-radius: var(--border-radius-md);
    max-width: 480px;
    margin: 3rem auto;
}

.empty-icon {
    width: 64px;
    height: 64px;
    color: hsl(var(--text-dark));
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: hsl(var(--text-muted));
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.reset-btn {
    background: hsl(var(--primary));
    color: #1c1c24; /* Dark text on gold in light theme for WCAG AA compliance */
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.reset-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.dark-theme .reset-btn {
    color: #fff; /* White text on violet in dark theme */
}

/* --- PREMIUM FOOTER --- */
.main-footer {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 2rem;
    margin-top: auto;
}

.footer-copy {
    color: hsl(var(--text-muted));
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.footer-meta {
    color: hsl(var(--text-dark));
    font-size: 0.8rem;
}

/* --- DETAIL MODAL SYSTEM --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(8, 8, 12, 0.8);
    backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    /* Fade in animation */
    animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.modal-card {
    background: hsl(var(--card-bg));
    border: 1px solid hsl(var(--card-border));
    color: hsl(var(--text-main));
    width: 100%;
    max-width: 820px;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.dark-theme .modal-card {
    background: rgba(20, 20, 32, 0.96);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

@keyframes slideUp {
    from { transform: translateY(40px) scale(0.96); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(0, 0, 0, 0.04);
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: hsl(var(--text-muted));
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition-fast);
}

.modal-close-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: hsl(var(--text-main));
    transform: rotate(90deg);
}

.dark-theme .modal-close-btn {
    background: rgba(255, 255, 255, 0.05);
    color: hsl(var(--text-muted));
}

.dark-theme .modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: hsl(var(--text-main));
}

.modal-header {
    padding: 2rem 2rem 1.5rem 2rem;
    border-bottom: 1px solid hsl(var(--card-border));
}

.dark-theme .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-category {
    font-size: 0.8rem;
    color: hsl(var(--secondary));
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 2.1rem;
    font-weight: 700;
    color: hsl(var(--text-main));
    padding-right: 3rem; /* Leave space for close button */
    line-height: 1.25;
}

.modal-source {
    font-size: 0.72rem;
    color: hsl(var(--text-dark));
    text-transform: uppercase;
    margin-top: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 2rem;
}

.info-section {
    margin-bottom: 1.75rem;
}

.info-section h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: hsl(var(--text-main));
    margin-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 0.25rem;
}

.modal-description {
    color: hsl(var(--text-muted));
    font-size: 0.95rem;
    line-height: 1.6;
    white-space: pre-line;
}

/* Details List style */
.details-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.detail-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.detail-icon i {
    width: 16px;
    height: 16px;
}

.detail-content {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.75rem;
    color: hsl(var(--text-dark));
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 0.95rem;
    color: hsl(var(--text-main));
}

a.detail-value:hover {
    color: hsl(var(--primary));
    text-decoration: underline;
}

/* Colors for specific icons */
.phone-icon i { color: #54a0ff; }
.email-icon i { color: #ff9f43; }
.address-icon i { color: #ff6b6b; }
.web-icon i { color: hsl(var(--secondary)); }

/* Action column (Right Column) */
.modal-action-column {
    display: flex;
    flex-direction: column;
}

.action-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.action-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

/* CTA buttons */
.cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.9rem 1.5rem;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    transition: var(--transition-normal);
}

.cta-btn i {
    width: 20px;
    height: 20px;
}

.whatsapp-cta {
    background: hsl(var(--success));
    color: #fff;
}

.whatsapp-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px hsl(var(--success) / 0.35);
    filter: brightness(1.1);
}

.tienda-cta {
    background: hsl(var(--gold));
    color: #121824;
    font-weight: 700;
}

.tienda-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px hsl(var(--gold-glow));
    filter: brightness(1.1);
}

.maps-cta {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: hsl(var(--text-main));
}

.maps-cta:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.05);
}

/* Social Network section */
.social-networks-section {
    margin-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 1.25rem;
}

.social-networks-section h4 {
    font-size: 0.85rem;
    color: hsl(var(--text-muted));
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.social-links-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.social-btn i {
    width: 16px;
    height: 16px;
}

.fb-btn {
    background: #1877f2;
    color: #fff;
}

.fb-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.ig-btn {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: #fff;
}

.ig-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

/* ==========================================================================
   NAVIGATION & PORTAL PUBLICACIÓN/CONTACTO STYLES
   ========================================================================== */

.header-navigation {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.nav-link {
    background: transparent;
    border: none;
    color: #4b5563; /* cohesive charcoal/dark gray */
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0.45rem 0.65rem;
    border-radius: 12px;
    transition: all var(--transition-fast) ease;
    display: inline-flex;
    flex-direction: column; /* Icon directly above text label */
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-width: 76px;
    line-height: 1.15;
}

.nav-link i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

#nav-btn-contacto {
    padding: 0.4rem 0.75rem;
}

.dark-theme .nav-link {
    color: hsl(var(--text-muted));
}

.nav-link:hover {
    color: #000;
    background: rgba(0, 0, 0, 0.06);
}

.dark-theme .nav-link:hover {
    color: hsl(var(--text-main));
    background: rgba(255, 255, 255, 0.08);
}

.nav-link.active {
    color: #ffffff !important;
    background: hsl(var(--primary)) !important; /* Blue active link */
    box-shadow: 0 2px 8px var(--primary-glow);
}

.dark-theme .nav-link.active {
    color: #ffffff !important;
    background: hsl(var(--primary)) !important;
    box-shadow: 0 2px 8px var(--primary-glow);
}

/* Ensure marketplace button stands out */
#nav-btn-marketplace {
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #333333;
}

.dark-theme #nav-btn-marketplace {
    background: hsl(var(--primary) / 0.15);
    border: 1px solid hsl(var(--primary) / 0.3);
    color: hsl(var(--text-main));
}

#nav-btn-marketplace.active {
    background: hsl(var(--primary)) !important; /* Use primary color */
    color: #1c1c24 !important; /* Dark text for contrast */
    border: 1px solid hsl(var(--primary)) !important;
}

.dark-theme #nav-btn-marketplace.active {
    color: #fff !important; /* White text in dark mode */
    background: hsl(var(--primary)) !important;
}

/* Modal form adjustments */
.form-grid {
    flex-direction: column;
    gap: 0.4rem;
    text-align: left;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: hsl(var(--text-muted));
}

/* Default form fields styling (Light theme) */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group textarea {
    width: 100%;
    background: #f5f5f7; /* Light gray background to distinguish from white card background */
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--border-radius-sm);
    color: hsl(var(--text-main));
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 0.75rem 1rem; /* Slightly larger padding for better touch targets and premium feel */
    outline: none;
    transition: var(--transition-fast);
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="date"]:focus,
.form-group input[type="time"]:focus,
.form-group textarea:focus {
    border-color: hsl(var(--primary));
    background: #ffffff;
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group input[type="radio"],
.form-group input[type="checkbox"] {
    accent-color: hsl(var(--primary));
    cursor: pointer;
}

/* Dark Theme overrides for form fields */
.dark-theme .form-group input[type="text"],
.dark-theme .form-group input[type="email"],
.dark-theme .form-group input[type="date"],
.dark-theme .form-group input[type="time"],
.dark-theme .form-group textarea {
    background: rgba(0, 0, 0, 0.2);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    color: hsl(var(--text-main));
}

.dark-theme .form-group input[type="text"]:focus,
.dark-theme .form-group input[type="email"]:focus,
.dark-theme .form-group input[type="date"]:focus,
.dark-theme .form-group input[type="time"]:focus,
.dark-theme .form-group textarea:focus {
    border-color: hsl(var(--primary));
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
}

.checkbox-group input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-group label {
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1.3;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    border-top: 1px solid hsl(var(--card-border));
    padding-top: 1.25rem;
    margin-top: 1rem;
}

.cancel-btn {
    background: transparent;
    border: 1px solid hsl(var(--card-border));
    color: hsl(var(--text-muted));
    padding: 0.6rem 1.25rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.cancel-btn:hover {
    background: rgba(255, 255, 255, 0.03);
    color: hsl(var(--text-main));
}

.save-btn {
    background: hsl(var(--primary));
    border: none;
    color: #1c1c24; /* Dark text on gold in light theme for WCAG AA compliance */
    padding: 0.6rem 1.25rem;
    border-radius: var(--border-radius-sm);
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition-fast);
}

.save-btn:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    filter: brightness(1.05);
}

.dark-theme .save-btn {
    color: #fff; /* White text on violet in dark theme */
    box-shadow: 0 4px 15px rgba(120, 50, 250, 0.2);
}

.dark-theme .save-btn:hover {
    box-shadow: 0 6px 20px rgba(120, 50, 250, 0.3);
}

/* Event Card Custom Badges & Icons */
.event-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(120, 50, 250, 0.12);
    color: hsl(var(--primary));
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.event-date-badge i {
    width: 12px;
    height: 12px;
}

/* ==========================================================================
   REDESIGNED CARD ALIGNMENT (GRID & TEXT HEIGHTS)
   ========================================================================== */
.business-card {
    min-height: 345px;
    display: flex;
    flex-direction: column;
}

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

/* 2 Lines Clamping for Title */
.card-content-area .card-title {
    font-family: 'Antonio', sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.01em;
    margin: 0 0 0.35rem 0;
    color: hsl(var(--text-main));
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.4em; /* precisely 2 lines */
}

/* 2 Lines Clamping for Location */
.card-location {
    font-size: 0.85rem;
    line-height: 1.4;
    color: hsl(var(--text-muted));
    margin: 0 0 0.35rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em; /* precisely 2 lines */
}

.card-address-sub {
    font-size: 0.78rem;
    opacity: 0.8;
}

/* 2 Lines Clamping for Rubro / Servicio */
.card-rubro-servicio {
    font-size: 0.72rem;
    line-height: 1.4;
    color: hsl(var(--secondary));
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em; /* precisely 2 lines */
    margin-top: auto; /* push to bottom of content area */
}

/* Large Icon Headers */
.card-icon-header {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: #f8f9fa !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.category-header-icon {
    width: 44px;
    height: 44px;
    color: hsl(var(--primary)) !important; /* Blue icon */
    filter: none !important;
}

/* Category-specific Gradients */
.cat-health {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%) !important;
}
.cat-dentist {
    background: linear-gradient(135deg, #00d2d3 0%, #00a8ff 100%) !important;
}
.cat-vets {
    background: linear-gradient(135deg, #10ac84 0%, #1dd1a1 100%) !important;
}
.cat-supermarket {
    background: linear-gradient(135deg, #ff9f43 0%, #ee5253 100%) !important;
}
.cat-services {
    background: linear-gradient(135deg, #54a0ff 0%, #5f27cd 100%) !important;
}
.cat-construction {
    background: linear-gradient(135deg, #cc8e35 0%, #ab7015 100%) !important;
}
.cat-openings {
    background: linear-gradient(135deg, #845ec2 0%, #4b4453 100%) !important;
}
.cat-travel {
    background: linear-gradient(135deg, #341f97 0%, #0abde3 100%) !important;
}
.cat-education {
    background: linear-gradient(135deg, #2e86de 0%, #1b1464 100%) !important;
}
.cat-furniture {
    background: linear-gradient(135deg, #20bf6b 0%, #05c46b 100%) !important;
}
.cat-realestate {
    background: linear-gradient(135deg, #009432 0%, #006266 100%) !important;
}
.cat-gastronomy {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5253 100%) !important;
}
.cat-cafe {
    background: linear-gradient(135deg, #82589f 0%, #53277e 100%) !important;
}
.cat-icecream {
    background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%) !important;
}
.cat-beauty {
    background: linear-gradient(135deg, #d980fa 0%, #9980fa 100%) !important;
}
.cat-automotive {
    background: linear-gradient(135deg, #57606f 0%, #2f3542 100%) !important;
}
.cat-sports {
    background: linear-gradient(135deg, #fbc531 0%, #e1b12c 100%) !important;
}
.cat-fashion {
    background: linear-gradient(135deg, #ff9ff3 0%, #f368e0 100%) !important;
}
.cat-tech {
    background: linear-gradient(135deg, #0f83ff 0%, #001099 100%) !important;
}
.cat-toys {
    background: linear-gradient(135deg, #ff9f43 0%, #feca57 100%) !important;
}
.cat-electrical {
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%) !important;
}
.cat-default {
    background: linear-gradient(135deg, #778ca3 0%, #4b6584 100%) !important;
}

/* Adjustments for Basic Unclaimed vertical cards */
.business-card.basic-unclaimed {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    background: rgba(255, 255, 255, 0.015);
    border: 1px dashed hsl(var(--card-border));
}

.dark-theme .business-card.basic-unclaimed {
    background: rgba(30, 30, 42, 0.3);
}

:root.light-theme .business-card.basic-unclaimed {
    background: rgba(0, 0, 0, 0.015);
}

.business-card.basic-unclaimed:hover {
    border-color: hsl(var(--primary) / 0.35);
    background: rgba(120, 50, 250, 0.03);
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

:root.light-theme .business-card.basic-unclaimed:hover {
    background: rgba(120, 50, 250, 0.04);
}

.claim-badge-hint {
    font-size: 0.72rem;
    color: hsl(var(--text-muted));
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    margin-top: 0.4rem;
}

/* ==========================================================================
   CAROUSEL OF BENEFITS, MAIN FILTER BAR & DYNAMIC TRENDS STYLES
   ========================================================================== */

/* --- PREMIUM HERO BANNER CAROUSEL --- */
.hero-banner-carousel {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto 1.5rem auto;
    border-radius: var(--border-radius-lg);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.05);
    min-height: 200px;
    display: flex;
    flex-direction: column;
}

.hero-carousel-track {
    display: flex;
    width: 300%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-slide {
    width: 33.333%;
    padding: 2.25rem 3rem;
    display: flex;
    align-items: center;
    position: relative;
    box-sizing: border-box;
}

.hero-slide-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
    color: #ffffff;
    text-align: left;
}

.hero-slide-content h2 {
    font-size: 1.85rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
    color: #ffffff;
    line-height: 1.2;
}

.hero-slide-content p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 1rem;
    line-height: 1.45;
}

.hero-carousel-dots {
    position: absolute;
    bottom: 0.75rem;
    right: 3rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.hero-carousel-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-carousel-dots .dot.active {
    width: 20px;
    border-radius: 4px;
    background: #ffffff;
}

.hero-banner-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-btn {
    padding: 0.65rem 1.35rem;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition-fast) ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hero-btn.primary-btn {
    background-color: hsl(var(--primary)); /* Brand Blue */
    color: #ffffff;
    border: none;
}

.hero-btn.primary-btn:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
}

.hero-btn.secondary-btn {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.35);
}

.hero-btn.secondary-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
    transform: translateY(-2px);
}

.hero-wave-overlay {
    position: absolute;
    right: -10%;
    top: -20%;
    width: 500px;
    height: 500px;
    border-radius: 43% 40% 45% 40%;
    background: radial-gradient(circle, rgba(52, 131, 250, 0.25) 0%, transparent 60%);
    animation: rotateWave 20s infinite linear;
    pointer-events: none;
    z-index: 1;
}

@keyframes rotateWave {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- STATIC BENEFITS ROW (MercadoLibre style) --- */
.benefits-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 2.5rem auto;
}

.benefit-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius-md);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.015);
    transition: all 0.25s ease;
}

.dark-theme .benefit-card {
    background: rgba(30, 30, 42, 0.45);
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: none;
}

.benefit-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
    border-color: #cbd5e1;
}

.dark-theme .benefit-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.benefit-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.benefit-icon-wrapper i {
    width: 20px;
    height: 20px;
}

.benefit-text {
    text-align: left;
}

.benefit-text h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: hsl(var(--text-main));
    margin-bottom: 0.15rem;
}

.benefit-text p {
    font-size: 0.82rem;
    color: hsl(var(--text-muted));
    line-height: 1.35;
}

/* --- MAIN FILTERS BAR (REALLOCATED TAGS ABOVE GRID) --- */
.main-filters-bar {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 10px 30px rgba(255, 160, 0, 0.03);
}

.dark-theme .main-filters-bar {
    background: rgba(30, 30, 42, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: none;
}

.main-filters-bar .categories-container {
    padding: 0.5rem 0;
    margin: -0.5rem 0;
    overflow: hidden;
}

.main-filters-bar .categories-scroll {
    padding: 0.8rem 1rem;
}

.main-filters-bar .stats-bar {
    margin-top: 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding-top: 1rem;
    border-bottom: none;
    padding-bottom: 0;
}

.dark-theme .main-filters-bar .stats-bar {
    border-top-color: rgba(255, 255, 255, 0.06);
}

/* Special classes for dynamic popular search tags */
.category-pill.popular-category {
    border: 1px dashed rgba(255, 160, 0, 0.65);
    background: rgba(255, 160, 0, 0.04);
    color: hsl(var(--text-secondary));
}

.category-pill.popular-search {
    border: 1px dashed rgba(52, 131, 250, 0.65);
    background: rgba(52, 131, 250, 0.04);
    color: hsl(var(--text-secondary));
}

.dark-theme .category-pill.popular-category {
    border: 1px dashed rgba(255, 230, 0, 0.4);
    background: rgba(255, 230, 0, 0.06);
}

.dark-theme .category-pill.popular-search {
    border: 1px dashed rgba(52, 131, 250, 0.4);
    background: rgba(52, 131, 250, 0.06);
}

.popular-search-badge {
    font-size: 0.72rem;
    color: rgba(0, 0, 0, 0.45);
    margin-left: 0.3rem;
    font-weight: 700;
}

.dark-theme .popular-search-badge {
    color: rgba(255, 255, 255, 0.45);
}

.search-count-badge {
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 0.35rem;
    background: rgba(52, 131, 250, 0.15) !important;
    color: rgba(52, 131, 250, 1) !important;
    padding: 0.1rem 0.4rem;
    border-radius: 20px;
}

.dark-theme .search-count-badge {
    background: rgba(52, 131, 250, 0.3) !important;
    color: #ffffff !important;
}

/* ==========================================================================
   CONSOLIDATED RESPONSIVE ADAPTATIONS
   ========================================================================== */

@media (max-width: 1120px) {
    .filter-controls-row {
        flex-direction: column;
        align-items: stretch;
    }

    .main-header {
        padding: 0.75rem 0 0 0;
    }
    .header-logo-img {
        height: 44px; /* Scaled down for mobile */
    }
    .header-top {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 0;
        max-width: 100% !important;
        width: 100% !important;
        overflow: hidden !important;
    }
    .header-actions-container {
        position: absolute;
        right: 1rem;
        top: 0.5rem;
    }
    .header-navigation {
        display: flex !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin: 0.25rem 0 0 0 !important;
        padding: 0.25rem 1rem !important;
        background: transparent !important;
        border: none !important;
        gap: 6px !important;
        justify-content: flex-start !important;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .header-navigation::-webkit-scrollbar {
        display: none;
    }
    .dark-theme .header-navigation {
        background: transparent !important;
        border: none !important;
    }
    .nav-link {
        display: inline-flex !important;
        flex-direction: column !important; /* Maintain icon on top on mobile/tablet */
        align-items: center !important;
        gap: 0.2rem !important;
        padding: 0.35rem 0.5rem !important;
        font-size: 0.7rem !important;
        border-radius: 8px !important;
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 60px !important;
        background: transparent !important;
    }
    .nav-link span {
        display: block !important;
        font-size: 0.7rem !important;
        font-weight: 600 !important;
        white-space: nowrap !important;
    }
    .nav-link i {
        width: 18px !important;
        height: 18px !important;
    }
    #nav-btn-contacto {
        padding: 0.35rem 0.5rem !important;
    }
    
    /* Evitar que las píldoras de categorías de rubro se corten */
    .categories-container {
        padding: 0.5rem 0;
        overflow: visible; /* Prevent any container-level vertical clipping */
    }
    .categories-scroll {
        padding: 0.5rem 1rem;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .categories-scroll::-webkit-scrollbar {
        display: none;
    }
    .category-pill {
        scroll-snap-align: start;
        flex: 0 0 auto;
    }
    
    /* Mobile Hero Banner Carousel & Benefits adaptations */
    .hero-banner-carousel {
        min-height: 180px;
        margin-bottom: 1.25rem;
    }
    .hero-slide {
        padding: 1.5rem 1.25rem 2.25rem 1.25rem;
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
    .hero-slide-content {
        max-width: 100%;
        text-align: center;
    }
    .hero-slide-content h2 {
        font-size: 1.45rem;
        margin-bottom: 0.35rem;
    }
    .hero-slide-content p {
        font-size: 0.88rem;
        margin-bottom: 0.85rem;
    }
    .hero-banner-actions {
        justify-content: center;
        gap: 0.75rem;
    }
    .hero-carousel-dots {
        right: 0;
        left: 0;
        justify-content: center;
        bottom: 0.5rem;
    }
    .benefits-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin-bottom: 2rem;
    }
    .benefit-card {
        padding: 1rem;
    }
    .controls-section {
        scroll-margin-top: 130px; /* Leaves clear margin under sticky mobile header */
    }
    
    .businesses-grid {
        grid-template-columns: 1fr;
        width: 100%;
    }
    
    .app-container {
        padding: 1rem 1.5rem;
        width: 100%;
        max-width: 100%;
    }
    
    .main-header {
        width: calc(100% - 3rem) !important;
        margin-left: 1.5rem !important;
        margin-right: 1.5rem !important;
    }
    
    .main-filters-bar {
        padding: 1rem;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    
    .modal-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .modal-card {
        max-height: 95vh;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-header {
        padding: 1.5rem 1.5rem 1rem 1.5rem;
    }
    
    .modal-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 576px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .span-2 {
        grid-column: span 1 !important;
    }
}

/* ==========================================================================
   CATEGORIES ACCORDION & SUGGESTED CATEGORY BANNER
   ========================================================================== */

/* Categories Accordion */
.categories-accordion {
    width: 100%;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.accordion-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: hsl(var(--card-bg));
    border: 1px solid hsl(var(--card-border));
    color: hsl(var(--text-secondary));
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.dark-theme .accordion-toggle-btn {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
    color: hsl(var(--text-muted));
}

.accordion-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.03);
    color: hsl(var(--text-main));
    transform: translateY(-1px);
}

.dark-theme .accordion-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: hsl(var(--text-main));
}

.accordion-chevron {
    width: 16px;
    height: 16px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.categories-accordion.open .accordion-chevron {
    transform: rotate(180deg);
}

.accordion-collapse {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}

.categories-accordion.open .accordion-collapse {
    opacity: 1;
}

.accordion-body {
    padding: 0.75rem 0;
}

.categories-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    justify-content: center;
    padding: 0.5rem 0.5rem;
}

.categories-grid .category-pill {
    padding: 0.4rem 0.9rem;
    font-size: 0.82rem;
}

/* Suggested Category Box */
.suggested-category-box {
    background: linear-gradient(135deg, rgba(255, 230, 0, 0.08) 0%, rgba(120, 50, 250, 0.05) 100%);
    border: 1px solid rgba(255, 230, 0, 0.2);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.dark-theme .suggested-category-box {
    background: linear-gradient(135deg, rgba(255, 230, 0, 0.04) 0%, rgba(120, 50, 250, 0.07) 100%);
    border-color: rgba(120, 50, 250, 0.25);
}

.suggested-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding-bottom: 0.75rem;
}

.dark-theme .suggested-category-header {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.suggested-category-title-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.suggested-category-title-area i {
    color: #ffd800;
}

.dark-theme .suggested-category-title-area i {
    color: hsl(var(--primary));
}

.suggested-category-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: hsl(var(--text-main));
    margin: 0;
}

.suggested-category-subtitle {
    font-size: 0.85rem;
    color: hsl(var(--text-muted));
    margin-top: 0.25rem;
}

.suggested-category-btn {
    background: #ffe600;
    border: 1px solid #ffd800;
    color: #1e1e24;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-normal);
}

.dark-theme .suggested-category-btn {
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--secondary)) 100%);
    border-color: transparent;
    color: #fff;
}

.suggested-category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 230, 0, 0.3);
}

.dark-theme .suggested-category-btn:hover {
    box-shadow: 0 4px 15px rgba(120, 50, 250, 0.3);
}

.suggested-category-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Sponsor Card Styles */
.sponsor-card {
    border: 1px solid rgba(255, 215, 0, 0.45) !important;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.08) !important;
    position: relative;
}

.dark-theme .sponsor-card {
    border: 1px solid rgba(255, 215, 0, 0.3) !important;
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.02) 0%, hsl(var(--card-bg)) 100%) !important;
    box-shadow: 0 4px 25px rgba(255, 215, 0, 0.04) !important;
}

.sponsor-card .featured-badge-star.sponsor-badge {
    background: #ffd700;
    color: #1e1e24;
}

.sponsor-card::before {
    content: 'SPONSOR';
    position: absolute;
    top: 10px;
    left: 10px;
    right: auto; /* Prevent stretching inherited from .business-card::before */
    height: auto; /* Prevent height override inherited from .business-card::before */
    opacity: 1 !important; /* Force visibility all the time, ignoring hover transitions */
    background: #ffd700;
    color: #1e1e24;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 0.05em;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   SITIOS ASOCIADOS / RECOMENDADOS (BANNERS)
   ========================================================================== */
.associated-sites-section {
    margin-top: 4rem;
    margin-bottom: 2rem;
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius-lg);
    background: hsl(var(--card-bg));
    border: 1px solid hsl(var(--card-border));
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    transition: var(--transition-normal);
}

.dark-theme .associated-sites-section {
    background: rgba(30, 30, 42, 0.35);
    backdrop-filter: blur(10px);
    box-shadow: none;
    border-color: hsl(var(--card-border));
}

.associated-sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.partner-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: hsl(var(--card-bg));
    border: 1px solid hsl(var(--card-border));
    border-radius: var(--border-radius-md);
    transition: var(--transition-normal);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.01);
}

.dark-theme .partner-card {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.05);
}

.partner-card:hover {
    transform: translateY(-4px);
    border-color: hsl(var(--primary));
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.05);
}

.dark-theme .partner-card:hover {
    border-color: hsl(var(--primary));
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    background: rgba(255, 255, 255, 0.05);
}

.partner-logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: hsl(var(--secondary) / 0.1);
    color: hsl(var(--secondary));
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.partner-card:hover .partner-logo-wrapper {
    background: hsl(var(--primary) / 0.15);
    color: hsl(var(--primary));
    transform: scale(1.05);
}

.partner-icon {
    width: 22px;
    height: 22px;
    stroke-width: 2;
}

.partner-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.partner-info h4 {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: hsl(var(--text-main));
    margin: 0;
    line-height: 1.3;
}

.partner-info p {
    font-size: 0.78rem;
    color: hsl(var(--text-muted));
    margin: 0;
    line-height: 1.3;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .associated-sites-section {
        padding: 2rem 1.25rem;
        margin-top: 3rem;
    }
    .associated-sites-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Scroll Down text */
.scroll-down-text {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: #d60000;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-top: 0.25rem;
    animation: pulseText 2s infinite ease-in-out;
}

@keyframes pulseText {
    0%, 100% { opacity: 0.65; }
    50% { opacity: 1; }
}

/* Floating category badge inside card cover images */
.card-category-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 2;
    transition: var(--transition-fast);
}

.card-category-badge.cat-health { border-color: rgba(239, 68, 68, 0.5); color: #f87171; }
.card-category-badge.cat-vets { border-color: rgba(16, 185, 129, 0.5); color: #34d399; }
.card-category-badge.cat-gastronomy { border-color: rgba(245, 158, 11, 0.5); color: #fbbf24; }
.card-category-badge.cat-supermarket { border-color: rgba(59, 130, 246, 0.5); color: #60a5fa; }
.card-category-badge.cat-cafe { border-color: rgba(139, 92, 26, 0.5); color: #d97706; }
.card-category-badge.cat-furniture { border-color: rgba(168, 85, 247, 0.5); color: #c084fc; }
.card-category-badge.cat-realestate { border-color: rgba(236, 72, 153, 0.5); color: #f472b6; }
.card-category-badge.cat-gardening { border-color: rgba(16, 185, 129, 0.5); color: #34d399; }
.card-category-badge.cat-beauty { border-color: rgba(236, 72, 153, 0.5); color: #f472b6; }
.card-category-badge.cat-automotive { border-color: rgba(107, 114, 128, 0.5); color: #9ca3af; }
.card-category-badge.cat-sports { border-color: rgba(245, 158, 11, 0.5); color: #fbbf24; }
.card-category-badge.cat-fashion { border-color: rgba(236, 72, 153, 0.5); color: #f472b6; }
.card-category-badge.cat-tech { border-color: rgba(59, 130, 246, 0.5); color: #60a5fa; }
.card-category-badge.cat-toys { border-color: rgba(168, 85, 247, 0.5); color: #c084fc; }
.card-category-badge.cat-electrical { border-color: rgba(234, 179, 8, 0.5); color: #fde047; }

.card-category-badge svg {
    width: 16px;
    height: 16px;
    stroke-width: 2px;
}

/* Showcase Section for Categories (Premium Cinematic Carousel) */
.showcase-carousel-wrapper {
    position: relative;
    padding: 1rem 0;
}

.showcase-card {
    height: 220px; /* Taller card for cinematic feeling */
    border-radius: var(--border-radius-lg);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.3s ease;
}

.showcase-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    z-index: 2;
    display: block;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.15) 100%);
    transform: skewX(-25deg);
}

.showcase-card:hover::after {
    animation: shine 0.75s;
}

@keyframes shine {
    100% {
        left: 125%;
    }
}

.showcase-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(255, 160, 0, 0.25);
    border-color: rgba(255, 160, 0, 0.5);
}

.dark-theme .showcase-card:hover {
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.6);
}

.showcase-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.1) 0%, rgba(15, 23, 42, 0.5) 50%, rgba(15, 23, 42, 0.95) 100%);
    z-index: 1;
    transition: background 0.3s ease;
}

.showcase-card:hover .showcase-card-overlay {
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.05) 0%, rgba(15, 23, 42, 0.45) 40%, rgba(15, 23, 42, 0.9) 100%);
}

.showcase-card-content {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.showcase-card:hover .showcase-card-content {
    transform: translateY(-5px);
}

.showcase-card-icon {
    width: 38px;
    height: 38px;
    color: #ffd700;
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid rgba(255, 215, 0, 0.25);
    padding: 8px;
    border-radius: 50%;
    margin-bottom: 0.5rem;
    stroke-width: 2.2px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.showcase-card:hover .showcase-card-icon {
    transform: scale(1.15) rotate(-5deg);
    background: rgba(255, 215, 0, 0.25);
}

.showcase-card h4 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: white;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.showcase-card p {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Responsive showcase & Carousel */
.showcase-carousel-track::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome, Safari and Opera */
}

.showcase-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
    color: white !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.showcase-arrow:hover {
    background: #ffd700 !important;
    border-color: #ffd700 !important;
    color: #1e1e24 !important;
    transform: scale(1.15) translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.3) !important;
}

.dark-theme .showcase-arrow:hover {
    background: hsl(var(--primary)) !important;
    border-color: hsl(var(--primary)) !important;
    color: #fff !important;
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4) !important;
}

.showcase-arrow:active {
    transform: scale(0.95);
}

@media (max-width: 1024px) {
    .showcase-carousel-track .showcase-card {
        flex: 0 0 calc(50% - 0.625rem) !important;
    }
}

@media (max-width: 640px) {
    .showcase-carousel-track .showcase-card {
        flex: 0 0 82% !important;
    }
    .showcase-arrow {
        display: none !important; /* Hide arrows on touch devices to rely on touch swipe */
    }
}

@media (max-width: 580px) {
    .showcase-card {
        height: 180px;
    }
}

/* Mini King Logo Animation on Ad Banner Hover */
.ad-banner-link:hover .ad-banner-btn-icon-wrapper {
    width: 36px !important;
    overflow: visible !important;
}

.ad-banner-link:hover .ad-arrow {
    transform: translateX(-20px) !important;
    opacity: 0 !important;
}

.ad-banner-link:hover .ad-mini-logo {
    left: 10px !important;
    opacity: 1 !important;
    animation: mini-playful-dance 0.6s infinite ease-in-out alternate;
}

@keyframes mini-playful-dance {
    0% { transform: rotate(-15deg) scale(3.6); }
    100% { transform: rotate(15deg) scale(4.4); }
}

/* ==============================================================================
   FORMULARIOS INLINE EXPANDIBLES (ARWEBCMS RULE #2)
   Cero ventanas modales fijas para altas y contacto
   ============================================================================== */
.inline-form-card {
    position: relative !important;
    display: block;
    width: 100% !important;
    max-width: 900px !important;
    margin: 1.5rem auto 2.5rem auto !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04) !important;
    overflow: hidden !important;
    z-index: 20 !important;
    animation: inlineSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.dark-theme .inline-form-card {
    background: #0f172a !important;
    border-color: #1e293b !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4) !important;
}

@keyframes inlineSlideDown {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.inline-form-inner {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.inline-form-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    padding: 1.5rem 2rem !important;
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%) !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.dark-theme .inline-form-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    border-bottom-color: #1e293b !important;
}

.inline-form-title {
    font-family: var(--font-heading) !important;
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 !important;
    letter-spacing: -0.02em !important;
}

.dark-theme .inline-form-title {
    color: #f8fafc !important;
}

.inline-form-close-btn {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #64748b !important;
    cursor: pointer !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05) !important;
    transition: all 0.2s ease !important;
}

.inline-form-close-btn:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    transform: rotate(90deg) scale(1.05) !important;
}

.dark-theme .inline-form-close-btn {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
}

.dark-theme .inline-form-close-btn:hover {
    background: #334155 !important;
    color: #ffffff !important;
}

.inline-form-body {
    padding: 2rem !important;
}

/* ==============================================================================
   ACCESSIBILITY & MODERN UI ENHANCEMENTS (WCAG 2.1 AA & ARWEBCMS GOVERNANCE)
   ============================================================================== */

/* 1. Skip-to-content Link for Keyboard Users */
.skip-link {
    position: absolute;
    top: -9999px;
    left: 1.5rem;
    background: #0284c7;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    z-index: 999999;
    text-decoration: none;
    box-shadow: 0 10px 25px -5px rgba(2, 132, 199, 0.4);
    transition: top 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.skip-link:focus {
    top: 1.25rem;
    outline: 3px solid #38bdf8;
    outline-offset: 3px;
}

/* 2. Global Focus-Visible Navigation Indicator */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid hsl(var(--primary)) !important;
    outline-offset: 2px !important;
}

/* 3. Skeleton Loading Screen (Zero CLS & Instant Shimmer) */
.skeleton-card {
    pointer-events: none;
    user-select: none;
    border: 1px solid hsl(var(--border-color) / 0.7) !important;
    background: hsl(var(--card-bg)) !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04) !important;
    overflow: hidden;
}
.skeleton-image {
    width: 100%;
    height: 140px;
    background: hsl(var(--surface-color));
}
.shimmer {
    background: linear-gradient(
        90deg,
        hsl(var(--surface-color)) 0%,
        hsl(var(--surface-hover) / 0.8) 50%,
        hsl(var(--surface-color)) 100%
    );
    background-size: 200% 100%;
    animation: gp-shimmer-anim 1.6s infinite ease-in-out;
}
@keyframes gp-shimmer-anim {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 4. Touch Targets & Micro-interactions */
.btn-touch-target {
    position: relative;
}
.btn-touch-target::after {
    content: '';
    position: absolute;
    inset: -8px;
}

@media (hover: hover) {
    .business-card {
        transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease;
    }
    .business-card:hover {
        transform: translateY(-3px);
    }
}
.business-card:active {
    transform: scale(0.99);
}

.whatsapp-btn:active,
.detail-btn:active,
.hero-btn:active,
.load-more-btn:active {
    transform: scale(0.96);
    transition: transform 0.1s ease;
}

/* 5. Prefers-Reduced-Motion Accessibility Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .shimmer {
        animation: none !important;
        background: hsl(var(--surface-color)) !important;
    }
}

/* ==========================================================================
   Dynamic Geolocation & Contextual Radius Bar
   ========================================================================== */
.geo-context-bar {
    max-width: 1200px;
    margin: 0.5rem auto 1rem auto;
    padding: 0 1rem;
    animation: fadeInDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.geo-context-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    background: linear-gradient(135deg, hsl(var(--bg-surface)) 0%, hsl(var(--primary) / 0.08) 100%);
    border: 1px solid hsl(var(--primary) / 0.3);
    border-radius: 14px;
    padding: 0.75rem 1.25rem;
    box-shadow: 0 4px 16px -4px hsl(var(--primary) / 0.12);
    position: relative;
}

.geo-context-lead {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.92rem;
    color: hsl(var(--text-primary));
}

.geo-pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: geoPulse 1.8s infinite;
    flex-shrink: 0;
}

@keyframes geoPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.geo-context-title strong {
    color: hsl(var(--primary));
    font-weight: 700;
}

.geo-context-subtitle {
    font-size: 0.82rem;
    color: hsl(var(--text-muted));
}

.geo-radius-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.geo-radius-caption {
    font-size: 0.8rem;
    font-weight: 600;
    color: hsl(var(--text-secondary));
    margin-right: 0.2rem;
}

.radius-chip {
    padding: 0.3rem 0.65rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid hsl(var(--border-color));
    background: hsl(var(--bg-base));
    color: hsl(var(--text-secondary));
    transition: all 0.18s ease;
}

.radius-chip:hover {
    border-color: hsl(var(--primary) / 0.5);
    color: hsl(var(--primary));
}

.radius-chip.active {
    background: hsl(var(--primary));
    color: #121824;
    border-color: hsl(var(--primary));
    font-weight: 700;
    box-shadow: 0 2px 8px -2px hsl(var(--primary) / 0.4);
}

.btn-geo-close {
    background: none;
    border: none;
    cursor: pointer;
    color: hsl(var(--text-muted));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem;
    border-radius: 50%;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn-geo-close:hover {
    background: hsl(var(--border-color));
    color: hsl(var(--text-primary));
}

/* User marker on Leaflet map */
.user-location-marker {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.user-gps-dot {
    width: 14px;
    height: 14px;
    background: #0284c7;
    border: 3px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
}
.user-gps-pulse {
    position: absolute;
    width: 32px;
    height: 32px;
    background: rgba(2, 132, 199, 0.35);
    border-radius: 50%;
    animation: userGpsPulse 2s infinite ease-out;
    z-index: 1;
}
@keyframes userGpsPulse {
    0% { transform: scale(0.4); opacity: 0.9; }
    100% { transform: scale(1.6); opacity: 0; }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .geo-context-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.65rem;
        padding: 0.75rem 1rem;
    }
    .geo-radius-group {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.2rem;
    }
    .btn-geo-close {
        position: absolute;
        top: 0.6rem;
        right: 0.6rem;
    }
}




