/* ======================================================
   Header Wishlist Dropdown (Compare-matched)
   Path: assets/css/header-wishlist.css
====================================================== */

.hdaf-wish {
	position: relative;
	--hdaf-wish-visible: 3;
	--hdaf-wish-widget-text: #111827;
	--hdaf-wish-widget-muted: #64748b;
	--hdaf-wish-widget-btn-bg: #ff6500;
	--hdaf-wish-widget-btn-text: #fff;
}

.hdaf-wish__toggle {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	background: #fff !important;
	border: 1px solid rgba(15, 23, 42, .1);
	border-radius: 14px;
	color: #111827 !important;
	box-shadow: none !important;
	cursor: pointer;
	outline: none;
	transition: border-color .18s ease, transform .18s ease;
}

.hdaf-wish__toggle:hover,
.hdaf-wish__toggle:focus,
.hdaf-wish.is-open .hdaf-wish__toggle {
	background: #fff !important;
	border-color: rgba(255, 101, 0, .32);
	color: #111827 !important;
	transform: translateY(-1px);
}

.hdaf-wish__icon {
	display: block;
	width: 22px;
	height: 22px;
	background: currentColor;
	-webkit-mask: var(--hdaf-wish-ico) center/contain no-repeat;
	mask: var(--hdaf-wish-ico) center/contain no-repeat;
}

.hdaf-wish__count {
	position: absolute;
	top: -7px;
	right: -5px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: #18a34a;
	color: #fff;
	font-size: 11px;
	font-weight: 800;
	line-height: 1;
}

.hdaf-wish__count[hidden] {
	display: none !important;
}

.hdaf-wish__dropdown {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	z-index: 10050;
	width: 384px;
	max-width: calc(100vw - 24px);
	padding: 0;
	background: #fff;
	border: 1px solid rgba(15, 23, 42, .1);
	border-radius: 18px;
	box-shadow: 0 18px 44px rgba(15, 23, 42, .12);
	color: var(--hdaf-wish-widget-text);
	opacity: 0;
	pointer-events: none;
	transform: translateY(8px);
	visibility: hidden;
	transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.hdaf-wish__dropdown::before {
	content: "";
	position: absolute;
	top: -8px;
	right: 18px;
	width: 16px;
	height: 16px;
	background: #fff;
	border-top: 1px solid rgba(15, 23, 42, .1);
	border-left: 1px solid rgba(15, 23, 42, .1);
	transform: rotate(45deg);
}

.hdaf-wish__dropdown::after {
	content: "";
	position: absolute;
	top: -18px;
	right: 0;
	left: 0;
	height: 18px;
	background: transparent;
}

.hdaf-wish.is-open .hdaf-wish__dropdown {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0);
	visibility: visible;
}

.hdaf-wish__head {
	position: relative;
	z-index: 1;
	padding: 18px 18px 16px;
	border-bottom: 1px solid rgba(15, 23, 42, .08);
}

.hdaf-wish__title {
	display: block;
	margin: 0 0 3px;
	font-size: 18px;
	font-weight: 800;
	line-height: 1.2;
	color: var(--hdaf-wish-widget-text);
}

.hdaf-wish__selected {
	display: block;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--hdaf-wish-widget-muted);
}

.hdaf-wish__body {
	padding: 14px 10px 12px;
	max-height: calc((min(var(--hdaf-wish-visible, 3), 3) * 84px) + 24px);
	overflow-y: auto;
	scrollbar-width: thin;
}

.hdaf-wish__body::-webkit-scrollbar {
	width: 6px;
}

.hdaf-wish__body::-webkit-scrollbar-thumb {
	background: rgba(15, 23, 42, .22);
	border-radius: 999px;
}

