/**
 * Product Categories Slider - Styles
 * WCAG 2.0 Compliant
 */

/* Main Container */
.cpts-slider {
  position: relative;
/*   max-width: 1400px; */
/*   margin: 0 auto; */
}

/* Navigation Wrapper */
.cpts-nav-wrapper {
	position: relative;
/* 	padding-bottom: 8px; */
	margin-left: clamp(32px, calc(5.95vw - 13.71px), 72px);
	padding-left: 8px;
	background: #FFF;
	display: flex;
	align-items: center;
	gap: 12px;
}

@media (max-width: 768px) {
	.cpts-nav-wrapper {
		margin-left: 16px;
	}
}

/* Scrollable Navigation Container */
.cpts-nav-scroll {
	background: #FFF;
	overflow-x: hidden;
	overflow-y: hidden;
	scroll-behavior: smooth;
	scrollbar-width: thin;
	scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
	padding-bottom: 32px;
	flex: 1;
}

.cpts-nav-scroll::-webkit-scrollbar {
  height: 8px;
}

.cpts-nav-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.cpts-nav-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

.cpts-nav-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.5);
}

/* Categories Navigation */
.cpts-categories-nav {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

/* Gdy elementy się nie mieszczą — wróć do flex-start i włącz min-width */
.cpts-nav-wrapper.has-overflow .cpts-categories-nav {
  justify-content: flex-start;
  min-width: min-content;
}

/* Navigation Items (Tabs) ### */
.cpts-slider .cpts-nav-scroll .cpts-nav-item {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 8px 8px 12px;
	cursor: pointer;
	transition: all 0.3s;
	white-space: nowrap;
	user-select: none;
	position: relative;
	flex-shrink: 0;
	color: var(--category-color);
	font-family: var(--e-global-typography-text-font-family), Sans-serif;
    font-size: var(--e-global-typography-text-font-size);
	line-height: 1em;
	text-transform: uppercase;
	font-weight: 700;
	border: none;
	transition: all 0.3s ease;
	border-radius: 0px;
	background-color: transparent;
}

.cpts-slider .cpts-nav-scroll .cpts-nav-item:hover {
	background: unset;
	color: var(--category-color);
}

/* Focus States - WCAG 2.4.7 */
.cpts-slider .cpts-slider .cpts-nav-scroll .cpts-nav-item:focus {
	outline: 2px solid #0066cc;
	outline-offset: 2px;
	background-color: unset;
	color: var(--category-color);
}

.cpts-slider .cpts-nav-scroll .cpts-nav-item:focus:not(:focus-visible) {
  outline: none;
}

.cpts-slider .cpts-nav-scroll .cpts-nav-item:focus-visible {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}

/* Active Indicator */
.cpts-slider .cpts-nav-scroll .cpts-nav-item::before {
	content: '';
	width: 12px;
	height: 12px;
	background: var(--category-color);
	border-radius: 100px;
	margin-right: 8px;
	transform-origin: right;
	transition: all 0.3s ease 0.3s;
}

.cpts-slider .cpts-nav-scroll .cpts-nav-item:hover::before,
.cpts-slider .cpts-nav-scroll .cpts-nav-item[aria-selected="true"]::before{
	transform: scale(2);
	transition: all 0.3s ease 0s;
}

.cpts-slider .cpts-nav-scroll .cpts-nav-item::after {
	content: '';
	position: absolute;
	left: 12px;
	top: 15px;
	width: 6px;
	height: 0px;
	background-color: var(--category-color);
	transform: translateX(-50%);
	transition: all 0.3s ease;
	transition-delay: 0.1s
}

.cpts-slider .cpts-nav-scroll .cpts-nav-item:hover::after,
.cpts-slider .cpts-nav-scroll .cpts-nav-item[aria-selected="true"]::after {
  height: 50px
}

/* Navigation Buttons - WCAG 2.5.5 */
.cpts-slider .cpts-nav-btn {
/* 	display: none; */
	background: #fff;
	cursor: pointer;
	z-index: 10;
	transition: all 0.3s;
	color: #000;
	padding: 0px;
	margin-bottom: 32px;
	border: none;
	line-height: 0;
}

.cpts-slider .cpts-nav-btn.prev {
	transform: rotate(180deg);
}

.cpts-slider .cpts-nav-btn svg {
	width: 24px;
	height: 24px;
}

/* Pokaż strzałki tylko gdy jest overflow */
.cpts-slider .cpts-nav-wrapper.has-overflow .cpts-nav-btn {
  display: flex;
}

.cpts-slider .cpts-nav-btn:focus {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}

.cpts-slider .cpts-nav-btn:focus:not(:focus-visible) {
  outline: none;
}

.cpts-slider .cpts-nav-btn:focus-visible {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}

.cpts-slider .cpts-nav-btn:disabled {
	color: #828282;
	background: transparent;
	cursor: not-allowed;
	pointer-events: none;
}


/* =========================================
 * Content Area — grid stacking
 * All slides occupy the same grid cell.
 * Height = tallest slide, no reflow on switch.
 * ========================================= */

.cpts-hero-main {
  position: relative;
  overflow: hidden;
  background: #FFF;
}

.cpts-content-area {
  display: grid;
  overflow: hidden;
  background: #FFF;
}

/* Hero Slides — stacked via grid, never display:none */
.cpts-hero-slide {
  grid-area: 1 / 1;
  position: relative;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}

.cpts-hero-slide.active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.4s ease, visibility 0s linear 0s;
}


