/* ============================================================================
 * HAV custom features
 *  1. Account email in header
 *  3/4. Floating left product-category filter sidebar
 * ========================================================================== */

/* ---- 1. Logged-in account email next to the header account icon --------- */
.hav-account-email {
	display: inline-block;
	vertical-align: middle;
	margin-left: 8px;
	max-width: 180px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 13px;
	line-height: 1;
	color: inherit;
	opacity: .9;
}

/* The account icon module sits in the right header column; keep email inline. */
.et_pb_icon_0_tb_header { white-space: nowrap; }
.et_pb_icon_0_tb_header a { display: inline-block; vertical-align: middle; }

/* Hide the email on compact / mobile headers where there is no room … */
@media (max-width: 980px) {
	.hav-account-email { display: none; }
	/* … unless the mobile header restructure is active, where row 3 is
	   explicitly meant to show "user icon + user email + cart". */
	body.hav-mheader .hav-account-email {
		display: inline-block;
		max-width: 150px;
		color: #fff;
		opacity: 1;
	}
	/* The account person icon on the same row was dark on the blue bg. */
	body.hav-mheader .et_pb_icon_0_tb_header .et-pb-icon { color: #fff !important; }
}

/* ---- 3/4. Floating filter sidebar --------------------------------------- */
.hav-filter {
	position: fixed;
	top: 50%;
	left: 0;
	transform: translateY(-50%);
	z-index: 99990;
	display: flex;
	align-items: stretch;
	font-family: inherit;
	color: #fff;
	transition: transform .25s ease;
}

/* Collapsed: slide the panel off-screen, leave the tab poking out. */
.hav-filter.is-collapsed .hav-filter__panel {
	width: 0;
	min-width: 0;
	opacity: 0;
	pointer-events: none;
	overflow: hidden;
	padding: 0;
	border: 0;
}

/* The vertical pull tab on the left edge. */
.hav-filter__tab {
	order: 2;
	align-self: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	background: #2b2b2b;
	color: #fff;
	border: 0;
	border-radius: 0 6px 6px 0;
	padding: 12px 6px;
	cursor: pointer;
	box-shadow: 2px 0 6px rgba(0, 0, 0, .35);
}
.hav-filter:not(.is-collapsed) .hav-filter__tab { display: none; }
.hav-filter__tab-text {
	writing-mode: vertical-rl;
	text-orientation: mixed;
	letter-spacing: 2px;
	font-size: 12px;
	font-weight: 600;
}
.hav-filter__tab-icon { font-size: 14px; }

/* The panel itself. */
.hav-filter__panel {
	order: 1;
	width: 240px;
	min-width: 240px;
	max-height: 86vh;
	overflow-y: auto;
	background: #1e1e1e;
	border-radius: 0 8px 8px 0;
	box-shadow: 3px 0 12px rgba(0, 0, 0, .4);
	padding: 0 0 8px;
	transition: width .25s ease, opacity .2s ease;
}
.hav-filter__panel::-webkit-scrollbar { width: 8px; }
.hav-filter__panel::-webkit-scrollbar-thumb { background: #555; border-radius: 4px; }

.hav-filter__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 14px;
	background: #2b2b2b;
	border-bottom: 1px solid #3a3a3a;
}
.hav-filter__title { font-weight: 700; letter-spacing: 1px; font-size: 14px; }
.hav-filter__close {
	background: none;
	border: 0;
	color: #bbb;
	font-size: 15px;
	cursor: pointer;
	line-height: 1;
}
.hav-filter__close:hover { color: #fff; }

/* Groups. */
.hav-filter__group { border-bottom: 1px solid #333; }
.hav-filter__group-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	background: none;
	border: 0;
	color: #fff;
	font-weight: 700;
	font-size: 14px;
	padding: 11px 14px;
	cursor: pointer;
	text-align: left;
}
.hav-filter__chevron { transition: transform .2s ease; font-size: 12px; color: #aaa; }
.hav-filter__group.is-closed .hav-filter__chevron { transform: rotate(-90deg); }
.hav-filter__group.is-closed .hav-filter__group-body { display: none; }

.hav-filter__group-body { padding: 2px 0 8px; }

/* Options. */
.hav-filter__opt {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 5px 14px;
	font-size: 13px;
	color: #e6e6e6;
	cursor: pointer;
}
.hav-filter__opt:hover { background: #2a2a2a; }
.hav-filter__opt input { margin: 0; cursor: pointer; accent-color: #2ea3f2; }
.hav-filter__opt span { line-height: 1.3; }

/* Indentation for nested (3rd-level) categories. */
.hav-filter__opt--d1 { padding-left: 30px; }
.hav-filter__opt--d2 { padding-left: 46px; }
.hav-filter__opt--d1 span,
.hav-filter__opt--d2 span { color: #c4c4c4; }

/* Actions. */
.hav-filter__actions {
	display: flex;
	gap: 8px;
	padding: 12px 14px 4px;
}
.hav-filter__apply,
.hav-filter__clear {
	flex: 1;
	border: 0;
	border-radius: 4px;
	padding: 8px 0;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}
.hav-filter__apply { background: #2ea3f2; color: #fff; }
.hav-filter__apply:hover { background: #1f8ad6; }
.hav-filter__clear { background: #3a3a3a; color: #ddd; }
.hav-filter__clear:hover { background: #4a4a4a; }

/* Price range row inside the filter panel. */
.hav-filter__price {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px 2px;
}
.hav-filter__price .hav-filter__cur { color: #aaa; font-size: 13px; }
.hav-filter__price .hav-filter__dash { color: #888; }
.hav-filter__price input {
	width: 100%;
	min-width: 0;
	background: #2a2a2a;
	border: 1px solid #444;
	border-radius: 4px;
	color: #fff;
	font-size: 13px;
	padding: 6px 8px;
}
.hav-filter__price input::placeholder { color: #888; }
.hav-filter__price input:focus { outline: none; border-color: #2ea3f2; }

/* On small screens shrink the panel a touch. */
@media (max-width: 600px) {
	.hav-filter__panel { width: 210px; min-width: 210px; max-height: 80vh; }
}

/* ---- 13. Back-to-top button --------------------------------------------- */
.hav-back-top {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 99980;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: #2ea3f2;
	color: #fff;
	font-size: 20px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.hav-back-top.is-visible {
	opacity: .92;
	visibility: visible;
	transform: translateY(0);
}
.hav-back-top:hover { opacity: 1; background: #1f8ad6; }
.hav-back-top__icon { display: inline-block; transform: translateY(1px); }

@media (max-width: 980px) {
	.hav-back-top { right: 14px; bottom: 76px; width: 42px; height: 42px; }
}

/* ---- 16. Featured products horizontal carousel -------------------------- */
.hav-carousel { width: 100%; margin: 0 auto; }
.hav-carousel__title {
	margin: 0 0 14px;
	font-size: 22px;
	font-weight: 700;
}
.hav-carousel__viewport {
	position: relative;
	display: flex;
	align-items: center;
}
.hav-carousel__track {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	padding: 4px 2px 12px;
	-ms-overflow-style: none;
	scrollbar-width: none;
}
.hav-carousel__track::-webkit-scrollbar { display: none; }

.hav-carousel__item {
	flex: 0 0 auto;
	width: 200px;
	scroll-snap-align: start;
	text-decoration: none;
	color: inherit;
	display: block;
	transition: transform .15s ease;
}
.hav-carousel__item:hover { transform: translateY(-4px); }
.hav-carousel__img {
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 8px;
	background: rgba(255, 255, 255, .05);
}
.hav-carousel__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.hav-carousel__info { padding: 8px 2px 0; }
.hav-carousel__name {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 13px;
	line-height: 1.35;
}
.hav-carousel__price { display: block; margin-top: 4px; font-weight: 700; font-size: 14px; }

.hav-carousel__nav {
	position: absolute;
	top: calc(50% - 18px);
	transform: translateY(-50%);
	z-index: 2;
	width: 38px;
	height: 38px;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, .55);
	color: #fff;
	font-size: 16px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.hav-carousel__nav:hover { background: rgba(0, 0, 0, .8); }
.hav-carousel__nav--prev { left: -6px; }
.hav-carousel__nav--next { right: -6px; }
.hav-carousel__nav[disabled] { opacity: .3; cursor: default; }

@media (max-width: 600px) {
	.hav-carousel__item { width: 150px; }
	.hav-carousel__nav { width: 32px; height: 32px; }
}

/* ---- 15. Mobile header restructure (<=980px) ---------------------------- */
/* Active only when JS has regrouped the header nodes (body.hav-mheader).
 * Target layout, top -> bottom:
 *   Row 1 (black): social buttons (furryparty icon / discord / contact)
 *   Row 2 (black): currency  [only if a currency module exists in the header]
 *   Row 3 (white): user icon + user email + cart
 *   Row 4 (white): hamburger menu + logo + search
 */
@media (max-width: 980px) {
	body.hav-mheader .et_pb_row_0_tb_header {
		display: flex !important;
		flex-wrap: wrap;
		align-items: center;
		justify-content: center;
		gap: 6px 14px;
		width: 100%;
		max-width: 100%;
		padding: 6px 10px;
	}
	body.hav-mheader .et_pb_row_0_tb_header > .et_pb_column {
		width: auto !important;
		margin: 0 !important;
		float: none !important;
	}

	/* White rows wrapper: stack account-row above the menu-row. */
	body.hav-mheader .et_pb_row_1_tb_header {
		display: flex !important;
		flex-direction: column;
		width: 100%;
		max-width: 100%;
		margin: 0 auto;
	}
	body.hav-mheader .et_pb_column_4_tb_header { order: 1; } /* row 3 */
	body.hav-mheader .et_pb_column_3_tb_header { order: 2; } /* row 4 */

	/* Row 3: user icon + email + cart, centered on white. */
	body.hav-mheader .et_pb_column_4_tb_header {
		width: 100% !important;
		margin: 0 !important;
		float: none !important;
		display: flex !important;
		align-items: center;
		justify-content: center;
		gap: 16px;
		padding: 8px 10px;
	}
	body.hav-mheader .et_pb_column_4_tb_header .et_pb_icon_0_tb_header { margin: 0; }
	body.hav-mheader .et_pb_column_4_tb_header .et_pb_menu__cart-button {
		position: relative;
		top: 0;
		margin: 0;
	}

	/* Row 4: hamburger + logo + search in one tidy row. */
	body.hav-mheader .et_pb_column_3_tb_header {
		width: 100% !important;
		margin: 0 !important;
		float: none !important;
	}
	body.hav-mheader .et_pb_menu_0_tb_header .et_pb_menu_inner_container {
		display: flex !important;
		align-items: center;
		justify-content: flex-start;
		gap: 10px;
		flex-wrap: nowrap;
	}
	/* Logo: far left + about half size. margin-right:auto pushes the rest right. */
	body.hav-mheader .et_pb_menu__logo-wrap {
		order: 1;
		margin: 0 auto 0 0 !important;
		max-width: 120px;
	}
	body.hav-mheader .et_pb_menu__logo-wrap img,
	body.hav-mheader .et_pb_menu__logo img {
		max-width: 120px !important;
		height: auto !important;
	}
	/* Right side: search on the left, menu (the square ☰) on the right. */
	body.hav-mheader .et_pb_menu_0_tb_header .et_pb_code_0_tb_header { order: 2; flex: 0 0 auto; }
	body.hav-mheader .et_pb_menu_0_tb_header .et_pb_menu__search,
	body.hav-mheader .et_pb_menu_0_tb_header .et_pb_menu__search-button { order: 3; }
	body.hav-mheader .et_pb_menu_0_tb_header .et_pb_menu__menu,
	body.hav-mheader .et_pb_menu_0_tb_header .mobile_menu_bar { order: 4; }
}

/* ---- 23. Product variation / SKU description -> white text -------------- */
.single-product .woocommerce-variation-description,
.single-product .woocommerce-variation-description p,
.single-product .woocommerce-variation-availability,
.et_pb_wc_add_to_cart .woocommerce-variation-description,
.et_pb_wc_add_to_cart .woocommerce-variation-description * {
	color: #ffffff !important;
}

/* ---- 22. Related / up-sells: hide out-of-stock, force 2 x 2 ------------- */
.et_pb_wc_related_products ul.products li.product.outofstock,
.et_pb_wc_upsells ul.products li.product.outofstock {
	display: none !important;
}
.et_pb_wc_related_products ul.products li.product,
.et_pb_wc_upsells ul.products li.product {
	width: 47% !important;
	margin: 0 6% 6% 0 !important;
	float: left !important;
	clear: none !important;
}
.et_pb_wc_related_products ul.products li.product:nth-child(2n),
.et_pb_wc_upsells ul.products li.product:nth-child(2n) {
	margin-right: 0 !important;
}
.et_pb_wc_related_products ul.products li.product:nth-child(2n+1),
.et_pb_wc_upsells ul.products li.product:nth-child(2n+1) {
	clear: both !important;
}

/* ---- 24 + 25. Wishlist + share tools on the product page --------------- */
.hav-wishlist-bar,
.hav-share-bar { margin: 14px 0; }

.hav-wishlist-bar .yith-wcwl-add-to-wishlist { margin: 0; }
.hav-wishlist-bar a {
	color: #fff !important;
	font-weight: 600;
}

.hav-share-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #2ea3f2;
	color: #fff;
	border: 0;
	border-radius: 6px;
	padding: 9px 16px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}
.hav-share-btn:hover { background: #1f8ad6; }
.hav-share-btn svg { display: block; }

/* Share modal. */
.hav-share-modal {
	position: fixed;
	inset: 0;
	z-index: 100050;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, .6);
	padding: 20px;
}
.hav-share-modal[hidden] { display: none; }
.hav-share-modal__box {
	position: relative;
	width: 100%;
	max-width: 380px;
	background: #fff;
	color: #222;
	border-radius: 10px;
	padding: 24px 22px 18px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
}
.hav-share-modal__close {
	position: absolute;
	top: 10px;
	right: 12px;
	background: none;
	border: 0;
	font-size: 16px;
	color: #888;
	cursor: pointer;
}
.hav-share-modal__close:hover { color: #222; }
.hav-share-modal__title { margin: 0 0 14px; font-size: 17px; font-weight: 700; }

.hav-share-copy { display: flex; gap: 8px; margin-bottom: 16px; }
.hav-share-link {
	flex: 1;
	min-width: 0;
	border: 1px solid #ccc;
	border-radius: 5px;
	padding: 8px 10px;
	font-size: 13px;
	color: #333;
	background: #f7f7f7;
}
.hav-share-copy-btn {
	border: 0;
	border-radius: 5px;
	background: #2ea3f2;
	color: #fff;
	font-weight: 600;
	padding: 0 14px;
	cursor: pointer;
}
.hav-share-copy-btn:hover { background: #1f8ad6; }
.hav-share-copy-btn.is-done { background: #3aab5e; }

.hav-share-icons {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
}
.hav-share-i {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 0;
	cursor: pointer;
	color: #fff;
	text-decoration: none;
	transition: transform .12s ease, opacity .12s ease;
}
.hav-share-i:hover { transform: translateY(-2px); opacity: .9; }
.hav-share-i--twitter   { background: #000; }
.hav-share-i--facebook  { background: #1877f2; }
.hav-share-i--telegram  { background: #29a9eb; }
.hav-share-i--email     { background: #777; }
.hav-share-i--discord   { background: #5865f2; }
.hav-share-i--tiktok    { background: #111; }
.hav-share-i--instagram { background: #e1306c; }
.hav-share-hint { margin: 14px 0 0; font-size: 11px; color: #999; text-align: center; line-height: 1.4; }

/* ---- 26. My Account navigation: full-width rows, black, prominent ------- */
.woocommerce-account .woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li {
	display: block;
	width: 100%;
	margin: 0;
	border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 13px 16px;
	color: #111 !important;
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
	background: rgba(0, 0, 0, .05);
	color: #000 !important;
}
/* Empty-orders / browse-products buttons -> full width & readable. */
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Message,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-info {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
}
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Message .button {
	width: 100%;
	box-sizing: border-box;
	text-align: center;
}

/* ---- 28. Hide shipment "Tracking Information" on the order view (fallback) */
.wc-shipment-tracking-info,
.wc-shipment-tracking,
.wc_shipment_tracking,
.wc-ast-tracking-wrapper,
.ast-tracking-info,
.ast-order-tracking,
.woocommerce-order-tracking,
.wc-order-tracking {
	display: none !important;
}

/* ---- 29. Wishlist page: black text -> white --------------------------- */
body.woocommerce-wishlist .wishlist-title,
body.woocommerce-wishlist .wishlist_table,
body.woocommerce-wishlist .wishlist_table th,
body.woocommerce-wishlist .wishlist_table td,
body.woocommerce-wishlist .wishlist_table a,
body.woocommerce-wishlist .wishlist_table .product-name a,
body.woocommerce-wishlist .wishlist-items-wrapper,
body.woocommerce-wishlist .yith_wcwl_wishlist_footer,
body.woocommerce-wishlist .wishlist-empty,
body.woocommerce-wishlist .cart_list,
body.woocommerce-wishlist .cart_list a,
body.woocommerce-wishlist .widget_shopping_cart,
body.woocommerce-wishlist .widget_shopping_cart *,
body.woocommerce-wishlist .woocommerce-mini-cart__total,
body.woocommerce-wishlist .flexy_breadcrumb,
body.woocommerce-wishlist .flexy_breadcrumb a,
body.woocommerce-wishlist h4.widgettitle {
	color: #ffffff !important;
}
/* Keep the real buttons (View cart / Checkout / Add to cart) on their own
   colours; only the bare links inside the cart total area follow above. */
body.woocommerce-wishlist .wishlist_table .product-price,
body.woocommerce-wishlist .wishlist_table .product-stock-status {
	color: #ffffff !important;
}

/* ---- 31. Order-received (thank-you) page: black text -> white --------- */
body.woocommerce-order-received .woocommerce,
body.woocommerce-order-received .woocommerce p,
body.woocommerce-order-received .woocommerce li,
body.woocommerce-order-received .woocommerce td,
body.woocommerce-order-received .woocommerce th,
body.woocommerce-order-received .woocommerce h2,
body.woocommerce-order-received .woocommerce h3,
body.woocommerce-order-received .woocommerce address,
body.woocommerce-order-received .woocommerce .woocommerce-column__title,
body.woocommerce-order-received .woocommerce-order-overview,
body.woocommerce-order-received .woocommerce-order-overview li {
	color: #ffffff !important;
}
body.woocommerce-order-received .woocommerce a {
	color: #ffe08a !important;
}
body.woocommerce-order-received .woocommerce table.shop_table,
body.woocommerce-order-received .woocommerce table.shop_table th,
body.woocommerce-order-received .woocommerce table.shop_table td {
	border-color: rgba(255, 255, 255, .25) !important;
}

/* ---- 32. My Account order content (view-order etc.) black -> white ----- */
/* Scoped to the CONTENT area only, so the navigation (kept black in #26)
   is not affected. */
body.woocommerce-account .woocommerce-MyAccount-content,
body.woocommerce-account .woocommerce-MyAccount-content p,
body.woocommerce-account .woocommerce-MyAccount-content li,
body.woocommerce-account .woocommerce-MyAccount-content td,
body.woocommerce-account .woocommerce-MyAccount-content th,
body.woocommerce-account .woocommerce-MyAccount-content h1,
body.woocommerce-account .woocommerce-MyAccount-content h2,
body.woocommerce-account .woocommerce-MyAccount-content h3,
body.woocommerce-account .woocommerce-MyAccount-content address,
body.woocommerce-account .woocommerce-MyAccount-content dt,
body.woocommerce-account .woocommerce-MyAccount-content dd,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-column__title,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-order-overview,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-order-overview li {
	color: #ffffff !important;
}
body.woocommerce-account .woocommerce-MyAccount-content a:not(.button) {
	color: #ffe08a !important;
}
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table,
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table th,
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table td {
	border-color: rgba(255, 255, 255, .25) !important;
}
/* Catch every value in the orders table (date <time>, status <mark>, etc.). */
body.woocommerce-account .woocommerce-MyAccount-content table,
body.woocommerce-account .woocommerce-MyAccount-content table th,
body.woocommerce-account .woocommerce-MyAccount-content table td,
body.woocommerce-account .woocommerce-MyAccount-content table time,
body.woocommerce-account .woocommerce-MyAccount-content table mark,
body.woocommerce-account .woocommerce-MyAccount-content table span,
body.woocommerce-account .woocommerce-MyAccount-content table strong,
body.woocommerce-account .woocommerce-MyAccount-content table a:not(.button) {
	color: #ffffff !important;
}

/* ---- Desktop header tweaks (>980px) ----------------------------------- */
@media (min-width: 981px) {
	/* Left-align the nav menu (next to the logo) so adding more items on the
	   right doesn't push them into a collapsed / folded state. */
	.et_pb_menu_0_tb_header .et_pb_menu__menu { text-align: left !important; }
	.et_pb_menu_0_tb_header .et-menu-nav > ul.et-menu {
		float: none !important;
		display: inline-block;
	}

	/* More breathing room between the cart and the account icon. */
	.et_pb_icon_0_tb_header { margin-left: 28px !important; }
}
