/* ============================================================
   PACKAGES.CSS — Enhanced UI
   Font Pairing: Poppins (Headings) + DM Sans (Body) + Playfair Display (Hero)
   ============================================================ */

/* ===== FONT SETUP ===== */
body {
    font-family: 'DM Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #1e293b;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6,
.font-poppins {
    font-family: 'Poppins', sans-serif;
}

/* ===== HERO HEADER ===== */
.packages-header {
    position: relative;
    padding: 100px 0 60px;
    background: linear-gradient(135deg, var(--primary-800, #1e3a5f) 0%, var(--primary-600, #2563eb) 50%, var(--primary-700, #1d4ed8) 100%);
    overflow: hidden;
}

.packages-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 60% at 20% 80%, rgba(255,255,255,0.08) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 50%);
    pointer-events: none;
}

.packages-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, #ffffff 0%, transparent 100%);
    pointer-events: none;
}

.packages-header h1 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    text-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.packages-header .text-secondary-300 {
    font-family: 'DM Sans', sans-serif;
    letter-spacing: 0.15em;
}

.packages-header p {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.1rem;
    line-height: 1.7;
    font-weight: 400;
}

/* Floating shapes decoration */
.packages-header .container::before {
    content: '';
    position: absolute;
    top: 20%;
    right: 5%;
    width: 120px;
    height: 120px;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    animation: floatShape 8s ease-in-out infinite;
}

.packages-header .container::after {
    content: '';
    position: absolute;
    bottom: 25%;
    left: 3%;
    width: 60px;
    height: 60px;
    border: 2px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    transform: rotate(45deg);
    animation: floatShape 6s ease-in-out infinite reverse;
}

@keyframes floatShape {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

/* ===== BREADCRUMBS (enhance existing) ===== */
.breadcrumb {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
}

.breadcrumb a {
    color: rgba(255,255,255,0.7);
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.breadcrumb .separator {
    margin: 0 8px;
    opacity: 0.4;
}

.breadcrumb .active {
    color: #ffffff;
    font-weight: 500;
}

/* ===== FILTER SIDEBAR ===== */
.filter-sidebar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 28px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    position: sticky;
    top: 100px;
    transition: box-shadow 0.3s ease;
}

.filter-sidebar:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.filter-sidebar h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    border-bottom-color: var(--primary-500, #3b82f6);
}

.filter-section {
    margin-bottom: 24px;
}

.filter-section h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

/* Custom Radio Checkboxes */
.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    margin: 0 -12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    color: #475569;
}

.filter-checkbox:hover {
    background: #f8fafc;
    color: #0f172a;
}

.filter-checkbox input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
    transition: all 0.25s ease;
}

