/**
 * TurnKey Directories - Modern Niche Page Styles
 * Airbnb-inspired search with Zillow-style layout
 * UPDATED: Unified typography system with Inter font
 */

/* Font import removed - fonts are loaded dynamically via performance optimizer based on dashboard settings */

/* DEBUG: Test that CSS is loading */
.tkd-zillow-layout {
    border: 2px solid red !important;
}

.tkd-listings-grid {
    border: 2px solid blue !important;
}

/* CSS Variables - Unified Typography System */
/* NOTE: --tkd-font-family is set dynamically via inline CSS from dashboard settings */
:root {
    /* Typography System - static helpers only, font-family comes from dashboard */
    --tkd-font-size-xs: 10px;
    --tkd-font-size-sm: 12px;
    --tkd-font-size-base: 14px;
    --tkd-font-size-md: 16px;
    --tkd-font-size-lg: 18px;
    --tkd-font-size-xl: 20px;
    --tkd-font-size-2xl: 24px;
    --tkd-font-size-3xl: 32px;
    --tkd-font-weight-normal: 400;
    --tkd-font-weight-medium: 500;
    --tkd-font-weight-semibold: 600;
    --tkd-font-weight-bold: 700;
    --tkd-leading-tight: 1.2;
    --tkd-leading-snug: 1.3;
    --tkd-leading-normal: 1.4;
    --tkd-leading-relaxed: 1.5;
    --tkd-leading-loose: 1.6;
    
    /* Color System */
    --tkd-primary: #FF5A5F;
    --tkd-primary-dark: #E84B50;
    --tkd-secondary: #008489;
    --tkd-text-dark: #222222;
    --tkd-text-gray: #717171;
    --tkd-text-light: #B0B0B0;
    --tkd-border: #DDDDDD;
    --tkd-border-light: #EBEBEB;
    --tkd-bg-light: #F7F7F7;
    --tkd-bg-white: #FFFFFF;
    --tkd-bg-glass: rgba(255, 255, 255, 0.1);
    --tkd-shadow-sm: 0 1px 2px rgba(0,0,0,0.08);
    --tkd-shadow-md: 0 2px 8px rgba(0,0,0,0.12);
    --tkd-shadow-lg: 0 4px 16px rgba(0,0,0,0.16);
    --tkd-shadow-hover: 0 2px 4px rgba(0,0,0,0.18);
    --tkd-radius-sm: 8px;
    --tkd-radius-md: 12px;
    --tkd-radius-lg: 16px;
    --tkd-radius-full: 1000px;
    --tkd-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Container */
.tkd-modern-niche-container {
    min-height: 100vh;
    background-color: var(--tkd-bg-white);
}

/* Hero Section */
.tkd-hero-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    padding: 80px 0 100px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.tkd-hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(var(--tkd-accent-rgb, 255, 149, 0), 0.15) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.tkd-hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.tkd-hero-title {
    font-family: var(--tkd-font-family);
    font-size: 48px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 16px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.tkd-hero-subtitle {
    font-family: var(--tkd-font-family);
    font-size: 18px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 48px;
    line-height: 1.5;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Search Widget - Modern Glass Style */
.tkd-search-widget {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sticky Search Bar - Scrolls with page like Airbnb/Yelp */
.tkd-search-widget.tkd-sticky-search {
    position: fixed !important;
    top: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 100% !important;
    max-width: 1200px !important;
    z-index: 1000 !important;
    padding: 12px 24px !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    border-bottom: none !important;
    animation: slideDown 0.3s ease-out !important;
    margin: 0 !important;
}

/* Account for WordPress admin bar */
.admin-bar .tkd-search-widget.tkd-sticky-search {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .tkd-search-widget.tkd-sticky-search {
        top: 46px;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.tkd-sticky-search .tkd-search-form {
    box-shadow: 0 3px 12px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.08) !important;
    border: 1px solid #dddddd !important;
    background: #ffffff !important;
}

/* Account for sticky search bar height when it's active */
.tkd-hero-section.tkd-search-sticky-active {
    padding-bottom: 20px;
}

.tkd-modern-niche-container.tkd-search-sticky-active {
    padding-top: 80px;
}

/* Account for WordPress admin bar + sticky search */
.admin-bar .tkd-modern-niche-container.tkd-search-sticky-active {
    padding-top: 112px; /* 80px + 32px admin bar */
}

@media screen and (max-width: 782px) {
    .admin-bar .tkd-modern-niche-container.tkd-search-sticky-active {
        padding-top: 126px; /* 80px + 46px admin bar */
    }
}

.tkd-search-form {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 100px;
    box-shadow: 
        0 8px 32px 0 rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tkd-search-form:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 40px 0 rgba(0, 0, 0, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.tkd-search-inputs {
    display: flex;
    align-items: center;
    min-height: 72px;
}

.tkd-search-field {
    flex: 1;
    position: relative;
    padding: 12px 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 100px;
}

.tkd-search-field:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    bottom: 20%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.2), transparent);
    height: auto;
    transform: none;
}

.tkd-search-field:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.tkd-search-field label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.tkd-search-field input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 16px;
    color: #ffffff;
    background: transparent;
    padding: 0;
    line-height: 1.4;
    font-weight: 500;
}

.tkd-search-field input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.tkd-field-icon {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    pointer-events: none;
    transition: color 0.3s ease;
}

.tkd-search-field:hover .tkd-field-icon {
    color: #ffffff;
}

.tkd-search-submit {
    background: linear-gradient(135deg, var(--tkd-accent-color, #ff9500) 0%, rgba(var(--tkd-accent-rgb, 255, 149, 0), 0.85) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0 42px;
    height: 60px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    margin-left: 8px;
    box-shadow: 0 4px 15px rgba(var(--tkd-accent-rgb, 255, 149, 0), 0.4);
}

.tkd-search-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(var(--tkd-accent-rgb, 255, 149, 0), 0.5);
    background: linear-gradient(135deg, rgba(var(--tkd-accent-rgb, 255, 149, 0), 0.9) 0%, var(--tkd-accent-color, #ff9500) 100%);
}

.tkd-search-submit i {
    font-size: 18px;
}

/* Quick Filters - Modern Pill Style */
.tkd-quick-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 32px;
    flex-wrap: wrap;
    justify-content: center;
}

.tkd-filter-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 10px 20px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(4px);
}

.tkd-filter-chip:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    transform: translateY(-1px);
}

.tkd-filter-chip.active {
    background: #ffffff;
    color: #0f172a;
    border-color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tkd-filter-chip i {
    font-size: 14px;
}

.tkd-clear-filters {
    color: var(--tkd-text-gray);
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    transition: var(--tkd-transition);
}

.tkd-clear-filters:hover {
    color: var(--tkd-text-dark);
}

/* Main Content Area */
.tkd-main-content {
    flex: 1;
    background: var(--tkd-bg-white);
}

.tkd-content-wrapper {
    max-width: 100%;
    margin: 0 auto;
}

/* Results Header */
.tkd-results-header {
    padding: 24px;
    border-bottom: 1px solid var(--tkd-border-light);
    display: flex;
    justify-content: between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.tkd-results-count h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--tkd-text-dark);
    margin: 0;
}

.tkd-results-count p {
    font-size: 14px;
    color: var(--tkd-text-gray);
    margin: 4px 0 0;
}

.tkd-view-toggles {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

.tkd-toggle-map {
    background: var(--tkd-bg-white);
    border: 1px solid var(--tkd-border);
    border-radius: var(--tkd-radius-sm);
    padding: 8px 16px;
    font-size: 14px;
    color: var(--tkd-text-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--tkd-transition);
}

.tkd-toggle-map:hover {
    background: var(--tkd-bg-light);
}

.tkd-toggle-map.active {
    background: var(--tkd-text-dark);
    color: white;
}

.tkd-sort-dropdown select {
    padding: 8px 12px;
    border: 1px solid var(--tkd-border);
    border-radius: var(--tkd-radius-sm);
    font-size: 14px;
    color: var(--tkd-text-dark);
    background: var(--tkd-bg-white);
    cursor: pointer;
}

/* Zillow-Style Layout - CRITICAL OVERRIDE */
.tkd-zillow-layout {
    display: flex !important;
    min-height: calc(100vh - 200px) !important;
    max-width: 100% !important;
    margin: 0 !important;
    gap: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

/* Map Panel (Left Side) - CRITICAL OVERRIDE */
.tkd-map-panel {
    flex: 0 0 50% !important;
    position: sticky !important;
    top: 0 !important;
    height: calc(100vh - 200px) !important;
    background: var(--tkd-bg-white) !important;
    border-right: 1px solid #dddddd !important;
    overflow: hidden !important;
    width: 50% !important;
}

/* Results Panel (Right Side) - CRITICAL OVERRIDE */
.tkd-results-panel {
    flex: 0 0 50% !important;
    padding: 20px !important;
    overflow-y: auto !important;
    height: calc(100vh - 200px) !important;
    width: 50% !important;
}

/* Split View - Zillow Style */
.tkd-split-view {
    display: flex;
    height: calc(100vh - 220px);
    position: relative;
}

/* Map Section */
.tkd-map-section {
    width: 50%;
    position: sticky;
    top: 0;
    height: 100%;
    display: none;
    border-right: 1px solid var(--tkd-border);
}

.tkd-split-view.show-map .tkd-map-section {
    display: block;
}

.tkd-split-view.show-map .tkd-listings-section {
    width: 50%;
}

.tkd-map-container {
    width: 100%;
    height: 100%;
    background: var(--tkd-bg-light);
    position: relative;
}

#business-map {
    width: 100%;
    height: 100%;
}

.tkd-interactive-map {
    width: 100%;
    height: 100%;
}

/* Listings Section */
.tkd-listings-section {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    height: 100%;
}

/* Results List Container - CRITICAL OVERRIDE */
.tkd-results-panel .tkd-results-list {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Listings Grid - 2 cards per row - CRITICAL OVERRIDE */
.tkd-results-panel .tkd-results-list .tkd-listings-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure cards take up full grid space - CRITICAL OVERRIDE */
.tkd-results-panel .tkd-results-list .tkd-listings-grid .tkd-listing-card {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 !important;
    float: none !important;
}

/* Listing Card - Glass Design Override */
.tkd-listing-card {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    transition: none !important;
    position: relative !important;
    cursor: pointer !important;
    overflow: visible !important;
    box-shadow: none !important;
    display: block !important;
}

.tkd-listing-card:hover {
    box-shadow: none !important;
    transform: none !important;
    border-color: transparent !important;
}

.tkd-featured-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, var(--tkd-primary) 0%, var(--tkd-primary-dark) 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(255, 90, 95, 0.3);
    z-index: 3;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Featured Image Styles - Glass Compatible */
.tkd-card-image {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: var(--tkd-bg-light);
    border-radius: 12px;
    margin-bottom: 16px;
}

.tkd-business-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.tkd-listing-card:hover .tkd-business-image {
    transform: scale(1.05);
}

.tkd-mapillary-embed {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
    display: block;
}

.tkd-mapillary-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 6px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2;
}

.tkd-mapillary-badge i {
    font-size: 11px;
}

.tkd-card-header {
    padding: 0;
    margin-bottom: 12px;
}

.tkd-business-name {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.3;
    color: var(--tkd-text-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-wrap: break-word;
    word-break: break-word;
    height: 2.6em; /* Fixed height for exactly 2 lines × 1.3 line-height */
    min-height: 2.6em; /* Ensure minimum height */
    max-height: 2.6em; /* Ensure maximum height */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.tkd-business-name a {
    color: inherit;
    text-decoration: none;
    transition: var(--tkd-transition);
    display: block;
}

.tkd-business-name a:hover {
    color: var(--tkd-primary);
}

.tkd-rating-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
}

.tkd-stars {
    display: flex;
    gap: 2px;
}

.tkd-stars i {
    font-size: 14px;
    color: var(--tkd-text-light);
}

.tkd-stars i.filled {
    color: var(--tkd-primary);
}

.tkd-rating-text {
    font-size: 14px;
    color: var(--tkd-text-gray);
    font-weight: 500;
}

.tkd-card-body {
    padding: 0;
    margin-bottom: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tkd-location-info,
.tkd-contact-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--tkd-text-gray);
    margin-bottom: 6px;
    line-height: 1.4;
}

.tkd-location-info i,
.tkd-contact-info i {
    font-size: 12px;
    width: 14px;
    color: var(--tkd-text-light);
}

.tkd-business-description {
    font-size: 14px;
    color: var(--tkd-text-gray);
    line-height: 1.5;
    margin: 8px 0 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.tkd-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0;
    border-top: none;
    margin-top: auto;
}

.tkd-view-details {
    flex: 1;
    background: var(--tkd-primary);
    color: white;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: var(--tkd-radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: var(--tkd-transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
}

.tkd-view-details:hover {
    background: var(--tkd-primary-dark);
    transform: scale(1.02);
}

.tkd-view-details i {
    font-size: 12px;
}

.tkd-visit-website {
    width: 40px;
    height: 40px;
    border: 1.5px solid var(--tkd-border);
    border-radius: var(--tkd-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tkd-text-gray);
    transition: var(--tkd-transition);
    text-decoration: none;
    background: var(--tkd-bg-white);
}

.tkd-visit-website:hover {
    border-color: var(--tkd-primary);
    color: var(--tkd-primary);
    background: rgba(255, 90, 95, 0.05);
}

/* Pagination */
.tkd-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
    padding-bottom: 48px;
}

.tkd-page-btn,
.tkd-page-num {
    padding: 8px 16px;
    border: 1px solid var(--tkd-border);
    border-radius: var(--tkd-radius-sm);
    font-size: 14px;
    color: var(--tkd-text-dark);
    text-decoration: none;
    background: var(--tkd-bg-white);
    transition: var(--tkd-transition);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tkd-page-btn:hover,
.tkd-page-num:hover {
    background: var(--tkd-bg-light);
}

.tkd-page-num.active {
    background: var(--tkd-text-dark);
    color: white;
    border-color: var(--tkd-text-dark);
}

.tkd-page-dots {
    color: var(--tkd-text-gray);
    padding: 0 4px;
}

/* No Results */
.tkd-no-results {
    text-align: center;
    padding: 80px 24px;
    max-width: 400px;
    margin: 0 auto;
}

.tkd-no-results i {
    font-size: 48px;
    color: var(--tkd-text-light);
    margin-bottom: 16px;
}

.tkd-no-results h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--tkd-text-dark);
    margin: 0 0 8px;
}

.tkd-no-results p {
    font-size: 14px;
    color: var(--tkd-text-gray);
    margin: 0 0 24px;
}

.tkd-reset-search {
    display: inline-block;
    background: var(--tkd-primary);
    color: white;
    padding: 12px 24px;
    border-radius: var(--tkd-radius-sm);
    text-decoration: none;
    font-weight: 600;
    transition: var(--tkd-transition);
}

.tkd-reset-search:hover {
    background: var(--tkd-primary-dark);
}

/* Large Screens - Keep 2 cards per row */
@media (min-width: 1200px) {
    .tkd-listings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet Responsive */
@media (max-width: 1024px) and (min-width: 769px) {
    .tkd-zillow-layout {
        flex-direction: column;
        padding: 16px;
    }
    
    .tkd-map-panel {
        flex: none;
        width: 100%;
        height: 400px;
        position: relative;
        margin-bottom: 24px;
    }
    
    .tkd-results-panel {
        width: 100%;
    }
    
    .tkd-listings-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .tkd-card-image {
        height: 180px;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* Hero */
    .tkd-hero-section {
        padding: 24px 0 16px;
    }
    
    .tkd-hero-title {
        font-size: 24px;
    }
    
    .tkd-hero-subtitle {
        font-size: 14px;
        margin-bottom: 24px;
    }
    
    /* Search Widget Mobile - FORCE OVERRIDES */
    .tkd-search-form {
        border-radius: 16px !important;
        background: #ffffff !important;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12) !important;
        margin-top: 16px !important;
        border: 1px solid rgba(0,0,0,0.08) !important;
        padding: 8px !important;
        position: relative !important;
        z-index: 20 !important;
        display: block !important;
        width: auto !important;
        max-width: none !important;
    }
    
    .tkd-search-inputs {
        flex-direction: column !important;
        min-height: auto !important;
        gap: 0 !important;
        display: flex !important;
        background: transparent !important;
    }
    
    .tkd-search-field {
        width: 100% !important;
        padding: 12px 16px !important;
        border-bottom: 1px solid #f1f5f9 !important;
        min-height: 48px !important;
        display: flex !important;
        align-items: center !important;
        background: transparent !important;
        margin: 0 !important;
    }
    
    .tkd-search-field:not(:last-child)::after {
        display: none !important;
    }
    
    .tkd-search-field:last-of-type {
        border-bottom: none !important;
    }
    
    .tkd-search-submit {
        width: 100% !important;
        margin: 8px 0 4px !important;
        justify-content: center !important;
        height: 48px !important;
        padding: 0 !important;
        border-radius: 12px !important;
        font-size: 15px !important;
        background: linear-gradient(135deg, var(--tkd-accent-color, #ff9500) 0%, rgba(var(--tkd-accent-rgb, 255, 149, 0), 0.85) 100%) !important;
        color: white !important;
        display: flex !important;
        align-items: center !important;
        position: static !important;
        transform: none !important;
    }
    
    .tkd-search-submit i {
        margin-right: 8px !important;
    }
    
    .tkd-search-submit::after {
        content: "Search";
    }

    /* Fix text colors for white background on mobile - FORCE OVERRIDES */
    .tkd-search-field label {
        color: #64748b !important;
        margin-bottom: 4px !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
    }
    
    .tkd-search-field input {
        color: #1e293b !important;
        font-size: 16px !important;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        height: auto !important;
        min-height: auto !important;
    }
    
    .tkd-search-field input::placeholder {
        color: #94a3b8 !important;
        opacity: 1 !important;
    }
    
    .tkd-field-icon {
        color: #94a3b8 !important;
        position: absolute !important;
        right: 16px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }

    /* Fix Container Padding - FORCE OVERRIDE tkd-mobile-critical.css */
    .tkd-modern-niche-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    .tkd-hero-content {
        padding: 0 20px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Fix Listings Grid - FORCE OVERRIDE */
    .tkd-listings-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .tkd-results-panel {
        padding: 16px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .tkd-results-list {
        width: 100% !important;
        padding: 0 !important;
    }

    /* Fix Card Proportions */
    .tkd-listing-card {
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        margin-bottom: 0 !important;
        background: #ffffff !important;
        border-radius: 16px !important;
        box-shadow: 0 2px 12px rgba(0,0,0,0.08) !important;
        overflow: hidden !important;
        padding: 0 !important;
    }

    .tkd-card-image {
        width: 100% !important;
        height: 200px !important;
        border-radius: 16px 16px 0 0 !important;
        margin: 0 !important;
    }

    .tkd-card-body {
        padding: 16px !important;
        display: block !important;
    }

    .tkd-card-footer {
        padding: 0 16px 16px !important;
        display: flex !important;
        flex-direction: row !important;
        gap: 10px !important;
        margin-top: 0 !important;
    }

    .tkd-view-details {
        flex: 1 !important;
        width: auto !important;
        text-align: center !important;
        justify-content: center !important;
        padding: 12px 16px !important;
        height: 48px !important;
    }

    .tkd-visit-website {
        width: 48px !important;
        height: 48px !important;
        flex: none !important;
    }
    
    /* Sticky Search Bar Mobile */
    .tkd-search-widget.tkd-sticky-search {
        padding: 8px 16px;
        max-width: 100%;
        left: 0;
        transform: none;
        background: transparent !important;
        box-shadow: none !important;
        border-bottom: none !important;
    }
    
    .tkd-modern-niche-container.tkd-search-sticky-active {
        padding-top: 70px;
    }
    
    /* Account for WordPress admin bar on mobile */
    .admin-bar .tkd-search-widget.tkd-sticky-search {
        top: 46px;
    }
    
    .admin-bar .tkd-modern-niche-container.tkd-search-sticky-active {
        padding-top: 116px; /* 70px + 46px admin bar */
    }
    
    /* Quick Filters Mobile */
    .tkd-quick-filters {
        padding: 0 16px;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap;
    }
    
    .tkd-quick-filters::-webkit-scrollbar {
        display: none;
    }
    
    .tkd-filter-chip {
        flex-shrink: 0;
    }
    
    /* Results Header Mobile */
    .tkd-results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 16px;
    }
    
    .tkd-view-toggles {
        width: 100%;
        justify-content: space-between;
    }
    
    /* Zillow Layout Mobile */
    .tkd-zillow-layout {
        flex-direction: column;
        padding: 12px;
        min-height: auto;
    }
    
    .tkd-map-panel {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        min-height: 0 !important;
        max-height: 0 !important;
        width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
    
    .tkd-results-panel {
        width: 100% !important;
    }
    
    /* Listings Grid Mobile */
    .tkd-listings-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Card Mobile */
    .tkd-listing-card {
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
    
    .tkd-card-image {
        height: 180px;
    }
    
    .tkd-card-header {
        padding: 12px 12px 6px;
    }
    
    .tkd-business-name {
        font-size: 16px;
    }
    
    .tkd-card-body {
        padding: 6px 12px 12px;
    }
    
    .tkd-location-info,
    .tkd-contact-info {
        font-size: 13px;
    }
    
    .tkd-business-description {
        font-size: 13px;
    }
    
    .tkd-card-footer {
        padding: 12px;
        gap: 8px;
    }
    
    .tkd-featured-badge {
        top: 10px;
        right: 10px;
        padding: 5px 10px;
        font-size: 10px;
    }
    
    .tkd-mapillary-badge {
        bottom: 10px;
        left: 10px;
        padding: 5px 8px;
        font-size: 11px;
    }
    
    .tkd-business-name {
        font-size: 16px;
    }
    
    .tkd-card-footer {
        flex-direction: column;
        gap: 8px;
    }
    
    .tkd-view-details {
        width: 100%;
    }
    
    .tkd-visit-website {
        width: 100%;
    }
    
    /* Pagination Mobile */
    .tkd-pagination {
        flex-wrap: wrap;
        gap: 4px;
        padding: 24px 16px;
    }
    
    .tkd-page-numbers {
        display: flex;
        gap: 4px;
    }
    
    .tkd-page-btn,
    .tkd-page-num {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .tkd-hero-content {
        padding: 0 16px;
    }
    
    .tkd-hero-title {
        font-size: 20px;
    }
    
    .tkd-search-field {
        padding: 12px 16px;
    }
    
    .tkd-filter-chip {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* Loading placeholder for images */
.tkd-card-image.loading {
    background: linear-gradient(135deg, var(--tkd-bg-light) 0%, var(--tkd-border-light) 100%);
    position: relative;
}

.tkd-card-image.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.4) 50%, 
        rgba(255,255,255,0) 100%);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Image fade in effect */
.tkd-business-image {
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tkd-business-image.loaded {
    opacity: 1;
}

/* No image placeholder */
.tkd-card-image .tkd-no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--tkd-bg-light) 0%, var(--tkd-border-light) 100%);
    color: var(--tkd-text-light);
}

.tkd-card-image .tkd-no-image-placeholder i {
    font-size: 48px;
    margin-bottom: 8px;
}

/* Card animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tkd-listing-card {
    animation: fadeIn 0.4s ease-out;
}

/* Stagger animation for multiple cards */
.tkd-listing-card:nth-child(1) { animation-delay: 0.05s; }
.tkd-listing-card:nth-child(2) { animation-delay: 0.1s; }
.tkd-listing-card:nth-child(3) { animation-delay: 0.15s; }
.tkd-listing-card:nth-child(4) { animation-delay: 0.2s; }
.tkd-listing-card:nth-child(5) { animation-delay: 0.25s; }
.tkd-listing-card:nth-child(6) { animation-delay: 0.3s; }

/* Focus States */
.tkd-search-field input:focus {
    outline: none;
}

.tkd-search-field:focus-within {
    background-color: var(--tkd-bg-light);
    border-radius: var(--tkd-radius-full);
}

/* Loading State */
.tkd-listings-section.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Print Styles */
@media print {
    .tkd-hero-section,
    .tkd-map-section,
    .tkd-view-toggles,
    .tkd-pagination {
        display: none !important;
    }
    
    .tkd-listings-section {
        width: 100% !important;
    }
    
    .tkd-listing-card {
        page-break-inside: avoid;
        border: 1px solid #000;
        margin-bottom: 10px;
    }
}
