/* ==========================================
   Local Business Directory - Frontend Styles
   ========================================== */

:root {
    --lbd-primary: #2563eb;
    --lbd-primary-dark: #1d4ed8;
    --lbd-secondary: #10b981;
    --lbd-whatsapp: #25D366;
    --lbd-text: #1f2937;
    --lbd-text-light: #6b7280;
    --lbd-bg: #ffffff;
    --lbd-bg-light: #f9fafb;
    --lbd-border: #333;
    --lbd-radius: 12px;
    --lbd-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --lbd-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

/* Search Form */
.lbd-search-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

.lbd-search-form {
    background: var(--lbd-bg);
    border: 1px solid var(--lbd-border);
    border-radius: var(--lbd-radius);
    padding: 24px;
    box-shadow: var(--lbd-shadow);
    margin-bottom: 30px;
}

.lbd-search-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.lbd-search-field {
    flex: 1;
    min-width: 180px;
}

.lbd-search-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--lbd-text);
    margin-bottom: 6px;
}

.lbd-search-field input,
.lbd-search-field select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--lbd-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--lbd-text);
    background: var(--lbd-bg);
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.lbd-search-field input:focus,
.lbd-search-field select:focus {
    outline: none;
    border-color: var(--lbd-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.lbd-search-btn-wrapper {
    flex: 0 0 auto;
}

.lbd-search-btn {
    padding: 10px 28px;
    background: var(--lbd-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    height: 42px;
}

.lbd-search-btn:hover {
    background: var(--lbd-primary-dark);
}

/* Results Info */
.lbd-results-info {
    margin-bottom: 20px;
    color: var(--lbd-text-light);
    font-size: 14px;
}

/* Results Grid */
.lbd-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

/* Business Card */
.lbd-card {
    background: var(--lbd-bg);
    border: 1px solid var(--lbd-border);
    border-radius: var(--lbd-radius);
    overflow: hidden;
    box-shadow: var(--lbd-shadow);
    transition: box-shadow 0.2s, transform 0.2s;
}

.lbd-card:hover {
    box-shadow: var(--lbd-shadow-lg);
    transform: translateY(-2px);
}

.lbd-card-image {
    position: relative;
    height: 200px;
    background: var(--lbd-bg-light);
    overflow: hidden;
}

.lbd-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lbd-card-featured-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #f59e0b;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    z-index: 2;
}

.lbd-card-featured {
    border: 2px solid #f59e0b;
}

.lbd-card-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--lbd-primary), #7c3aed);
    color: #fff;
    font-size: 48px;
    font-weight: 700;
    text-decoration: none;
}

.lbd-card-logo {
    position: absolute;
    bottom: 12px;
    left: 16px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--lbd-bg);
    overflow: hidden;
    background: var(--lbd-bg);
    box-shadow: var(--lbd-shadow);
    z-index: 3;
}

.lbd-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lbd-card-body {
    padding: 28px 16px 16px;
}

.lbd-card-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px;
}

.lbd-card-title a {
    color: var(--lbd-text);
    text-decoration: none;
}

.lbd-card-title a:hover {
    color: var(--lbd-primary);
}

.lbd-card-tagline {
    color: var(--lbd-text-light);
    font-size: 13px;
    margin: 0 0 12px;
    font-style: italic;
}

.lbd-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.lbd-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--lbd-text-light);
    background: var(--lbd-bg-light);
    padding: 4px 8px;
    border-radius: 6px;
}

.lbd-card-meta svg {
    flex-shrink: 0;
}

.lbd-card-actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--lbd-border);
}

.lbd-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

.lbd-btn-phone {
    background: #e0f2fe;
    color: #0369a1;
}

.lbd-btn-phone:hover {
    background: #bae6fd;
}

.lbd-btn-whatsapp {
    background: #dcfce7;
    color: #166534;
}

.lbd-btn-whatsapp:hover {
    background: #bbf7d0;
}

