/**
 * Series Components Styles
 * 
 * Shared styles for door-styles-grid and featured-series components
 * 
 * @package Plastpro
 * @since 1.0.0
 */

/* ============================================
   Door Styles Listing Component
   ============================================ */

.door-styles-listing {
	padding: 3rem 0;
}

.door-styles-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 2rem;
	flex-wrap: wrap;
	gap: 1rem;
}

.door-styles-count {
	font-size: 14px;
	font-family: var(--plastpro-font-family, 'Montserrat', sans-serif);
	font-weight: 400;
	line-height: 18px;
	word-wrap: break-word;
	color: #1D252D;
}

.door-styles-sort {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.door-styles-sort-label {
	font-size: 1rem;
	color: #7C878E;
	font-weight: 400;
	font-family: var(--plastpro-font-family, 'Montserrat', sans-serif);
}

.door-styles-sort-wrapper {
	position: relative;
	display: inline-block;
}

.door-styles-sort-button {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0;
	border: none;
	background: transparent;
	cursor: pointer;
	font-family: var(--plastpro-font-family, 'Montserrat', sans-serif);
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.door-styles-sort-value {
	font-size: 1.125rem;
	font-weight: 700;
	color: #000000;
	font-family: var(--plastpro-font-family, 'Montserrat', sans-serif);
}

.door-styles-sort-chevron {
	flex-shrink: 0;
	width: 10px;
	height: 6px;
}

.door-styles-sort-select {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
	z-index: 1;
	font-size: 1.125rem;
	font-weight: 700;
	color: #000000;
	font-family: var(--plastpro-font-family, 'Montserrat', sans-serif);
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background: transparent;
	border: none;
	padding: 0;
	margin: 0;
}

.door-styles-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(284px, 1fr));
	gap: 2rem;
	margin-bottom: 3rem;
	justify-items: center; /* Center cards to prevent stretching */
}

/* API-driven series door grid: cards are injected by JS, no display toggling */
.js-series-doors-api .door-style-card {
	display: block;
}

.door-styles-grid-empty {
	grid-column: 1 / -1;
	text-align: center;
	padding: 2rem;
	color: #7C878E;
}

.door-styles-grid-empty--hidden {
	display: none !important;
}

.door-styles-pagination--hidden {
	display: none !important;
}

/* Skeleton loading – same size as .door-style-card */
.door-style-skeleton {
	width: 330px;
	height: 400px;
	background: #fff;
	box-shadow: 4px 4px 10px 0 rgba(0, 0, 0, 0.1);
	position: relative;
	overflow: hidden;
	border-radius: 0;
}

.door-style-skeleton::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(
		90deg,
		transparent 0%,
		rgba(255, 255, 255, 0.6) 50%,
		transparent 100%
	);
	animation: door-style-skeleton-shimmer 1.2s ease-in-out infinite;
}

@keyframes door-style-skeleton-shimmer {
	0% { transform: translateX(-100%); }
	100% { transform: translateX(100%); }
}

.door-style-skeleton__image {
	position: absolute;
	top: 17px;
	left: 50%;
	transform: translateX(-50%);
	width: 180px;
	height: 280px;
	background: #e8e8e8;
}

.door-style-skeleton__height {
	position: absolute;
	bottom: 100px;
	left: 50%;
	transform: translateX(-50%);
	width: 50px;
	height: 18px;
	background: #e8e8e8;
}

.door-style-skeleton__content {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 1.25rem 1.5rem;
}

.door-style-skeleton__line {
	height: 12px;
	background: #e8e8e8;
	border-radius: 4px;
	margin-bottom: 0.75rem;
}

.door-style-skeleton__line:last-child {
	margin-bottom: 0;
}

.door-style-skeleton__line--short {
	width: 45%;
}

.door-style-skeleton__line--long {
	width: 85%;
}

/* Door Style Card - Base Styles */
.door-style-card {
	display: none; /* Hidden by default, shown via JavaScript pagination */
	position: relative;
	background: #FFFFFF;
	border-radius: 0;
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	height: 400px;
	width: 330px; /* Fixed width to maintain proportions */
	box-shadow: 4px 4px 10px 0px rgba(0, 0, 0, 0.1);
	text-decoration: none;
	color: inherit;
}

.door-style-card[style*="display: block"] {
	display: block;
}

.door-style-card:hover {
	transform: translateY(-4px);
	box-shadow: 4px 8px 16px 0px rgba(0, 0, 0, 0.15);
}

/* Door Style Card Image */
.door-style-card-image {
	position: absolute;
	top: 17px;
	left: 50%;
	transform: translateX(-50%);
	width: auto;
	overflow: hidden;
	background: #FFFFFF;
}

.door-style-card-image-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	transition: transform 0.3s ease;
	display: block;
}

