/**
 * Hubavineshta.bg – Last Pieces frontend styles
 * Aligned with Elementor Kit 205509 + loop template 215243.
 */

.hn-lp,
.hn-lp-hub,
.hn-lp-grid-wrap {
	--hn-lp-primary: var(--e-global-color-primary, #f7df1d);
	--hn-lp-secondary: var(--e-global-color-secondary, #75c32c);
	--hn-lp-text: var(--e-global-color-text, #000000);
	--hn-lp-muted: var(--e-global-color-1de4cdc5, #545454);
	--hn-lp-surface: var(--e-global-color-accent, #ffffff);
	--hn-lp-bg: var(--e-global-color-782aa56, #f5f5f5);
	--hn-lp-border: #dcdcdc;
	--hn-lp-font-heading: var(--e-global-typography-primary-font-family, "Montserrat Alternates"), sans-serif;
	--hn-lp-font-body: var(--e-global-typography-text-font-family, "Roboto"), sans-serif;
	--hn-lp-radius-card: 8px;
	--hn-lp-radius-pill: 50px;
	--hn-lp-radius-btn: 4px;
	color: var(--hn-lp-text);
	font-family: var(--hn-lp-font-body);
}

/* ── Badges (distinct from green „Намаление!“ → brand yellow) ── */

.hn-lp-badge {
	display: inline-block;
	margin: 0;
	padding: 0 12px;
	border-radius: var(--hn-lp-radius-pill);
	background: var(--hn-lp-primary);
	color: var(--hn-lp-text);
	font-family: var(--hn-lp-font-heading);
	font-size: 12px;
	font-weight: 700;
	line-height: 2;
	text-transform: none;
	white-space: nowrap;
}

.hn-lp-badge--single {
	display: inline-block;
	margin: 0 0 12px;
}

.woocommerce .hn-lp-badge,
.woocommerce ul.products li.product .hn-lp-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	right: auto;
	z-index: 2;
	min-height: unset;
}

/* ── Hub page ── */

.hn-lp-hub {
	margin: 0 auto 48px;
	max-width: 1200px;
	padding: 0 16px;
}

.hn-lp-hub__title {
	margin: 0 0 8px;
	font-family: var(--hn-lp-font-heading);
	font-size: clamp(1.5rem, 2.5vw, 2rem);
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	color: var(--hn-lp-text);
}

.hn-lp-hub__subtitle {
	margin: 0 0 32px;
	font-size: 1rem;
	line-height: 1.5;
	text-align: center;
	color: var(--hn-lp-muted);
}

.hn-lp-hub__choices {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 16px;
	margin-bottom: 40px;
}

.hn-lp-hub__choice {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 120px;
	padding: 24px 20px;
	border: 2px solid var(--hn-lp-secondary);
	border-radius: var(--hn-lp-radius-card);
	background: var(--hn-lp-surface);
	text-align: center;
	text-decoration: none;
	color: var(--hn-lp-text);
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.hn-lp-hub__choice:hover,
.hn-lp-hub__choice:focus {
	background: var(--hn-lp-secondary);
	border-color: var(--hn-lp-secondary);
	color: var(--hn-lp-surface);
	transform: translateY(-2px);
}

.hn-lp-hub__choice-title {
	font-family: var(--hn-lp-font-heading);
	font-size: 1.125rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.hn-lp-hub__choice-desc {
	font-size: 0.875rem;
	font-weight: 500;
	opacity: 0.85;
}

.hn-lp-section {
	margin-bottom: 56px;
	padding-top: 8px;
	scroll-margin-top: 110px;
}

.hn-lp-section + .hn-lp-section {
	border-top: 1px solid var(--hn-lp-border);
	padding-top: 40px;
}

/* ── Section headings ── */

.hn-lp-grid__title {
	margin: 0 0 20px;
	font-family: var(--hn-lp-font-heading);
	font-size: 1.25rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--hn-lp-muted);
	text-align: center;
}

/* ── Size filter (matches .hb-loop-size-box) ── */

.hn-lp-size-filter {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-bottom: 28px;
}

.hn-lp-size-filter__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 32px;
	padding: 0 12px;
	border: 1px solid var(--hn-lp-border);
	border-radius: var(--hn-lp-radius-btn);
	background: var(--hn-lp-surface);
	color: var(--hn-lp-text);
	font-family: var(--hn-lp-font-body);
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.hn-lp-size-filter__btn:hover {
	border-color: var(--hn-lp-secondary);
	color: var(--hn-lp-secondary);
}

.hn-lp-size-filter__btn.is-active {
	border-color: var(--hn-lp-text);
	background: var(--hn-lp-text);
	color: var(--hn-lp-surface);
	box-shadow: 0 0 0 2px var(--hn-lp-text);
}

.hn-lp-size-filter__btn.is-active:hover {
	border-color: var(--hn-lp-text);
	color: var(--hn-lp-surface);
}

/* ── Product grid (matches Elementor loop 215243) ── */

.hn-lp-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 10px;
}

.hn-lp-grid.is-loading {
	opacity: 0.55;
	pointer-events: none;
}

.hn-lp-card {
	overflow: hidden;
	border-radius: var(--hn-lp-radius-card);
	background: var(--hn-lp-surface);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.hn-lp-card:hover {
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

.hn-lp-card__media-link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.hn-lp-card__image {
	position: relative;
	overflow: hidden;
	background: var(--hn-lp-bg);
}

.hn-lp-card__image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.hn-lp-card__image .hn-lp-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	left: auto;
}

.hn-lp-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 8px;
	padding: 8px 8px 20px;
	text-align: center;
}

.hn-lp-card__title {
	margin: 0;
	font-family: var(--hn-lp-font-heading);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.35;
	text-transform: uppercase;
	color: var(--hn-lp-muted);
}

.hn-lp-card__title a {
	color: inherit;
	text-decoration: none;
}

.hn-lp-card__title a:hover {
	color: var(--hn-lp-secondary);
}

.hn-lp-card__price {
	font-family: var(--hn-lp-font-heading);
	font-size: 14px;
	font-weight: 600;
	color: var(--hn-lp-text);
}

.hn-lp-card__price .amount,
.hn-lp-card__price ins {
	color: var(--hn-lp-secondary);
	text-decoration: none;
}

.hn-lp-card__price del {
	opacity: 0.55;
	font-size: 13px;
}

.hn-lp-card__purchase {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: auto;
	padding-top: 4px;
}

.hn-lp-card__size {
	width: 100%;
	height: 36px;
	padding: 0 10px;
	border: 1px solid var(--hn-lp-border);
	border-radius: var(--hn-lp-radius-btn);
	background: var(--hn-lp-surface);
	color: var(--hn-lp-text);
	font-family: var(--hn-lp-font-body);
	font-size: 14px;
	font-weight: 500;
}

.hn-lp-card__size:focus {
	border-color: var(--hn-lp-secondary);
	outline: none;
	box-shadow: 0 0 0 2px rgba(117, 195, 44, 0.25);
}

.hn-lp-card__buy {
	width: 100%;
	padding: 8px 16px;
	border: 1px solid var(--hn-lp-secondary);
	border-radius: var(--hn-lp-radius-btn);
	background: var(--hn-lp-surface);
	color: var(--hn-lp-secondary);
	font-family: var(--hn-lp-font-heading);
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.hn-lp-card__buy:hover:not(:disabled),
.hn-lp-card__buy:focus:not(:disabled) {
	background: var(--hn-lp-secondary);
	border-color: var(--hn-lp-secondary);
	color: var(--hn-lp-surface);
}

.hn-lp-card__buy:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.hn-lp-card__buy.is-loading {
	opacity: 0.7;
}

.hn-lp-card__message {
	margin: 0;
	font-size: 12px;
	line-height: 1.35;
}

.hn-lp-card__message.is-success {
	color: var(--hn-lp-secondary);
}

.hn-lp-card__message.is-error {
	color: #cf2e2e;
}

.hn-lp-empty {
	grid-column: 1 / -1;
	margin: 0;
	padding: 32px 16px;
	border-radius: var(--hn-lp-radius-card);
	background: var(--hn-lp-bg);
	font-size: 1rem;
	text-align: center;
	color: var(--hn-lp-muted);
}

/* ── Responsive ── */

@media (max-width: 767px) {
	.hn-lp-hub {
		padding: 0 10px;
	}

	.hn-lp-hub__choices {
		grid-template-columns: 1fr;
	}

	.hn-lp-size-filter {
		flex-wrap: nowrap;
		justify-content: flex-start;
		overflow-x: auto;
		padding-bottom: 6px;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
	}

	.hn-lp-size-filter::-webkit-scrollbar {
		height: 4px;
	}

	.hn-lp-size-filter::-webkit-scrollbar-thumb {
		border-radius: 10px;
		background: #ccc;
	}

	.hn-lp-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}

	.hn-lp-card__title {
		font-size: 14px;
	}
}

@media (min-width: 1025px) {
	.hn-lp-grid {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
}

@media (min-width: 768px) and (max-width: 1024px) {
	.hn-lp-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}
