/**
 * Shop page front: the promo banner and the category circles that sit
 * between the heading and the grid (inc/shop-front.php). The slider
 * controls are added by sliders.js and only styled here.
 */

/* --------------------------------------------------------------------------
   1. Banner
   -------------------------------------------------------------------------- */

.pctmart-shop-banner {
	position: relative;
	flex: 1 1 100%;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	margin: 4px 0 28px;
}

.pctmart-shop-banner-track {
	display: flex;
	overflow-x: auto;
	border-radius: 16px;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.pctmart-shop-banner-track::-webkit-scrollbar {
	display: none;
}

.pctmart-shop-slide {
	flex: 0 0 100%;
	min-width: 0;
	scroll-snap-align: start;
}

/* In the home hero the slide fills the column beside the copy; the column
   is half the page, so the image sits above the words instead of beside
   them. */
.pctmart-hero-track .pctmart-shop-slide-inner {
	grid-template-columns: minmax(0, 1fr);
	align-content: center;
	gap: 14px;
	height: 100%;
	min-height: 320px;
	padding: 24px 28px 30px;
}

.pctmart-hero-track .pctmart-shop-slide-media {
	order: -1;
}

.pctmart-hero-track .pctmart-shop-slide-img {
	max-height: 190px;
}

.pctmart-hero-track .pctmart-shop-slide-title {
	max-width: none;
	font-size: clamp(20px, 2vw, 26px);
}

.pctmart-hero-track .pctmart-shop-slide-copy {
	font-size: 14px;
}

.pctmart-shop-slide-inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
	align-items: center;
	gap: 24px;
	min-height: 280px;
	padding: 28px clamp(24px, 4vw, 48px);
	color: inherit;
	text-decoration: none;
}

