/* =============================================================================
   TTPixel Child Theme — Homepage Styles (home.css)
   Loaded ONLY on front page.
   ============================================================================= */

/* Container */
.ttp-container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 20px;
}

.ttp-homepage {
	background-color: #f8fafc;
	padding-bottom: 50px;
}

/* =============================================================================
   1. HERO BANNER SLIDER
   ============================================================================= */

.ttp-hero-section {
	padding-top: 20px;
	padding-bottom: 20px;
}

.ttp-hero-slider {
	position: relative;
	width: 100%;
	border-radius: 12px;
	overflow: hidden;
	background: #ffffff;
	box-shadow: 0 4px 20px rgba(0,0,0,0.06);
	cursor: grab;
}

.ttp-hero-slider:active {
	cursor: grabbing;
}

.ttp-hero-slider__track {
	position: relative;
	width: 100%;
}

.ttp-hero-slider__slide {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	opacity: 0;
	transition: opacity 0.5s ease-in-out;
	pointer-events: none;
}

.ttp-hero-slider__slide.is-active {
	opacity: 1;
	position: relative;
	pointer-events: auto;
}

.ttp-hero-slider__link {
	display: block;
	width: 100%;
	height: 100%;
}

.ttp-hero-slider__img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 12px;
}

/* Hero Controls */
button.ttp-hero-slider__arrow,
.ttp-hero-slider__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	width: 32px !important;
	height: 32px !important;
	border-radius: 0 !important;
	background: transparent !important;
	background-color: transparent !important;
	backdrop-filter: none !important;
	border: none !important;
	box-shadow: none !important;
	color: #0f172a !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	cursor: pointer;
	transition: all 0.2s ease !important;
	padding: 0 !important;
	margin: 0 !important;
	outline: none !important;
	-webkit-appearance: none !important;
	appearance: none !important;
}

button.ttp-hero-slider__arrow svg,
.ttp-hero-slider__arrow svg {
	width: 22px !important;
	height: 22px !important;
	stroke: #1e293b !important;
	color: #1e293b !important;
	transition: stroke 0.2s ease, transform 0.2s ease !important;
}

button.ttp-hero-slider__arrow:hover,
button.ttp-hero-slider__arrow:focus,
.ttp-hero-slider__arrow:hover,
.ttp-hero-slider__arrow:focus {
	background: transparent !important;
	background-color: transparent !important;
	border: none !important;
	box-shadow: none !important;
	transform: translateY(-50%) scale(1.2) !important;
}

button.ttp-hero-slider__arrow:hover svg,
button.ttp-hero-slider__arrow:focus svg,
.ttp-hero-slider__arrow:hover svg,
.ttp-hero-slider__arrow:focus svg {
	stroke: #2563eb !important;
	color: #2563eb !important;
}

.ttp-hero-slider__arrow--prev { left: 8px !important; }
.ttp-hero-slider__arrow--next { right: 8px !important; }

.ttp-hero-slider__dots {
	position: absolute;
	bottom: 16px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 5;
	display: flex;
	gap: 8px;
}

.ttp-hero-slider__dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.5);
	border: none;
	cursor: pointer;
	transition: all 0.2s ease;
	padding: 0;
}

.ttp-hero-slider__dot.is-active {
	background: #2563eb;
	width: 28px;
	border-radius: 6px;
}

/* =============================================================================
   2. CIRCLE CATEGORIES CAROUSEL
   ============================================================================= */

.ttp-circle-categories-section {
	padding: 12px 0 20px 0;
}

.ttp-circle-cats-wrap {
	position: relative;
	background: #ffffff;
	border-radius: 12px;
	padding: 18px 16px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
	border: 1px solid #f1f5f9;
}

.ttp-circle-cats__track {
	display: flex;
	align-items: flex-start;
	gap: 20px;
	overflow-x: auto;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding: 4px 2px;
	cursor: grab;
	user-select: none;
}

.ttp-circle-cats__track.is-dragging {
	cursor: grabbing !important;
	scroll-behavior: auto !important;
	scroll-snap-type: none !important;
}

.ttp-circle-cats__track::-webkit-scrollbar {
	display: none;
}

.ttp-circle-cat-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	text-decoration: none !important;
	flex: 0 0 90px;
	scroll-snap-align: start;
	transition: transform 0.2s ease;
}

