.tf-gallery {
	box-sizing: border-box;
}
.tf-gallery * {
	box-sizing: border-box;
}

/* ---------- شبکه‌ای ---------- */
.tf-gallery-grid .tf-gallery-items {
	display: grid;
	grid-template-columns: repeat(var(--tf-columns-desktop, 4), 1fr);
	gap: var(--tf-gutter, 10px);
	list-style: none;
	margin: 0;
	padding: 0;
}
@media (max-width: 600px) {
	.tf-gallery-grid .tf-gallery-items {
		grid-template-columns: repeat(var(--tf-columns-mobile, 2), 1fr);
	}
}
.tf-gallery-item {
	overflow: hidden;
	border-radius: var(--tf-radius, 12px);
	box-shadow: var(--tf-shadow, none);
	width: 100%;
	max-width: var(--tf-item-max-width-desktop, none);
	height: var(--tf-item-height-desktop, auto);
	margin: 0 auto;
	border: var(--tf-frame-width, 0px) solid var(--tf-frame-color, transparent);
}
@media (max-width: 600px) {
	.tf-gallery-item {
		max-width: var(--tf-item-max-width-mobile, none);
		height: var(--tf-item-height-mobile, auto);
	}
}
.tf-gallery-link {
	display: block;
	line-height: 0;
	position: relative;
	width: 100%;
	height: 100%;
}
.tf-gallery-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	display: block;
	transition: transform .35s ease, opacity .35s ease;
}

.tf-hover-zoom .tf-gallery-link:hover .tf-gallery-img {
	transform: scale(1.06);
}
.tf-hover-transparent .tf-gallery-link:hover .tf-gallery-img {
	opacity: .82;
}

.tf-theme-dark .tf-gallery-item {
	background: #1b1b1b;
}
.tf-theme-light .tf-gallery-item {
	background: #f4f4f4;
}

.tf-gallery-item[hidden] {
	display: none;
}

.tf-gallery-pagination {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 16px;
	flex-wrap: wrap;
}
.tf-gallery-pagination button {
	border: none;
	background: rgba(0,0,0,.08);
	cursor: pointer;
	border-radius: 6px;
	padding: 6px 12px;
	font-size: 14px;
}
.tf-gallery-pagination button.is-active {
	background: #2271b1;
	color: #fff;
}
.tf-gallery-pagination.tf-pagination-dots button {
	width: 10px;
	height: 10px;
	padding: 0;
	border-radius: 50%;
	background: rgba(0,0,0,.2);
}
.tf-gallery-pagination.tf-pagination-dots button.is-active {
	background: #2271b1;
}

/* ---------- کروسل ---------- */
.tf-gallery-carousel {
	position: relative;
	overflow: hidden;
}
.tf-carousel-track {
	display: flex;
	gap: var(--tf-gutter, 10px);
	will-change: transform;
}
.tf-carousel-track.tf-carousel-animated {
	transition: transform .4s ease;
}
.tf-carousel-slide {
	flex: 0 0 calc(100% / var(--tf-visible-desktop, 5));
	overflow: hidden;
	border-radius: var(--tf-radius, 20px);
	box-shadow: var(--tf-shadow, none);
	aspect-ratio: var(--tf-ratio, 1 / 1);
}
@media (max-width: 600px) {
	.tf-carousel-slide {
		flex-basis: calc(100% / var(--tf-visible-mobile, 2));
	}
}
.tf-carousel-prev,
.tf-carousel-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0,0,0,.45);
	color: #fff;
	border: none;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	font-size: 20px;
	cursor: pointer;
	z-index: 2;
}
.tf-carousel-prev { inset-inline-start: 8px; }
.tf-carousel-next { inset-inline-end: 8px; }

