{% extends 'hosting_app/base_hosting.html' %}
{% load static %}

{% block title %}{{ venue.venue_name }} | Host in Sri Lanka{% endblock %}

{% block content %}

<style>
    /* =========================================================
       PUBLIC HOST VENUE DETAIL — PREMIUM PUBLIC STYLE
    ========================================================= */

    .public-host-detail-page {
        background:
            radial-gradient(circle at top left, rgba(255, 193, 7, 0.12), transparent 30%),
            radial-gradient(circle at top right, rgba(116, 49, 41, 0.12), transparent 34%),
            linear-gradient(180deg, #fffaf5 0%, #ffffff 48%, #fff7ef 100%);
        min-height: 100vh;
        color: #2d1716;
        overflow-x: hidden;
    }

    .public-host-detail-hero {
        position: relative;
        min-height: 620px;
        display: flex;
        align-items: flex-end;
        overflow: hidden;
        background: linear-gradient(135deg, #2d1716 0%, #743129 55%, #a7601b 100%);
    }

    .public-host-detail-hero-bg {
        position: absolute;
        inset: 0;
        z-index: 0;
    }

    .public-host-detail-hero-bg img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .public-host-detail-hero-bg::after {
        content: "";
        position: absolute;
        inset: 0;
        background:
            radial-gradient(circle at 18% 35%, rgba(255, 193, 7, 0.22), transparent 34%),
            linear-gradient(
                100deg,
                rgba(45, 23, 22, 0.96) 0%,
                rgba(45, 23, 22, 0.88) 44%,
                rgba(116, 49, 41, 0.66) 76%,
                rgba(116, 49, 41, 0.48) 100%
            );
    }

    .public-host-detail-hero-placeholder {
        position: absolute;
        inset: 0;
        background:
            radial-gradient(circle at top right, rgba(255, 193, 7, 0.20), transparent 34%),
            linear-gradient(135deg, #2d1716 0%, #743129 56%, #a7601b 100%);
    }

    .public-host-detail-hero::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 130px;
        background: linear-gradient(to bottom, transparent, #fffaf5);
        z-index: 1;
    }

    .public-host-detail-hero-inner {
        position: relative;
        z-index: 2;
        padding: 7rem 0 8rem;
        max-width: 1000px;
    }

    .public-host-detail-badge {
        display: inline-flex;
        align-items: center;
        gap: 0.55rem;
        padding: 0.55rem 1rem;
        border-radius: 999px;
        background: rgba(255, 193, 7, 0.16);
        border: 1px solid rgba(255, 193, 7, 0.34);
        color: #ffe7aa;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        font-size: 0.78rem;
        margin-bottom: 1.2rem;
        backdrop-filter: blur(8px);
    }

    .public-host-detail-hero h1 {
        color: #ffffff;
        font-size: clamp(2.55rem, 5vw, 5rem);
        font-weight: 950;
        line-height: 1.04;
        letter-spacing: -0.05em;
        margin-bottom: 1rem;
        max-width: 950px;
    }

    .public-host-detail-hero p {
        color: rgba(255, 255, 255, 0.86);
        font-size: 1.12rem;
        line-height: 1.82;
        max-width: 820px;
        margin-bottom: 0;
    }

    .public-host-detail-badge-row {
        display: flex;
        flex-wrap: wrap;
        gap: 0.65rem;
        margin: 1.4rem 0 1.7rem;
    }

    .public-host-detail-pill {
        display: inline-flex;
        align-items: center;
        gap: 0.42rem;
        padding: 0.52rem 0.82rem;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.14);
        border: 1px solid rgba(255, 255, 255, 0.22);
        color: #ffffff;
        font-size: 0.8rem;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        backdrop-filter: blur(8px);
    }

    .public-host-detail-pill.gold {
        background: rgba(255, 193, 7, 0.94);
        border-color: rgba(255, 193, 7, 0.95);
        color: #2d1716;
    }

    .public-host-detail-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.85rem;
    }

    .public-host-detail-actions .btn {
        border-radius: 999px;
        font-weight: 850;
        padding: 0.86rem 1.4rem;
        min-height: 50px;
    }

    .public-host-btn-gold {
        background: #ffc107;
        color: #2d1716;
        border: none;
        box-shadow: 0 16px 32px rgba(255, 193, 7, 0.22);
    }

    .public-host-btn-gold:hover {
        background: #ffe082;
        color: #2d1716;
        transform: translateY(-2px);
    }

    .public-host-btn-glass {
        background: rgba(255, 255, 255, 0.12);
        color: #ffffff;
        border: 1px solid rgba(255, 255, 255, 0.36);
        backdrop-filter: blur(10px);
    }

    .public-host-btn-glass:hover {
        background: #ffffff;
        color: #2d1716;
    }

    .public-host-detail-content {
        position: relative;
        z-index: 3;
        margin-top: -78px;
        padding-bottom: 5rem;
    }

    .public-host-card {
        border-radius: 34px;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(239, 226, 211, 0.95);
        box-shadow: 0 28px 70px rgba(58, 30, 24, 0.11);
        overflow: hidden;
        margin-bottom: 1.5rem;
    }

    .public-host-card-header {
        padding: 1.6rem 1.8rem 1.05rem;
        border-bottom: 1px solid #efe2d3;
        background:
            radial-gradient(circle at top right, rgba(255, 193, 7, 0.08), transparent 28%),
            linear-gradient(180deg, #ffffff 0%, #fffaf5 100%);
    }

    .public-host-card-header h2,
    .public-host-card-header h3 {
        color: #2d1716;
        font-weight: 950;
        margin-bottom: 0.35rem;
        letter-spacing: -0.025em;
    }

    .public-host-card-header p {
        color: #7a655d;
        line-height: 1.65;
        margin-bottom: 0;
    }

    .public-host-card-body {
        padding: 1.8rem;
    }

    .public-host-description {
        color: #6f5b53;
        line-height: 1.85;
        font-size: 1.02rem;
        margin-bottom: 0;
        white-space: pre-line;
    }

    .public-host-info-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }

    .public-host-info-item {
        border-radius: 22px;
        border: 1px solid #efe2d3;
        background: #fffaf5;
        padding: 1rem;
    }

    .public-host-info-item span {
        display: block;
        color: #7a655d;
        font-size: 0.76rem;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        margin-bottom: 0.3rem;
    }

    .public-host-info-item strong,
    .public-host-info-item a {
        color: #2d1716;
        font-weight: 900;
        text-decoration: none;
        word-break: break-word;
    }

    .public-host-info-item a:hover {
        color: #a7601b;
        text-decoration: underline;
    }

    .public-host-chip-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 0.65rem;
    }

    .public-host-chip {
        display: inline-flex;
        align-items: center;
        gap: 0.45rem;
        border-radius: 999px;
        padding: 0.56rem 0.85rem;
        background: #fffaf5;
        border: 1px solid #efe2d3;
        color: #6f5b53;
        font-size: 0.84rem;
        font-weight: 800;
    }

    .public-host-chip.active {
        background: #fff4e4;
        color: #2d1716;
        border-color: #efd7ae;
    }

    .public-host-chip i {
        color: #a7601b;
    }

    .public-host-gallery-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1rem;
    }

    .public-host-gallery-item {
        border-radius: 24px;
        overflow: hidden;
        border: 1px solid #efe2d3;
        background: #fffaf5;
        box-shadow: 0 14px 30px rgba(58, 30, 24, 0.06);
    }

    .public-host-gallery-item img {
        width: 100%;
        height: 190px;
        object-fit: cover;
        display: block;
    }

    .public-host-gallery-caption {
        padding: 0.85rem 0.95rem;
        color: #6f5b53;
        font-size: 0.9rem;
        line-height: 1.55;
    }

    .public-host-service-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }

    .public-host-service-card {
        border-radius: 24px;
        border: 1px solid #efe2d3;
        background: #fffaf5;
        overflow: hidden;
    }

    .public-host-service-image {
        height: 170px;
        background: #fff4e4;
        overflow: hidden;
    }

    .public-host-service-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .public-host-service-placeholder {
        height: 170px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #a7601b;
        font-size: 2.4rem;
        background:
            radial-gradient(circle at top right, rgba(255, 193, 7, 0.14), transparent 34%),
            linear-gradient(135deg, #fffaf5, #fff4e4);
    }

    .public-host-service-body {
        padding: 1.15rem;
    }

    .public-host-service-body h4 {
        color: #2d1716;
        font-weight: 950;
        font-size: 1.06rem;
        margin-bottom: 0.45rem;
    }

    .public-host-service-body p {
        color: #6f5b53;
        line-height: 1.65;
        font-size: 0.92rem;
        margin-bottom: 0.85rem;
    }

    .public-host-price-pill {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        border-radius: 999px;
        padding: 0.45rem 0.72rem;
        background: #fff4e4;
        border: 1px solid #efd7ae;
        color: #7a4c18;
        font-size: 0.8rem;
        font-weight: 900;
    }

    .public-host-empty-box {
        border-radius: 24px;
        border: 1px dashed #d8bfa3;
        background: #fffaf5;
        padding: 1.6rem;
        text-align: center;
        color: #7a655d;
        line-height: 1.7;
    }

    .public-host-empty-box i {
        display: block;
        color: #a7601b;
        font-size: 2rem;
        margin-bottom: 0.65rem;
    }

    .public-host-note-box {
        border-radius: 24px;
        padding: 1.1rem 1.2rem;
        background: #fff4e4;
        border: 1px solid #efd7ae;
        color: #7a4c18;
        line-height: 1.75;
        white-space: pre-line;
    }

    .public-host-sidebar-card {
        border-radius: 34px;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(239, 226, 211, 0.95);
        box-shadow: 0 24px 56px rgba(58, 30, 24, 0.09);
        overflow: hidden;
        margin-bottom: 1.5rem;
        position: sticky;
        top: 1rem;
    }

    .public-host-sidebar-header {
        padding: 1.45rem 1.55rem 1rem;
        border-bottom: 1px solid #efe2d3;
        background:
            radial-gradient(circle at top right, rgba(255, 193, 7, 0.08), transparent 28%),
            linear-gradient(180deg, #ffffff 0%, #fffaf5 100%);
    }

    .public-host-sidebar-header h3 {
        color: #2d1716;
        font-weight: 950;
        margin-bottom: 0.25rem;
    }

    .public-host-sidebar-header p {
        color: #7a655d;
        line-height: 1.65;
        margin-bottom: 0;
    }

    .public-host-sidebar-body {
        padding: 1.45rem;
    }

    .public-host-summary-list {
        display: grid;
        gap: 0.75rem;
    }

    .public-host-summary-item {
        border-radius: 18px;
        background: #fffaf5;
        border: 1px solid #efe2d3;
        padding: 0.9rem 1rem;
    }

    .public-host-summary-item span {
        display: block;
        color: #7a655d;
        font-size: 0.76rem;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        margin-bottom: 0.25rem;
    }

    .public-host-summary-item strong {
        color: #2d1716;
        font-weight: 900;
    }

    .public-host-sidebar-actions {
        display: grid;
        gap: 0.65rem;
        margin-top: 1rem;
    }

    .public-host-sidebar-actions .btn {
        border-radius: 999px;
        min-height: 48px;
        font-weight: 850;
    }

    .public-host-cta {
        border-radius: 30px;
        padding: 2rem;
        background:
            radial-gradient(circle at top right, rgba(255, 193, 7, 0.16), transparent 34%),
            linear-gradient(135deg, #2d1716 0%, #743129 58%, #a7601b 100%);
        color: #ffffff;
        box-shadow: 0 24px 56px rgba(58, 30, 24, 0.16);
        margin-top: 1.5rem;
    }

    .public-host-cta h3 {
        color: #ffffff;
        font-weight: 950;
        margin-bottom: 0.7rem;
    }

    .public-host-cta p {
        color: rgba(255, 255, 255, 0.84);
        line-height: 1.75;
        margin-bottom: 1.2rem;
    }

    @media (max-width: 1199.98px) {
        .public-host-gallery-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .public-host-service-grid {
            grid-template-columns: 1fr;
        }
    }

    @media (max-width: 991.98px) {
        .public-host-detail-hero {
            min-height: auto;
            background-position: 68% center;
        }

        .public-host-detail-hero-inner {
            padding: 5rem 1.2rem 6rem;
        }

        .public-host-detail-content {
            margin-top: -55px;
        }

        .public-host-sidebar-card {
            position: static;
        }
    }

    @media (max-width: 767.98px) {
        .public-host-detail-actions {
            flex-direction: column;
            align-items: stretch;
        }

        .public-host-detail-actions .btn {
            width: 100%;
        }

        .public-host-info-grid,
        .public-host-gallery-grid {
            grid-template-columns: 1fr;
        }

        .public-host-card,
        .public-host-sidebar-card {
            border-radius: 28px;
        }

        .public-host-card-header,
        .public-host-card-body,
        .public-host-sidebar-header,
        .public-host-sidebar-body {
            padding-left: 1.15rem;
            padding-right: 1.15rem;
        }
    }
</style>


<div class="public-host-detail-page">

    <!-- HERO -->
    <section class="public-host-detail-hero">

        {% if venue.cover_image %}
            <div class="public-host-detail-hero-bg">
                <img src="{{ venue.cover_image.url }}" alt="{{ venue.venue_name }}">
            </div>
        {% else %}
            <div class="public-host-detail-hero-placeholder"></div>
        {% endif %}

        <div class="container">
            <div class="public-host-detail-hero-inner">

                <span class="public-host-detail-badge">
                    <i class="bi bi-building-heart"></i>
                    {% if venue.venue_category %}
                        {{ venue.get_venue_category_display }}
                    {% else %}
                        Host Venue
                    {% endif %}
                </span>

                <h1>{{ venue.venue_name }}</h1>

                <p>
                    {{ venue.short_description }}
                </p>

                <div class="public-host-detail-badge-row">

                    {% if venue.host_profile %}
                        <span class="public-host-detail-pill">
                            <i class="bi bi-person-badge-fill"></i>
                            {{ venue.host_profile.business_name }}
                        </span>
                    {% endif %}

                    {% if venue.city or venue.district %}
                        <span class="public-host-detail-pill">
                            <i class="bi bi-geo-alt-fill"></i>
                            {% if venue.get_city_display %}
                                {{ venue.get_city_display }}
                            {% else %}
                                {{ venue.city }}
                            {% endif %}
                            {% if venue.city and venue.district %}, {% endif %}
                            {% if venue.get_district_display %}
                                {{ venue.get_district_display }}
                            {% else %}
                                {{ venue.district }}
                            {% endif %}
                        </span>
                    {% endif %}

                    {% if venue.max_guest_capacity %}
                        <span class="public-host-detail-pill">
                            <i class="bi bi-people-fill"></i>
                            Up to {{ venue.max_guest_capacity }} Guests
                        </span>
                    {% endif %}

                    {% if venue.is_featured %}
                        <span class="public-host-detail-pill gold">
                            <i class="bi bi-star-fill"></i>
                            Featured Host
                        </span>
                    {% endif %}

                </div>

                <div class="public-host-detail-actions">
                    <a href="#event-options" class="btn public-host-btn-gold">
                        <i class="bi bi-gift-fill me-2"></i>
                        View Event Options
                    </a>

                    <a href="{% url 'hosting_app:public_host_venue_list' %}"
                       class="btn public-host-btn-glass">
                        <i class="bi bi-arrow-left-circle me-2"></i>
                        Back to Public Hosts
                    </a>
                </div>

            </div>
        </div>
    </section>


    <!-- CONTENT -->
    <section class="public-host-detail-content">
        <div class="container">

            <div class="row g-4 align-items-start">

                <!-- MAIN CONTENT -->
                <div class="col-lg-8">

                    <!-- DESCRIPTION -->
                    <div class="public-host-card">
                        <div class="public-host-card-header">
                            <h2>About This Venue</h2>
                            <p>
                                Learn about the atmosphere, purpose, and celebration suitability of this host venue.
                            </p>
                        </div>

                        <div class="public-host-card-body">
                            <p class="public-host-description">
                                {{ venue.full_description }}
                            </p>
                        </div>
                    </div>


                    <!-- LOCATION -->
                    <div class="public-host-card">
                        <div class="public-host-card-header">
                            <h3>Location & Access</h3>
                            <p>
                                Basic public location details for this venue.
                            </p>
                        </div>

                        <div class="public-host-card-body">
                            <div class="public-host-info-grid">

                                <div class="public-host-info-item">
                                    <span>District</span>
                                    <strong>
                                        {% if venue.get_district_display %}
                                            {{ venue.get_district_display }}
                                        {% else %}
                                            {{ venue.district }}
                                        {% endif %}
                                    </strong>
                                </div>

                                <div class="public-host-info-item">
                                    <span>City</span>
                                    <strong>
                                        {% if venue.get_city_display %}
                                            {{ venue.get_city_display }}
                                        {% else %}
                                            {{ venue.city }}
                                        {% endif %}
                                    </strong>
                                </div>

                                <div class="public-host-info-item">
                                    <span>Address</span>
                                    <strong>
                                        {% if venue.address %}
                                            {{ venue.address|linebreaksbr }}
                                        {% else %}
                                            Shared after arrangement confirmation
                                        {% endif %}
                                    </strong>
                                </div>

                                <div class="public-host-info-item">
                                    <span>Map</span>
                                    {% if venue.google_map_link %}
                                        <a href="{{ venue.google_map_link }}" target="_blank">
                                            Open Google Map
                                            <i class="bi bi-box-arrow-up-right ms-1"></i>
                                        </a>
                                    {% else %}
                                        <strong>Map link not available</strong>
                                    {% endif %}
                                </div>

                            </div>
                        </div>
                    </div>


                    <!-- EVENT SUITABILITY -->
                    <div class="public-host-card">
                        <div class="public-host-card-header">
                            <h3>Suitable For</h3>
                            <p>
                                Celebration types this venue may support.
                            </p>
                        </div>

                        <div class="public-host-card-body">
                            <div class="public-host-chip-grid">

                                {% if venue.supports_romantic_dates %}
                                    <span class="public-host-chip active"><i class="bi bi-heart-fill"></i> Romantic Dates</span>
                                {% endif %}

                                {% if venue.supports_proposal_events %}
                                    <span class="public-host-chip active"><i class="bi bi-gem"></i> Proposal Events</span>
                                {% endif %}

                                {% if venue.supports_anniversaries %}
                                    <span class="public-host-chip active"><i class="bi bi-calendar-heart"></i> Anniversaries</span>
                                {% endif %}

                                {% if venue.supports_birthdays %}
                                    <span class="public-host-chip active"><i class="bi bi-cake2-fill"></i> Birthdays</span>
                                {% endif %}

                                {% if venue.supports_honeymoon_experiences %}
                                    <span class="public-host-chip active"><i class="bi bi-suit-heart-fill"></i> Honeymoon Experiences</span>
                                {% endif %}

                                {% if venue.supports_private_dinners %}
                                    <span class="public-host-chip active"><i class="bi bi-cup-hot-fill"></i> Private Dinners</span>
                                {% endif %}

                                {% if venue.supports_engagement_events %}
                                    <span class="public-host-chip active"><i class="bi bi-stars"></i> Engagement Events</span>
                                {% endif %}

                                {% if venue.supports_small_weddings %}
                                    <span class="public-host-chip active"><i class="bi bi-flower1"></i> Small Weddings</span>
                                {% endif %}

                                {% if venue.supports_custom_celebrations %}
                                    <span class="public-host-chip active"><i class="bi bi-magic"></i> Custom Celebrations</span>
                                {% endif %}

                                {% if not venue.supports_romantic_dates and not venue.supports_proposal_events and not venue.supports_anniversaries and not venue.supports_birthdays and not venue.supports_honeymoon_experiences and not venue.supports_private_dinners and not venue.supports_engagement_events and not venue.supports_small_weddings and not venue.supports_custom_celebrations %}
                                    <div class="public-host-empty-box w-100">
                                        <i class="bi bi-heart"></i>
                                        Event suitability details are not available yet.
                                    </div>
                                {% endif %}

                            </div>
                        </div>
                    </div>


                    <!-- FACILITIES -->
                    <div class="public-host-card">
                        <div class="public-host-card-header">
                            <h3>Facilities & Capabilities</h3>
                            <p>
                                Practical facilities that may support guest arrangements.
                            </p>
                        </div>

                        <div class="public-host-card-body">
                            <div class="public-host-chip-grid">

                                {% if venue.meal_service_available %}
                                    <span class="public-host-chip active"><i class="bi bi-cup-hot-fill"></i> Meal Service</span>
                                {% endif %}

                                {% if venue.alcohol_available %}
                                    <span class="public-host-chip active"><i class="bi bi-cup-straw"></i> Alcohol Available</span>
                                {% endif %}

                                {% if venue.decoration_available %}
                                    <span class="public-host-chip active"><i class="bi bi-balloon-heart-fill"></i> Decoration Available</span>
                                {% endif %}

                                {% if venue.photography_allowed %}
                                    <span class="public-host-chip active"><i class="bi bi-camera-fill"></i> Photography Allowed</span>
                                {% endif %}

                                {% if venue.music_allowed %}
                                    <span class="public-host-chip active"><i class="bi bi-music-note-beamed"></i> Music Allowed</span>
                                {% endif %}

                                {% if venue.indoor_available %}
                                    <span class="public-host-chip active"><i class="bi bi-house-heart-fill"></i> Indoor Area</span>
                                {% endif %}

                                {% if venue.outdoor_available %}
                                    <span class="public-host-chip active"><i class="bi bi-tree-fill"></i> Outdoor Area</span>
                                {% endif %}

                                {% if venue.private_area_available %}
                                    <span class="public-host-chip active"><i class="bi bi-shield-lock-fill"></i> Private Area</span>
                                {% endif %}

                                {% if venue.parking_available %}
                                    <span class="public-host-chip active"><i class="bi bi-p-square-fill"></i> Parking</span>
                                {% endif %}

                                {% if not venue.meal_service_available and not venue.alcohol_available and not venue.decoration_available and not venue.photography_allowed and not venue.music_allowed and not venue.indoor_available and not venue.outdoor_available and not venue.private_area_available and not venue.parking_available %}
                                    <div class="public-host-empty-box w-100">
                                        <i class="bi bi-stars"></i>
                                        Facility details are not available yet.
                                    </div>
                                {% endif %}

                            </div>
                        </div>
                    </div>


                    <!-- GALLERY -->
                    <div class="public-host-card">
                        <div class="public-host-card-header">
                            <h3>Venue Gallery</h3>
                            <p>
                                Browse images uploaded by the Hosting Partner.
                            </p>
                        </div>

                        <div class="public-host-card-body">
                            {% if gallery_images %}
                                <div class="public-host-gallery-grid">
                                    {% for image in gallery_images %}
                                        <div class="public-host-gallery-item">
                                            <img src="{{ image.image.url }}"
                                                 alt="{{ image.caption|default:venue.venue_name }}">

                                            <div class="public-host-gallery-caption">
                                                {% if image.caption %}
                                                    {{ image.caption }}
                                                {% else %}
                                                    {{ venue.venue_name }}
                                                {% endif %}
                                            </div>
                                        </div>
                                    {% endfor %}
                                </div>
                            {% else %}
                                <div class="public-host-empty-box">
                                    <i class="bi bi-images"></i>
                                    Gallery images are not available yet.
                                </div>
                            {% endif %}
                        </div>
                    </div>


                    <!-- EVENT OPTIONS -->
                    <div class="public-host-card" id="event-options">
                        <div class="public-host-card-header">
                            <h3>Event Packages</h3>
                            <p>
                                Available event packages connected with this venue.
                            </p>
                        </div>

                        <div class="public-host-card-body">
                            {% if event_packages %}
                                <div class="public-host-service-grid">
                                    {% for package in event_packages %}
                                        <div class="public-host-service-card">

                                            <div class="public-host-service-image">
                                                {% if package.image %}
                                                    <img src="{{ package.image.url }}"
                                                         alt="{{ package.title }}">
                                                {% elif package.package_image %}
                                                    <img src="{{ package.package_image.url }}"
                                                         alt="{{ package.title }}">
                                                {% else %}
                                                    <div class="public-host-service-placeholder">
                                                        <i class="bi bi-gift-fill"></i>
                                                    </div>
                                                {% endif %}
                                            </div>

                                            <div class="public-host-service-body">
                                                <h4>{{ package.title }}</h4>

                                                <p>
                                                    {% if package.short_description %}
                                                        {{ package.short_description|truncatechars:130 }}
                                                    {% else %}
                                                        Event package details will be available soon.
                                                    {% endif %}
                                                </p>

                                                <span class="public-host-price-pill">
                                                    <i class="bi bi-cash-coin"></i>
                                                    From USD {{ package.base_price_usd }}
                                                </span>
                                            </div>

                                        </div>
                                    {% endfor %}
                                </div>
                            {% else %}
                                <div class="public-host-empty-box">
                                    <i class="bi bi-gift-fill"></i>
                                    Event packages are not listed yet. You can still contact Ensolanka
                                    to discuss a custom arrangement with this venue.
                                </div>
                            {% endif %}
                        </div>
                    </div>


                    <!-- MEAL PLANS -->
                    <div class="public-host-card">
                        <div class="public-host-card-header">
                            <h3>Meal Plans</h3>
                            <p>
                                Meal options connected with this venue, where available.
                            </p>
                        </div>

                        <div class="public-host-card-body">
                            {% if meal_plans %}
                                <div class="public-host-service-grid">
                                    {% for meal in meal_plans %}
                                        <div class="public-host-service-card">

                                            <div class="public-host-service-image">
                                                {% if meal.image %}
                                                    <img src="{{ meal.image.url }}"
                                                         alt="{{ meal.title }}">
                                                {% else %}
                                                    <div class="public-host-service-placeholder">
                                                        <i class="bi bi-cup-hot-fill"></i>
                                                    </div>
                                                {% endif %}
                                            </div>

                                            <div class="public-host-service-body">
                                                <h4>{{ meal.title }}</h4>

                                                <p>
                                                    {{ meal.description|truncatechars:130 }}
                                                </p>

                                                <span class="public-host-price-pill">
                                                    <i class="bi bi-cash-coin"></i>
                                                    USD {{ meal.price_per_person_usd }} / person
                                                </span>
                                            </div>

                                        </div>
                                    {% endfor %}
                                </div>
                            {% else %}
                                <div class="public-host-empty-box">
                                    <i class="bi bi-cup-hot-fill"></i>
                                    Meal plans are not listed yet.
                                </div>
                            {% endif %}
                        </div>
                    </div>


                    <!-- ADD-ONS -->
                    <div class="public-host-card">
                        <div class="public-host-card-header">
                            <h3>Add-on Services</h3>
                            <p>
                                Optional services that may improve the celebration experience.
                            </p>
                        </div>

                        <div class="public-host-card-body">
                            {% if add_on_services %}
                                <div class="public-host-service-grid">
                                    {% for service in add_on_services %}
                                        <div class="public-host-service-card">

                                            <div class="public-host-service-image">
                                                {% if service.image %}
                                                    <img src="{{ service.image.url }}"
                                                         alt="{{ service.title }}">
                                                {% else %}
                                                    <div class="public-host-service-placeholder">
                                                        <i class="bi bi-stars"></i>
                                                    </div>
                                                {% endif %}
                                            </div>

                                            <div class="public-host-service-body">
                                                <h4>{{ service.title }}</h4>

                                                <p>
                                                    {{ service.description|truncatechars:130 }}
                                                </p>

                                                <span class="public-host-price-pill">
                                                    <i class="bi bi-cash-coin"></i>
                                                    USD {{ service.price_usd }}
                                                </span>
                                            </div>

                                        </div>
                                    {% endfor %}
                                </div>
                            {% else %}
                                <div class="public-host-empty-box">
                                    <i class="bi bi-stars"></i>
                                    Add-on services are not listed yet.
                                </div>
                            {% endif %}
                        </div>
                    </div>


                    <!-- IMPORTANT NOTES -->
                    {% if venue.important_notes %}
                        <div class="public-host-card">
                            <div class="public-host-card-header">
                                <h3>Important Notes</h3>
                                <p>
                                    Rules, restrictions, advance notice requirements, or practical details.
                                </p>
                            </div>

                            <div class="public-host-card-body">
                                <div class="public-host-note-box">
                                    {{ venue.important_notes }}
                                </div>
                            </div>
                        </div>
                    {% endif %}

                </div>


                <!-- SIDEBAR -->
                <div class="col-lg-4">

                    <div class="public-host-sidebar-card">
                        <div class="public-host-sidebar-header">
                            <h3>Venue Summary</h3>
                            <p>
                                Quick details for this public hosting venue.
                            </p>
                        </div>

                        <div class="public-host-sidebar-body">

                            <div class="public-host-summary-list">

                                <div class="public-host-summary-item">
                                    <span>Venue Type</span>
                                    <strong>
                                        {% if venue.venue_category %}
                                            {{ venue.get_venue_category_display }}
                                        {% else %}
                                            Host Venue
                                        {% endif %}
                                    </strong>
                                </div>

                                <div class="public-host-summary-item">
                                    <span>Hosting Partner</span>
                                    <strong>
                                        {% if venue.host_profile %}
                                            {{ venue.host_profile.business_name }}
                                        {% else %}
                                            Ensolanka Hosting Partner
                                        {% endif %}
                                    </strong>
                                </div>

                                <div class="public-host-summary-item">
                                    <span>Location</span>
                                    <strong>
                                        {% if venue.city or venue.district %}
                                            {% if venue.get_city_display %}
                                                {{ venue.get_city_display }}
                                            {% else %}
                                                {{ venue.city }}
                                            {% endif %}
                                            {% if venue.city and venue.district %}, {% endif %}
                                            {% if venue.get_district_display %}
                                                {{ venue.get_district_display }}
                                            {% else %}
                                                {{ venue.district }}
                                            {% endif %}
                                        {% else %}
                                            Sri Lanka
                                        {% endif %}
                                    </strong>
                                </div>

                                <div class="public-host-summary-item">
                                    <span>Capacity</span>
                                    <strong>
                                        {% if venue.max_guest_capacity %}
                                            Up to {{ venue.max_guest_capacity }} guests
                                        {% else %}
                                            Subject to arrangement
                                        {% endif %}
                                    </strong>
                                </div>

                                <div class="public-host-summary-item">
                                    <span>Meal Service</span>
                                    <strong>
                                        {% if venue.meal_service_available %}
                                            Available
                                        {% else %}
                                            Subject to package
                                        {% endif %}
                                    </strong>
                                </div>

                                <div class="public-host-summary-item">
                                    <span>Private Area</span>
                                    <strong>
                                        {% if venue.private_area_available %}
                                            Available
                                        {% else %}
                                            Not specified
                                        {% endif %}
                                    </strong>
                                </div>

                            </div>

                            <div class="public-host-sidebar-actions">
                                <a href="{% url 'hosting_app:local_client_booking_entry' venue.slug %}"
                                    class="btn public-host-btn-gold">
                                    <i class="bi bi-calendar-heart-fill me-2"></i>
                                    Book This Experience
                                </a>
                                <a href="#event-options" class="btn btn-dark">
                                    <i class="bi bi-gift-fill me-2"></i>
                                    View Event Options
                                </a>

                                <a href="{% url 'hosting_app:public_host_venue_list' %}"
                                   class="btn btn-outline-secondary">
                                    <i class="bi bi-arrow-left-circle me-2"></i>
                                    Browse More Hosts
                                </a>
                            </div>

                        </div>
                    </div>


                    <div class="public-host-sidebar-card">
                        <div class="public-host-sidebar-header">
                            <h3>How Booking Works</h3>
                            <p>
                                Event arrangements are coordinated through Ensolanka.
                            </p>
                        </div>

                        <div class="public-host-sidebar-body">
                            <div class="public-host-chip-grid">
                                <span class="public-host-chip active">
                                    <i class="bi bi-1-circle-fill"></i>
                                    Choose a venue
                                </span>

                                <span class="public-host-chip active">
                                    <i class="bi bi-2-circle-fill"></i>
                                    Review options
                                </span>

                                <span class="public-host-chip active">
                                    <i class="bi bi-3-circle-fill"></i>
                                    Send request
                                </span>

                                <span class="public-host-chip active">
                                    <i class="bi bi-4-circle-fill"></i>
                                    Ensolanka confirms
                                </span>
                            </div>

                            <div class="public-host-note-box mt-3">
                                A public venue view does not mean instant booking confirmation.
                                Ensolanka checks availability, package details, guest requirements,
                                pricing, and final arrangement suitability before confirmation.
                            </div>
                        </div>
                    </div>


                    <div class="public-host-cta">
                        <h3>Want to arrange a special moment?</h3>

                        <p>
                            Contact Ensolanka to discuss a romantic date, proposal, anniversary,
                            birthday, private dinner, or custom celebration using this venue.
                        </p>

                        <a href="{% url 'hosting_app:contact_page' %}"
                           class="btn public-host-btn-gold">
                            <i class="bi bi-envelope-heart-fill me-2"></i>
                            Contact Ensolanka
                        </a>
                    </div>

                </div>

            </div>

        </div>
    </section>

</div>

{% endblock %}