.door-style-card:hover .door-style-card-image-img {
	transform: scale(1.05);
}

.door-style-card--no-image .door-style-card-image {
	display: none;
}

/* Door Style Card Height Indicator */
.door-style-card-height {
	position: absolute;
	bottom: 82px;
	right: 30px; /* 14.71% of 284px from right = 41.75px */
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.25rem;
	z-index: 2;
}

.door-style-card-height-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 15px;
	height: 15px;
	flex-shrink: 0;
}

.door-style-card-height-icon svg {
	width: 100%;
	height: 100%;
}

.door-style-card-height-text {
	font-family: var(--plastpro-font-family, 'Montserrat', sans-serif);
	font-size: 14px;
	font-weight: 700;
	line-height: 22px;
	color: #000000;
	text-align: right;
	white-space: nowrap;
}

/* Door Style Card Content */
.door-style-card-content {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 45px 0 34px 0;
	background: transparent;
}

/* Door Style Card Series Name */
.door-style-card-series {
	position: absolute;
	top: 5px;
	left: 15px;
	right: 116px;
	font-family: var(--plastpro-font-family, 'Montserrat', sans-serif);
	font-size: 14px;
	font-weight: 700;
	line-height: 14px;
	color: #7C878E;
	text-transform: uppercase;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Door Style Card Title */
.door-style-card-title {
	position: absolute;
	top: 20px; /* Fixed position below series name */
	left: 15px;
	right: 40px;
	margin: 0;
	padding: 0;
	font-family: var(--plastpro-font-family, 'Montserrat', sans-serif);
	font-size: 18px;
	font-weight: 700;
	line-height: 18px;
	white-space: normal;
	word-wrap: break-word;
}

.door-style-card-title-link {
	color: #000000;
	text-decoration: none;
	transition: color 0.3s ease;
	display: block;
}

.door-style-card:hover .door-style-card-title-link {
	color: var(--plastpro-orange, #E87722);
}

/* Door Style Card Code */
.door-style-card-code {
	font-size: 0.875rem;
	font-weight: 600;
	color: #7C878E;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 0.5rem;
	font-family: var(--plastpro-font-family, 'Montserrat', sans-serif);
}

/* Door Style Card Specialties */
.door-style-card-specialties {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: auto;
	padding-top: 0.75rem;
}

.door-style-card-specialty {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 4px;
	background: #F5F5F5;
	overflow: hidden;
}

.door-style-card-specialty-icon {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 4px;
}

/* Door Style Card Dimensions */
.door-style-card-dimensions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 0.75rem;
	font-size: 0.875rem;
	color: #7C878E;
}

.door-style-card-dimension {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
}

.door-style-card-dimension-icon {
	font-size: 0.75rem;
	color: #7C878E;
}

/* Door Style Card Variants */
.door-style-card--compact .door-style-card-image {
	height: 150px;
}

.door-style-card--compact .door-style-card-content {
	padding: 1rem;
}

.door-style-card--compact .door-style-card-title {
	font-size: 1rem;
}

.door-style-card--featured {
	border: 2px solid var(--plastpro-orange, #E87722);
}

.door-style-card--featured .door-style-card-image {
	height: 250px;
}

/* Legacy class names for backward compatibility */
.door-style-image {
	width: 100%;
	height: 200px;
	overflow: hidden;
	background: #F5F5F5;
}

.door-style-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.door-style-content {
	padding: 1.25rem;
}

.door-style-title {
	font-size: 1.125rem;
	font-weight: 600;
	margin: 0;
}

.door-style-title a {
	color: #1D252D;
	text-decoration: none;
	transition: color 0.3s ease;
}

.door-style-title a:hover {
	color: var(--plastpro-orange);
}

/* Door Styles Pagination */
.door-styles-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0;
	margin-top: 2rem;
}

.pagination-prev,
.pagination-next {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	height: auto;
	border: none;
	background: transparent;
	padding: 0;
	cursor: pointer;
	transition: opacity 0.3s ease;
}

.pagination-prev svg,
.pagination-next svg {
	display: block;
	width: 10px;
	height: 16px;
}

.pagination-prev:disabled,
.pagination-next:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.pagination-prev:disabled svg,
.pagination-next:disabled svg {
	opacity: 0.3;
}

.pagination-prev:hover:not(:disabled),
.pagination-next:hover:not(:disabled) {
	opacity: 0.8;
}

.pagination-prev.disabled,
.pagination-next.disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.pagination-info {
	font-size: 1rem;
	color: #000000;
	font-weight: 400;
	font-family: var(--plastpro-font-family, 'Montserrat', sans-serif);
	margin: 0 1rem;
}

.door-styles-listing.no-results {
	text-align: center;
	padding: 4rem 0;
}

.door-styles-listing.no-results p {
	color: #7C878E;
	font-size: 1.125rem;
}

/* ============================================
   Featured Series Component
   ============================================ */

.featured-series {
	padding: 3rem 0 4rem;
}

/* .featured-series-title moved to style.css */

.featured-series-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 2rem;
	margin-bottom: 3rem;
}