.ttp-circle-cat-item:hover {
	transform: translateY(-3px);
}

.ttp-circle-cat-item__img-wrap {
	width: 74px;
	height: 74px;
	border-radius: 50%;
	overflow: hidden;
	background: #f1f5f9;
	border: 2px solid #e2e8f0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ttp-circle-cat-item:hover .ttp-circle-cat-item__img-wrap {
	border-color: #2563eb;
	box-shadow: 0 4px 14px rgba(37, 99, 235, 0.2);
}

.ttp-circle-cat-item__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.ttp-circle-cat-item:hover .ttp-circle-cat-item__img {
	transform: scale(1.08);
}

.ttp-circle-cat-item__name {
	font-size: 12.5px;
	font-weight: 600;
	color: #1e293b;
	text-align: center;
	line-height: 1.25;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

button.ttp-circle-cats__arrow,
.ttp-circle-cats__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	width: 36px !important;
	height: 36px !important;
	border-radius: 50% !important;
	background: #ffffff !important;
	background-color: #ffffff !important;
	border: 1.5px solid #cbd5e1 !important;
	color: #2563eb !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
	transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
	outline: none !important;
	padding: 0 !important;
	margin: 0 !important;
	-webkit-appearance: none !important;
	appearance: none !important;
}

button.ttp-circle-cats__arrow svg,
.ttp-circle-cats__arrow svg {
	width: 16px !important;
	height: 16px !important;
	min-width: 16px !important;
	min-height: 16px !important;
	stroke: #2563eb !important;
	color: #2563eb !important;
	transition: stroke 0.2s ease, transform 0.2s ease !important;
}

button.ttp-circle-cats__arrow:hover,
button.ttp-circle-cats__arrow:focus,
.ttp-circle-cats__arrow:hover,
.ttp-circle-cats__arrow:focus {
	background: #2563eb !important;
	background-color: #2563eb !important;
	border-color: #2563eb !important;
	color: #ffffff !important;
	box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35) !important;
	transform: translateY(-50%) scale(1.1) !important;
}

button.ttp-circle-cats__arrow:hover svg,
button.ttp-circle-cats__arrow:focus svg,
.ttp-circle-cats__arrow:hover svg,
.ttp-circle-cats__arrow:focus svg {
	stroke: #ffffff !important;
	color: #ffffff !important;
}

.ttp-circle-cats__arrow--prev { left: -10px !important; }
.ttp-circle-cats__arrow--next { right: -10px !important; }

/* =============================================================================
   3. SINGLE CATEGORY PRODUCT CAROUSEL (5 items per row, 10 items total)
   ============================================================================= */

.ttp-home-cat-section {
	padding: 24px 0;
}

.ttp-home-cat-header {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
	padding-bottom: 10px;
	border-bottom: 1px solid #e2e8f0;
}

.ttp-home-cat-header__left {
	position: relative;
	display: flex;
	align-items: baseline;
	gap: 8px;
}

.ttp-home-cat-header__left::after {
	content: '';
	position: absolute;
	bottom: -11px;
	left: 0;
	width: 100%;
	height: 3px;
	background-color: #2563eb;
	border-radius: 3px 3px 0 0;
}

.ttp-home-cat-header__title {
	font-size: 1.35rem;
	font-weight: 800;
	color: #0f172a;
	margin: 0;
	line-height: 1.2;
}

.ttp-home-cat-header__count {
	font-size: 13px;
	color: #64748b;
	font-weight: 600;
}

.ttp-home-cat-header__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13.5px;
	font-weight: 700;
	color: #2563eb;
	text-decoration: none !important;
	transition: gap 0.2s ease;
	background: #eff6ff;
	padding: 6px 14px;
	border-radius: 6px;
}

.ttp-home-cat-header__more:hover {
	gap: 9px;
	background: #2563eb;
	color: #ffffff;
}

.ttp-cat-carousel-wrap {
	position: relative;
}

.ttp-cat-carousel__track {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding: 4px 2px 10px 2px;
	cursor: grab;
	user-select: none;
}

.ttp-cat-carousel__track.is-dragging {
	cursor: grabbing !important;
	scroll-behavior: auto !important;
	scroll-snap-type: none !important;
}

.ttp-cat-carousel__track::-webkit-scrollbar {
	display: none;
}

