/**
 * Stiva YGO Native Header & Mobile Navigation Styles
 *
 * Designed Mobile-First, matches Otaku/Stiva Yu-Gi-Oh! aesthetics 100%.
 */

/* ==========================================================================
   Header Container & Layout
   ========================================================================== */
.stiva-header {
	width: 100%;
	position: relative;
	background-color: #ffffff;
	z-index: 1000;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.stiva-header-container,
.stiva-mobile-container {
	width: 100%;
	max-width: 1320px;
	margin: 0 auto;
	padding: 0 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

/* ==========================================================================
   Mobile Header Bar (Mobile-First Display)
   ========================================================================== */
.stiva-header-desktop {
	display: none;
}

.stiva-header-mobile {
	display: block;
	padding: 12px 0;
	background-color: #ffffff;
}

.stiva-mobile-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.stiva-mobile-logo .stiva-logo-img {
	max-height: 32px;
	width: auto;
	display: block;
	object-fit: contain;
}

.stiva-mobile-actions {
	display: flex;
	align-items: center;
	gap: 18px;
}

.stiva-header-icon-svg {
	display: block;
	stroke: #1e1e1e;
	transition: stroke 0.2s ease;
}

.stiva-mobile-cart-link:hover .stiva-header-icon-svg,
.stiva-search-open-btn:hover .stiva-header-icon-svg,
.stiva-burger-btn:hover .stiva-header-icon-svg {
	stroke: #dc1212;
}

.stiva-mobile-cart-link {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #1e1e1e;
	text-decoration: none;
	padding: 4px;
}

.stiva-cart-count-badge {
	position: absolute;
	top: -4px;
	right: -8px;
	background: #dc1212;
	color: #ffffff;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 10px;
	font-weight: 700;
	border-radius: 50%;
	min-width: 17px;
	height: 17px;
	padding: 0 3px;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	box-shadow: 0 1px 4px rgba(220, 18, 18, 0.4);
}

.stiva-search-open-btn,
.stiva-burger-btn {
	background: transparent;
	border: none;
	padding: 6px;
	cursor: pointer;
	color: #1e1e1e;
	font-size: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s ease;
}

.stiva-search-open-btn:hover,
.stiva-burger-btn:hover {
	color: #dc1212;
}

/* ==========================================================================
   Desktop Header Bar (Screen >= 1024px)
   ========================================================================== */
@media (min-width: 1024px) {
	.stiva-header-mobile {
		display: none;
	}

	.stiva-header-desktop {
		display: block;
		padding: 16px 0;
	}

	.stiva-header-col-logo .stiva-logo-img {
		max-height: 42px;
		width: auto;
		display: block;
	}

	.stiva-header-col-nav {
		display: flex;
		align-items: center;
		justify-content: flex-end;
		gap: 32px;
	}

	/* Main Nav */
	.stiva-desktop-nav .stiva-nav-menu {
		list-style: none;
		margin: 0;
		padding: 0;
		display: flex;
		align-items: center;
		gap: 28px;
	}

	.stiva-desktop-nav .stiva-nav-menu > li {
		position: relative;
	}

	.stiva-desktop-nav .stiva-nav-menu > li > a {
		font-size: 15px;
		font-weight: 600;
		color: #1e1e1e;
		text-decoration: none;
		text-transform: capitalize;
		padding: 10px 0;
		display: inline-block;
		transition: color 0.2s ease;
		position: relative;
	}

	.stiva-desktop-nav .stiva-nav-menu > li > a:hover,
	.stiva-desktop-nav .stiva-nav-menu > li.current-menu-item > a {
		color: #dc1212;
	}

	/* Submenus */
	.stiva-desktop-nav .stiva-nav-menu .sub-menu {
		position: absolute;
		top: 100%;
		left: 0;
		min-width: 210px;
		background: #ffffff;
		border: 1px solid rgba(0, 0, 0, 0.08);
		border-radius: 6px;
		box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
		list-style: none;
		padding: 12px 0;
		margin: 0;
		opacity: 0;
		visibility: hidden;
		transform: translateY(10px);
		transition: all 0.25s ease;
		z-index: 999;
	}

	.stiva-desktop-nav .stiva-nav-menu > li:hover > .sub-menu {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}

	.stiva-desktop-nav .stiva-nav-menu .sub-menu li a {
		display: block;
		padding: 8px 20px;
		color: #333333;
		font-size: 14px;
		font-weight: 500;
		text-decoration: none;
		transition: background-color 0.2s, color 0.2s;
	}

	.stiva-desktop-nav .stiva-nav-menu .sub-menu li a:hover {
		background-color: #f7f7f7;
		color: #dc1212;
	}

	/* Desktop Header Actions */
	.stiva-header-actions {
		display: flex;
		align-items: center;
		gap: 20px;
	}

	/* Cart Trigger & Bag Icon */
	.stiva-cart-trigger {
		position: relative;
		cursor: pointer;
		display: flex;
		align-items: center;
	}

	.stiva-desktop-cart-link {
		position: relative;
		display: flex;
		align-items: center;
		justify-content: center;
		color: #1e1e1e;
		text-decoration: none;
		padding: 6px;
		transition: color 0.2s ease;
	}

	.stiva-desktop-cart-link:hover {
		color: #dc1212;
	}

	.stiva-desktop-cart-link:hover .stiva-header-icon-svg {
		stroke: #dc1212;
	}

	.stiva-desktop-cart-link .stiva-cart-count-badge {
		top: -2px;
		right: -6px;
	}

	/* Mini Cart Dropdown */
	.stiva-mini-cart-dropdown {
		display: none;
		position: absolute;
		top: calc(100% + 15px);
		right: 0;
		width: 320px;
		background: #ffffff;
		border: 1px solid rgba(0, 0, 0, 0.1);
		border-radius: 8px;
		box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
		padding: 20px;
		z-index: 1001;
	}

	.stiva-cart-trigger:hover .stiva-mini-cart-dropdown,
	.stiva-mini-cart-dropdown.stiva-cart-open {
		display: block;
	}
}

/* ==========================================================================
   Fullscreen Search Overlay
   ========================================================================== */
.stiva-search-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(14, 14, 14, 0.98);
	backdrop-filter: blur(12px);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.stiva-search-overlay.stiva-is-active {
	opacity: 1;
	visibility: visible;
}

.stiva-search-dialog {
	width: 90%;
	max-width: 680px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 40px;
}

.stiva-search-header {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.stiva-search-logo {
	max-height: 48px;
	width: auto;
	display: block;
	object-fit: contain;
}

.stiva-search-close-btn {
	background: transparent;
	border: none;
	cursor: pointer;
	width: 44px;
	height: 44px;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background-color 0.2s ease;
}

.stiva-search-close-btn:hover {
	background: rgba(255, 255, 255, 0.08);
}

.stiva-close-icon {
	position: relative;
	width: 24px;
	height: 24px;
}

.stiva-close-icon::before,
.stiva-close-icon::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 0;
	width: 24px;
	height: 2px;
	background-color: #ffffff;
	transition: transform 0.2s, background-color 0.2s;
}

.stiva-close-icon::before {
	transform: rotate(45deg);
}

.stiva-close-icon::after {
	transform: rotate(-45deg);
}

.stiva-search-close-btn:hover .stiva-close-icon::before,
.stiva-search-close-btn:hover .stiva-close-icon::after {
	background-color: #dc1212;
}

.stiva-search-form-wrap {
	width: 100%;
}

.stiva-search-form {
	position: relative;
	width: 100%;
	border-bottom: 2px solid rgba(255, 255, 255, 0.25);
	display: flex;
	align-items: center;
	transition: border-color 0.25s ease;
}

.stiva-search-form:focus-within {
	border-bottom-color: #dc1212;
}

.stiva-search-input {
	width: 100%;
	background: transparent;
	border: none;
	outline: none;
	font-size: 24px;
	color: #ffffff;
	padding: 14px 60px 14px 0;
	font-weight: 400;
	font-family: inherit;
	box-shadow: none !important;
}

.stiva-search-input::placeholder {
	color: rgba(255, 255, 255, 0.4);
}

.stiva-search-submit-btn,
button.stiva-search-submit-btn,
form button.stiva-search-submit-btn {
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	background: #dc1212 !important;
	border: none !important;
	color: #ffffff !important;
	width: 46px !important;
	height: 46px !important;
	border-radius: 4px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(220, 18, 18, 0.4) !important;
	transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
	padding: 0 !important;
}

.stiva-search-submit-btn:hover,
button.stiva-search-submit-btn:hover,
form button.stiva-search-submit-btn:hover {
	background: #b70e0e !important;
	transform: translateY(-50%) scale(1.04) !important;
	box-shadow: 0 6px 20px rgba(220, 18, 18, 0.6) !important;
	color: #ffffff !important;
}

.stiva-search-submit-btn .trx_addons_icon-search {
	font-size: 20px !important;
	color: #ffffff !important;
	line-height: 1 !important;
}

/* ==========================================================================
   Fullscreen Mobile Drawer
   ========================================================================== */
.stiva-mobile-drawer-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0, 0, 0, 0.7);
	z-index: 99998;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.stiva-mobile-drawer-overlay.stiva-is-active {
	opacity: 1;
	visibility: visible;
}

.stiva-mobile-drawer {
	position: fixed;
	top: 0;
	right: 0;
	width: 100%;
	max-width: 420px;
	height: 100vh;
	background: #191919;
	z-index: 99999;
	transform: translateX(100%);
	transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
	overflow-y: auto;
	box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5);
	color: #ffffff;
}

