/* ==========================================================================
   Siam District — Homepage "Best Sellers" product carousel
   ========================================================================== */

.best-sellers {
	background: var(--sd-color-page-bg);
	padding: 64px 0;
}

/* Products of the Week reuses this whole component — just alternates
   to a white background for visual rhythm against the sections above
   and below it (both on --sd-color-page-bg). */
.best-sellers.products-of-week {
	background: var(--sd-color-white);
}

.best-sellers__container {
	max-width: var(--sd-container-width);
	margin: 0 auto;
	padding: 0 24px;
}

.best-sellers__header {
	text-align: center;
	margin-bottom: 32px;
}

.best-sellers__title {
	margin: 0;
	font-family: var(--sd-font-heading);
	font-size: 34px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--sd-color-body-text);
}

.best-sellers__view-all {
	display: block;
	width: fit-content;
	margin: 40px auto 0;
	padding: 14px 40px;
	background: var(--sd-color-brand);
	color: var(--sd-color-button-text);
	font-family: var(--sd-font-button);
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	border-radius: var(--sd-radius);
	transition: background-color 0.15s ease;
}

.best-sellers__view-all:hover,
.best-sellers__view-all:focus-visible {
	background: var(--sd-color-brand-hover);
}

/* ---- Carousel ---- */

.best-sellers__carousel {
	position: relative;
}

.best-sellers__track {
	display: flex;
	gap: 28px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
}

.best-sellers__track::-webkit-scrollbar {
	display: none;
}

.product-card {
	flex: 0 0 calc((100% - 3 * 28px) / 4);
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	color: var(--sd-color-body-text);
}

.product-card__image {
	display: block;
	aspect-ratio: 1 / 1;
	background: var(--sd-color-white);
	border-radius: var(--sd-radius);
	overflow: hidden;
	margin-bottom: 16px;
}

/* On the white "Products of the Week" background, the card image needs
   its own border since it can no longer rely on a page-bg/white contrast
   to read as a distinct card. */
.products-of-week .product-card__image {
	border: 1px solid var(--sd-color-border);
}

.product-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.25s ease;
}

.product-card:hover .product-card__image img,
.product-card:focus-visible .product-card__image img {
	transform: scale(1.05);
}

.product-card__title {
	font-family: var(--sd-font-body);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
	margin-bottom: 6px;
}

.product-card__price {
	font-family: var(--sd-font-button);
	font-size: 16px;
	font-weight: 600;
	color: var(--sd-color-brand);
	margin-bottom: 12px;
}

/* Honest "no real product yet" state — Kids category, 20 Aug. Shows the
   generic placeholder-product.svg contained/muted on a grey background
   instead of stretching an unrelated photo to look like a real product. */

.product-card--soon {
	cursor: default;
}

.product-card--soon .product-card__image {
	background: var(--sd-color-page-bg);
	display: flex;
	align-items: center;
	justify-content: center;
}

.product-card--soon .product-card__image img {
	width: 45%;
	height: 45%;
	object-fit: contain;
	opacity: 0.6;
}

.product-card--soon:hover .product-card__image img,
.product-card--soon:focus-visible .product-card__image img {
	transform: none;
}

.product-card--soon .product-card__price {
	color: #999999;
}

.product-card__sizes {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.product-card__size {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 30px;
	height: 30px;
	padding: 0 6px;
	border: 1px solid var(--sd-color-border);
	border-radius: var(--sd-radius);
	background: var(--sd-color-white);
	font-family: var(--sd-font-button);
	font-size: 12px;
	font-weight: 600;
	color: var(--sd-color-body-text);
}

.best-sellers__arrow {
	position: absolute;
	top: 0;
	bottom: 40px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	background: none;
	border: none;
	cursor: pointer;
	color: var(--sd-color-body-text);
}

.best-sellers__arrow--prev {
	left: -48px;
}

.best-sellers__arrow--next {
	right: -48px;
}

.best-sellers__arrow svg {
	width: 28px;
	height: 28px;
	stroke: currentColor;
}

.best-sellers__arrow:hover,
.best-sellers__arrow:focus-visible {
	color: var(--sd-color-brand);
}

.best-sellers__arrow:disabled {
	opacity: 0.3;
	cursor: default;
}

@media (max-width: 1279.98px) {
	.best-sellers__arrow--prev {
		left: 0;
	}

	.best-sellers__arrow--next {
		right: 0;
	}
}

@media (max-width: 999.98px) {
	.product-card {
		flex-basis: calc((100% - 2 * 20px) / 2.3);
	}

	.best-sellers__track {
		gap: 20px;
	}

	.best-sellers__title {
		font-size: 26px;
	}

	.best-sellers__arrow {
		display: none;
	}
}

@media (max-width: 599.98px) {
	.best-sellers {
		padding: 40px 0;
	}

	.product-card {
		flex-basis: calc((100% - 20px) / 2);
	}

	.best-sellers__header {
		margin-bottom: 20px;
	}

	.best-sellers__title {
		font-size: 22px;
	}

	.product-card__title {
		font-size: 14px;
	}
}