.lbd-btn-view {
    background: var(--lbd-primary);
    color: #fff;
    margin-left: auto;
}

.lbd-btn-view:hover {
    background: var(--lbd-primary-dark);
}

/* No Results */
.lbd-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--lbd-text-light);
}

/* Pagination */
.lbd-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.lbd-pagination button {
    padding: 8px 16px;
    border: 1px solid var(--lbd-border);
    border-radius: 8px;
    background: var(--lbd-bg);
    color: var(--lbd-text);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.lbd-pagination button:hover {
    border-color: var(--lbd-primary);
    color: var(--lbd-primary);
}

.lbd-pagination button.active {
    background: var(--lbd-primary);
    color: #fff;
    border-color: var(--lbd-primary);
}

.lbd-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Single Business Page */
.lbd-single-wrapper {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

.lbd-single-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Hero Full Width */
.lbd-single-hero {
    position: relative;
    width: 100%;
    min-height: 450px;
    display: flex;
    align-items: flex-end;
    margin-bottom: 0;
    overflow: hidden;
}

.lbd-single-hero-overlay {
    position: relative;
    width: 100%;
    background: linear-gradient(transparent 0%, rgba(0,0,0,0.85) 100%);
    padding: 60px 40px 40px;
    color: #fff;
    z-index: 2;
}

.lbd-single-hero-overlay h1 {
    margin: 0 0 6px;
    font-size: 36px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.lbd-single-hero-overlay .lbd-single-address {
    margin: 0 0 6px;
    font-size: 15px;
    opacity: 0.9;
}

.lbd-single-hero-overlay .lbd-single-tagline {
    margin: 0 0 14px;
    font-size: 16px;
    opacity: 0.85;
    font-style: italic;
}

.lbd-single-logo-wrap {
    margin-bottom: 16px;
}

.lbd-single-logo {
    max-width: 200px;
    max-height: 200px;
    width: 200px;
    height: 200px;
    object-fit: contain;
    border-radius: 50%;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
    background: rgba(255,255,255,0.1);
    padding: 10px;
}

.lbd-single-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.lbd-tag {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.lbd-single-contact-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
    padding: 20px 40px;
    background: var(--lbd-bg-light);
    border-bottom: 1px solid var(--lbd-border);
}

.lbd-single-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.lbd-single-contact-item.phone {
    background: #e0f2fe;
    color: #0369a1;
}

.lbd-single-contact-item.whatsapp {
    background: #dcfce7;
    color: #166534;
}

.lbd-single-contact-item.directions {
    background: #fef3c7;
    color: #92400e;
}

.lbd-single-section {
    margin-bottom: 30px;
}

.lbd-single-section h2 {
    font-size: 22px;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--lbd-border);
}

.lbd-single-section .lbd-single-content {
    line-height: 1.7;
    color: var(--lbd-text);
}

/* About Section Card */
.lbd-about-card {
    background: #f1f1f1;
    border-radius: 8px;
    border: 1px solid #ccc;
    padding: 24px 28px;
}

.lbd-about-card .lbd-single-content {
    font-size: 24px;
    font-weight: 500;
    line-height: 1.3em;
    color: var(--lbd-text);
}

/* Gallery Full Width */
.lbd-single-section.lbd-gallery-section {
    max-width: none;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 0 20px;
    box-sizing: border-box;
}

/* Schedule Table */
.lbd-schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.lbd-schedule-day {
    display: flex;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--lbd-bg-light);
    border-radius: 8px;
    font-size: 14px;
}

.lbd-schedule-day .day-name {
    font-weight: 600;
}

.lbd-schedule-day .day-hours {
    color: var(--lbd-text-light);
}

.lbd-schedule-day.closed {
    opacity: 0.5;
    text-decoration: line-through;
}

/* Gallery Carousel */
.lbd-gallery-carousel {
    position: relative;
    overflow: hidden;
    padding: 20px 0;
    width: 100%;
}

.lbd-gallery-track {
    display: flex;
    gap: 20px;
    width: max-content;
    will-change: transform;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.lbd-gallery-item {
    flex: 0 0 50vw;
    max-width: 560px;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: opacity 0.4s, transform 0.4s;
    opacity: 0.45;
    transform: scale(0.93);
}

.lbd-gallery-item.active {
    opacity: 1;
    transform: scale(1);
}

.lbd-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.lbd-gallery-item:hover img {
    transform: scale(1.05);
}

.lbd-gallery-item.lbd-clone {
    opacity: 0.35;
}

/* Arrows */
.lbd-gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #d1d5db;
    background: rgba(255,255,255,0.95) !important;
    color: #374151 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s;
    padding: 0;
    font-size: 0;
    line-height: 0;
    text-decoration: none;
    outline: none;
}

.lbd-gallery-arrow:hover {
    background: #f3f4f6 !important;
    border-color: #9ca3af;
    transform: translateY(-50%) scale(1.1);
}

.lbd-gallery-prev { left: calc(50% - 280px); }
.lbd-gallery-next { right: calc(50% - 280px); }

/* Dots */
.lbd-gallery-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.lbd-gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.lbd-gallery-dot.active {
    background: #374151;
    width: 24px;
    border-radius: 4px;
}

/* Lightbox */
.lbd-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.92);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lbFadeIn 0.25s ease;
}

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

