

<?php $__env->startSection('content'); ?>
<div class="container my-5">

    <div class="row g-4">
        <!-- IMAGE GALLERY -->
        <div class="col-lg-6">
            <?php $__currentLoopData = $room->images; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $img): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
              <img src="<?php echo e(url('uploads/rooms/'.$img->image)); ?>"
     onerror="this.src='<?php echo e(url('images/default.jpg')); ?>'"
     class="img-fluid rounded-4 mb-3 shadow-sm">

            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </div>

        <!-- ROOM DETAILS -->
        <div class="col-lg-6">
            <h2 class="fw-bold mb-1">
                Room <?php echo e($room->room_number); ?>

            </h2>
            <p class="text-muted"><?php echo e($room->category->name); ?></p>

            <h3 class="text-dark mb-3">
                ₹<?php echo e($room->price_per_night); ?>

                <small class="text-muted fs-6">/ night</small>
            </h3>

            <p class="mb-4">
                <?php echo e($room->description); ?>

            </p>

            <h5 class="fw-semibold mb-2">Amenities</h5>
            <ul class="list-inline mb-4">
                <?php $__currentLoopData = $room->amenities; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $amenity): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <li class="list-inline-item badge bg-light text-dark border px-3 py-2 mb-2">
                        <?php echo e($amenity->name); ?>

                    </li>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </ul>

            <!-- BOOKING FORM -->
            <form method="POST" action="<?php echo e(route('booking.preview')); ?>" class="card p-4 shadow-sm rounded-4">
                <?php echo csrf_field(); ?>

                <input type="hidden" name="room_id" value="<?php echo e($room->id); ?>">

                <div class="row g-3">
                    <div class="col-md-6">
                        <label>Check In</label>
                        <input type="date" name="check_in" class="form-control" required>
                    </div>
                    <div class="col-md-6">
                        <label>Check Out</label>
                        <input type="date" name="check_out" class="form-control" required>
                    </div>

                    <div class="col-md-12">
                        <label>Guests</label>
                        <input type="number" class="form-control" value="1" min="1" max="<?php echo e($room->max_guests); ?>">
                    </div>
                </div>

                <button class="btn btn-dark w-100 mt-4 rounded-pill">
                    Check Price & Book
                </button>
            </form>

        </div>
    </div>

</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('frontend.layout', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home2/jitrealx/public_html/hotelbooking/resources/views/frontend/rooms/show.blade.php ENDPATH**/ ?>