/**
 * Luxury Timepieces Collection - Brand Collection Block
 * 
 * A global reusable block displaying luxury watch brand cards in a slider.
 * Used on product pages, homepage, collection pages, etc.
 *
 * @package Onviqa
 * @since 1.0.0
 */

/* ==========================================================================
   Section Container
   ========================================================================== */

.ksq-brand-collection {
	position: relative;
	width: 100vw;
	margin-left: calc(-50vw + 50%);
	padding: 100px 0;
	background: radial-gradient(46.44% 119.97% at 50% 0%, #333333 0%, #111111 100%);
	overflow: visible;
}

.ksq-brand-collection__container {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 50px;
	width: 100%;
	max-width: 1540px;
	margin: 0 auto;
	padding: 0 50px;
	box-sizing: border-box;
}

/* ==========================================================================
   Header Section
   ========================================================================== */

.ksq-brand-collection__header {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	max-width: 900px;
	text-align: center;
}

.ksq-brand-collection__title {
	margin: 0;
	font-family: 'DM Serif Display', serif;
	font-style: normal;
	font-weight: 400;
	font-size: 44px;
	line-height: 60px;
	color: #FFFFFF;
}

.ksq-brand-collection__description {
	margin: 0;
	font-family: 'Roboto Flex', sans-serif;
	font-style: normal;
	font-weight: 400;
	font-size: 16px;
	line-height: 24px;
	color: rgba(255, 255, 255, 0.7);
}

/* ==========================================================================
   Slider Wrapper & Navigation
   Based on Figma: 1490px wrapper with arrows, 1440px cards track
   ========================================================================== */

.ksq-brand-collection__slider-wrapper {
	position: relative;
	width: 100%;
	max-width: 1440px;
	margin: 0 auto;
}

.ksq-brand-collection__track-container {
	width: 100%;
	overflow: hidden;
	position: relative;
}

.ksq-brand-collection__track {
	display: flex;
	flex-direction: row;
	gap: 32px;
	transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Navigation Arrows - Half inside card, half outside */
.ksq-brand-collection__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background: #FFFFFF;
	border: 1.5px solid #888888;
	cursor: pointer;
	transition: all 0.2s ease;
	color: #888888;
}

.ksq-brand-collection__nav:hover {
	border-color: #111111;
	color: #111111;
}

.ksq-brand-collection__nav:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.ksq-brand-collection__nav svg {
	width: 14px;
	height: 12px;
}

/* Left arrow: half inside Rolex card (25px), half outside */
.ksq-brand-collection__nav--prev {
	left: -25px;
}

/* Right arrow: half inside RM card (25px), half outside */
.ksq-brand-collection__nav--next {
	right: -25px;
}

/* ==========================================================================
   Brand Cards
   ========================================================================== */

.ksq-brand-card {
	position: relative;
	flex-shrink: 0;
	width: 336px;
	height: 336px;
	border-radius: 16px;
	overflow: hidden;
	background-color: var(--card-bg, #F4DFD9);
	text-decoration: none;
	display: block;
	cursor: pointer;
}

.ksq-brand-card__image-wrapper {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.ksq-brand-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	border-radius: 16px;
}

/* Explore Button (now a span inside the card link) */
.ksq-brand-card__button {
	position: absolute;
	bottom: 8px;
	left: 8px;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 12px 36px;
	background-color: var(--button-bg, #D73000);
	border-radius: 10px;
	text-decoration: none;
	transition: transform 0.2s ease, opacity 0.2s ease;
	pointer-events: none; /* Button is visual only, card link handles click */
}

.ksq-brand-card__button span {
	font-family: 'Roboto Flex', sans-serif;
	font-style: normal;
	font-weight: 600;
	font-size: 18px;
	line-height: 21px;
	color: #FFFFFF;
}

.ksq-brand-card__button svg {
	width: 10px;
	height: 8px;
	color: #FFFFFF;
}

.ksq-brand-card:hover .ksq-brand-card__button {
	transform: scale(1.02);
	opacity: 0.95;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

/* Tablet - Below 1540px */
@media (max-width: 1540px) {
	.ksq-brand-collection__container {
		max-width: 100%;
		padding: 0 25px;
	}
	
	.ksq-brand-collection__track {
		gap: 24px;
	}
	
	.ksq-brand-card {
		width: 300px;
		height: 300px;
	}
}

@media (max-width: 1200px) {
	.ksq-brand-collection {
		padding: 80px 0;
	}
	
	.ksq-brand-collection__container {
		gap: 40px;
	}
	
	.ksq-brand-collection__title {
		font-size: 36px;
		line-height: 48px;
	}
	
	.ksq-brand-card {
		width: 280px;
		height: 280px;
	}
}

@media (max-width: 1024px) {
	.ksq-brand-collection {
		padding: 60px 0;
	}
	
	.ksq-brand-collection__container {
		padding: 0 20px;
	}
	
	.ksq-brand-collection__nav {
		width: 44px;
		height: 44px;
	}
	
	.ksq-brand-collection__nav svg {
		width: 12px;
		height: 10px;
	}
	
	.ksq-brand-card {
		width: 260px;
		height: 260px;
	}
	
	.ksq-brand-card__button {
		padding: 10px 28px;
	}
	
	.ksq-brand-card__button span {
		font-size: 16px;
		line-height: 19px;
	}
}

@media (max-width: 768px) {
	.ksq-brand-collection {
		padding: 50px 0;
	}
	
	.ksq-brand-collection__container {
		gap: 30px;
		padding: 0 15px;
	}
	
	.ksq-brand-collection__header {
		gap: 10px;
	}
	
	.ksq-brand-collection__title {
		font-size: 28px;
		line-height: 38px;
	}
	
	.ksq-brand-collection__description {
		font-size: 14px;
		line-height: 21px;
	}
	
	.ksq-brand-collection__nav {
		width: 40px;
		height: 40px;
	}
	
	.ksq-brand-collection__track {
		gap: 16px;
	}
	
	.ksq-brand-card {
		width: 240px;
		height: 240px;
	}
	
	.ksq-brand-card__button {
		padding: 8px 20px;
		left: 6px;
		bottom: 6px;
	}
	
	.ksq-brand-card__button span {
		font-size: 14px;
		line-height: 17px;
	}
	
	.ksq-brand-card__button svg {
		width: 8px;
		height: 6px;
	}
}

@media (max-width: 576px) {
	.ksq-brand-collection {
		padding: 40px 0;
	}
	
	.ksq-brand-collection__container {
		gap: 25px;
		padding: 0 15px;
	}
	
	.ksq-brand-collection__title {
		font-size: 24px;
		line-height: 32px;
	}
	
	.ksq-brand-collection__description {
		font-size: 13px;
		line-height: 20px;
	}
	
	/* Hide navigation arrows on mobile - enable touch swipe */
	.ksq-brand-collection__nav {
		display: none;
	}
	
	.ksq-brand-collection__slider-wrapper {
		gap: 0;
	}
	
	.ksq-brand-collection__track-container {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		-ms-overflow-style: none;
	}
	
	.ksq-brand-collection__track-container::-webkit-scrollbar {
		display: none;
	}
	
	.ksq-brand-collection__track {
		padding: 0 5px;
		gap: 12px;
	}
	
	.ksq-brand-card {
		width: 200px;
		height: 200px;
	}
	
	.ksq-brand-card__button {
		padding: 6px 14px;
		gap: 6px;
		border-radius: 8px;
	}
	
	.ksq-brand-card__button span {
		font-size: 12px;
		line-height: 14px;
	}
}

/* ==========================================================================
   Animation & Transitions
   ========================================================================== */

.ksq-brand-card {
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ksq-brand-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Slider Animation */
.ksq-brand-collection__track.is-animating {
	pointer-events: none;
}

/* Smooth entry animation */
@keyframes brandCardFadeIn {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.ksq-brand-collection.is-visible .ksq-brand-card {
	animation: brandCardFadeIn 0.5s ease forwards;
}

.ksq-brand-collection.is-visible .ksq-brand-card:nth-child(1) { animation-delay: 0s; }
.ksq-brand-collection.is-visible .ksq-brand-card:nth-child(2) { animation-delay: 0.1s; }
.ksq-brand-collection.is-visible .ksq-brand-card:nth-child(3) { animation-delay: 0.2s; }
.ksq-brand-collection.is-visible .ksq-brand-card:nth-child(4) { animation-delay: 0.3s; }
.ksq-brand-collection.is-visible .ksq-brand-card:nth-child(5) { animation-delay: 0.4s; }

/* ==========================================================================
   Light Theme Variant
   Used on homepage and other light-background pages
   ========================================================================== */

.ksq-brand-collection--light {
	background: transparent;
	padding: 80px 0;
}

.ksq-brand-collection--light .ksq-brand-collection__title {
	color: #111111;
}

.ksq-brand-collection--light .ksq-brand-collection__description {
	color: #666666;
}

.ksq-brand-collection--light .ksq-brand-collection__nav {
	background: #FFFFFF;
	border-color: #111111;
	color: #111111;
}

.ksq-brand-collection--light .ksq-brand-collection__nav:hover {
	background: #111111;
	border-color: #111111;
	color: #FFFFFF;
}

.ksq-brand-collection--light .ksq-brand-collection__nav:disabled {
	opacity: 0.3;
}