/* Hero Image */
.cpts-hero-image {
	display: block;
	width: 100%;
/* 	aspect-ratio: 16 / 9; */
	object-fit: cover;
	max-height: calc(100vh - (var(--menu-height) + 80px));
	min-height: 500px;
	object-position: bottom;
}

@media only screen and (max-width: 768px) {
	.cpts-hero-image {
		min-height: 0;
	}
}


/* Hero Overlay */
.cpts-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    padding: 0px 16px 16px 16px;
    align-items: flex-end;
}

.hero-title-wrapper {
	margin: 0 auto;
}


@media (max-width: 768px) {
	.cpts-hero-overlay {
		padding: 0px 8px 8px 8px;
	}
}

/* Hero Title */
.hero-title-wrapper .cpts-hero-title {
	color: #FFF;
	font-size: clamp(120px, 5.26vw + 63.8px, 180px);
	font-weight: 700;
	text-transform: uppercase;
	margin: 0;
	line-height: .8em;
	margin-top: -0.11em;
}

/* Hero Subtitle */
.hero-title-wrapper .sub-title {
  	font-size: clamp(24px, 1.19vw + 14.86px, 32px);
	color: #FFF;
	line-height: 1em;
	margin-top: 8px;
	text-align: right;
}

@media (max-width: 768px) {
	.hero-title-wrapper .cpts-hero-title {
		font-size: 60px;
	}
	
	.hero-title-wrapper .sub-title {
		font-size: 16px;
		margin-top: 8px;
	}
}

/* Hero CTA Button - WCAG 2.5.5 (44px minimum height) */
.cpts-slider .cpts-hero-cta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--category-color);
	color: #FFF;
	padding: 12px 20px 0px 0px;
	font-size: clamp(20px, 0.6vw + 15.42px, 24px);
	line-height: 24px;
	transition: all 0.3s;
}

.cpts-slider .cpts-hero-cta-wrapper {
	position: relative;
	z-index: 1;
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

@media only screen and (min-width: 768px) {
	.cpts-slider .cpts-hero-cta-wrapper { 
		position: absolute;
		right: 16px;
		bottom: 16px;
	}
}

.cpts-hero-cta:hover {
	background: #fff;
	color: var(--category-color);
}

.cpts-hero-cta:focus {
  outline: 2px solid #0066cc;
  outline-offset: 4px;
}

.cpts-hero-cta:focus:not(:focus-visible) {
  outline: none;
}

.cpts-hero-cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

/* Screen Reader Only */
.cpts-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Reduced Motion - WCAG 2.3.3 */
@media (prefers-reduced-motion: reduce) {
  .cpts-nav-item,
  .cpts-nav-btn,
  .cpts-hero-cta {
    transition: none;
  }
  
  .cpts-hero-slide {
    transition: none;
  }
  
  .cpts-nav-scroll {
    scroll-behavior: auto;
  }
}


@media (max-width: 768px) {
	.cpts-slider .cpts-hero-cta {
		font-size: 16px;
		padding: 8px 8px 0px 0px;
	}
	
	.cpts-slider .cpts-hero-cta svg {
		width: 16px;
		height: 16px;
	}

	.cpts-hero-cta:hover {
	  background: #DADADA;
	}
	
}


/* =========================================
 * Product Gallery
 * Desktop: 3 fixed-width slides, overflow hidden
 * Mobile:  peek slider
 * ========================================= */

.cpts-product-gallery {
	position: relative;
	width: 100%;
	overflow: hidden;
	background: #FFF;
	padding-bottom: 16px;
}

.cpts-gallery-track {
	display: flex;
	gap: 8px;
	will-change: transform;
}

.cpts-gallery-item {
	flex: 0 0 calc((100% - 16px) / 3);
	min-width: calc((100% - 16px) / 3);
	display: block;
	overflow: hidden;
}

.cpts-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

/* Gallery Arrows — shared */
.cpts-gallery-arrows {
	display: none;
}

.cpts-gallery-arrows .cpts-nav-btn {
	margin: 0;
}

/* Desktop: show arrows when more than 3 images */
@media (min-width: 769px) {
	.cpts-product-gallery.has-overflow .cpts-gallery-arrows {
		display: flex;
		justify-content: center;
		gap: 22px;
		padding-top: 8px;
	}
}


/* --- Mobile: horizontal slider with center peek --- */
@media (max-width: 768px) {

	.cpts-gallery-arrows {
		display: flex;
		justify-content: center;
		gap: 22px;
	}

	.cpts-gallery-arrows .cpts-nav-btn {
		display: flex;
		margin: 0px;
	}

	.cpts-product-gallery {
		overflow: hidden;
	}

	.cpts-gallery-track {
		display: flex;
		flex-wrap: nowrap;
		gap: 8px;
		padding: 12px 0;
		transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	}

	.cpts-gallery-item {
		flex: 0 0 70%;
		min-width: 70%;
		border-radius: 6px;
	}
}