.stiva-mobile-drawer.stiva-is-active {
	transform: translateX(0);
}

.stiva-mobile-drawer-inner {
	display: flex;
	flex-direction: column;
	min-height: 100%;
	padding: 30px 25px;
	box-sizing: border-box;
}

.stiva-mobile-drawer-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 25px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	margin-bottom: 25px;
}

.stiva-drawer-logo-img {
	max-height: 36px;
	width: auto;
}

.stiva-drawer-close-btn {
	background: transparent;
	border: none;
	color: #ffffff;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.stiva-drawer-close-icon {
	position: relative;
	width: 18px;
	height: 18px;
}

.stiva-drawer-close-icon::before,
.stiva-drawer-close-icon::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 0;
	width: 18px;
	height: 2px;
	background-color: #ffffff;
}

.stiva-drawer-close-icon::before {
	transform: rotate(45deg);
}

.stiva-drawer-close-icon::after {
	transform: rotate(-45deg);
}

/* Mobile Drawer Menu List */
.stiva-mobile-menu-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.stiva-mobile-menu-list > li {
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	position: relative;
}

.stiva-mobile-menu-list > li > a {
	display: block;
	padding: 14px 0;
	font-size: 18px;
	font-weight: 600;
	color: #ffffff;
	text-decoration: none;
	transition: color 0.2s;
}