/* Soft tints, one per slide, so the row of banners reads as a set. */
.pctmart-shop-slide.is-mint .pctmart-shop-slide-inner {
	background: linear-gradient(120deg, #e7f6ee 0%, #d4efe0 100%);
}

.pctmart-shop-slide.is-sand .pctmart-shop-slide-inner {
	background: linear-gradient(120deg, #fdf4e7 0%, #f7e6cf 100%);
}

.pctmart-shop-slide.is-sky .pctmart-shop-slide-inner {
	background: linear-gradient(120deg, #e8f1fd 0%, #d6e6fb 100%);
}

.pctmart-shop-slide.is-rose .pctmart-shop-slide-inner {
	background: linear-gradient(120deg, #fdeef0 0%, #f8dde1 100%);
}

.pctmart-shop-slide-text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
}

.pctmart-shop-slide-title {
	max-width: 18ch;
	color: #0c111d;
	font-size: clamp(22px, 2.6vw, 34px);
	font-weight: 700;
	line-height: 1.15;
}

.pctmart-shop-slide-copy {
	max-width: 44ch;
	color: #344054;
	font-size: clamp(14px, 1.3vw, 16px);
	line-height: 1.5;
}

.pctmart-shop-slide-cta {
	display: inline-block;
	margin-top: 6px;
	padding: 11px 24px;
	border-radius: 25rem;
	background: var(--pct-brand-deep, #c8102e);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
}

.pctmart-shop-slide-inner:hover .pctmart-shop-slide-cta,
.pctmart-shop-slide-inner:focus-visible .pctmart-shop-slide-cta {
	background: var(--pct-brand-ink, #111);
}

.pctmart-shop-slide-media {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	min-width: 0;
}

/* The parent gives any image in the archive header half width; this one
   fills its column. */
header.woocommerce-products-header .pctmart-shop-slide-img,
.pctmart-shop-slide-img {
	display: block;
	width: 100%;
	max-width: 560px;
	height: auto;
	max-height: 270px;
	object-fit: contain;
	object-position: center bottom;
}

/* The circle images sit under the same parent rule. */
header.woocommerce-products-header .pctmart-shop-cat-img {
	width: 80px;
}

/* --------------------------------------------------------------------------
   2. Slider controls (shared shape with the home hero)
   -------------------------------------------------------------------------- */

.pctmart-shop-banner .pctmart-slider-dots {
	position: absolute;
	right: 0;
	bottom: 14px;
	left: 0;
	display: flex;
	justify-content: center;
	gap: 8px;
}

.pctmart-shop-banner .pctmart-slider-dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(12, 17, 29, 0.25);
	cursor: pointer;
	transition: width 0.2s ease, background 0.2s ease;
}

.pctmart-shop-banner .pctmart-slider-dot.is-current {
	width: 22px;
	border-radius: 4px;
	background: #0c111d;
}

.pctmart-shop-banner .pctmart-slider-arrow,
.pctmart-shop-cats-slider .pctmart-slider-arrow {
	position: absolute;
	top: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 0 2px 8px rgba(16, 24, 40, 0.16);
	color: #0c111d;
	transform: translateY(-50%);
	cursor: pointer;
}

.pctmart-shop-banner .pctmart-slider-arrow:hover,
.pctmart-shop-banner .pctmart-slider-arrow:focus,
.pctmart-shop-cats-slider .pctmart-slider-arrow:hover,
.pctmart-shop-cats-slider .pctmart-slider-arrow:focus {
	background: #fff;
}

.pctmart-shop-banner .pctmart-slider-arrow.is-prev {
	left: 12px;
}

.pctmart-shop-banner .pctmart-slider-arrow.is-next {
	right: 12px;
}

/* --------------------------------------------------------------------------
   3. Category circles
   -------------------------------------------------------------------------- */

/* The archive header is a flex row on small screens, so the rail must be
   told to take the full width or it grows to fit every circle. */
.pctmart-shop-cats {
	flex: 1 1 100%;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	margin: 0 0 28px;
	padding: 0 0 20px;
	border-bottom: 1px solid #e4e7ec;
}

.pctmart-shop-cats-slider {
	position: relative;
	max-width: 100%;
}

.pctmart-shop-cats-track {
	display: flex;
	gap: 8px;
	margin: 0;
	padding: 4px 2px;
	overflow-x: auto;
	list-style: none;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
}

.pctmart-shop-cats-track::-webkit-scrollbar {
	display: none;
}

.pctmart-shop-cat {
	flex: 0 0 auto;
	width: 128px;
	margin: 0;
	list-style: none;
	scroll-snap-align: start;
}

.pctmart-shop-cat-link {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 4px;
	color: #1d2327;
	text-align: center;
	text-decoration: none;
}

.pctmart-shop-cat-media {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 104px;
	height: 104px;
	border-radius: 50%;
	background: #f2f4f7;
	color: #111;
	transition: background 0.15s ease, transform 0.15s ease;
}

.pctmart-shop-cat-link:hover .pctmart-shop-cat-media,
.pctmart-shop-cat-link:focus-visible .pctmart-shop-cat-media {
	background: #e4e7ec;
	transform: translateY(-2px);
}

/* The packshot sits inside the circle on its own white square, blended
   into the grey by the circle clip. */
.pctmart-shop-cat-img {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	object-fit: cover;
	mix-blend-mode: multiply;
}

.pctmart-shop-cat-media svg,
.pctmart-shop-cat-media .pctmart-shop-cat-icon {
	width: 40px;
	height: 40px;
}

.pctmart-shop-cat-media .pctmart-shop-cat-icon svg {
	width: 100%;
	height: 100%;
}

.pctmart-shop-cat-name {
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
}

.pctmart-shop-cat-link:hover .pctmart-shop-cat-name,
.pctmart-shop-cat-link:focus-visible .pctmart-shop-cat-name {
	color: var(--pct-brand-deep, #c8102e);
}

/* Arrows on the rail sit on the edges, over the fade. */
.pctmart-shop-cats-slider .pctmart-slider-arrow {
	top: 56px;
}

.pctmart-shop-cats-slider .pctmart-slider-arrow.is-prev {
	left: -6px;
}

.pctmart-shop-cats-slider .pctmart-slider-arrow.is-next {
	right: -6px;
}

/* --------------------------------------------------------------------------
   4. Narrow screens
   -------------------------------------------------------------------------- */

@media (max-width: 700px) {
	.pctmart-shop-slide-inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
		min-height: 0;
		padding: 22px 20px 36px;
	}

	.pctmart-shop-slide-media {
		order: -1;
	}

	.pctmart-shop-slide-img {
		max-height: 150px;
	}

	.pctmart-shop-slide-title {
		max-width: none;
	}

	.pctmart-shop-banner .pctmart-slider-arrow,
	.pctmart-shop-cats-slider .pctmart-slider-arrow {
		display: none;
	}

	.pctmart-shop-cat {
		width: 96px;
	}

	.pctmart-shop-cat-media {
		width: 80px;
		height: 80px;
	}

	header.woocommerce-products-header .pctmart-shop-cat-img,
	.pctmart-shop-cat-img {
		width: 62px;
		height: 62px;
	}

	.pctmart-shop-cat-name {
		font-size: 13px;
	}
}