.hdaf-wish-list {
	display: grid;
	gap: 9px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hdaf-wish-item {
	display: grid;
	grid-template-columns: 60px minmax(0, 1fr) 34px;
	align-items: center;
	gap: 10px;
	min-height: 74px;
	padding: 8px;
	background: #fff;
	border: 1px solid rgba(15, 23, 42, .1);
	border-radius: 13px;
	transition: border-color .16s ease, background-color .16s ease;
}

.hdaf-wish-item:hover {
	border-color: rgba(255, 101, 0, .28);
	background: #fffaf7;
}

.hdaf-wish-item__thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	background: #fff;
	border: 1px solid rgba(15, 23, 42, .08);
	border-radius: 10px;
	overflow: hidden;
}

.hdaf-wish-item__thumb img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}

.hdaf-wish-item__meta {
	min-width: 0;
}

.hdaf-wish-item__title {
	display: -webkit-box;
	max-height: 36px;
	overflow: hidden;
	color: #111827 !important;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.28;
	text-decoration: none !important;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.hdaf-wish-item__title:hover,
.hdaf-wish-item__title:focus {
	color: #ff6500 !important;
	text-decoration: underline !important;
	text-underline-offset: 2px;
}

.hdaf-wish-item__price {
	margin-top: 4px;
	color: #111827;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
}

.hdaf-wish-item__remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	padding: 0;
	background: #fff;
	border: 1px solid rgba(239, 68, 68, .18);
	border-radius: 999px;
	color: #ff4d5e;
	font-size: 20px;
	line-height: 1;
	box-shadow: none !important;
	cursor: pointer;
}

.hdaf-wish-item__remove:hover {
	background: #fff1f2;
	border-color: rgba(239, 68, 68, .32);
}

.hdaf-wish-empty {
	padding: 22px 18px;
	text-align: center;
}

.hdaf-wish-empty[hidden] {
	display: none !important;
}

.hdaf-wish-empty__title {
	margin: 0 0 6px;
	font-size: 15px;
	font-weight: 800;
	color: #111827;
}

.hdaf-wish-empty__text {
	margin: 0;
	color: #64748b;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.5;
}

.hdaf-wish__foot {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	padding: 14px 18px 16px;
	border-top: 1px solid rgba(15, 23, 42, .08);
}

.hdaf-wish__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0 18px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	text-align: center;
	text-decoration: none !important;
	box-shadow: none !important;
	cursor: pointer;
}

.hdaf-wish__btn--view {
	border: 1px solid var(--hdaf-wish-widget-btn-bg) !important;
	background: var(--hdaf-wish-widget-btn-bg) !important;
	color: var(--hdaf-wish-widget-btn-text) !important;
}

.hdaf-wish__btn--view:hover {
	border-color: #e85b00 !important;
	background: #e85b00 !important;
	color: #fff !important;
}

.hdaf-wish__btn--clear {
	border: 2px solid #111 !important;
	background: #fff !important;
	color: #111 !important;
}

.hdaf-wish__btn--clear:hover:not(:disabled) {
	border-color: #ef4444 !important;
	background: #ef4444 !important;
	color: #fff !important;
}

.hdaf-wish__btn:disabled {
	cursor: not-allowed;
	opacity: .55;
}

@media (max-width: 640px) {
	.hdaf-wish__dropdown {
		right: -54px;
		width: min(384px, calc(100vw - 18px));
	}
}


/* Final header wishlist button radius */
.hdaf-wish__toggle {
	border-radius: 8px !important;
}

/* ======================================================
   Patch 3: Premium header widget polish
   Purpose: unify dropdown elevation, focus rings and mobile positioning.
====================================================== */

.hdaf-wish__toggle:hover,
.hdaf-wish__toggle:focus-visible,
.hdaf-wish.is-open .hdaf-wish__toggle{
  box-shadow: 0 0 0 3px rgba(255,101,0,.12) !important;
}
.hdaf-wish__dropdown{
  box-shadow: 0 22px 56px rgba(15,23,42,.14);
}
@media (max-width:640px){
  .hdaf-wish__dropdown{
    position:fixed;
    top:88px;
    right:12px;
    left:12px;
    width:auto;
    max-width:none;
    max-height:calc(100vh - 106px);
    overflow:auto;
  }
  .hdaf-wish__dropdown::before{ display:none; }
}