.stiva-mobile-menu-list > li > a:hover {
	color: #dc1212;
}

.stiva-mobile-menu-list .stiva-submenu-toggle {
	position: absolute;
	right: 0;
	top: 14px;
	width: 32px;
	height: 32px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.stiva-mobile-menu-list .stiva-submenu-toggle::after {
	content: '+';
	font-size: 20px;
	color: #ffffff;
	line-height: 1;
}

.stiva-mobile-menu-list .stiva-submenu-toggle.stiva-is-open::after {
	content: '−';
}

.stiva-mobile-menu-list .sub-menu {
	display: none;
	list-style: none;
	padding: 5px 0 15px 15px;
	margin: 0;
}

.stiva-mobile-menu-list .sub-menu li a {
	display: block;
	padding: 8px 0;
	font-size: 15px;
	color: #b0b0b0;
	text-decoration: none;
	transition: color 0.2s;
}

.stiva-mobile-menu-list .sub-menu li a:hover {
	color: #ffffff;
}

/* Mobile Social Icons in Drawer */
.stiva-mobile-socials {
	margin-top: auto;
	padding-top: 35px;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 14px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.stiva-social-item {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	color: #ffffff;
	text-decoration: none;
	font-size: 16px;
	transition: all 0.25s ease;
}

.stiva-social-item:hover {
	background: #dc1212;
	color: #ffffff;
	transform: translateY(-2px);
}

/* ==========================================================================
   Compact Header Language Switcher Pill (EN / عربي)
   ========================================================================== */
.stiva-header-lang-slot {
	display: inline-flex;
	align-items: center;
}

.stiva-header-lang-slot .stiva-store-language.stiva-header-lang-pill {
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	background: transparent !important;
	box-shadow: none !important;
	width: auto !important;
	max-width: none !important;
	display: inline-flex !important;
	align-items: center !important;
}

.stiva-header-lang-slot .stiva-store-language.stiva-header-lang-pill [role="group"] {
	display: inline-flex !important;
	align-items: center !important;
	background: #f2f4f8 !important;
	border: 1px solid rgba(0, 0, 0, 0.08) !important;
	border-radius: 999px !important;
	padding: 2px !important;
	gap: 2px !important;
}

.stiva-header-lang-slot .stiva-store-language.stiva-header-lang-pill button {
	border: none !important;
	background: transparent !important;
	color: #555555 !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	padding: 4px 9px !important;
	border-radius: 999px !important;
	cursor: pointer !important;
	line-height: 1.1 !important;
	min-height: auto !important;
	transition: all 0.2s ease !important;
}

.stiva-header-lang-slot .stiva-store-language.stiva-header-lang-pill button[aria-pressed="true"] {
	background: #dc1212 !important;
	color: #ffffff !important;
	box-shadow: 0 2px 6px rgba(220, 18, 18, 0.3) !important;
}
