/**
 * HivePress WooCommerce Breadcrumbs Styles
 * Автор: smalta.net
 */

/* ===================================
   Контейнер breadcrumbs
   =================================== */

.hpwc-breadcrumbs-wrapper {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
}

.hpwc-breadcrumbs-left {
	flex: 1 1 auto;
	min-width: 0;
}

.hpwc-breadcrumbs-right {
	flex: 0 0 auto;
}

/* ===================================
   Стили breadcrumbs (из titlebar-shop.php)
   =================================== */

.titlebar-shop-container .woocommerce-breadcrumb {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	opacity: .85;
	background: #f2f2f2 !important;
	padding: 10px 15px !important;
	border-radius: 10px !important;
}

.titlebar-shop-container .woocommerce-breadcrumb a {
	text-decoration: underline;
	color: #3e4655;
	transition: color 0.2s ease;
}

.titlebar-shop-container .woocommerce-breadcrumb a:hover {
	text-decoration: none;
	color: #767676;
}

.titlebar-shop-container .woocommerce-breadcrumb a:first-child,
.titlebar-shop-container .woocommerce-breadcrumb > span:first-child {
	position: relative;
	padding-left: 20px;
}

.titlebar-shop-container .woocommerce-breadcrumb a:first-child::before,
.titlebar-shop-container .woocommerce-breadcrumb > span:first-child::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: 14px;
	height: 14px;
	transform: translateY(-50%);
	background-repeat: no-repeat;
	background-size: 14px 14px;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23222' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 10.5L12 3l9 7.5'/><path d='M5 10v10h14V10'/><path d='M9 21V14h6v7'/></svg>");
}

/* ===================================
   Виджет корзины
   =================================== */

.hpwc-cart-widget {
	display: inline-flex;
	align-items: center;
	background: #f2f2f2;
	padding: 10px 15px;
	border-radius: 10px;
	transition: all 0.3s ease;
}

.hpwc-cart-widget:hover {
	background: #e8e8e8;
}

.hpwc-cart-widget__link {
	display: flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	color: #3e4655;
	font-size: 14px;
	line-height: 1.6;
	position: relative;
}

.hpwc-cart-widget__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

.hpwc-cart-widget__icon svg {
	display: block;
	color: #3e4655;
	transition: color 0.2s ease;
}

.hpwc-cart-widget__link:hover .hpwc-cart-widget__icon svg {
	color: #767676;
}

.hpwc-cart-widget__badge {
	position: absolute;
	top: -8px;
	right: -8px;
	background: #e74c3c;
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
	padding: 3px 5px;
	border-radius: 10px;
	min-width: 18px;
	text-align: center;
	animation: hpwc-badge-pulse 0.3s ease;
}

@keyframes hpwc-badge-pulse {
	0% {
		transform: scale(0.8);
	}
	50% {
		transform: scale(1.1);
	}
	100% {
		transform: scale(1);
	}
}

.hpwc-cart-widget__total {
	font-size: 14px;
	color: #3e4655;
	white-space: nowrap;
	transition: color 0.2s ease;
}

.hpwc-cart-widget__link:hover .hpwc-cart-widget__total {
	color: #767676;
}

/* Пустая корзина */
.hpwc-cart-widget--empty {
	opacity: 0.7;
}

.hpwc-cart-widget--empty:hover {
	opacity: 1;
}

/* ===================================
   Счётчик продавцов (справочник)
   =================================== */

.hpwc-vendor-counter {
	display: inline-block;
	background: #f2f2f2;
	padding: 10px 15px;
	border-radius: 10px;
	font-size: 14px;
	line-height: 1.6;
	color: #3e4655;
}

.hpwc-vendor-counter__today {
	vertical-align: super;
	font-size: 0.75em;
	color: #27ae60;
	font-weight: 600;
	margin-left: 2px;
}

/* Обёртка breadcrumbs + счётчик справочника */
.directory-breadcrumb-wrapper {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	flex-wrap: nowrap;
}

.directory-breadcrumb-left {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
}

/* Хлебные крошки: обрезка с эффектом «уходит в пустоту» — исчезает только текст, фон целый */
.directory-breadcrumb-left .directory-breadcrumb {
	overflow: hidden;
	white-space: nowrap;
	position: relative;
}
.directory-breadcrumb-left .directory-breadcrumb::after {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 195px; /* 80px + ~3 см — текст исчезает раньше */
	background: linear-gradient(to right, transparent, #f2f2f2);
	pointer-events: none;
}

.directory-breadcrumb-right {
	flex: 0 0 auto;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

/* ===================================
   Счётчик объявлений (Маркетплейс)
   =================================== */

.hpwc-listing-counter {
	display: inline-block;
	background: #f2f2f2;
	padding: 10px 15px;
	border-radius: 10px;
	font-size: 14px;
	line-height: 1.6;
	color: #3e4655;
}

.hpwc-listing-counter__today {
	vertical-align: super;
	font-size: 0.75em;
	color: #27ae60;
	font-weight: 600;
	margin-left: 2px;
}

/* Обёртка breadcrumbs + счётчик Маркетплейса */
.marketplace-breadcrumb-wrapper {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
}

.marketplace-breadcrumb-left {
	flex: 1 1 auto;
	min-width: 0;
}

.marketplace-breadcrumb-right {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

/* ===================================
   Адаптивность
   =================================== */

@media (max-width: 768px) {
	.hpwc-breadcrumbs-wrapper,
	.directory-breadcrumb-wrapper,
	.marketplace-breadcrumb-wrapper {
		flex-direction: column;
		flex-wrap: wrap;
		align-items: stretch;
		gap: 10px;
	}

	.hpwc-breadcrumbs-left,
	.hpwc-breadcrumbs-right,
	.directory-breadcrumb-left,
	.directory-breadcrumb-right,
	.marketplace-breadcrumb-left,
	.marketplace-breadcrumb-right {
		flex: 1 1 auto;
	}

	/* На мобильных убираем градиент и overflow — крошки могут переноситься */
	.directory-breadcrumb-left {
		overflow: visible;
	}
	.directory-breadcrumb-left .directory-breadcrumb {
		overflow: visible;
		white-space: normal;
	}
	.directory-breadcrumb-left .directory-breadcrumb::after {
		display: none;
	}

	.hpwc-cart-widget,
	.hpwc-vendor-counter,
	.hpwc-listing-counter {
		width: 100%;
		justify-content: center;
	}

	.titlebar-shop-container .woocommerce-breadcrumb {
		font-size: 13px;
		padding: 8px 12px !important;
	}

	.hpwc-cart-widget__total {
		font-size: 13px;
	}
}

@media (max-width: 480px) {
	.hpwc-cart-widget__total {
		font-size: 12px;
	}

	.titlebar-shop-container .woocommerce-breadcrumb {
		font-size: 12px;
	}
}
