/* ============================================
   PRODUCT PAGE - DFS AB Style
   ============================================ */

/* Main container with proper spacing */
.product-container {
	display: flex;
	flex-direction: column;
	gap: var(--padding-large);
	padding: var(--padding-large) 5%; /* Side padding like frontpage */
	max-width: var(--container-large);
	margin: 0 auto;
}

/* Product title styling */
.product-container > h1 {
	font-size: var(--font-size-h2); /* 32px */
	font-weight: var(--font-weight-bold);
	letter-spacing: -1px; /* DFS AB tight spacing */
	color: var(--color-primary);
	margin-bottom: var(--padding-small);
	line-height: 1.2;
}

/* Category badges - DFS AB pill style */
.product-categoryList {
	display: flex;
	flex-direction: row;
	gap: var(--padding-small);
	flex-wrap: wrap;
	margin-bottom: var(--padding-default);
}

.product-categoryList span.badge {
	background: var(--color-secondary);
	color: var(--color-white);
	padding: 8px 20px;
	border-radius: 20px; /* Pill shape */
	font-size: 14px;
	font-weight: var(--font-weight-semibold);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: var(--transition-fast);
}

.product-categoryList span.badge:hover {
	transform: scale(1.05);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ============================================
   UPPER SECTION - Image + Info Grid
   ============================================ */

/* Responsive grid with explicit breakpoints */
.product-upper {
	display: grid;
	grid-template-columns: 1fr; /* Mobile: stacked */
	gap: var(--padding-xlarge); /* Generous spacing */
}

/* Tablet: side by side */
@media (min-width: 768px) {
	.product-upper {
		grid-template-columns: 1fr 1fr; /* Equal columns */
	}
}

/* Desktop: wider image column */
@media (min-width: 1024px) {
	.product-upper {
		grid-template-columns: 1.2fr 0.8fr; /* Image gets more space */
		gap: 80px; /* More generous spacing */
	}
}

/* ============================================
   IMAGE GALLERY - Fixed aspect ratio issues
   ============================================ */

.product-imageContainer {
	display: flex;
	flex-direction: column;
	gap: var(--padding-large);
}

/* Main highlight image - NO forced aspect ratio */
.product-highlightImage {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	min-height: 400px;
	max-height: 600px;
	background: var(--color-background-1);
	border-radius: var(--border-radius-card); /* DFS AB rounded corners */
	overflow: hidden;
	box-shadow: var(--box-shadow-default);
	padding: var(--padding-large);
}

.product-highlightImage img {
	width: 100%;
	height: 100%;
	max-height: 550px;
	object-fit: contain;
	background: white;
}

/* Thumbnail grid - replaced horizontal scroll */
.product-highlightSelectContainer {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
	gap: var(--padding-default);
	max-width: 100%;
}

.product-highlightSelectContainer img {
	width: 100%;
	height: 100px;
	object-fit: cover;
	border: 3px solid transparent;
	border-radius: var(--border-radius-small);
	transition: var(--transition-fast);
	cursor: pointer;
	user-select: none;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Active and hover states for thumbnails */
.product-highlightSelectContainer img:hover {
	border-color: var(--color-tertiary);
	transform: scale(1.05);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product-highlightSelectContainer img.active {
	border-color: var(--color-secondary);
	box-shadow: 0 4px 12px rgba(0, 119, 190, 0.3);
}

/* ============================================
   PRODUCT INFO - Specs and Actions
   ============================================ */

.product-infoContainer {
	display: flex;
	flex-direction: column;
	gap: var(--padding-large);
}

/* Specs section with card styling */
.product-specs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--padding-default);
	background: var(--color-background-1);
	padding: var(--padding-large);
	border-radius: var(--border-radius-default);
	box-shadow: var(--box-shadow-default);
}

.product-specs .product-spec-key {
	font-weight: var(--font-weight-semibold);
	color: var(--color-text-primary);
	font-size: var(--font-size-default);
}

.product-specs .product-spec-value {
	color: var(--color-text-secondary);
	font-size: var(--font-size-default);
}

/* Action buttons */
.product-actions {
	display: flex;
	flex-direction: column;
	gap: var(--padding-default);
	margin-top: var(--padding-default);
}

.product-actions .btn {
	width: 100%;
	padding: 16px 32px; /* Larger, more prominent */
	font-size: 16px;
	border-radius: var(--border-radius-button);
	font-weight: var(--font-weight-semibold);
	transition: var(--transition-default);
}

/* ============================================
   TABS - Description and Details
   ============================================ */

/* Tab navigation styling */
.nav-tabs {
	border-bottom: 3px solid var(--color-background-1);
	margin-top: var(--padding-xlarge); /* Space from upper section */
	margin-bottom: 0;
}

.nav-tabs .nav-link {
	color: var(--color-text-primary);
	font-weight: var(--font-weight-semibold);
	font-size: var(--font-size-default);
	padding: var(--padding-default) var(--padding-large);
	border: none;
	border-bottom: 3px solid transparent;
	transition: var(--transition-fast);
	background: transparent;
}

.nav-tabs .nav-link:hover {
	color: var(--color-secondary);
	border-bottom-color: var(--color-tertiary);
	background: transparent;
}

.nav-tabs .nav-link.active {
	color: var(--color-secondary);
	border-bottom-color: var(--color-secondary);
	background: transparent;
}

/* Tab content with proper width constraint */
.product-infoTabs {
	background: var(--color-white);
}

.product-infoTabs > .tab-pane {
	padding: var(--padding-xlarge) var(--padding-large); /* Generous vertical padding */
	max-width: 800px; /* Limit line length for readability - DFS AB principle */
	margin: 0 auto; /* Center the content */
}

.product-infoTabs > .tab-pane p {
	font-size: var(--font-size-body); /* 18px for better readability */
	line-height: 1.6; /* Comfortable reading */
	color: var(--color-text-primary);
	margin-bottom: var(--padding-default);
}

.product-infoTabs > .tab-pane h2,
.product-infoTabs > .tab-pane h3 {
	color: var(--color-primary);
	margin-top: var(--padding-large);
	margin-bottom: var(--padding-default);
}

.product-infoTabs > .tab-pane h2 {
	font-size: var(--font-size-h3);
	font-weight: var(--font-weight-bold);
}

.product-infoTabs > .tab-pane h3 {
	font-size: var(--font-size-h4);
	font-weight: var(--font-weight-semibold);
}

.product-infoTabs > .tab-pane ul,
.product-infoTabs > .tab-pane ol {
	margin-left: var(--padding-large);
	margin-bottom: var(--padding-default);
}

.product-infoTabs > .tab-pane li {
	font-size: var(--font-size-body);
	line-height: 1.6;
	margin-bottom: var(--padding-small);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

/* Mobile optimizations */
@media (max-width: 767px) {
	.product-container {
		padding: var(--padding-default);
	}

	.product-container > h1 {
		font-size: var(--font-size-h3); /* Smaller on mobile */
	}

	.product-highlightImage {
		min-height: 300px;
		max-height: 400px;
	}

	.product-specs {
		grid-template-columns: 1fr; /* Single column on mobile */
		padding: var(--padding-default);
	}

	.product-highlightSelectContainer {
		grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
	}

	.product-highlightSelectContainer img {
		height: 80px;
	}

	.product-infoTabs > .tab-pane {
		padding: var(--padding-large) var(--padding-default);
	}

	.nav-tabs .nav-link {
		padding: var(--padding-default);
		font-size: var(--font-size-small);
	}
}

/* Tablet optimizations */
@media (min-width: 768px) and (max-width: 1023px) {
	.product-highlightImage {
		min-height: 350px;
		max-height: 500px;
	}

	.product-specs {
		padding: var(--padding-default);
	}
}
