/**
 * TVSH Category Carousel
 */

.tvsh-cc {
	--tvsh-cc-radius: 12px;
	--tvsh-cc-border: #e8e8e8;
	--tvsh-cc-name-bg: #fff;
	--tvsh-cc-arrow: #111;
	--tvsh-cc-arrow-bg: #fff;
	max-width: 100%;
	position: relative;
}

.tvsh-cc__swiper {
	position: relative;
	padding: 0 40px;
	overflow: hidden;
}

/**
 * Before Swiper JS runs (and in slow editor preview), keep slides in a horizontal row
 * so the widget does not look like one tall stacked block.
 */
.tvsh-cc__swiper.swiper:not(.swiper-initialized) .swiper-wrapper {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(110px, 1fr);
	gap: var(--tvsh-cc-fallback-gap, 16px);
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scroll-snap-type: x proximity;
	padding-bottom: 4px;
}

.tvsh-cc__swiper.swiper:not(.swiper-initialized) .swiper-slide {
	scroll-snap-align: start;
	min-width: 0;
}

.tvsh-cc__swiper.swiper {
	overflow: visible;
}

.tvsh-cc__card {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	text-decoration: none;
	color: inherit;
	height: 100%;
	border-radius: var(--tvsh-cc-radius);
	border: 1px solid var(--tvsh-cc-border);
	background: var(--tvsh-cc-name-bg);
	overflow: hidden;
	transition: box-shadow 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 0.25s ease;
}

.tvsh-cc__card:hover {
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
	.tvsh-cc__card {
		transition-duration: 0.01ms;
	}

	.tvsh-cc__card:hover {
		transform: none;
	}
}

.tvsh-cc__image {
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
	background: #f5f5f5;
}

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

.tvsh-cc__name {
	display: block;
	padding: 0.65rem 0.75rem;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	color: #111;
}

/* Swiper arrows */
.tvsh-cc .swiper-button-prev,
.tvsh-cc .swiper-button-next {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--tvsh-cc-arrow-bg);
	border: 1px solid rgba(0, 0, 0, 0.12);
	color: var(--tvsh-cc-arrow);
	margin-top: 0;
	top: 42%;
	transform: translateY(-50%);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tvsh-cc .swiper-button-prev:after,
.tvsh-cc .swiper-button-next:after {
	font-size: 14px;
	font-weight: 700;
}

.tvsh-cc .swiper-button-prev {
	left: 0;
}

.tvsh-cc .swiper-button-next {
	right: 0;
}

/* Elementor editor: empty state message */
.tvsh-cc--elementor-placeholder {
	padding: 1rem 1.25rem;
	border: 1px dashed #c3c4c7;
	background: #f6f7f7;
	border-radius: 8px;
	font-size: 13px;
	line-height: 1.5;
	color: #50575e;
	margin: 0;
}

.tvsh-cc--elementor-placeholder p {
	margin: 0;
}

@media (max-width: 767px) {
	.tvsh-cc__swiper {
		padding: 0 32px;
	}

	.tvsh-cc .swiper-button-prev,
	.tvsh-cc .swiper-button-next {
		width: 32px;
		height: 32px;
	}
}
