/**
 * Header Cart icon + hover dropdown styles.
 *
 * @package Kadence_Child
 */

/* Container
-------------------------------------------------------------- */
.kc-header-cart {
	position: relative;
	display: inline-flex;
	align-items: center;
	margin-right: 10px;
}

/* Trigger (link to cart)
-------------------------------------------------------------- */
.kc-header-cart__trigger {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	padding: 0;
	text-decoration: none;
	color: var(--global-palette3, #1A1A2E);
}

.kc-header-cart__icon {
	display: block;
}

/* Badge
-------------------------------------------------------------- */
.kc-header-cart__badge {
	position: absolute;
	top: -4px;
	right: -6px;
	min-width: 14px;
	height: 14px;
	padding: 0 5px;
	border-radius: 9px;
	background: var(--global-palette1, #c569ff);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	line-height: 14px;
	text-align: center;
	display: none;
}

.kc-header-cart__badge.is-visible {
	display: block;
}

/* Dropdown
-------------------------------------------------------------- */
.kc-header-cart__dropdown {
	position: absolute;
	top: 100%;
	right: 0;
	margin-top: 10px;
	width: 320px;
	background: #fff;
	border: 1px solid #E5D7EE;
	border-radius: 16px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
	padding: 16px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
	z-index: 99999;
}

.kc-header-cart:hover .kc-header-cart__dropdown {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* Empty state
-------------------------------------------------------------- */
.kc-header-cart__empty {
	text-align: center;
	color: #9ca3af;
	margin: 8px 0;
	font-size: 14px;
}

/* Items list
-------------------------------------------------------------- */
.kc-header-cart__items {
	list-style: none;
	margin: 0;
	padding: 0;
}

.kc-header-cart__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 0;
}

.kc-header-cart__item + .kc-header-cart__item {
	border-top: 1px solid #f3f0f5;
}

/* Thumbnail */
.kc-header-cart__item-thumb {
	flex-shrink: 0;
	width: 56px;
	height: 56px;
	border-radius: 10px;
	overflow: hidden;
}

.kc-header-cart__item-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Item info */
.kc-header-cart__item-info {
	flex: 1;
	min-width: 0;
}

.kc-header-cart__item-name {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: var(--global-palette3, #1A1A2E);
	text-decoration: none !important;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

a.kc-header-cart__item-name:hover {
	color: var(--global-palette1, #c569ff);
}

.kc-header-cart__item-meta {
	display: block;
	font-size: 12px;
	color: var(--global-palette4, #6B7280);
	margin-top: 2px;
}

/* Price */
.kc-header-cart__item-price {
	flex-shrink: 0;
	font-size: 15px;
	font-weight: 600;
	color: var(--global-palette3, #1A1A2E);
}

/* Footer: total + view cart button
-------------------------------------------------------------- */
.kc-header-cart__footer {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #f3f0f5;
}

.kc-header-cart__total {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
}

.kc-header-cart__total-label {
	font-size: 14px;
	color: var(--global-palette4, #6B7280);
}

.kc-header-cart__total-amount {
	font-size: 18px;
	font-weight: 700;
	color: var(--global-palette3, #1A1A2E);
}

.kc-header-cart__view-btn {
	display: block;
	width: 100%;
	padding: 12px;
	background: var(--global-palette1, #c569ff);
	color: #fff !important;
	text-align: center;
	text-decoration: none !important;
	font-size: 15px;
	font-weight: 600;
	border-radius: 12px;
	transition: background 0.2s;
	box-sizing: border-box;
}

.kc-header-cart__view-btn:hover {
	background: var(--global-palette2, #a347e0);
}

/* Mobile: smaller dropdown */
@media (max-width: 768px) {
	.kc-header-cart__dropdown {
		width: 280px;
		right: -10px;
	}
}