/* 5 Products visible per row on desktop (calc 20% minus total gaps) */
.ttp-cat-carousel__slide {
	flex: 0 0 calc(20% - 12.8px);
	min-width: 210px;
	scroll-snap-align: start;
}

.ttp-cat-carousel__slide li.ttp-product-card-item {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	width: 100% !important;
	height: 100% !important;
}

.ttp-cat-carousel__slide .ttp-product-card {
	height: 100%;
}

.ttp-cat-carousel__arrow {
	display: none !important;
}

.ttp-cat-carousel__arrow:hover {
	background: #2563eb;
	color: #ffffff;
	border-color: #2563eb;
}

.ttp-cat-carousel__arrow--prev { left: -16px; }
.ttp-cat-carousel__arrow--next { right: -16px; }

/* =============================================================================
   4. PROMO BANNERS GRID (60% LEFT / 40% RIGHT STACKED 2 ROWS)
   ============================================================================= */

.ttp-promo-grid-section {
	padding: 24px 0;
}

.ttp-promo-grid {
	display: flex;
	gap: 20px;
	align-items: stretch;
}

.ttp-promo-grid__col-60 {
	flex: 0 0 calc(60% - 10px);
	max-width: calc(60% - 10px);
}

.ttp-promo-grid__col-40 {
	flex: 0 0 calc(40% - 10px);
	max-width: calc(40% - 10px);
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ttp-promo-card {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 4px 16px rgba(0,0,0,0.06);
	text-decoration: none !important;
}

.ttp-promo-card--large {
	min-height: 360px;
}

.ttp-promo-card--stacked {
	flex: 1;
	min-height: 170px;
}

.ttp-promo-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.ttp-promo-card:hover .ttp-promo-card__img {
	transform: scale(1.04);
}

.ttp-promo-card__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(15, 23, 42, 0.7) 0%, transparent 60%);
	display: flex;
	align-items: flex-end;
	padding: 20px;
}

.ttp-promo-card__title {
	color: #ffffff;
	font-size: 1.15rem;
	font-weight: 700;
	text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* =============================================================================
   5. RESPONSIVE BREAKPOINTS
   ============================================================================= */

@media (max-width: 1200px) {
	.ttp-cat-carousel__slide {
		flex: 0 0 calc(25% - 12px); /* 4 items on medium screens */
	}

	.ttp-hero-slider__img {
		max-height: 360px;
	}
}

@media (max-width: 900px) {
	.ttp-promo-grid {
		flex-direction: column;
	}

	.ttp-promo-grid__col-60,
	.ttp-promo-grid__col-40 {
		flex: 0 0 100%;
		max-width: 100%;
	}

	.ttp-promo-card--large {
		min-height: 240px;
	}

	.ttp-cat-carousel__slide {
		flex: 0 0 calc(33.333% - 11px); /* 3 items on tablets */
	}
}

@media (max-width: 640px) {
	.ttp-hero-slider__img {
		max-height: 220px;
	}

	.ttp-cat-carousel__slide {
		flex: 0 0 calc(50% - 8px); /* 2 items on mobile */
		min-width: 165px;
	}

	.ttp-home-cat-header__title {
		font-size: 1.15rem;
	}

	.ttp-circle-cat-item {
		flex: 0 0 76px;
	}

	.ttp-circle-cat-item__img-wrap {
		width: 62px;
		height: 62px;
	}

	.ttp-circle-cat-item__name {
		font-size: 11.5px;
	}
}

/* =============================================================================
   AUTO-MARQUEE PRODUCT CAROUSEL SECTION
   ============================================================================= */

.ttp-marquee-section {
	margin: 12px 0 16px 0;
	position: relative;
}

.ttp-marquee-header {
	margin-bottom: 12px;
}

.ttp-marquee-title {
	font-size: 1.15rem !important;
	font-weight: 800 !important;
	color: #0f172a !important;
	margin: 0 !important;
	display: flex;
	align-items: center;
	gap: 8px;
}

.ttp-marquee-viewport {
	overflow-x: auto;
	width: 100%;
	position: relative;
	border-radius: 12px;
	padding: 4px 0;
	scrollbar-width: none; /* Firefox */
	-ms-overflow-style: none; /* IE 10+ */
	cursor: grab;
	user-select: none;
	-webkit-user-select: none;
	scroll-behavior: auto;
	-webkit-overflow-scrolling: touch;
}

.ttp-marquee-viewport::-webkit-scrollbar {
	display: none; /* Chrome/Safari/Edge */
}

.ttp-marquee-viewport:active {
	cursor: grabbing;
}

/* Track container for JS continuous marquee + Mouse drag */
.ttp-marquee-track {
	display: flex;
	align-items: center;
	gap: 16px;
	width: max-content;
}

/* Horizontal Landscape Product Card (Matches User Screenshot) */
.ttp-marquee-card {
	display: flex;
	align-items: center;
	gap: 12px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 10px 14px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
	transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.6s ease, box-shadow 0.6s ease !important;
	text-decoration: none !important;
	flex-shrink: 0;

	/* PC / Desktop Default (≥1024px): 4.5 items visible (4 full + 1 half peek) */
	width: calc((1400px - 40px - (3.5 * 16px)) / 4.5);
	min-width: 285px;
	box-sizing: border-box;
}

.ttp-marquee-card:hover,
.ttp-marquee-card.is-focused {
	border-color: #2563eb !important;
	box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15) !important;
	transform: translateY(-3px) scale(1.03) !important;
	z-index: 2;
}

