.t4-builder-home,
.t4-builder-header,
.t4-builder-footer {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.t4-header-builder-row,
.t4-footer-builder-row {
	width: 100%;
}

.t4-header-builder-row:has(.t4-search),
.t4-widget-search {
	position: relative;
	z-index: 20;
	overflow: visible;
}

.t4-widget-search:focus-within {
	z-index: 40;
}

.t4-header-builder-row > .row {
	align-items: center;
}

.t4-widget-logo__img {
	display: block;
	max-height: 48px;
	width: auto;
	height: auto;
	max-width : 100%
}

.t4-widget-logo__caption {
	margin: 0.5rem 0 0;
	font-size: 0.9rem;
	line-height: 1.45;
	opacity: 0.85;
}

.t4-widget-links__title {
	font-size: 1rem;
	font-weight: 700;
	margin: 0 0 0.75rem;
}

.t4-widget-links__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.t4-widget-links__list li + li {
	margin-top: 0.35rem;
}

.t4-widget-links__list a {
	text-decoration: none;
}

.t4-widget-header-tools {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.65rem;
	flex-wrap: wrap;
}

/* Mobile: < 768px */
@media (max-width: 767.98px) {
	.t4-hide-mobile {
		display: none !important;
	}
}

/* Tablet: 768px – 991.98px */
@media (min-width: 768px) and (max-width: 991.98px) {
	.t4-hide-tablet {
		display: none !important;
	}
}

/* Desktop / PC: ≥ 992px */
@media (min-width: 992px) {
	.t4-hide-desktop {
		display: none !important;
	}
}

.t4-widget-banner__img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 12px;
	object-fit: cover;
}

.t4-widget-banner__link {
	display: block;
}

.t4-widget-text__body {
	font-size: 1rem;
	line-height: 1.6;
	color: #1e293b;
}

.t4-widget-text__body h1,
.t4-widget-text__body h2,
.t4-widget-text__body h3 {
	margin-top: 0;
}

.t4-widget--hook {
	min-height: 0;
}

.t4-site-header {
	background: #fff;
	border-bottom: 1px solid var(--sn-border, #e6edf5);
	padding: 12px 0;
}

.t4-site-footer {
	margin-top: 2rem;
}

.t4-site-footer .t4-builder-footer {
	padding: 2rem 0 1rem;
}

.t4-home .sn-section,
.t4-home .t4-widget--category {
	margin: 1.5rem 0;
}

.t4-widget--category .t4-product-grid .t4-product-card,
.t4-widget--category .t4-product-grid .product-card {
	height: 100%;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 12px;
	background: #fff;
}

.t4-widget--category .t4-product-card__image,
.t4-widget--category .product-image-wrapper {
	height: 200px;
	max-height: 200px;
	margin-bottom: 10px;
	padding: 8px;
	overflow: hidden;
}

.t4-widget--category .t4-product-card__image img,
.t4-widget--category .product-image-wrapper img {
	max-height: 100%;
	width: auto;
	max-width: 100%;
	object-fit: contain;
}

.t4-widget--category .t4-product-card__title,
.t4-widget--category .product-title {
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.35;
	min-height: 0;
	max-height: 2.7em;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.t4-widget--category .t4-product-card__prices .current-price,
.t4-widget--category .current-price {
	font-size: 1rem;
	font-weight: 700;
}

.t4-widget--category .miniPrice {
	font-size: 1rem;
	padding: 0;
}

.t4-widget--category .t4-section__head,
.t4-widget--category .sm-section__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.t4-section__tools {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-left: auto;
}

.t4-rail {
	position: relative;
	min-width: 0;
}

.t4-rail__nav {
	display: flex;
	gap: 8px;
	flex: 0 0 auto;
}

.t4-rail__btn {
	width: 36px;
	height: 36px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #e2e8f0;
	border-radius: 50%;
	background: #fff;
	color: var(--sm-primary, #3d47d9);
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.t4-rail__btn:hover:not(:disabled) {
	background: var(--sm-primary, #3d47d9);
	border-color: var(--sm-primary, #3d47d9);
	color: #fff;
}

.t4-rail__btn:disabled {
	opacity: 0.35;
	cursor: default;
}

.t4-rail__track {
	display: flex;
	align-items: stretch;
	gap: 14px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding: 2px 0 6px;
}

.t4-rail__track::-webkit-scrollbar {
	display: none;
}

.t4-cat-carousel {
	margin-top: 4px;
}

.t4-cat-carousel .t4-rail__card {
	flex: 0 0 calc((100% - 56px) / 5);
	width: calc((100% - 56px) / 5);
	scroll-snap-align: start;
	min-width: 0;
	height: auto;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 12px;
	background: #fff;
}

@media (max-width: 991.98px) {
	.t4-cat-carousel .t4-rail__card {
		flex-basis: calc((100% - 28px) / 3);
		width: calc((100% - 28px) / 3);
	}
}

@media (max-width: 575.98px) {
	.t4-cat-carousel .t4-rail__card {
		flex-basis: calc((100% - 14px) / 2);
		width: calc((100% - 14px) / 2);
	}
}

/* main_menu hook: horizontal nav (module outputs bare <li>) */
.t4-widget-menu,
.t4-builder-header .t4-nav-list {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.t4-widget-menu > li,
.t4-builder-header .t4-nav-list > li {
	flex: 0 0 auto;
	list-style: none;
	margin: 0;
}

.t4-widget-menu > li > a,
.t4-builder-header .t4-nav-list > li > a {
	display: inline-flex;
	align-items: center;
	padding: 8px 14px;
	border-radius: 999px;
	font-size: 0.875rem;
	font-weight: 500;
	color: inherit;
	text-decoration: none;
	white-space: nowrap;
}

.t4-widget-menu > li > a:hover,
.t4-widget-menu > li > a.active,
.t4-widget-menu > li > a.is-active {
	background: var(--primary-light, #eff6ff);
	color: var(--primary, #2563eb);
}

.t4-container > .row {
	align-items: stretch;
}

.t4-container .t4-editable,
.t4-container .t4-widget {
	height: 100%;
}

.t4-container .t4-placeholder {
	min-height: 180px;
	height: 100%;
}
