/* Slotly Catalog — Public SEO Catalog Page
   Always dark theme (like landing) */

/* ── FORCE DARK THEME (override light mode from components.css) ── */
:root[data-theme="light"] body.catalog-page,
body.catalog-page {
    background: #0f0c29 !important;
    color: #e2e8f0 !important;
    min-height: 100vh;
}
.catalog-page * { box-sizing: border-box; }

/* Override light theme cards/screens */
:root[data-theme="light"] .catalog-page .card,
:root[data-theme="light"] .catalog-page .screen,
:root[data-theme="light"] .catalog-page .modal-content {
    background: rgba(255,255,255,0.05) !important;
    color: #e2e8f0 !important;
}

/* Override light theme for catalog — force dark everywhere */
.catalog-page .nav { background: rgba(15,12,41,0.95) !important; }
.catalog-page footer { background: #0a0820 !important; color: #e2e8f0 !important; }
.catalog-page footer h3 { color: #fff !important; }
.catalog-page footer a { color: rgba(255,255,255,0.7) !important; }
.catalog-page footer a:hover { color: #fff !important; }
.catalog-page footer p,
.catalog-page footer span,
.catalog-page .footer-req,
.catalog-page .footer-bottom { color: rgba(255,255,255,0.5) !important; }
.catalog-page .footer-inner { border-color: rgba(255,255,255,0.1) !important; }
.catalog-page .cookie-banner { background: #1a1a2e !important; color: #e2e8f0 !important; border-color: rgba(255,255,255,0.1) !important; }
.catalog-page .cookie-banner a { color: #a29bfe !important; }
.catalog-page .cookie-decline { color: rgba(255,255,255,0.7) !important; border-color: rgba(255,255,255,0.2) !important; background: transparent !important; }

/* ── HERO (compact) ── */
.catalog-hero {
    background: linear-gradient(135deg, #0f0c29 0%, #1a1040 50%, #0f0c29 100%);
    padding: 100px 24px 44px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.catalog-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 50%, rgba(108,92,231,0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 50%, rgba(162,155,254,0.06) 0%, transparent 50%);
    pointer-events: none;
}
.catalog-hero h1 {
    font-size: clamp(24px, 3.5vw, 40px);
    font-weight: 800;
    color: #fff;
    margin: 0 0 10px;
    position: relative;
}
.catalog-hero-sub {
    color: rgba(255,255,255,0.6);
    font-size: 16px;
    margin: 0 0 28px;
    position: relative;
}

/* ── SEARCH BAR ── */
.catalog-search-wrap {
    display: flex;
    gap: 10px;
    max-width: 640px;
    margin: 0 auto;
    position: relative;
}
.catalog-search-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    padding: 13px 18px;
    transition: border-color .2s, box-shadow .2s;
}
.catalog-search-box:focus-within {
    border-color: rgba(108,92,231,0.5);
    box-shadow: 0 0 20px rgba(108,92,231,0.12);
}
.catalog-search-box i {
    color: rgba(255,255,255,0.35);
    font-size: 15px;
    flex-shrink: 0;
}
.catalog-search-box input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-size: 15px;
    font-family: inherit;
}
.catalog-search-box input::placeholder { color: rgba(255,255,255,0.5); }
.catalog-search-clear {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    line-height: 1;
    transition: color .15s;
}
.catalog-search-clear:hover { color: #fff; }

.catalog-city-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    padding: 13px 16px;
    min-width: 180px;
    transition: border-color .2s, box-shadow .2s;
}
.catalog-city-box:focus-within {
    border-color: rgba(108,92,231,0.5);
    box-shadow: 0 0 20px rgba(108,92,231,0.12);
}
.catalog-city-box i {
    color: rgba(255,255,255,0.35);
    font-size: 14px;
    flex-shrink: 0;
}
.catalog-city-box input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-size: 15px;
    font-family: inherit;
    min-width: 0;
}
.catalog-city-box input::placeholder { color: rgba(255,255,255,0.5); }

/* ── BREADCRUMB ── */
.catalog-breadcrumb {
    padding: 12px 24px 0;
    max-width: 1100px;
    margin: 0 auto;
    font-size: 13px;
    color: rgba(255,255,255,0.4);
}
.catalog-breadcrumb a {
    color: var(--purple-light, #a29bfe);
    text-decoration: none;
    transition: color .15s;
}
.catalog-breadcrumb a:hover { color: #fff; }
.catalog-breadcrumb .sep { margin: 0 8px; opacity: 0.4; }

/* ── MAIN CONTAINER ── */
.catalog-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

/* ── CATEGORIES GRID ── */
.catalog-categories { margin: 28px 0 24px; }
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}
.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 10px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    transition: all .2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.category-card:hover {
    border-color: rgba(108,92,231,0.3);
    background: rgba(108,92,231,0.06);
    transform: translateY(-2px);
}
.category-card.active {
    border-color: rgba(108,92,231,0.6);
    background: rgba(108,92,231,0.12);
    box-shadow: 0 4px 20px rgba(108,92,231,0.15);
}
.category-card-name {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    text-align: center;
    line-height: 1.3;
}
.category-card.active .category-card-name { color: #fff; }

/* ── SUBCATEGORY CHIPS ── */
.subcategory-bar {
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.subcategory-bar::-webkit-scrollbar { display: none; }
.subcategory-chips {
    display: flex;
    gap: 8px;
    padding: 2px 0;
}
.subcategory-chip {
    flex-shrink: 0;
    padding: 7px 18px;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.subcategory-chip:hover {
    border-color: rgba(108,92,231,0.4);
    color: rgba(255,255,255,0.85);
}
.subcategory-chip.active {
    background: var(--purple, #6C5CE7);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
}

/* ── SORT BAR ── */
.catalog-sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    gap: 12px;
}
.results-count {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    white-space: nowrap;
}
.catalog-sort-bar select {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    border-radius: 10px;
    padding: 8px 32px 8px 14px;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='rgba(255,255,255,0.4)' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color .2s;
}
.catalog-sort-bar select:focus {
    outline: none;
    border-color: rgba(108,92,231,0.5);
}

/* ── BUSINESS CARDS GRID ── */
.businesses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 16px;
}
.business-card {
    display: block;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    text-decoration: none;
    color: inherit;
}
.business-card:hover {
    transform: translateY(-4px);
    border-color: rgba(108,92,231,0.3);
    box-shadow: 0 12px 40px rgba(108,92,231,0.15);
}

.bc-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 18px 12px;
}
.bc-logo {
    width: 52px;
    height: 52px;
    border-radius: 13px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255,255,255,0.06);
}
.bc-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.bc-logo-ph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
}
.bc-info {
    flex: 1;
    min-width: 0;
}
.bc-name {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.bc-category {
    font-size: 11px;
    font-weight: 600;
    color: var(--purple-light, #a29bfe);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 2px;
}

.bc-body { padding: 0 18px 16px; }
.bc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 13px;
    color: rgba(255,255,255,0.65);
}
.bc-meta i { margin-right: 4px; }
.bc-rating { color: #fdcb6e; }
.bc-rating .count { color: rgba(255,255,255,0.4); font-size: 12px; }
.bc-address {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.bc-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.bc-services {
    font-size: 12px;
    color: rgba(255,255,255,0.55);
}
.bc-cta {
    display: inline-block;
    padding: 7px 18px;
    background: linear-gradient(135deg, #6C5CE7, #a29bfe);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 10px;
    transition: transform .15s, box-shadow .15s;
}
.business-card:hover .bc-cta {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(108,92,231,0.35);
}

/* ── SKELETON CARDS ── */
.skel-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    overflow: hidden;
}
.skel-header {
    display: flex;
    gap: 14px;
    padding: 18px 18px 12px;
    align-items: center;
}
.skel-avatar {
    width: 52px;
    height: 52px;
    border-radius: 13px;
    position: relative;
}
.skel-lines { flex: 1; }
.skel-line {
    height: 13px;
    border-radius: 6px;
    margin-bottom: 8px;
    position: relative;
}
.skel-line:last-child { margin-bottom: 0; }
.skel-body { padding: 0 18px 18px; }
.skel-avatar,
.skel-line {
    background: rgba(255,255,255,0.06);
    overflow: hidden;
}
.skel-avatar::after,
.skel-line::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
    animation: shimmer 1.5s infinite;
}

/* ── EMPTY STATE ── */
.catalog-empty {
    text-align: center;
    padding: 70px 24px;
}
.catalog-empty-icon {
    font-size: 48px;
    color: rgba(108,92,231,0.3);
    margin-bottom: 18px;
}
.catalog-empty h3 {
    font-size: 20px;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    margin: 0 0 8px;
}
.catalog-empty p {
    font-size: 14px;
    color: rgba(255,255,255,0.4);
    margin: 0 0 22px;
}
.catalog-empty .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #6C5CE7, #a29bfe);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
}
.catalog-empty .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(108,92,231,0.35);
}

/* ── PAGINATION ── */
.catalog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 36px 0 0;
}
.catalog-pagination .btn-pg {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all .2s;
}
.catalog-pagination .btn-pg:hover:not(:disabled) {
    border-color: rgba(108,92,231,0.4);
    color: #fff;
}
.catalog-pagination .btn-pg:disabled {
    opacity: 0.3;
    cursor: default;
}
.page-info {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
}

/* ── ANIMATION (stagger fade) ── */
.cat-fade {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .4s ease, transform .4s ease;
}
.cat-fade.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .catalog-hero { padding: 80px 16px 32px; }
    .catalog-hero h1 { font-size: 22px; }
    .catalog-search-wrap { flex-direction: column; }
    .catalog-city-box { min-width: 0; }
    .categories-grid { grid-template-columns: repeat(auto-fill, minmax(95px, 1fr)); gap: 8px; }
    .category-card { padding: 14px 6px 10px; }
    .category-card-name { font-size: 11px; }
    .businesses-grid { grid-template-columns: 1fr; }
    .catalog-sort-bar { flex-wrap: wrap; }
    .bc-address { max-width: 160px; }
}

@media (max-width: 480px) {
    .catalog-hero { padding: 76px 12px 24px; }
    .catalog-hero-sub { font-size: 14px; }
    .catalog-main { padding: 0 12px 40px; }
    .bc-header { padding: 14px 14px 10px; }
    .bc-body { padding: 0 14px 14px; }
    .bc-footer { padding: 10px 14px; }
}
