/* ============================================================
   SmartShop Theme Builder - Frontend Styles
   ============================================================ */

/* ============================================================
   Base & Layout
   ============================================================ */
/* Full Site Editing Wrappers */
.smartshop-tb-fse-header,
.smartshop-tb-fse-footer,
.smartshop-tb-fse-content {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
}

.smartshop-tb-content {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	box-sizing: border-box;
}

.smartshop-tb-content *,
.smartshop-tb-content *::before,
.smartshop-tb-content *::after {
	box-sizing: border-box;
}

/* ============================================================
   Section
   ============================================================ */
.smartshop-tb-section {
	display: flex;
	flex-wrap: wrap;
	width: 100%;
	margin-bottom: 0;
	position: relative;
}

/* ============================================================
   Column
   ============================================================ */
.smartshop-tb-column {
	min-height: 1px;
	padding: 15px;
	min-width: 0;
}

.smartshop-tb-inner-column {
	min-height: 1px;
	min-width: 0;
	padding: 15px;
}

/* ============================================================
   Widget Wrapper (Advanced Styles wrapper)
   ============================================================ */
.smartshop-tb-widget-wrapper {
	width: auto;
	max-width: 100%;
	min-width: 0;
}

/* ============================================================
   Nav Menu Widget
   ============================================================ */
.stb-widget-nav-menu {
	width: 100%;
}

.stb-widget-nav-menu .stb-nav-menu-container {
	width: 100%;
}

.stb-widget-nav-menu .stb-nav-menu-list,
.stb-widget-nav-menu .stb-nav-menu-list ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.stb-widget-nav-menu .stb-nav-menu-list {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px 14px;
}

.stb-widget-nav-menu .stb-nav-menu-list > li {
	margin: 0;
	padding: 0;
	position: relative;
}

.stb-widget-nav-menu .stb-nav-menu-list a {
	display: inline-flex;
	align-items: center;
	padding: 6px 10px;
	border-radius: 8px;
	text-decoration: none;
	color: inherit;
	font-weight: 500;
	line-height: 1.25;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.stb-widget-nav-menu .stb-nav-menu-list a:hover {
	color: #1d6ff2;
	background: rgba(29, 111, 242, 0.08);
}

.stb-widget-nav-menu .stb-nav-menu-list .sub-menu {
	position: absolute;
	left: 0;
	top: calc(100% + 8px);
	min-width: 190px;
	background: #fff;
	border: 1px solid rgba(20, 50, 79, 0.12);
	border-radius: 10px;
	box-shadow: 0 14px 28px rgba(20, 50, 79, 0.12);
	padding: 6px;
	display: none;
	z-index: 50;
}

.stb-widget-nav-menu .stb-nav-menu-list .sub-menu li {
	width: 100%;
}

.stb-widget-nav-menu .stb-nav-menu-list .sub-menu a {
	display: flex;
	width: 100%;
}

.stb-widget-nav-menu .stb-nav-menu-list li:hover > .sub-menu {
	display: block;
}

/* ============================================================
   Shared Carousel
   ============================================================ */
.stb-carousel {
	--stb-carousel-gap: 18px;
	--stb-carousel-arrow-bg: #ffffff;
	--stb-carousel-arrow-color: #14324f;
	--stb-carousel-dot-color: #cbd5e1;
	--stb-carousel-dot-active: #1d6ff2;
	position: relative;
}

.stb-carousel-shell {
	display: flex;
	align-items: center;
	gap: 14px;
}

.stb-carousel-viewport {
	flex: 1;
	overflow: hidden;
	min-width: 0;
}

.stb-carousel-track {
	display: flex;
	gap: var(--stb-carousel-gap);
	transition: transform 0.35s ease;
	will-change: transform;
}

.stb-carousel-slide {
	min-width: 0;
}

.stb-carousel-arrow {
	width: 44px;
	height: 44px;
	border: 1px solid rgba(20, 50, 79, 0.08);
	border-radius: 999px;
	background: var(--stb-carousel-arrow-bg);
	color: var(--stb-carousel-arrow-color);
	box-shadow: 0 10px 24px rgba(20, 50, 79, 0.08);
	cursor: pointer;
	font-size: 24px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.stb-carousel-arrow:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 14px 28px rgba(20, 50, 79, 0.12);
}

.stb-carousel-arrow:disabled {
	opacity: 0.45;
	cursor: not-allowed;
	box-shadow: none;
}

.stb-carousel-dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 16px;
}

