/* ==========================================================================
   Homepage — front-page.php styles
   ========================================================================== */

/* ── Variables ────────────────────────────────────────────────────────────── */
:root {
	--hp-brand:      #7c3aed;
	--hp-brand-dk:   #5b21b6;
	--hp-brand-lt:   #f3effe;
	--hp-brand-mid:  #c4b5fd;
	--hp-coral:      #fb923c;
	--hp-ink:        #2c2438;
	--hp-muted:      #6b5e7e;
	--hp-line:       #ede8f5;
	--hp-panel:      #ffffff;
	--hp-bg:         #faf8ff;
	--hp-radius-md:  22px;
	--hp-radius-sm:  12px;
	--hp-radius-pill:50px;
	--hp-gap:        16px;
	--hp-shadow-soft:0 2px 12px rgba(124,58,237,.08);
	--hp-shadow-lift:0 8px 28px rgba(124,58,237,.18);
}

/* ── Layout ───────────────────────────────────────────────────────────────── */
.hp-main {
	background: var(--hp-bg);
}

.hp-hero {
	display: flex;
	flex-direction: column;
	gap: var(--hp-gap);
	width: 100%;
	margin: 0;
	padding: 12px 16px;
	box-sizing: border-box;
}

@media (min-width: 1024px) {
	.hp-hero {
		flex-direction: row;
		align-items: flex-start;
		/* 150px side padding on desktop only — keeps the homepage content
		   inset from the edges. Mobile keeps its compact 16px padding. */
		padding: 12px 150px;
		gap: 20px;
	}
}

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.hp-sidebar {
	width: 100%;
	background: var(--hp-panel);
	border-radius: var(--hp-radius-md);
	border: 1.5px solid var(--hp-line);
	padding: 12px 0;
	box-shadow: var(--hp-shadow-soft);
}

@media (min-width: 1024px) {
	.hp-sidebar {
		width: 220px;
		flex-shrink: 0;
		position: sticky;
		top: 88px;
	}
}

/* Mobile: category/links sidebar is hidden — same items are reachable via
   the hamburger menu, and it pushed the hero/products too far down. */
@media (max-width: 767px) {
	.hp-sidebar {
		display: none !important;
	}
}

/* Sidebar nav */
.hp-sidebar-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.hp-sidebar-item {
	margin: 0;
}

.hp-sidebar-link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 18px;
	font-size: 14px;
	font-weight: 600;
	color: var(--hp-ink);
	border-radius: 0;
	transition: background .13s, color .13s;
	text-decoration: none;
}

.hp-sidebar-link:hover,
.hp-sidebar-item.is-active .hp-sidebar-link {
	background: var(--hp-brand-lt);
	color: var(--hp-brand);
}

/* Storefront draws a purple outline on plain :focus, which shows on mouse click.
   Drop it for pointer clicks, but keep a visible ring for keyboard users (a11y). */
.hp-sidebar-link:focus {
	outline: none;
}

.hp-sidebar-link:focus-visible {
	outline: 2px solid var(--hp-brand);
	outline-offset: 1px;
}

.hp-sidebar-icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--hp-brand);
}

.hp-sidebar-icon img {
	width: 28px;
	height: 28px;
}

/* Divider */
.hp-sidebar-divider {
	height: 1px;
	background: var(--hp-line);
	margin: 8px 18px;
}

/* Sidebar cards */
.hp-sidebar-blocks {
	padding: 4px 0;
}

.hp-sidebar-card {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 18px;
	text-decoration: none;
	transition: background .13s;
}

.hp-sidebar-card:hover {
	background: var(--hp-brand-lt);
}

.hp-sidebar-card-badge {
	width: 36px;
	height: 36px;
	flex-shrink: 0;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 800;
	color: #fff;
}

