.header-below-category-dropdown-wrapper:hover .header-below-category-dropdown {
	display: block !important;
}
.header-below-category-dropdown {
	min-width: 220px;
}
/* Header background */
.header-main-bg {
	background: #FFD600;
	z-index: 1020;
}

/* Top line background and transition */
.header-topline-bg {
	background: #FFF9C4;
	transition: opacity 0.7s cubic-bezier(.4,0,.2,1), height 0.7s cubic-bezier(.4,0,.2,1);
}

/* Logo image */
.header-logo {
	height: 40px;
	width: auto;
	image-rendering: auto;
	cursor: pointer;
}

/* Ensure logo link is clickable */
a[href="/"] {
	text-decoration: none;
	display: inline-block;
	position: relative;
	z-index: 10;
}

/* Search form container */
.header-search-form {
	max-width: 400px;
	margin: 0 auto;
}

/* Search input */
.header-search-input {
	padding-right: 2.5rem;
	background: #FFF9C4;
	position: relative;
	z-index: 2;
}

/* Search icon span */
.header-search-icon {
	pointer-events: none;
	z-index: 3;
}

/* Dropdown container (already present) */
.header-search-dropdown {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	width: 100%;
	z-index: 5000;
	background: #fff;
	border: 1px solid #eee;
	border-radius: 0 0 8px 8px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Recently searched title */
.header-search-recent-title {
	font-size: .8rem;
}
/* Header and dropdown styles extracted from header.php */

.header-social-link:hover {
	color: #1877f2 !important;
}
.header-social-link.ig:hover {
	color: #E4405F !important;
}

#searchOverlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0, 0, 0, 0.3);
	z-index: 1000;
	display: none;
	pointer-events: none;
}

.header-search-dropdown {
	margin-top: 12px !important;
	border-radius: 8px !important;
	font-size: 1rem !important;
	padding: 5px 15px !important;
}

.header-search-dropdown-input-link {
    color: #4d4d4d;
}

.header-search-dropdown-input-link:hover {
	background: #f3f3f3ff !important;
	border-radius: 8px;
	transition: background 0.2s, color 0.2s;
}
.header-search-dropdown-input-link:hover .fa-arrow-right {
	color: #FFC107 !important;
	transition: color 0.2s;
}

.header-search-dropdown-recent-link:hover {
	background: #f3f3f3ff !important;
	border-radius: 8px;
	transition: background 0.2s;
}

.header-search-dropdown-recent-link:hover .fa-location {
	color: #FFC107 !important;
	transition: color 0.2s;
}

/* Section below header with white background */
.header-below-section {
    background: #fff !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
}

.header-below-categories {
    display: flex !important;
    align-items: center !important;
}

/* Ensure proper container alignment on larger screens */
.header-below-section .attraction-main-container {
    max-width: 1180px;
    margin: 0 auto;
    width: 100%;
}

/* Handle responsive padding for header categories */
@media (max-width: 767px) {
    .header-below-categories.px-3 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

@media (min-width: 768px) {
    .header-below-categories.px-md-0 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* Ensure headerTopLine is visible on desktop by default, allow JS to override for scroll effects */
    #headerTopLine {
        display: block;
        visibility: visible;
        position: relative;
        z-index: 1;
        opacity: 1;
        height: auto;
        overflow: hidden;
        transition: opacity 0.3s ease-in-out, height 0.3s ease-in-out, padding 0.3s ease-in-out, margin 0.3s ease-in-out;
    }
    
    /* When scrolled on desktop, hide the header top line completely */
    #headerTopLine.header-scrolled {
        opacity: 0;
        height: 0;
        padding-top: 0;
        padding-bottom: 0;
        margin-top: 0;
        margin-bottom: 0;
        pointer-events: none;
    }
    
    /* Ensure all container elements inside headerTopLine are visible by default */
    #headerTopLine .container,
    #headerTopLine .container-sm,
    #headerTopLine .order-container,
    #headerTopLine .row,
    #headerTopLine .col-12 {
        display: block;
        visibility: visible;
    }
    
    /* Ensure flexbox elements are displayed properly */
    #headerTopLine .d-flex {
        display: flex;
    }
}

.header-below-category-link {
    color: #363636 !important;
    transition: color 0.2s;
    padding-top: 15px !important;
    padding-bottom: 15px !important;
    padding-right: 15px !important;
    font-size: 1rem;
}

/* Dropdown under All Categories spans full screen width */
.header-below-category-dropdown {
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    min-width: unset !important;
    max-width: unset !important;
    position: absolute !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    z-index: 1050;
    top:100%;
    background-color: #fff;
}
.header-below-category-dropdown > .bg-white {
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 auto;
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
}
.header-below-category-dropdown-wrapper {
    position: static !important;
}

.header-category-hover {
    color: #363636 !important;
}

.header-category-hover:hover {
    color: #ffc107 !important;
}

#backToTopBtn:hover {
  background: #fcdd2c !important;
  color: #FFF !important;
  box-shadow: 0 0 0 6px #ffe06644;
  transform: scale(1.08);
  transition: all 0.2s cubic-bezier(.4,0,.2,1);
}

.recent-address {
    font-size: .75rem;
}