.ttp-marquee-card__img-wrap {
	width: 65px;
	height: 65px;
	flex-shrink: 0;
	border-radius: 8px;
	overflow: hidden;
	background: #f8fafc;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #f1f5f9;
}

.ttp-marquee-card__img-wrap img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform 0.3s ease;
}

.ttp-marquee-card:hover .ttp-marquee-card__img-wrap img {
	transform: scale(1.06);
}

.ttp-marquee-card__info {
	flex: 1;
	min-width: 0;
}

.ttp-marquee-card__title {
	font-size: 13px !important;
	font-weight: 700 !important;
	color: #1e293b !important;
	margin: 0 0 6px 0 !important;
	line-height: 1.3 !important;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	display: block;
}

.ttp-marquee-card:hover .ttp-marquee-card__title,
.ttp-marquee-card.is-focused .ttp-marquee-card__title {
	color: #2563eb !important;
}

.ttp-marquee-card__price {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: nowrap;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ttp-marquee-card__regular-price {
	font-size: 12px !important;
	color: #94a3b8 !important;
	text-decoration: line-through !important;
	margin: 0 !important;
}

.ttp-marquee-card__sale-price {
	font-size: 14.5px !important;
	font-weight: 800 !important;
	color: #f97316 !important;
	text-decoration: none !important;
	margin: 0 !important;
}

.ttp-marquee-card__sale-price bdi {
	color: #f97316 !important;
}

.ttp-marquee-card__save-tag {
	background: #fef2f2 !important;
	color: #ef4444 !important;
	font-size: 10.5px !important;
	font-weight: 700 !important;
	padding: 1px 5px !important;
	border-radius: 4px !important;
	border: 1px solid #fecaca !important;
	white-space: nowrap !important;
	display: inline-flex !important;
	align-items: center !important;
	margin-left: 2px !important;
}

.ttp-marquee-card__save-tag bdi {
	color: #ef4444 !important;
}

/* Tablet (768px - 1023px): 3 items visible */
@media (max-width: 1023.98px) {
	.ttp-marquee-card {
		width: calc((100vw - 40px - (2 * 14px)) / 3);
		min-width: 220px;
		padding: 8px 12px;
	}
}

/* Mobile (<768px): 1.5 items visible (Peek Carousel) so Save badge fits cleanly on 1 line */
@media (max-width: 767.98px) {
	.ttp-marquee-card {
		width: 75vw !important;
		max-width: 275px !important;
		min-width: 245px !important;
		padding: 9px 12px !important;
		gap: 10px !important;
	}

	.ttp-marquee-card__img-wrap {
		width: 56px !important;
		height: 56px !important;
	}

	.ttp-marquee-card__title {
		font-size: 13px !important;
	}

	.ttp-marquee-card__price {
		flex-wrap: nowrap !important;
		gap: 5px !important;
		align-items: center !important;
	}

	.ttp-marquee-card__regular-price {
		font-size: 11.5px !important;
	}

	.ttp-marquee-card__sale-price {
		font-size: 14px !important;
	}

	.ttp-marquee-card__save-tag {
		font-size: 10px !important;
		padding: 1px 4.5px !important;
		margin-left: 1px !important;
	}
}

