:root {
    --primary: #6366f1;
    --secondary: #8b5cf6;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --whatsapp: #25d366;
    --bg-dark: #0a0a12;
    --bg-card: #13131f;
    --bg-elevated: #1c1c2e;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --border: rgba(255, 255, 255, 0.08);
    --gradient-primary: linear-gradient(135deg, #6366f1, #8b5cf6);
    --gradient-gold: linear-gradient(135deg, #f59e0b, #fbbf24);
    --gradient-africa: linear-gradient(135deg, #10b981, #f59e0b, #ef4444);
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.7;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.gr {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Header */
.header {
    background: rgba(10, 10, 18, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
}

.logo img {
    height: 40px;
}

.logo-badge {
    font-size: 0.6rem;
    background: var(--gradient-gold);
    color: #000;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
}

.btn-gold {
    background: var(--gradient-gold);
    color: #000;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-primary);
}

.btn-whatsapp {
    background: var(--whatsapp);
    color: #fff;
}

/* Hero */
.hero {
    padding: 80px 0 60px;
    text-align: center;
}

.hero h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 40px;
}

/* Search */
.search-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 30px;
    margin-bottom: 50px;
}

.search-row {
    display: grid;
    grid-template-columns: 1fr 200px 200px auto;
    gap: 15px;
}

.search-input {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0 15px;
}

.search-input i {
    color: var(--text-muted);
}

.search-input input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 15px 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.search-input input:focus {
    outline: none;
}

.search-input input::placeholder {
    color: var(--text-muted);
}

.search-select {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 15px;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
}

.search-select:focus {
    outline: none;
    border-color: var(--primary);
}

.search-btn {
    padding: 15px 30px;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-md);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Categories */
.categories {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.cat-btn {
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.cat-btn:hover,
.cat-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Stats */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-bottom: 50px;
    padding: 20px 0;
}

.stat-item {
    text-align: center;
}

.stat-item h4 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
}

.stat-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Directory Grid */
.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 25px;
    margin-bottom: 60px;
}

.provider-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.3s;
}

.provider-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.provider-card.premium {
    border-color: var(--accent);
}

.provider-card.premium::before {
    content: '⭐ Premium';
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--gradient-gold);
    color: #000;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
}

.provider-header {
    padding: 25px;
    display: flex;
    gap: 18px;
    position: relative;
}

.provider-avatar {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.provider-card:nth-child(2) .provider-avatar {
    background: var(--gradient-gold);
    color: #000;
}

.provider-card:nth-child(3) .provider-avatar {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.provider-card:nth-child(4) .provider-avatar {
    background: linear-gradient(135deg, #ef4444, #f87171);
}

.provider-card:nth-child(5) .provider-avatar {
    background: linear-gradient(135deg, #ec4899, #f472b6);
}

.provider-card:nth-child(6) .provider-avatar {
    background: linear-gradient(135deg, #06b6d4, #22d3ee);
}

.provider-info h3 {
    font-size: 1.15rem;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.provider-info h3 .verified {
    background: var(--success);
    color: #fff;
    font-size: 0.6rem;
    padding: 3px 8px;
    border-radius: 10px;
}

.provider-category {
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 8px;
}

.provider-location {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.provider-location i {
    color: var(--primary);
}

.provider-body {
    padding: 0 25px 20px;
    display: flex;
    flex-direction: column;
}

/* Provider Image */
.provider-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    background: var(--bg-elevated);
    display: block;
}

.provider-image-container {
    position: relative;
    width: 100%;
    height: 160px;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 15px;
    background: var(--bg-elevated);
}

.provider-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.provider-price {
    color: var(--success);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 8px 0 12px;
}

.provider-contacts {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0;
}

.contact-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s;
}

.contact-chip:hover {
    transform: translateY(-2px);
}

.contact-chip.whatsapp {
    background: var(--whatsapp) !important;
    color: #fff !important;
}

.contact-chip.whatsapp:hover {
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.provider-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 2;
    flex: 1;
}

.provider-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.provider-tag {
    padding: 5px 12px;
    background: var(--bg-elevated);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.provider-stats {
    display: flex;
    gap: 20px;
    padding: 15px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 15px;
}

.provider-stat {
    text-align: center;
    flex: 1;
}

.provider-stat h5 {
    font-size: 1rem;
    color: var(--text-primary);
}

.provider-stat p {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.provider-stat.rating h5 {
    color: var(--accent);
}

.provider-actions {
    display: flex;
    gap: 10px;
}

.btn-contact {
    flex: 1;
    padding: 12px;
    background: var(--whatsapp);
    border: none;
    border-radius: var(--radius-md);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-contact:hover {
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}

.btn-profile {
    padding: 12px 18px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-profile:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Premium CTA */
.premium-cta {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(245, 158, 11, 0.1) 100%);
    border: 2px solid var(--accent);
    border-radius: var(--radius-xl);
    padding: 50px;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
}

.premium-cta::before {
    content: '👑';
    position: absolute;
    top: -30px;
    right: -30px;
    font-size: 150px;
    opacity: 0.1;
}

.premium-cta h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    margin-bottom: 15px;
    position: relative;
}

.premium-cta p {
    color: var(--text-secondary);
    margin-bottom: 25px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.premium-features {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    position: relative;
}

.premium-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.premium-feature i {
    color: var(--accent);
}

.premium-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 25px;
    position: relative;
}

.premium-price small {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Footer */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 40px 0;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--text-secondary);
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 1024px) {
    .search-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .nav-links {
        display: none;
    }

    .directory-grid {
        grid-template-columns: 1fr;
    }

    .stats-bar {
        flex-wrap: wrap;
        gap: 30px;
    }
}

/* Contact Chip Default */
.contact-chip {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.contact-chip:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Menu Hamburger */
.menu-hamburger {
    display: none;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.menu-hamburger:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.menu-hamburger .badge-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    display: none;
}

@media (max-width: 768px) {
    .menu-hamburger {
        display: flex;
    }
}

/* ============================================
   SKELETON LOADING - GAFAM Style
   ============================================ */

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.provider-card.skeleton {
    pointer-events: none;
}

.skeleton-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--bg-elevated) 25%, rgba(255, 255, 255, 0.08) 50%, var(--bg-elevated) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-line {
    height: 14px;
    border-radius: 7px;
    background: linear-gradient(90deg, var(--bg-elevated) 25%, rgba(255, 255, 255, 0.08) 50%, var(--bg-elevated) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    margin-bottom: 10px;
}

.skeleton-line.w-100 {
    width: 100%;
}

.skeleton-line.w-80 {
    width: 80%;
}

.skeleton-line.w-70 {
    width: 70%;
}

.skeleton-line.w-50 {
    width: 50%;
}

.skeleton-line.w-40 {
    width: 40%;
}

.skeleton-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.skeleton-btn {
    flex: 1;
    height: 44px;
    border-radius: var(--radius-md);
    background: linear-gradient(90deg, var(--bg-elevated) 25%, rgba(255, 255, 255, 0.08) 50%, var(--bg-elevated) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-btn-sm {
    width: 50px;
    height: 44px;
    border-radius: var(--radius-md);
    background: linear-gradient(90deg, var(--bg-elevated) 25%, rgba(255, 255, 255, 0.08) 50%, var(--bg-elevated) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Provider Card Entrance Animation */
.provider-card:not(.skeleton) {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

.provider-card:nth-child(1) {
    animation-delay: 0.05s;
}

.provider-card:nth-child(2) {
    animation-delay: 0.1s;
}

.provider-card:nth-child(3) {
    animation-delay: 0.15s;
}

.provider-card:nth-child(4) {
    animation-delay: 0.2s;
}

.provider-card:nth-child(5) {
    animation-delay: 0.25s;
}

.provider-card:nth-child(6) {
    animation-delay: 0.3s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fix for DisplayEngine rendering product-card instead of provider-card */
.directory-grid .product-card .product-image {
    height: 180px !important;
    overflow: hidden;
}

.directory-grid .product-card .product-image img {
    height: 100%;
    width: 100%;
    object-fit: cover !important;
}

/* Ensure grid columns are not too wide on mobile */
@media (max-width: 768px) {
    .directory-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    }
}