.stb-carousel-dot {
	width: 10px;
	height: 10px;
	border-radius: 999px;
	border: none;
	background: var(--stb-carousel-dot-color);
	cursor: pointer;
	padding: 0;
	transition: transform 0.2s ease, background 0.2s ease;
}

.stb-carousel-dot.is-active,
.stb-carousel-dot[aria-current="true"] {
	background: var(--stb-carousel-dot-active);
	transform: scale(1.15);
}

.stb-gallery-carousel .stb-gallery-carousel-frame {
	display: flex;
	gap: 14px;
	align-items: stretch;
}

.stb-gallery-carousel--right .stb-gallery-carousel-frame {
	flex-direction: row-reverse;
}

.stb-gallery-carousel .stb-gallery-thumbs {
	--stb-gallery-thumb-slot: calc((100% - (var(--stb-gallery-rendered-thumbs, var(--stb-gallery-thumbs-visible, 4)) - 1) * var(--stb-gallery-thumb-gap, 10px)) / var(--stb-gallery-rendered-thumbs, var(--stb-gallery-thumbs-visible, 4)));
	position: relative;
}

.stb-gallery-carousel .stb-gallery-thumbs--side {
	flex: 0 0 min(24%, 160px);
	max-width: min(24%, 160px);
	height: calc((var(--stb-gallery-rendered-thumbs, var(--stb-gallery-thumbs-visible, 4)) * var(--stb-gallery-thumb-height, 88px)) + ((var(--stb-gallery-rendered-thumbs, var(--stb-gallery-thumbs-visible, 4)) - 1) * var(--stb-gallery-thumb-gap, 10px)));
}

.stb-gallery-carousel .stb-gallery-thumbs--bottom {
	margin-top: 14px;
	height: var(--stb-gallery-thumb-height, 88px);
}

.stb-gallery-carousel .stb-gallery-thumbs-viewport {
	width: 100%;
	height: 100%;
	overflow: hidden;
	position: relative;
}

.stb-gallery-carousel .stb-gallery-thumbs-track {
	display: flex;
	gap: var(--stb-gallery-thumb-gap, 10px);
	will-change: transform;
	transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.stb-gallery-carousel .stb-gallery-thumbs--side .stb-gallery-thumbs-track {
	flex-direction: column;
}

.stb-gallery-carousel .stb-gallery-thumb {
	border: 1px solid var(--stb-gallery-thumb-border, rgba(20, 50, 79, 0.10));
	border-radius: var(--stb-gallery-thumb-radius, 14px);
	overflow: hidden;
	background: #fff;
	padding: 0;
	cursor: pointer;
	height: var(--stb-gallery-thumb-height, 88px);
	flex: 0 0 var(--stb-gallery-thumb-slot);
	width: var(--stb-gallery-thumb-slot);
	opacity: var(--stb-gallery-thumb-opacity, 0.76);
	transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
}

.stb-gallery-carousel .stb-gallery-thumbs--side .stb-gallery-thumb {
	width: 100%;
	flex-basis: var(--stb-gallery-thumb-height, 88px);
}

.stb-gallery-carousel .stb-gallery-thumb img {
	display: block;
	width: 100%;
	height: 100%;
}

.stb-gallery-carousel .stb-gallery-thumb:hover {
	opacity: var(--stb-gallery-thumb-hover-opacity, 0.9);
}

.stb-gallery-carousel .stb-gallery-thumb.is-active,
.stb-gallery-carousel .stb-gallery-thumb[aria-current="true"] {
	opacity: var(--stb-gallery-thumb-active-opacity, 1);
	transform: scale(var(--stb-gallery-thumb-active-scale, 1.02));
	border-color: var(--stb-gallery-thumb-active-border, var(--stb-carousel-dot-active));
}

.stb-gallery-carousel .stb-carousel-shell {
	flex: 1;
	min-width: 0;
	position: relative;
}

.stb-gallery-carousel .stb-carousel-arrow {
	width: var(--stb-gallery-arrow-size, 44px);
	height: var(--stb-gallery-arrow-size, 44px);
	opacity: var(--stb-gallery-arrow-opacity, 1);
	backdrop-filter: blur(var(--stb-gallery-arrow-blur, 0px));
	-webkit-backdrop-filter: blur(var(--stb-gallery-arrow-blur, 0px));
}

.stb-gallery-carousel--arrows-inside .stb-carousel-shell {
	gap: 0;
}

.stb-gallery-carousel--arrows-inside .stb-carousel-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 3;
}

