/* ============================================================
   HBM Image Carousel - Frontend Styles
   Version: 1.0.0
   Author: HBM
   ============================================================ */

/* ── Wrapper ─────────────────────────────────────────────── */
.hbm-carousel-wrapper {
	position: relative;
	width: 100%;
}

.hbm-carousel-wrapper.arrows-outside {
	padding: 0 56px;
}

/* ── Slide inner ─────────────────────────────────────────── */
.hbm-carousel-slide-inner {
	position: relative;
	overflow: hidden;
	display: block;
	width: 100%;
}

.hbm-carousel-slide-inner a {
	display: block;
	text-decoration: none;
}

/* ── Images ──────────────────────────────────────────────── */
.hbm-carousel-slide img {
	display: block;
	width: 100%;
	height: 400px;
	object-fit: cover;
	transition: all 0.3s ease;
}

/* ── Caption overlay ─────────────────────────────────────── */
.hbm-slide-caption {
	position: absolute;
	left: 0;
	right: 0;
	width: 100%;
	padding: 10px 15px;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	font-size: 14px;
	line-height: 1.5;
	text-align: center;
	z-index: 5;
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.hbm-slide-caption.pos-top {
	top: 0;
	bottom: auto;
}

.hbm-slide-caption.pos-center {
	top: 50%;
	transform: translateY(-50%);
	bottom: auto;
}

.hbm-slide-caption.pos-bottom {
	bottom: 0;
	top: auto;
}

/* Hover caption — hidden by default, shown on hover */
.hbm-slide-caption.caption-hover {
	opacity: 0;
	transform: translateY(8px);
}

.hbm-slide-caption.pos-top.caption-hover {
	transform: translateY(-8px);
}

.hbm-carousel-slide-inner:hover .hbm-slide-caption.caption-hover {
	opacity: 1;
	transform: translateY(0);
}

/* Always-visible caption */
.hbm-slide-caption.caption-always {
	opacity: 1;
}

/* ── Arrows ──────────────────────────────────────────────── */
.hbm-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
	cursor: pointer;
	transition: background 0.25s ease, transform 0.25s ease;
	outline: none;
	padding: 0;
}

.hbm-arrow:hover {
	background: rgba(0, 0, 0, 0.85);
	transform: translateY(-50%) scale(1.05);
}

.hbm-arrow:focus-visible {
	outline: 3px solid #007bff;
	outline-offset: 2px;
}

.hbm-arrow svg {
	pointer-events: none;
}

/* Inside positioning */
.hbm-carousel-wrapper:not(.arrows-outside) .hbm-arrow-prev {
	left: 12px;
}

.hbm-carousel-wrapper:not(.arrows-outside) .hbm-arrow-next {
	right: 12px;
}

/* Outside positioning */
.hbm-carousel-wrapper.arrows-outside .hbm-arrow-prev {
	left: 0;
}

.hbm-carousel-wrapper.arrows-outside .hbm-arrow-next {
	right: 0;
}

/* Center / Overlay positioning */
.hbm-carousel-wrapper.arrows-center .hbm-arrow-prev {
	left: 12px;
}
.hbm-carousel-wrapper.arrows-center .hbm-arrow-next {
	right: 12px;
}

/* Arrow hidden state */
.hbm-arrow.swiper-button-disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.hbm-arrow.swiper-button-hidden {
	display: none;
}

/* ── Pagination ──────────────────────────────────────────── */
.swiper-pagination {
	position: relative !important;
	bottom: auto !important;
	left: auto !important;
	width: 100% !important;
	margin-top: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
}

.swiper-pagination-bullet {
	width: 10px;
	height: 10px;
	background: #ccc;
	opacity: 1;
	border-radius: 50%;
	margin: 0 4px !important;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.swiper-pagination-bullet-active {
	background: #000;
	transform: scale(1.2);
}

/* Fraction / Progressbar */
.swiper-pagination-fraction {
	font-size: 14px;
	color: #555;
}

.swiper-pagination-progressbar {
	height: 4px !important;
	border-radius: 2px;
}

.swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
	background: #000;
}

/* ── Scrollbar ───────────────────────────────────────────── */
.swiper-scrollbar {
	margin-top: 10px;
	position: relative !important;
	bottom: auto !important;
	height: 4px !important;
	border-radius: 2px;
	background: #e0e0e0;
}

.swiper-scrollbar-drag {
	background: #555;
	border-radius: 2px;
}

/* ── Lazy load preloader ─────────────────────────────────── */
.swiper-lazy-preloader {
	width: 42px;
	height: 42px;
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	border: 3px solid #e0e0e0;
	border-top-color: #888;
	border-radius: 50%;
	animation: hbm-spin 0.8s linear infinite;
}

@keyframes hbm-spin {
	to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ── Coverflow effect ────────────────────────────────────── */
.swiper-slide-shadow-left,
.swiper-slide-shadow-right {
	background-image: none !important;
}

/* ── Editor preview (inside Elementor editor only) ──────── */
.hbm-editor-preview {
	display: flex;
	gap: 10px;
	overflow: hidden;
	padding: 4px;
}

.hbm-editor-thumb {
	flex: 1;
	min-width: 100px;
	position: relative;
}

.hbm-editor-caption {
	display: block;
	font-size: 11px;
	text-align: center;
	margin-top: 4px;
	color: #555;
}

.hbm-editor-note {
	text-align: center;
	font-size: 11px;
	color: #888;
	margin-top: 6px;
}

/* ── Responsive helpers ──────────────────────────────────── */
@media (max-width: 1024px) {
	.hbm-carousel-slide img {
		height: 300px;
	}
}

@media (max-width: 767px) {
	.hbm-carousel-slide img {
		height: 200px;
	}

	.hbm-carousel-wrapper.arrows-outside {
		padding: 0 44px;
	}

	.hbm-arrow {
		width: 36px;
		height: 36px;
	}
}
