/**
 * DB Header Footer - Frontend Stylesheet
 *
 * @package DB_Header_Footer
 */

/* ==========================================================================
   1. Base Wrappers & Reset
   ========================================================================== */
#db-header-wrap,
#db-footer-wrap {
	box-sizing: border-box;
	position: relative;
	width: 100%;
	clear: both;
}
#db-header-wrap *,
#db-footer-wrap * {
	box-sizing: border-box;
}

/* ==========================================================================
   2. Sticky Header System
   ========================================================================== */
.db-hf-sticky-header {
	transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

.db-hf-sticky-header.db-hf-is-sticky {
	position: fixed !important;
	top: 0;
	left: 0;
	right: 0;
	width: 100% !important;
	z-index: 9999 !important;
}

/* Slide-down entrance animation */
.db-hf-sticky-header.db-hf-is-sticky[data-db-sticky-animation="1"] {
	animation: dbHfSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes dbHfSlideDown {
	from {
		transform: translateY(-100%);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

/* Scrolled shadow */
.db-hf-sticky-header.db-hf-is-sticky.has-shadow {
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

/* Logo shrink transition */
.db-hf-sticky-header.db-hf-is-sticky[data-db-sticky-logo-shrink="1"] .db-hf-site-logo-img {
	transform: scale(0.85);
	transition: transform 0.3s ease;
}

/* Spacer preventing page jump */
.db-hf-sticky-spacer {
	display: none;
	width: 100%;
}
.db-hf-sticky-spacer.is-active {
	display: block;
}

/* ==========================================================================
   3. Transparent Header System
   ========================================================================== */
.db-hf-transparent-header {
	position: absolute !important;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	z-index: 999;
	background-color: transparent !important;
	transition: background-color 0.35s ease, border-color 0.35s ease;
}

.db-hf-transparent-header a {
	transition: color 0.25s ease;
}

/* Transition to solid when scrolled */
.db-hf-transparent-header.db-hf-is-scrolled {
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

/* ==========================================================================
   4. Responsive Device Visibility
   ========================================================================== */
@media (min-width: 1200px) {
	.db-hf-hide-desktop { display: none !important; }
}
@media (min-width: 1024px) and (max-width: 1199px) {
	.db-hf-hide-laptop { display: none !important; }
}
@media (min-width: 768px) and (max-width: 1023px) {
	.db-hf-hide-tablet { display: none !important; }
}
@media (max-width: 767px) {
	.db-hf-hide-mobile { display: none !important; }
}

/* ==========================================================================
   5. Site Logo
   ========================================================================== */
.db-hf-site-logo-wrap {
	display: inline-block;
}
.db-hf-logo-link {
	display: inline-flex;
	flex-direction: column;
	text-decoration: none;
}
.db-hf-site-logo-img {
	display: block;
	max-width: 100%;
	height: auto;
}
.db-hf-site-title {
	font-size: 22px;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.2;
}
.db-hf-site-tagline {
	font-size: 12px;
	color: #64748b;
	margin-top: 2px;
}

/* ==========================================================================
   6. Navigation Menu
   ========================================================================== */
.db-hf-nav-container {
	display: block;
}
.db-hf-nav-menu {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	align-items: center;
}
.db-hf-nav-vertical .db-hf-nav-menu {
	flex-direction: column;
	align-items: flex-start;
}
.db-hf-nav-menu > li {
	position: relative;
	margin: 0;
	padding: 0;
}
.db-hf-nav-menu > li > a {
	display: inline-block;
	padding: 8px 12px;
	text-decoration: none;
	color: #1e293b;
	transition: color 0.2s ease;
}

/* Submenu Indicators */
.db-hf-has-indicator .menu-item-has-children > a:after {
	content: "▾";
	font-size: 11px;
	margin-left: 6px;
	display: inline-block;
	transition: transform 0.2s ease;
}
.db-hf-has-indicator .menu-item-has-children:hover > a:after {
	transform: rotate(180deg);
}

/* Dropdown Submenu */
.db-hf-nav-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 200px;
	background: #ffffff;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
	border-radius: 6px;
	padding: 8px 0;
	margin: 0;
	list-style: none;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
	z-index: 1000;
}
.db-hf-nav-menu li:hover > .sub-menu,
.db-hf-nav-menu li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.db-hf-nav-menu .sub-menu li a {
	display: block;
	padding: 8px 18px;
	font-size: 14px;
	color: #334155;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.db-hf-nav-menu .sub-menu li a:hover {
	background-color: #f8fafc;
	color: #2563eb;
}
.db-hf-nav-menu .sub-menu .sub-menu {
	top: 0;
	left: 100%;
}

/* ==========================================================================
   7. Mobile Navigation Drawer & Accordion
   ========================================================================== */
.db-hf-mobile-menu-wrapper {
	position: relative;
	display: inline-block;
}
.db-hf-mobile-toggle-btn {
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: inherit;
}
.db-hf-burger-icon {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	width: 22px;
	height: 16px;
}
.db-hf-burger-line {
	display: block;
	width: 100%;
	height: 2px;
	background-color: currentColor;
	border-radius: 2px;
	transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Off-canvas Drawer */
.db-hf-mobile-drawer {
	position: fixed;
	top: 0;
	bottom: 0;
	width: 300px;
	max-width: 85vw;
	background: #ffffff;
	z-index: 100000;
	box-shadow: 0 0 30px rgba(0, 0, 0, 0.15);
	transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
	overflow-y: auto;
	display: flex;
	flex-direction: column;
}

.db-hf-drawer-offcanvas_left {
	left: 0;
	transform: translateX(-100%);
}
.db-hf-drawer-offcanvas_right {
	right: 0;
	transform: translateX(100%);
}
.db-hf-drawer-fullscreen {
	top: 0; left: 0; right: 0; bottom: 0;
	width: 100%; max-width: 100%;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Active Drawer State */
.db-hf-mobile-drawer.is-open {
	transform: translateX(0);
}
.db-hf-drawer-fullscreen.is-open {
	opacity: 1;
	visibility: visible;
}

/* Backdrop */
.db-hf-mobile-backdrop {
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(15, 23, 42, 0.6);
	z-index: 99999;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}
.db-hf-mobile-backdrop.is-active {
	opacity: 1;
	visibility: visible;
}

.db-hf-mobile-drawer-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 18px 20px;
	border-bottom: 1px solid #f1f5f9;
}
.db-hf-mobile-brand {
	font-weight: 700;
	font-size: 18px;
	color: #0f172a;
}
.db-hf-drawer-close {
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: #64748b;
	padding: 4px;
}
.db-hf-drawer-close:hover { color: #0f172a; }

.db-hf-mobile-drawer-body {
	padding: 20px;
	flex: 1;
}
.db-hf-mobile-nav-list {
	margin: 0;
	padding: 0;
	list-style: none;
}
.db-hf-mobile-nav-list li {
	margin: 0;
	padding: 0;
	border-bottom: 1px solid #f8fafc;
}
.db-hf-mobile-nav-list li a {
	display: block;
	padding: 12px 0;
	color: #1e293b;
	text-decoration: none;
	font-size: 15px;
	font-weight: 500;
}
.db-hf-mobile-nav-list .sub-menu {
	display: none;
	padding-left: 16px;
	list-style: none;
	background: #f8fafc;
	border-radius: 4px;
	margin-bottom: 8px;
}
.db-hf-mobile-nav-list .sub-menu.is-expanded {
	display: block;
}

/* ==========================================================================
   8. Search Widget
   ========================================================================== */
.db-hf-search-form {
	display: flex;
	position: relative;
}
.db-hf-search-field {
	flex: 1;
	padding: 9px 14px;
	border: 1px solid #d1d5db;
	border-radius: 4px 0 0 4px;
	outline: none;
	font-size: 14px;
}
.db-hf-search-submit {
	background: #1e293b;
	color: #ffffff;
	border: none;
	padding: 0 16px;
	border-radius: 0 4px 4px 0;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.db-hf-search-icon-trigger {
	background: none;
	border: none;
	padding: 8px;
	cursor: pointer;
	color: inherit;
	display: inline-flex;
	align-items: center;
}
.db-hf-search-modal {
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(15, 23, 42, 0.85);
	z-index: 100001;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}
.db-hf-search-modal.is-open {
	opacity: 1;
	visibility: visible;
}
.db-hf-search-modal-inner {
	width: 90%;
	max-width: 600px;
	position: relative;
}
.db-hf-search-modal-close {
	position: absolute;
	top: -45px;
	right: 0;
	background: none;
	border: none;
	color: #ffffff;
	font-size: 36px;
	cursor: pointer;
}

/* ==========================================================================
   9. Header CTA Button
   ========================================================================== */
.db-hf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 22px;
	background: #2563eb;
	color: #ffffff;
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	transition: background-color 0.2s ease, transform 0.15s ease;
}
.db-hf-btn:hover {
	background: #1d4ed8;
	color: #ffffff;
}
.db-hf-btn-badge {
	font-size: 10px;
	background: #ef4444;
	color: #ffffff;
	padding: 2px 6px;
	border-radius: 10px;
	margin-left: 8px;
	text-transform: uppercase;
}

/* ==========================================================================
   10. User Menu Widget
   ========================================================================== */
.db-hf-user-menu-wrapper {
	position: relative;
	display: inline-block;
}
.db-hf-user-trigger {
	background: none;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 8px;
	color: inherit;
	padding: 6px;
}
.db-hf-user-avatar {
	border-radius: 50%;
	display: block;
}
.db-hf-user-name {
	font-weight: 600;
	font-size: 14px;
}
.db-hf-user-dropdown {
	position: absolute;
	top: 100%;
	right: 0;
	background: #ffffff;
	box-shadow: 0 10px 25px rgba(0,0,0,0.08);
	border-radius: 6px;
	min-width: 180px;
	padding: 8px 0;
	margin: 0;
	list-style: none;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: all 0.2s ease;
	z-index: 1000;
}
.db-hf-user-logged-in:hover .db-hf-user-dropdown,
.db-hf-user-logged-in:focus-within .db-hf-user-dropdown {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.db-hf-user-dropdown li a {
	display: block;
	padding: 8px 16px;
	font-size: 13px;
	color: #334155;
	text-decoration: none;
}
.db-hf-user-dropdown li a:hover {
	background-color: #f8fafc;
	color: #2563eb;
}
.db-hf-logout-link {
	border-top: 1px solid #f1f5f9;
	color: #ef4444 !important;
}

/* ==========================================================================
   11. WooCommerce Cart Widget
   ========================================================================== */
.db-hf-cart-wrapper {
	position: relative;
	display: inline-block;
}
.db-hf-cart-trigger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	color: inherit;
}
.db-hf-cart-icon-wrap {
	position: relative;
	display: inline-flex;
}
.db-hf-cart-badge {
	position: absolute;
	top: -8px;
	right: -8px;
	background: #ef4444;
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}
.db-hf-cart-total {
	font-size: 14px;
	font-weight: 600;
}
.db-hf-mini-cart-dropdown {
	position: absolute;
	top: 100%;
	right: 0;
	width: 320px;
	background: #ffffff;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
	border-radius: 8px;
	padding: 16px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: all 0.25s ease;
	z-index: 1000;
}
.db-hf-cart-wrapper.has-dropdown:hover .db-hf-mini-cart-dropdown,
.db-hf-cart-wrapper.has-dropdown:focus-within .db-hf-mini-cart-dropdown {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* ==========================================================================
   12. Social Icons Widget
   ========================================================================== */
.db-hf-social-list {
	display: flex;
	gap: 12px;
	align-items: center;
}
.db-hf-social-item {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #64748b;
	transition: color 0.2s ease, transform 0.2s ease;
	text-decoration: none;
}
.db-hf-social-item:hover {
	color: #2563eb;
	transform: translateY(-2px);
}

/* ==========================================================================
   13. Contact Info Widget
   ========================================================================== */
.db-hf-contact-wrap {
	display: flex;
	gap: 20px;
}
.db-hf-contact-stacked {
	flex-direction: column;
	gap: 10px;
}
.db-hf-contact-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: #475569;
}
.db-hf-contact-item a {
	color: inherit;
	text-decoration: none;
}
.db-hf-contact-item a:hover {
	text-decoration: underline;
}

/* ==========================================================================
   14. Back to Top Button
   ========================================================================== */
#db-hf-back-to-top,
.db-hf-widget-btt-floating {
	position: fixed;
	bottom: 30px;
	right: 30px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #2563eb;
	color: #ffffff;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
	opacity: 0;
	visibility: hidden;
	transform: translateY(15px);
	transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
	z-index: 9999;
}
#db-hf-back-to-top.is-visible,
.db-hf-widget-btt-floating.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
#db-hf-back-to-top:hover,
.db-hf-widget-btt-floating:hover {
	background: #1d4ed8;
}

.db-hf-widget-btt-inline {
	background: #2563eb;
	color: #ffffff;
	border: none;
	padding: 10px 18px;
	border-radius: 4px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 600;
}

/* ==========================================================================
   15. Announcement Bar
   ========================================================================== */
.db-hf-announcement-bar {
	background: #2563eb;
	color: #ffffff;
	padding: 10px 20px;
	display: flex;
	justify-content: center;
	align-items: center;
	position: relative;
	font-size: 14px;
	text-align: center;
}
.db-hf-announcement-bar.is-dismissed {
	display: none !important;
}
.db-hf-announcement-link {
	color: inherit;
	font-weight: 700;
	margin-left: 10px;
	text-decoration: underline;
}
.db-hf-announcement-dismiss {
	position: absolute;
	right: 15px;
	background: none;
	border: none;
	color: currentColor;
	font-size: 20px;
	cursor: pointer;
	opacity: 0.8;
}
.db-hf-announcement-dismiss:hover { opacity: 1; }