.stb-gallery-carousel--arrows-inside .stb-carousel-arrow-prev {
	left: 14px;
}

.stb-gallery-carousel--arrows-inside .stb-carousel-arrow-next {
	right: 14px;
}

.stb-gallery-carousel--arrows-inside .stb-carousel-arrow:hover:not(:disabled) {
	transform: translateY(-50%) scale(1.03);
}

@media (max-width: 767px) {
	.stb-carousel-shell {
		gap: 10px;
	}

	.stb-carousel-arrow {
		width: 38px;
		height: 38px;
		font-size: 20px;
	}

	.stb-gallery-carousel .stb-gallery-carousel-frame,
	.stb-gallery-carousel--right .stb-gallery-carousel-frame {
		flex-direction: column;
	}

	.stb-gallery-carousel .stb-gallery-thumbs--side,
	.stb-gallery-carousel .stb-gallery-thumbs--bottom {
		max-width: none;
		height: var(--stb-gallery-thumb-height, 88px);
	}

	.stb-gallery-carousel .stb-gallery-thumbs-track {
		flex-direction: row;
	}

	.stb-gallery-carousel .stb-gallery-thumbs--side .stb-gallery-thumb {
		width: var(--stb-gallery-thumb-slot);
		flex-basis: var(--stb-gallery-thumb-slot);
	}
}

/* ============================================================
   Heading
   ============================================================ */
.smartshop-tb-heading,
.smartshop-tb-widget-wrapper h1,
.smartshop-tb-widget-wrapper h2,
.smartshop-tb-widget-wrapper h3,
.smartshop-tb-widget-wrapper h4,
.smartshop-tb-widget-wrapper h5,
.smartshop-tb-widget-wrapper h6 {
	margin: 0 0 10px 0;
	padding: 0;
	line-height: 1.3;
	font-weight: 700;
}

/* ============================================================
   Text Editor
   ============================================================ */
.smartshop-tb-text-editor {
	line-height: 1.75;
	color: #444;
}
.smartshop-tb-text-editor p {
	margin-bottom: 1em;
}
.smartshop-tb-text-editor a {
	color: #1890ff;
	text-decoration: underline;
}

/* ============================================================
   Image
   ============================================================ */
.smartshop-tb-image {
	width: 100%;
	overflow: hidden;
}
.smartshop-tb-image img {
	display: inline-block;
	max-width: 100%;
	height: auto;
	line-height: 1;
}
.smartshop-tb-image a img {
	transition: opacity 0.25s, transform 0.25s;
}
.smartshop-tb-image a:hover img {
	opacity: 0.9;
	transform: scale(1.02);
}

/* ============================================================
   Button
   ============================================================ */
.smartshop-tb-button-wrapper {
	width: 100%;
}
.smartshop-tb-button {
	display: inline-block;
	padding: 10px 22px;
	background: #1890ff;
	color: #fff;
	text-decoration: none !important;
	border-radius: 4px;
	font-weight: 600;
	font-size: 14px;
	letter-spacing: 0.2px;
	box-shadow: 0 2px 8px rgba(24,144,255,0.3);
	cursor: pointer;
	line-height: 1.5;
	border: none;
}