/* Tablet and large mobile header styles */
@media (min-width: 768px) and (max-width: 1200px) {
    /* Allow header top line to be controlled by JavaScript on tablets */
    body #headerTopLine {
        display: block !important;
        opacity: 1;
        height: auto;
        visibility: visible;
        overflow: hidden;
        transition: opacity 0.3s ease-in-out, height 0.3s ease-in-out, padding 0.3s ease-in-out, margin 0.3s ease-in-out !important;
    }
    
    /* When scrolled, hide the header top line completely */
    body #headerTopLine.header-scrolled {
        opacity: 0 !important;
        height: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        pointer-events: none !important;
    }
    
    /* Allow JavaScript to hide nested containers when needed */
    #headerTopLine * {
        visibility: visible;
    }
    
    /* When JavaScript sets height to 0 on tablets, ensure it's truly hidden */
    body #headerTopLine[style*="height: 0px"] {
        min-height: 0 !important;
        max-height: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
    
    /* Adjust header topline for tablets */
    .header-topline-bg {
        padding: 8px 0;
    }
    
    /* Make header elements more compact on tablets */
    .header-topline-bg .small {
        font-size: 0.8rem;
    }
    
    /* Adjust logo size for tablets */
    .header-logo {
        height: 35px;
        cursor: pointer;
    }
    
    /* Make search form more compact */
    .header-search-form {
        max-width: 350px;
    }
    
    /* Ensure proper header structure on tablets */
    .attraction-main-container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Make social links more touch-friendly */
    .header-social-link {
        padding: 10px 8px;
        margin: 0 2px;
    }
}

/* Hide header below section on mobile only - show on tablets */
@media (max-width: 767px) {
    /* Hide header top line on mobile only */
    #headerTopLine {
        display: none !important;
    }
    
    .header-below-section {
        display: block !important;
    }
    
    /* Mobile search icon styling */
    #mobileSearchBtn {
        border-color: #6c757d;
        color: #6c757d;
        padding: 8px 12px;
        border-radius: 6px;
        transition: all 0.3s ease;
    }
    
    #mobileSearchBtn:hover,
    #mobileSearchBtn:focus {
        border-color: #FFD600;
        color: #333;
        background-color: #FFD600;
    }
    
    /* Hide desktop search form on mobile */
    .header-search-form {
        display: none !important;
    }
    
    /* Mobile search offcanvas styling */
    .offcanvas-bottom {
        height: 85vh !important;
        border-radius: 20px 20px 0 0 !important;
        box-shadow: 0 -8px 25px rgba(0,0,0,0.15) !important;
        background: #fff;
    }
    
    .offcanvas-bottom .offcanvas-body {
        padding: 2rem 1.5rem;
        background: #fff;
        border-radius: 15px !important;
    }
    
    .offcanvas-bottom .btn-close {
        background-size: 24px;
        opacity: 0.6;
        z-index: 10;
    }
    
    .offcanvas-bottom .btn-close:hover {
        opacity: 1;
    }
    
    .offcanvas-bottom .form-control-lg {
        border-radius: 15px;
        border: 2px solid #e9ecef;
        padding: 12px 60px 12px 50px;
        font-size: 16px;
        transition: all 0.3s ease;
    }
    
    .offcanvas-bottom .form-control-lg:focus {
        border-color: #FFD600;
        box-shadow: 0 0 0 3px rgba(255, 214, 0, 0.15);
    }
    
    .offcanvas-bottom .btn-outline-secondary {
        border-color: #e9ecef;
        color: #6c757d;
        transition: all 0.3s ease;
    }
    
    .offcanvas-bottom .btn-outline-secondary:hover {
        background-color: #FFD600;
        border-color: #FFD600;
        color: #333;
    }
    
    .offcanvas-bottom .btn-outline-warning {
        border-color: #FFD600;
        color: #333;
        transition: all 0.3s ease;
    }
    
    .offcanvas-bottom .btn-outline-warning:hover {
        background-color: #FFD600;
        border-color: #FFD600;
        color: #333;
    }
    
    /* Mobile search dropdown styling (matching desktop) */
    .offcanvas-bottom .mobile-search-title {
        text-align: center;
        margin-bottom: 2rem;
        margin-top: 2rem;
        color: #fff;
        font-weight: 600;
        font-size: 1.5rem;
    }
    
    .offcanvas-bottom .mobile-search-dropdown {
        margin-top: 20px;
        background: #fff;
    }
    
    .offcanvas-bottom .header-search-recent-title {
        font-size: .8rem;
        color: #6c757d;
        margin-bottom: 1rem;
    }
    
    .offcanvas-bottom .header-search-dropdown-recent-link:hover {
        background: #f3f3f3 !important;
        border-radius: 8px;
        transition: background 0.2s;
    }
    
    .offcanvas-bottom .header-search-dropdown-recent-link:hover .fa-location {
        color: #FFC107 !important;
        transition: color 0.2s;
    }
    
    .offcanvas-bottom .header-search-dropdown-input-link {
        color: #4d4d4d;
    }
    
    .offcanvas-bottom .header-search-dropdown-input-link:hover {
        background: #f3f3f3 !important;
        border-radius: 8px;
        transition: background 0.2s, color 0.2s;
    }
    
    .offcanvas-bottom .header-search-dropdown-input-link:hover .fa-arrow-right {
        color: #FFC107 !important;
        transition: color 0.2s;
    }
}

/* Prevent overflow in headerSearchDropdownRecent list items */
#headerSearchDropdownRecent li {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 100%;
}
#headerSearchDropdownRecent .fw-semibold {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	display: block;
	max-width: 300px;
}
#headerSearchDropdownRecent .recent-address {
	font-size: 0.85em;
	color: #888;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	display: block;
	max-width: 300px;
}
#mobileSearchDropdownRecent li {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 100%;
}
#mobileSearchDropdownRecent .fw-semibold {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	display: block;
	max-width: 250px;
}
#mobileSearchDropdownRecent .recent-address {
	font-size: 0.85em;
	color: #888;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	display: block;
	max-width: 250px;
}