.lbd-lb-img-wrap {
    max-width: 85vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lbd-lb-img {
    max-width: 85vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
}

.lbd-lb-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
    line-height: 1;
}

.lbd-lb-close:hover { background: rgba(255,255,255,0.15); }

.lbd-lb-prev,
.lbd-lb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.lbd-lb-prev:hover,
.lbd-lb-next:hover { background: rgba(255,255,255,0.25); }

.lbd-lb-prev { left: 20px; }
.lbd-lb-next { right: 20px; }

.lbd-lb-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.7);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .lbd-gallery-item {
        flex: 0 0 70vw;
        max-width: none;
        height: 320px;
    }
    .lbd-gallery-arrow {
        width: 36px;
        height: 36px;
    }
    .lbd-gallery-prev { left: 8px; }
    .lbd-gallery-next { right: 8px; }
}

@media (max-width: 480px) {
    .lbd-gallery-item {
        flex: 0 0 82vw;
        max-width: none;
        height: 260px;
    }
}

/* Social Links */
.lbd-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.lbd-social-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--lbd-bg-light);
    color: var(--lbd-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--lbd-border);
    transition: all 0.2s;
}

.lbd-social-link:hover {
    border-color: var(--lbd-primary);
    color: var(--lbd-primary);
}

/* Archive Page */
.lbd-archive-header {
    text-align: center;
    margin-bottom: 30px;
}

.lbd-archive-header h1 {
    font-size: 28px;
    margin: 0 0 8px;
}

.lbd-archive-header p {
    color: var(--lbd-text-light);
    margin: 0;
}

/* Floating WhatsApp Button */
.lbd-whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 9999;
    transition: transform 0.3s, box-shadow 0.3s;
}

.lbd-whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.lbd-whatsapp-float img {
    width: 34px;
    height: 34px;
}

@media (max-width: 768px) {
    .lbd-whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 54px;
        height: 54px;
    }
    .lbd-whatsapp-float img {
        width: 30px;
        height: 30px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .lbd-search-fields {
        flex-direction: column;
    }

    .lbd-search-field {
        min-width: 100%;
    }

    .lbd-results-grid {
        grid-template-columns: 1fr;
    }

    .lbd-single-hero {
        min-height: 350px;
    }

    .lbd-single-hero-overlay {
        padding: 40px 20px 30px;
    }

    .lbd-single-hero-overlay h1 {
        font-size: 26px;
    }

    .lbd-single-logo {
        max-width: 200px;
    }

    .lbd-single-contact-bar {
        flex-direction: column;
    }

    .lbd-single-contact-item {
        justify-content: center;
    }
}