/* ============================================================
   Divider
   ============================================================ */
.smartshop-tb-divider-wrapper {
	width: 100%;
	padding: 15px 0;
}
.smartshop-tb-divider {
	display: block;
	height: 1px;
	background: #e8e8e8;
	border: none;
}

/* ============================================================
   Spacer
   ============================================================ */
.smartshop-tb-spacer {
	display: block;
	width: 100%;
}

/* ============================================================
   Icon
   ============================================================ */
.smartshop-tb-icon {
	width: 100%;
}
.smartshop-tb-icon .dashicons,
.smartshop-tb-svg-icon {
	display: inline-block;
	transition: transform 0.2s, color 0.2s;
}
.smartshop-tb-svg-icon {
	width: 1em;
	height: 1em;
	vertical-align: middle;
	background-color: currentColor;
	-webkit-mask-image: var(--stb-icon-url);
	mask-image: var(--stb-icon-url);
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
}
.smartshop-tb-icon a {
	text-decoration: none;
	display: inline-block;
}
.smartshop-tb-icon a:hover .dashicons,
.smartshop-tb-icon a:hover .smartshop-tb-svg-icon {
	transform: scale(1.15);
}

/* ============================================================
   Video
   ============================================================ */
.smartshop-tb-video {
	width: 100%;
	overflow: hidden;
	border-radius: 4px;
	box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.smartshop-tb-video iframe {
	display: block;
	border: none;
}
.smartshop-tb-video-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #111;
	min-height: 200px;
	border-radius: 4px;
	color: #fff;
}

/* ============================================================
   Counter
   ============================================================ */
.smartshop-tb-counter {
	width: 100%;
}
.stb-counter-number {
	font-size: 48px;
	font-weight: 800;
	line-height: 1;
	color: #1890ff;
	display: block;
}
.stb-counter-title {
	display: block;
	font-size: 15px;
	color: #666;
	margin-top: 8px;
	font-weight: 500;
}

/* Counter animation */
.stb-counter-number.animated {
	animation: stbCounterFadeIn 0.5s ease forwards;
}
@keyframes stbCounterFadeIn {
	from { opacity: 0; transform: translateY(10px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Testimonial
   ============================================================ */
.smartshop-tb-testimonial {
	width: 100%;
	padding: 24px;
	border: 1px solid #e8e8e8;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 2px 12px rgba(0,0,0,0.05);
	transition: box-shadow 0.25s;
}
.smartshop-tb-testimonial:hover {
	box-shadow: 0 6px 24px rgba(0,0,0,0.1);
}
.stb-testimonial-content {
	font-style: italic;
	font-size: 16px;
	line-height: 1.7;
	color: #555;
	margin-bottom: 16px;
	position: relative;
	padding-left: 16px;
	border-left: 3px solid #1890ff;
}
.stb-testimonial-name {
	font-weight: 700;
	font-size: 15px;
	color: #222;
}
.stb-testimonial-pos {
	font-size: 13px;
	color: #999;
	margin-top: 3px;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
	.smartshop-tb-section {
		flex-wrap: wrap;
	}
}

@media (max-width: 768px) {
	.smartshop-tb-column {
		width: 100% !important;
		flex: 0 0 100%;
	}

	.smartshop-tb-content {
		padding: 0 15px;
	}

	.stb-counter-number {
		font-size: 36px;
	}

	.smartshop-tb-testimonial {
		padding: 16px;
	}

	.stb-testimonial-content {
		font-size: 15px;
	}

	.smartshop-tb-button {
		display: block;
		text-align: center;
	}
}

@media (max-width: 480px) {
	.stb-counter-number {
		font-size: 30px;
	}
}

/* ============================================================
   Utility Animations
   ============================================================ */
[data-aos] .smartshop-tb-section,
[data-aos] .smartshop-tb-column {
	animation: stbFadeUp 0.55s ease both;
}
@keyframes stbFadeUp {
	from { opacity: 0; transform: translateY(24px); }
	to   { opacity: 1; transform: translateY(0); }
}