/* Featured Series Card */
.featured-series-card {
	background: #FFFFFF;
	border: 1px solid #E5E5E5;
	border-radius: 8px;
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-series-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.featured-series-image {
	width: 100%;
	height: 250px;
	overflow: hidden;
	background: #F5F5F5;
}

.featured-series-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.featured-series-card:hover .featured-series-image img {
	transform: scale(1.05);
}

.featured-series-content {
	padding: 1.5rem;
	text-align: center;
}

.featured-series-title-card {
	font-size: 1.5rem;
	font-weight: 700;
	margin-bottom: 1rem;
}

.featured-series-title-card a {
	color: #1D252D;
	text-decoration: none;
	transition: color 0.3s ease;
}

.featured-series-title-card a:hover {
	color: var(--plastpro-orange);
}

.featured-series-link {
	display: inline-block;
	color: var(--plastpro-orange);
	font-weight: 700;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: color 0.3s ease;
	margin-top: 0.5rem;
}

.featured-series-link:hover {
	color: #C65A0F;
}

/* View All Series button now uses .cta-button--text class from style.css */
/* .featured-series-footer moved to style.css */

/* Responsive */
@media (max-width: 1024px) {
	.door-styles-grid {
		grid-template-columns: repeat(auto-fill, minmax(284px, 1fr));
		justify-items: center;
		gap: 1.5rem;
	}
	
	/* Maintain card proportions at 1024px - same as base */
	.door-style-card {
		height: 400px;
		max-width: 300px;
		width: 300px; /* Fixed width to prevent stretching */
	}
	
	/* Keep original positioning - cards are same size */
	.door-style-card-image {
		top: 17px;
		left: 50%;
		transform: translateX(-50%);
		width: auto;
	}
	
	.door-style-card-height {
		bottom: 105px;
		right: 20px;
	}
	
	.door-style-card-series {
		position: absolute;
		top: 5px;
		left: 15px;
		right: 116px;
	}
	
	.door-style-card-title {
		position: absolute;
		top: 20px; /* Fixed position below series name */
		left: 15px;
		right: 40px;
		padding: 0;
		line-height: 18px;
	}
}

@media (max-width: 768px) {
	.door-styles-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 1.5rem;
		justify-items: center; /* Center cards in 2-column layout */
	}
	
	/* Scale card for 2-column layout - maintain proportions */
	.door-style-card {
		height: 350px;
		width: 300px; /* Fixed width */
		max-width: 300px;
	}
	
	.door-style-card-image {
		top: 15px;
		left: 50%;
		transform: translateX(-50%);
		width: auto;
	}
	
	.door-style-card-height {
		bottom: 80px;
		right: 25px;
	}
	
	.door-style-card-height-text {
		font-size: 12px;
		line-height: 18px;
	}
	
	.door-style-card-content {
		padding: 45px 0 25px 0;
	}
	
	.door-style-card-series {
		position: absolute;
		top: 5px;
		left: 13px;
		right: 102px;
		font-size: 12px;
		line-height: 12px;
	}
	
	.door-style-card-title {
		position: absolute;
		top: 18px; /* Fixed position below series name */
		left: 13px;
		right: 40px;
		padding: 0;
		font-size: 16px;
		line-height: 18px;
	}

	/* .featured-series-title responsive moved to style.css */

	.featured-series-grid {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	.door-styles-listing,
	.featured-series {
		padding: 3rem 0 4rem;
	}
}

@media (max-width: 480px) {
	.door-styles-grid {
		grid-template-columns: 1fr;
		justify-items: center; /* Center cards in single column */
	}
	
	/* Scale card for single column - maintain original size */
	.door-style-card {
		height: 370px;
		width: 300px;
		max-width: 300px;
		margin: 0 auto;
	}
	
	.door-style-card-image {
		top: 17px;
		left: 50%;
		transform: translateX(-50%);
		width: auto;
	}
	
	.door-style-card-height {
		bottom: 80px;
		right: 25px;
	}
	
	.door-style-card-content {
		padding: 45px 0 25px 0;
	}
	
	.door-style-card-series {
		position: absolute;
		top: 5px;
		left: 15px;
		right: 116px;
	}
	
	.door-style-card-title {
		position: absolute;
		top: 20px; /* Fixed position below series name */
		left: 15px;
		right: 40px;
		padding: 0;
		line-height: 18px;
	}

	.featured-series-grid {
		grid-template-columns: 1fr;
	}
	
	.door-styles-pagination {
		flex-wrap: wrap;
		gap: 0.5rem;
	}
}

