
PK 
<?php
include('./includes/db.php'); // adjust path if needed
include('./includes/header.php');
$search = isset($_GET['search']) ? trim($_GET['search']) : '';
$packages = null;
if ($search != '') {
$search_safe = mysqli_real_escape_string($conn, $search);
$packages = $conn->query("
SELECT * FROM packages
WHERE status = 1
AND title LIKE '%$search_safe%'
ORDER BY id DESC
");
}
?>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background: linear-gradient(135deg, #fef9f2 0%, #fff5eb 100%);
font-family: 'Inter', sans-serif;
}
/* Section Header Styling */
.collection-header {
text-align: center;
margin-bottom: 3rem;
position: relative;
}
.collection-header h2 {
font-family: 'Playfair Display', serif;
font-size: 3.2rem;
font-weight: 800;
background: linear-gradient(135deg, #c25d1a, #e67e22, #f39c12);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
display: inline-block;
letter-spacing: -0.02em;
margin-bottom: 0.5rem;
}
.collection-header .subtitle {
font-size: 1rem;
color: #8b6b4d;
letter-spacing: 2px;
text-transform: uppercase;
font-weight: 500;
}
.collection-header::after {
content: '✦';
display: block;
font-size: 1.8rem;
color: #e67e22;
opacity: 0.6;
margin-top: 8px;
}
/* Modern Package Card - completely redesigned */
.package-card-premium {
background: rgba(255, 255, 255, 0.96);
backdrop-filter: blur(2px);
border-radius: 2rem;
overflow: hidden;
transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.08);
border: 1px solid rgba(230, 126, 34, 0.15);
height: 100%;
display: flex;
flex-direction: column;
position: relative;
}
.package-card-premium:hover {
transform: translateY(-12px);
box-shadow: 0 30px 45px -15px rgba(230, 126, 34, 0.25);
border-color: rgba(230, 126, 34, 0.4);
}
/* Image Container with Cinematic Zoom */
.image-container-premium {
position: relative;
overflow: hidden;
height: 260px;
border-radius: 1.5rem 1.5rem 0 0;
}
.image-container-premium img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.7s ease-out;
}
.package-card-premium:hover .image-container-premium img {
transform: scale(1.08);
}
/* Modern Duration Badge */
.duration-badge-premium {
position: absolute;
top: 18px;
left: 18px;
background: linear-gradient(115deg, #e67e22, #f39c12);
color: white;
padding: 6px 16px;
border-radius: 40px;
font-size: 0.8rem;
font-weight: 700;
letter-spacing: 0.5px;
backdrop-filter: blur(4px);
box-shadow: 0 4px 12px rgba(0,0,0,0.2);
z-index: 2;
font-family: 'Inter', monospace;
}
.duration-badge-premium i {
margin-right: 6px;
font-size: 0.75rem;
}
/* Wishlist / Quick view icon (floating elegance) */
.quick-actions {
position: absolute;
top: 18px;
right: 18px;
z-index: 2;
display: flex;
gap: 8px;
}
.action-icon {
background: rgba(255,255,240,0.9);
backdrop-filter: blur(8px);
width: 36px;
height: 36px;
border-radius: 60px;
display: flex;
align-items: center;
justify-content: center;
color: #e67e22;
cursor: pointer;
transition: 0.2s;
font-size: 0.9rem;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.action-icon:hover {
background: #e67e22;
color: white;
transform: scale(1.1);
}
/* Card Content Area */
.card-content-premium {
padding: 1.6rem 1.5rem 1.8rem;
flex: 1;
display: flex;
flex-direction: column;
}
.card-content-premium h5 {
font-family: 'Playfair Display', serif;
font-size: 1.55rem;
font-weight: 700;
color: #2c2418;
margin-bottom: 1rem;
line-height: 1.3;
transition: 0.2s;
}
.package-card-premium:hover h5 {
color: #e67e22;
}
/* Amenities Icons - Modern Chip Design */
.amenities-grid {
display: flex;
flex-wrap: wrap;
gap: 5px;
margin: 1rem 0 1.2rem;
border-top: 1px solid #f0e2d4;
padding-top: 1rem;
}
.amenity-chip {
background: #fef5ed;
border-radius: 40px;
padding: 5px 14px;
font-size: 0.75rem;
font-weight: 600;
display: inline-flex;
align-items: center;
gap: 8px;
color: #b45f2b;
transition: 0.2s;
border: 1px solid #ffe0c4;
}
.amenity-chip i {
font-size: 0.8rem;
color: #e67e22;
}
/* Description text with elegant truncation */
.package-description {
font-size: 0.9rem;
line-height: 1.55;
color: #5e4b36;
margin-bottom: 1.5rem;
flex: 1;
}
/* Bottom Section: Price & CTA */
.card-footer-premium {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: auto;
border-top: 1px solid #f7e8db;
padding-top: 1.2rem;
}
.price-tag {
display: flex;
flex-direction: column;
}
.price-label {
font-size: 0.7rem;
text-transform: uppercase;
letter-spacing: 1px;
color: #a18263;
}
.price-value {
font-size: 1.65rem;
font-weight: 800;
color: #c25d1a;
line-height: 1;
font-family: monospace;
}
.price-value small {
font-size: 0.8rem;
font-weight: 500;
}
.btn-book-premium {
background: linear-gradient(105deg, #e67e22, #f39c12);
border: none;
padding: 10px 24px;
border-radius: 60px;
color: white;
font-weight: 700;
font-size: 0.85rem;
transition: all 0.3s;
box-shadow: 0 5px 12px rgba(230,126,34,0.3);
display: inline-flex;
align-items: center;
gap: 8px;
}
.btn-book-premium:hover {
transform: translateX(4px);
background: linear-gradient(105deg, #d35400, #e67e22);
box-shadow: 0 8px 18px rgba(230,126,34,0.4);
}
/* empty state */
.empty-state {
text-align: center;
padding: 3rem;
background: rgba(255,255,245,0.8);
border-radius: 2rem;
font-weight: 500;
}
/* responsive adjustments */
@media (max-width: 768px) {
.collection-header h2 {
font-size: 2.2rem;
}
.card-content-premium h5 {
font-size: 1.35rem;
}
.price-value {
font-size: 1.4rem;
}
.btn-book-premium {
padding: 8px 18px;
}
}
@media (max-width: 576px) {
.amenities-grid {
gap: 8px;
}
.card-content-premium {
padding: 1.2rem;
}
}
/* subtle background animation */
@keyframes floatBg {
0% { background-position: 0% 50%; }
100% { background-position: 100% 50%; }
}
</style>
<div class="container py-5">
<div class="collection-header" data-aos="fade-up">
<div class="subtitle">Search Results</div>
<h2>
<?php if($search): ?>
Results for "<?php echo htmlspecialchars($search); ?>"
<?php else: ?>
Search Packages
<?php endif; ?>
</h2>
</div>
<div class="row g-4">
<?php if($packages && $packages->num_rows > 0): ?>
<?php while($package = $packages->fetch_assoc()):
$shortDesc = strip_tags($package['short_description']);
$trimmedDesc = strlen($shortDesc) > 100 ? substr($shortDesc, 0, 100) . '...' : $shortDesc;
?>
<div class="col-lg-4 col-md-6" data-aos="fade-up">
<div class="package-card-premium">
<div class="image-container-premium">
<img src="<?php echo $package['main_image']; ?>"
alt="<?php echo htmlspecialchars($package['title']); ?>"
loading="lazy">
<span class="duration-badge-premium">
<i class="fas fa-calendar-week"></i>
<?php echo htmlspecialchars($package['duration']); ?>
</span>
<div class="quick-actions">
<div class="action-icon" onclick="quickView('<?php echo $package['id']; ?>')">
<i class="far fa-eye"></i>
</div>
</div>
</div>
<div class="card-content-premium">
<h5><?php echo htmlspecialchars($package['title']); ?></h5>
<div class="amenities-grid">
<div class="amenity-chip"><i class="fas fa-hotel"></i> Stay</div>
<div class="amenity-chip"><i class="fas fa-binoculars"></i> Sightseeing</div>
<div class="amenity-chip"><i class="fas fa-car"></i> Transfer</div>
</div>
<div class="package-description">
<?php echo htmlspecialchars($trimmedDesc); ?>
</div>
<div class="card-footer-premium">
<div class="price-tag">
<span class="price-label">Starting from</span>
<span class="price-value">
₹ <?php echo number_format($package['price']); ?>
<small>/person</small>
</span>
</div>
<button class="btn-book-premium"
onclick="window.location.href='package_details.php?id=<?php echo $package['id']; ?>'">
Book Now <i class="fas fa-arrow-right"></i>
</button>
</div>
</div>
</div>
</div>
<?php endwhile; ?>
<?php else: ?>
<div class="col-12">
<div class="empty-state text-center">
<i class="fas fa-search" style="font-size: 3rem; color: #e67e22;"></i>
<p style="font-size: 1.2rem; margin-top: 10px;">
No packages found for "<strong><?php echo htmlspecialchars($search); ?></strong>"
</p>
</div>
</div>
<?php endif; ?>
</div>
</div>
<script>
function quickView(packageId) {
// For a more elegant quick view, you could fetch details via AJAX.
// Here we will open the package details page in a new tab? But to preserve original design, we show a subtle alert.
// However we keep interactive: just redirect to details page (same as book now but consistent)
window.location.href = 'package_details.php?id=' + packageId;
}
</script>
<?php include('./includes/footer.php'); ?>


PK 99