.hp-sidebar-card-body {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.hp-sidebar-card-title {
	font-size: 13px;
	font-weight: 700;
	color: var(--hp-ink);
}

.hp-sidebar-card-desc {
	font-size: 11.5px;
	color: var(--hp-muted);
}

/* Sidebar extra widget area */
.hp-sidebar-extra {
	padding: 8px 0 4px;
}

.hp-sidebar-widget {
	padding: 8px 18px;
}

/* ── Main content ─────────────────────────────────────────────────────────── */
.hp-content {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

/* ── Banners ──────────────────────────────────────────────────────────────── */
.hp-banners {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}

@media (min-width: 700px) {
	.hp-banners {
		grid-template-columns: repeat(3, 1fr);
	}
}

.hp-banner {
	display: block;
	border-radius: 14px;
	overflow: hidden;
	aspect-ratio: 3 / 2;
	box-shadow: var(--hp-shadow-soft);
	transition: transform .2s, box-shadow .2s;
}

.hp-banner:hover {
	transform: translateY(-3px);
	box-shadow: var(--hp-shadow-lift);
}

.hp-banner img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ── Banner slider (mobile only) ─────────────────────────────────────────── */
@media (max-width: 699px) {
	.hp-banners[data-slider] {
		position: relative;
		display: block;
	}

	.hp-banners[data-slider] .hp-banner {
		display: none;
	}

	.hp-banners[data-slider] .hp-banner.is-active {
		display: block;
	}

	.hp-banner-arrow {
		position: absolute;
		top: 50%;
		transform: translateY(-50%);
		width: 44px !important;
		height: 44px !important;
		border-radius: 50% !important;
		background: #fff !important;
		background-color: #fff !important;
		border: none !important;
		box-shadow: 0 4px 16px rgba(0, 0, 0, .15);
		color: #1a1a1a !important;
		padding: 0 !important;
		display: flex;
		align-items: center;
		justify-content: center;
		cursor: pointer;
		transition: box-shadow .14s;
		z-index: 4;
	}

	.hp-banner-prev { left: 12px; }
	.hp-banner-next { right: 12px; }

	.hp-banner-arrow:hover {
		box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
	}
}

@media (min-width: 700px) {
	.hp-banner-arrow {
		display: none !important;
	}
}

/* ── Trust strip ──────────────────────────────────────────────────────────── */
.hp-trust-strip {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.hp-trust-item {
	flex: 1 1 0;
	min-width: 140px;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	background: #fff;
	border: 1.5px solid var(--hp-line);
	border-radius: var(--hp-radius-pill);
	font-size: 12.5px;
	font-weight: 600;
	color: var(--hp-ink);
	line-height: 1.3;
}

.hp-trust-icon {
	font-size: 18px;
	flex-shrink: 0;
	line-height: 1;
}

/* ── Section head ─────────────────────────────────────────────────────────── */
.hp-section-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}

.hp-section-title {
	font-size: clamp(18px, 2vw, 24px);
	font-weight: 800;
	color: var(--hp-ink);
	margin: 0;
}

.hp-section-subtitle {
	font-size: 13.5px;
	color: var(--hp-muted);
	margin: 4px 0 0;
}

.hp-view-all {
	flex-shrink: 0;
	padding: 8px 18px;
	border-radius: var(--hp-radius-pill);
	border: 1.5px solid var(--hp-brand-mid);
	font-size: 13px;
	font-weight: 700;
	color: var(--hp-brand);
	text-decoration: none;
	transition: background .14s, border-color .14s;
}

.hp-view-all:hover {
	background: var(--hp-brand-lt);
	border-color: var(--hp-brand);
}

/* ── Product slider ───────────────────────────────────────────────────────── */
.hp-section {
	background: var(--hp-panel);
	border-radius: var(--hp-radius-md);
	border: 1.5px solid var(--hp-line);
	padding: 20px;
	box-shadow: var(--hp-shadow-soft);
}

.hp-slider-wrap {
	position: relative;
	display: flex;
	align-items: center;
}

.hp-slider-track {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
	width: 100%;
	overflow: hidden;
}

@media (max-width: 860px) {
	.hp-slider-track {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Product card */
.hp-product-card {
	display: flex;
	flex-direction: column;
	background: var(--hp-panel);
	border: 1.5px solid var(--hp-line);
	border-radius: var(--hp-radius-md);
	overflow: hidden;
	transition: transform .15s, box-shadow .15s, border-color .15s;
}

.hp-product-card:hover {
	transform: translateY(-5px);
	box-shadow: var(--hp-shadow-lift);
	border-color: transparent;
}

.hp-product-card-link {
	text-decoration: none;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.hp-product-img-wrap {
	position: relative;
	background: var(--hp-brand-lt);
	aspect-ratio: 1;
	overflow: hidden;
}

.hp-product-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .3s;
}

.hp-product-card:hover .hp-product-img {
	transform: scale(1.04);
}

.hp-product-badge {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 2;
	padding: 3px 8px;
	border-radius: var(--hp-radius-pill);
	font-size: 11px;
	font-weight: 800;
	color: #fff;
}

.hp-product-badge--sale {
	background: #ef4444;
}

.hp-product-body {
	padding: 12px 14px 10px;
	display: flex;
	flex-direction: column;
	gap: 5px;
	flex: 1;
}

.hp-product-cat {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--hp-brand);
}

.hp-product-name {
	font-size: 13.5px;
	font-weight: 700;
	color: var(--hp-ink);
	margin: 0;
	line-height: 1.35;
}

.hp-product-rating {
	display: flex;
	align-items: center;
	gap: 4px;
}

.hp-stars {
	display: flex;
	gap: 1px;
}

.hp-star {
	font-size: 14px;
	line-height: 1;
}

.hp-star--full  { color: #f59e0b; }
.hp-star--half  { color: #f59e0b; opacity: .5; }
.hp-star--empty { color: #d1c4e9; }

.hp-rating-score {
	font-size: 12px;
	font-weight: 700;
	color: var(--hp-ink);
}

.hp-rating-count {
	font-size: 12px;
	color: var(--hp-muted);
}

.hp-product-price {
	display: flex;
	align-items: baseline;
	gap: 6px;
	margin-top: auto;
	padding-top: 4px;
}

.hp-price-now {
	font-size: 16px;
	font-weight: 800;
	color: var(--hp-ink);
}

.hp-price-was {
	font-size: 12px;
	color: var(--hp-muted);
	text-decoration: line-through;
}

.hp-product-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 10px 14px;
	background: var(--hp-brand);
	color: #fff;
	font-size: 13px;
	font-weight: 800;
	border-radius: var(--hp-radius-pill);
	margin: 0 14px 14px;
	text-decoration: none;
	transition: background .14s, transform .12s;
}

/* "Do košíku" rendered as <button> for AJAX add-to-cart — reset native button chrome
   and Elementor kit's `.elementor-kit-* button{}` defaults (Roboto, 18px, 10px radius,
   kit accent color) so it matches the <a> variant used for "Vybrat model". */
.hp-product-btn--ajax {
	appearance: none;
	-webkit-appearance: none;
	border: none;
	cursor: pointer;
	position: relative;
	background: var(--hp-brand) !important;
	color: #fff !important;
	font-family: inherit !important;
	font-size: 13px !important;
	font-weight: 800 !important;
	border-radius: var(--hp-radius-pill) !important;
}

.hp-product-btn--ajax.loading {
	color: transparent;
	pointer-events: none;
}

/* WC core's add-to-cart.js inserts a "Zobrazit košík" link after the button on
   added_to_cart — the popup already covers this, so hide the extra link. */
.hp-product-card .added_to_cart {
	display: none !important;
}

.hp-product-btn--ajax.loading::after {
	content: "";
	position: absolute;
	width: 16px;
	height: 16px;
	top: 50%;
	left: 50%;
	margin: -8px 0 0 -8px;
	border: 2px solid rgba(255, 255, 255, .4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: hp-btn-spin .6s linear infinite;
}

@keyframes hp-btn-spin {
	to { transform: rotate(360deg); }
}

.hp-product-btn:hover {
	background: var(--hp-brand-dk);
	transform: translateY(-1px);
}

/* Slider arrows — !important guards override Storefront's button{border-radius:0} */
.hp-slider-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 52px !important;
	height: 52px !important;
	border-radius: 50% !important;
	background: #fff !important;
	background-color: #fff !important;
	border: none !important;
	box-shadow: 0 4px 24px rgba(0, 0, 0, .12);
	color: #1a1a1a !important;
	padding: 0 !important;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: box-shadow .14s, color .14s;
	z-index: 4;
}

.hp-slider-prev { left: -26px; }
.hp-slider-next { right: -26px; }

.hp-slider-arrow:hover {
	box-shadow: 0 6px 28px rgba(0, 0, 0, .18);
}

.hp-slider-arrow:disabled {
	opacity: .3;
	cursor: default;
	pointer-events: none;
}

/* ── Category grid ────────────────────────────────────────────────────────── */
.hp-cat-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
}

@media (min-width: 700px) {
	.hp-cat-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

.hp-cat-tile {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 14px;
	background: #fff;
	border: 1.5px solid var(--hp-line);
	border-radius: 14px;
	padding: 10px 16px 10px 10px;
	text-decoration: none;
	color: var(--hp-ink);
	box-shadow: var(--hp-shadow-soft);
	transition: transform .2s, box-shadow .2s, border-color .15s;
}

.hp-cat-tile:hover {
	transform: translateY(-2px);
	box-shadow: var(--hp-shadow-lift);
	border-color: var(--hp-brand-mid);
}

.hp-cat-tile-icon {
	width: 54px;
	height: 54px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	overflow: hidden;
	background: var(--hp-brand-lt);
}

.hp-cat-tile-icon img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hp-cat-tile-label {
	font-weight: 700;
	font-size: 14px;
	line-height: 1.3;
}