/* ---------- اسلایدر بنری ---------- */
.tf-gallery-banner {
	display: flex;
	direction: ltr;
	align-items: stretch;
	border-radius: var(--tf-radius, 12px);
	overflow: hidden;
	box-shadow: var(--tf-shadow, none);
	box-sizing: border-box;
	border: var(--tf-border-width, 0px) solid var(--tf-color-start, #ff7a45);
}
.tf-banner-viewport {
	flex: 1 1 auto;
	overflow: hidden;
	position: relative;
	height: var(--tf-banner-height, 130px);
}
.tf-banner-track {
	display: flex;
	height: 100%;
	gap: 8px;
	will-change: transform;
}
.tf-banner-item {
	flex: 0 0 auto;
	height: 100%;
	aspect-ratio: var(--tf-ratio, 1 / 1);
	overflow: hidden;
}
.tf-banner-item .tf-gallery-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	display: block;
}
.tf-banner-box {
	direction: rtl;
	flex: 0 0 auto;
	width: var(--tf-box-width-desktop, 190px);
	background: var(--tf-box-bg, linear-gradient(135deg, var(--tf-color-start, #ff7a45), var(--tf-color-end, #e91e8c)));
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--tf-box-padding-desktop, 14px);
	text-align: center;
	overflow: hidden;
}
.tf-banner-box-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--tf-block-gap-desktop, 8px);
	width: 100%;
	min-width: 0;
}
.tf-banner-title {
	margin: 0;
	font-size: var(--tf-title-size-desktop, 22px);
	font-weight: 700;
	overflow-wrap: break-word;
	word-break: break-word;
	line-height: var(--tf-line-height-desktop, 1.25);
}
.tf-banner-subtitle {
	margin: 0;
	font-size: var(--tf-subtitle-size-desktop, 16px);
	opacity: .9;
	overflow-wrap: break-word;
	word-break: break-word;
	line-height: var(--tf-line-height-desktop, 1.25);
}
.tf-banner-button {
	display: inline-block;
	width: var(--tf-button-width-desktop, auto);
	max-width: 100%;
	margin-inline: var(--tf-button-side-gap-desktop, 0px);
	background: var(--tf-button-bg, rgba(255,255,255,.18));
	color: var(--tf-button-text-color, #fff);
	text-decoration: none;
	padding: clamp(2px, 1.5%, 4px) clamp(8px, 8%, 16px);
	border-radius: 999px;
	font-size: var(--tf-button-size-desktop, 15px);
	white-space: normal;
	overflow-wrap: break-word;
	word-break: break-word;
	line-height: var(--tf-line-height-desktop, 1.25);
	transition: background .2s ease;
	box-sizing: border-box;
	text-align: center;
}
.tf-banner-button:hover {
	background: var(--tf-button-bg-hover, rgba(255,255,255,.32));
	color: var(--tf-button-text-color, #fff);
}
.tf-banner-button-text--mobile {
	display: none;
}
@media (max-width: 600px) {
	.tf-banner-box {
		width: var(--tf-box-width-mobile, 100px);
		padding: var(--tf-box-padding-mobile, 8px);
	}
	.tf-banner-box-inner {
		gap: var(--tf-block-gap-mobile, 5px);
	}
	.tf-banner-title {
		font-size: var(--tf-title-size-mobile, 14px);
		line-height: var(--tf-line-height-mobile, 1.2);
	}
	.tf-banner-subtitle {
		font-size: var(--tf-subtitle-size-mobile, 11px);
		line-height: var(--tf-line-height-mobile, 1.2);
	}
	.tf-banner-button {
		width: var(--tf-button-width-mobile, auto);
		margin-inline: var(--tf-button-side-gap-mobile, 0px);
		font-size: var(--tf-button-size-mobile, 10px);
		line-height: var(--tf-line-height-mobile, 1.2);
	}
	.tf-banner-button-text--desktop {
		display: none;
	}
	.tf-banner-button-text--mobile {
		display: inline;
	}
}

/* ---------- لایت‌باکس ---------- */
.tf-lightbox-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.9);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100000;
	padding: 24px;
}
.tf-lightbox-overlay img {
	max-width: 92vw;
	max-height: 88vh;
	border-radius: 8px;
}
.tf-lightbox-close,
.tf-lightbox-prev,
.tf-lightbox-next {
	position: absolute;
	background: rgba(255,255,255,.12);
	color: #fff;
	border: none;
	cursor: pointer;
	border-radius: 50%;
}
.tf-lightbox-close {
	top: 18px;
	inset-inline-end: 18px;
	width: 38px;
	height: 38px;
	font-size: 20px;
}
.tf-lightbox-prev,
.tf-lightbox-next {
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	font-size: 24px;
}
.tf-lightbox-prev { inset-inline-start: 18px; }
.tf-lightbox-next { inset-inline-end: 18px; }