.filter-checkbox input[type="radio"]:checked {
    border-color: var(--primary-500, #3b82f6);
    background: var(--primary-500, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.filter-checkbox input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: #ffffff;
    border-radius: 50%;
}

.filter-checkbox .count {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 20px;
    min-width: 28px;
    text-align: center;
}

.filter-checkbox:has(input:checked) .count {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-600, #2563eb);
}

.filter-checkbox:has(input:checked) {
    background: rgba(59, 130, 246, 0.04);
    color: var(--primary-700, #1d4ed8);
    font-weight: 500;
}

/* Filter Submit Button */
.filter-sidebar button[type="submit"] {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    border-radius: 14px;
    padding: 14px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.filter-sidebar button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.filter-sidebar button[type="submit"]:hover::before {
    left: 100%;
}

.filter-sidebar button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

/* ===== SORT BAR ===== */
.sort-dropdown {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px 20px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.sort-dropdown p {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    color: #64748b;
}

.sort-dropdown p strong {
    color: #0f172a;
    font-weight: 700;
}

.sort-dropdown label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
}

.sort-dropdown select {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: #334155;
    border-radius: 10px;
    padding: 8px 32px 8px 14px;
    border: 1.5px solid #e2e8f0;
    background-color: #f8fafc;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sort-dropdown select:hover {
    border-color: #cbd5e1;
    background-color: #f1f5f9;
}

.sort-dropdown select:focus {
    outline: none;
    border-color: var(--primary-500, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: #ffffff;
}

/* ===== PACKAGES GRID ===== */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

@media (max-width: 700px) {
    .packages-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== PACKAGE CARD — The Star ===== */
.package-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    animation: cardReveal 0.5s ease-out forwards;
}

.package-card:nth-child(1) { animation-delay: 0.05s; }
.package-card:nth-child(2) { animation-delay: 0.1s; }
.package-card:nth-child(3) { animation-delay: 0.15s; }
.package-card:nth-child(4) { animation-delay: 0.2s; }
.package-card:nth-child(5) { animation-delay: 0.25s; }
.package-card:nth-child(6) { animation-delay: 0.3s; }
.package-card:nth-child(7) { animation-delay: 0.35s; }
.package-card:nth-child(8) { animation-delay: 0.4s; }
.package-card:nth-child(9) { animation-delay: 0.45s; }

@keyframes cardReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.package-card:hover {
    transform: translateY(-6px);
    box-shadow: 
        0 12px 40px rgba(0,0,0,0.08),
        0 4px 12px rgba(0,0,0,0.04);
    border-color: transparent;
}

.package-card:hover .image-wrapper img {
    transform: scale(1.08);
}

.package-card:hover .wishlist-btn {
    opacity: 1;
    transform: translate(0, 0);
}

/* Image Wrapper */
.package-card .image-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.package-card .image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.package-card .image-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(0,0,0,0.3) 0%, transparent 100%);
    pointer-events: none;
}

/* Badges */
.package-card .badge {
    position: absolute;
    z-index: 2;
    font-family: 'Poppins', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 8px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.package-card .badge-featured {
    top: 14px;
    left: 14px;
    background: rgba(245, 158, 11, 0.9);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.package-card .badge-discount {
    top: 14px;
    right: 14px;
    background: rgba(239, 68, 68, 0.9);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3); }
    50% { box-shadow: 0 2px 16px rgba(239, 68, 68, 0.5); }
}

/* Wishlist Button */
.package-card .wishlist-btn {
    position: absolute;
    bottom: 14px;
    right: 14px;
    z-index: 2;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: translate(0, 8px);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    color: #64748b;
    font-size: 15px;
}

.package-card .wishlist-btn:hover {
    background: #ffffff;
    color: #ef4444;
    transform: translate(0, 0) scale(1.1);
}

.package-card .wishlist-btn.active {
    opacity: 1;
    transform: translate(0, 0);
    color: #ef4444;
    background: #ffffff;
}

.package-card .wishlist-btn.active i {
    font-weight: 900;
}

/* Card Body */
.package-card .card-body {
    padding: 20px;
}

/* Category Tag */
.package-card .category-tag {
    display: inline-block;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary-600, #2563eb);
    background: rgba(59, 130, 246, 0.08);
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 10px;
}

/* Title */
.package-card .title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    color: #0f172a;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.package-card .title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.package-card .title a:hover {
    color: var(--primary-600, #2563eb);
}

/* Location */
.package-card .location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 14px;
}

.package-card .location i {
    font-size: 0.75rem;
    color: var(--secondary-500, #f59e0b);
}

/* Meta Items */
.package-card .meta {
    display: flex;
    gap: 20px;
    padding: 12px 0;
    margin-bottom: 14px;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}

.package-card .meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    color: #475569;
    font-weight: 500;
}

.package-card .meta-item i {
    font-size: 0.8rem;
    color: var(--primary-500, #3b82f6);
    width: 16px;
    text-align: center;
}

/* Footer — Price + CTA */
.package-card .footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.package-card .price {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.package-card .price .original {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 500;
}

.package-card .price .current {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.package-card .price .label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 500;
}

/* Book / Details Button */
.package-card .btn-book {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-600, #2563eb), var(--primary-700, #1d4ed8));
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.25);
    position: relative;
    overflow: hidden;
}

.package-card .btn-book::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.package-card .btn-book:hover::before {
    left: 100%;
}

.package-card .btn-book:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
    background: linear-gradient(135deg, var(--primary-500, #3b82f6), var(--primary-600, #2563eb));
}

.package-card .btn-book i {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.package-card .btn-book:hover i {
    transform: translateX(3px);
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    padding: 20px 0;
}

.pagination a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 4px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.pagination a:hover {
    border-color: var(--primary-500, #3b82f6);
    color: var(--primary-600, #2563eb);
    background: rgba(59, 130, 246, 0.04);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.pagination a.active {
    background: linear-gradient(135deg, var(--primary-600, #2563eb), var(--primary-700, #1d4ed8));
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

.pagination a i {
    font-size: 0.75rem;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 80px 30px;
    background: #ffffff;
    border: 2px dashed #e2e8f0;
    border-radius: 24px;
}

.empty-state .icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 24px;
    background: #f8fafc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state .icon i {
    font-size: 36px;
    color: #cbd5e1;
}

.empty-state h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.empty-state p {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 24px;
}

.empty-state a {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 12px 28px;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

.empty-state a:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

/* ===== MOBILE FILTER TOGGLE (if you add one later) ===== */
@media (max-width: 1023px) {
    .filter-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 360px;
        height: 100vh;
        z-index: 9999;
        border-radius: 0;
        overflow-y: auto;
        transition: left 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        box-shadow: none;
    }

    .filter-sidebar.open {
        left: 0;
        box-shadow: 10px 0 40px rgba(0,0,0,0.15);
    }

    .filter-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 9998;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .filter-overlay.show {
        opacity: 1;
        visibility: visible;
    }

    .packages-header {
        padding: 70px 0 45px;
    }

    .packages-header h1 {
        font-size: 1.8rem;
    }

    .package-card .image-wrapper {
        height: 190px;
    }

    .package-card .card-body {
        padding: 16px;
    }

    .package-card .price .current {
        font-size: 1.2rem;
    }

    .package-card .btn-book {
        padding: 9px 16px;
        font-size: 0.78rem;
    }

    .sort-dropdown {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start !important;
    }

    .sort-dropdown .flex.items-center.gap-2 {
        width: 100%;
    }

    .sort-dropdown select {
        flex: 1;
    }

    .pagination a {
        min-width: 36px;
        height: 36px;
        font-size: 0.82rem;
        border-radius: 10px;
    }
}

@media (max-width: 400px) {
    .package-card .footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .package-card .btn-book {
        width: 100%;
        justify-content: center;
    }
}

/* ===== SCROLLBAR (subtle) ===== */
.filter-sidebar::-webkit-scrollbar {
    width: 4px;
}

.filter-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.filter-sidebar::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 4px;
}

.filter-sidebar::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    .package-card {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .package-card .badge-discount {
        animation: none;
    }

    .packages-header .container::before,
    .packages-header .container::after {
        animation: none;
    }

    .package-card,
    .package-card .image-wrapper img,
    .package-card .btn-book,
    .pagination a,
    .filter-checkbox,
    .filter-sidebar button[type="submit"] {
        transition-duration: 0.01ms !important;
    }
}

/* ===== FOCUS VISIBLE ===== */
.filter-checkbox input[type="radio"]:focus-visible {
    outline: 2px solid var(--primary-500, #3b82f6);
    outline-offset: 2px;
}

.sort-dropdown select:focus-visible {
    outline: 2px solid var(--primary-500, #3b82f6);
    outline-offset: 2px;
}
/* ===== MOBILE FILTER TOGGLE BUTTON ===== */
#filterToggle {
    display: flex;
    width: 100%;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
}

@media (min-width: 1024px) {
    #filterToggle {
        display: none !important;
    }
}

/* ===== MOBILE FILTER DRAWER ===== */
@media (max-width: 1023px) {
    .filter-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 85%;
        max-width: 360px;
        height: 100vh;
        height: 100dvh;
        z-index: 10000;
        border-radius: 0 20px 20px 0;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        box-shadow: none;
        padding-top: 20px;
    }

    .filter-sidebar.open {
        transform: translateX(0);
        box-shadow: 10px 0 40px rgba(0, 0, 0, 0.2);
    }

    .filter-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }

    .filter-overlay.show {
        opacity: 1;
        visibility: visible;
    }

    /* Close button inside sidebar on mobile */
    .filter-sidebar::before {
        content: '\f00d';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        position: sticky;
        top: 0;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        width: 40px;
        height: 40px;
        margin: 0 0 10px auto;
        background: #f1f5f9;
        border-radius: 50%;
        font-size: 14px;
        color: #475569;
        cursor: pointer;
        z-index: 10;
        padding: 0;
        text-align: center;
        line-height: 40px;
        transition: all 0.2s ease;
    }

    .filter-sidebar::before:hover {
        background: #e2e8f0;
        color: #0f172a;
    }

    /* Hide sidebar from grid flow on mobile */
    aside.lg\\:col-span-1 {
        position: fixed;
        top: 0;
        left: 0;
        pointer-events: none;
        height: 0;
        overflow: visible;
    }

    aside.lg\\:col-span-1 .filter-sidebar {
        pointer-events: auto;
    }

    /* Make grid full width on mobile */
    .grid.grid-cols-1.lg\\:grid-cols-4 {
        grid-template-columns: 1fr !important;
    }

    .grid.grid-cols-1.lg\\:grid-cols-4 > .lg\\:col-span-3 {
        grid-column: 1 !important;
    }
}

/* ===== FIX: Filter sidebar on desktop should be in grid flow ===== */
@media (min-width: 1024px) {
    aside.lg\\:col-span-1 {
        position: relative !important;
        pointer-events: auto !important;
        height: auto !important;
        overflow: visible !important;
    }

    .filter-sidebar {
        position: sticky !important;
        top: 100px;
        transform: none !important;
        border-radius: 20px !important;
    }

    .filter-sidebar::before {
        display: none !important;
    }

    .filter-overlay {
        display: none !important;
    }
}
.package-card .btn-book:focus-visible,
.pagination a:focus-visible,
.filter-sidebar button[type="submit"]:focus-visible {
    outline: 2px solid var(--primary-500, #3b82f6);
    outline-offset: 3px;
}

/* ===== SELECTION COLOR ===== */
::selection {
    background: rgba(59, 130, 246, 0.15);
    color: #1d4ed8;
}
/* ============================================================
   PATCH — append this to the END of packages.css
   Disables old ::before "fake" close icon (not clickable) since
   packages.php now has a real #filterClose button in the drawer header.
   ============================================================ */
@media (max-width: 1023px) {
    .filter-sidebar::before {
        content: none;
        display: none;
    }
}

/* Mobile filter toggle button — icon + label spacing */
#filterToggle {
    gap: 8px;
    font-size: 0.95rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
#filterToggle:active {
    transform: scale(0.98);
}

/* Prevent body scroll flicker + smooth drawer backdrop */
.filter-overlay {
    cursor: pointer;
}
/* =========================================================
   FINAL MOBILE FILTER FIX
   ========================================================= */

@media (max-width: 1023px) {

    /* Filter button - ALWAYS visible on mobile/tablet */
    #filterToggle {
        display: flex !important;
        width: 100%;
        min-height: 64px;
        align-items: center;
        justify-content: center;
        gap: 10px;

        margin-bottom: 20px;

        background: #2563eb !important;
        color: #ffffff !important;

        border: 0 !important;
        border-radius: 18px !important;

        font-family: 'Poppins', sans-serif;
        font-size: 1.05rem;
        font-weight: 700;

        cursor: pointer;

        box-shadow:
            0 8px 22px rgba(37, 99, 235, 0.22);

        position: relative;
        z-index: 20;
    }

    #filterToggle i {
        font-size: 18px;
    }

    #filterToggle:active {
        transform: scale(0.98);
    }

    /* Overlay */
    #filterOverlay {
        display: block;
        position: fixed;
        inset: 0;

        background: rgba(15, 23, 42, 0.48);

        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        z-index: 9998;

        transition:
            opacity 0.3s ease,
            visibility 0.3s ease;

        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
    }

    #filterOverlay.show {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    /* Sidebar drawer */
    #filterSidebar {
        position: fixed !important;

        top: 0 !important;
        left: 0 !important;

        width: min(88vw, 380px) !important;
        max-width: 380px !important;

        height: 100vh !important;
        height: 100dvh !important;

        margin: 0 !important;

        background: #ffffff !important;

        border: 0 !important;
        border-radius: 0 22px 22px 0 !important;

        overflow-y: auto !important;

        z-index: 9999 !important;

        transform: translateX(-105%) !important;

        transition:
            transform 0.35s cubic-bezier(.22,.61,.36,1),
            box-shadow 0.35s ease !important;

        box-shadow: none !important;

        padding: 22px 20px 30px !important;

        pointer-events: none;
    }

    /* OPEN STATE */
    #filterSidebar.open {
        transform: translateX(0) !important;

        box-shadow:
            12px 0 40px rgba(15, 23, 42, 0.18) !important;

        pointer-events: auto;
    }

    /* Keep parent aside out of grid */
    aside.lg\:col-span-1 {
        position: static !important;
        width: 0 !important;
        height: 0 !important;
        overflow: visible !important;
        pointer-events: none !important;
    }

    aside.lg\:col-span-1 #filterSidebar {
        pointer-events: none;
    }

    aside.lg\:col-span-1 #filterSidebar.open {
        pointer-events: auto;
    }

    /* Drawer header */
    #filterSidebar > .flex.items-center.justify-between {
        display: flex !important;

        position: sticky;
        top: -22px;

        background: #ffffff;

        padding: 18px 0 16px;

        z-index: 5;

        border-bottom: 1px solid #eef2f7;

        margin-bottom: 18px !important;
    }

    #filterSidebar > .flex.items-center.justify-between h3 {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;

        font-size: 18px !important;
        color: #0f172a !important;
        border: 0 !important;
    }

    /* Close button */
    #filterClose {
        display: flex !important;

        width: 40px;
        height: 40px;

        flex-shrink: 0;

        align-items: center;
        justify-content: center;

        border: 0;
        border-radius: 50%;

        background: #f1f5f9;
        color: #475569;

        cursor: pointer;

        transition: all 0.2s ease;
    }

    #filterClose:hover {
        background: #e2e8f0;
        color: #0f172a;
    }

    /* Filter content */
    #filterSidebar .filter-section {
        margin-bottom: 22px;
    }

    #filterSidebar .filter-checkbox {
        padding: 9px 10px;
        margin: 0 -10px;
    }

    /* Apply button */
    #filterSidebar button[type="submit"] {
        width: 100% !important;
        min-height: 48px;
    }

    /* Prevent horizontal overflow */
    body {
        overflow-x: hidden;
    }
}


/* =========================================================
   DESKTOP — NORMAL SIDEBAR
   ========================================================= */

@media (min-width: 1024px) {

    #filterToggle {
        display: none !important;
    }

    #filterOverlay {
        display: none !important;
    }

    aside.lg\:col-span-1 {
        position: relative !important;
        width: auto !important;
        height: auto !important;
        overflow: visible !important;
        pointer-events: auto !important;
    }

    #filterSidebar {
        position: sticky !important;

        top: 100px !important;

        left: auto !important;

        width: auto !important;
        max-width: none !important;

        height: auto !important;

        transform: none !important;

        border-radius: 20px !important;

        box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;

        pointer-events: auto !important;
    }
}