/* ===================================================================
   HANDYS PAGE - Complete Styling
   Combines old (.orange-wrapp) and new (.product-card) structures
   Integrated with design1_minimal system (Orange/Green theme)
   Breakpoints: 1200px (tablet), 768px (mobile), 480px (small mobile)
   =================================================================== */

/* ===================================================================
   SECTION 1: PAGE LAYOUT (Hero, Filter, Products Section)
   =================================================================== */

.hero-section {
	background: transparent;
	padding: 1rem 1.5rem;
}

.hero-section h1 {
	font-family: 'Poppins', sans-serif;
	font-size: 2.2rem;
	font-weight: 700;
	color: var(--text);
	margin-bottom: 0.5rem;
}

.hero-section p {
	font-size: 0.9rem;
	color: var(--text-light);
}

/* Filter Section */
.filter-section {
	background: var(--white);
	padding: 1rem 1.5rem;
	border-bottom: 1px solid var(--border);
	position: sticky;
	top: 0;
	z-index: 100;
}

.filter-container {
	max-width: 1200px;
	margin: 0 auto;
}

.filter-group {
	display: flex;
	gap: 0.8rem;
	align-items: center;
	flex-wrap: wrap;
}

.filter-group label {
	font-weight: 600;
	color: var(--text);
	font-size: 0.85rem;
	white-space: nowrap;
}

.filter-group select {
	padding: 0.5rem 2rem 0.5rem 0.6rem;
	border: 1px solid var(--border);
	border-radius: 4px;
	font-family: 'Sora', sans-serif;
	background: var(--white) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path fill="%23666" d="M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z"/></svg>') no-repeat right 0.6rem center;
	background-size: 12px 8px;
	cursor: pointer;
	transition: all 0.2s;
	font-size: 0.85rem;
	width: auto;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
}

.filter-group select:hover {
	border-color: var(--primary);
	box-shadow: 0 2px 8px rgba(246, 163, 45, 0.1);
}

.filter-group select:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(246, 163, 45, 0.1);
}

/* Products Section Container */
.products-section {
	max-width: 1200px;
	margin: 0 auto;
	padding: 2rem 1.5rem;
}

/* ===================================================================
   SECTION 2: PRODUCTS GRID (Shared by old and new structure)
   =================================================================== */

.products-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
	margin: 2rem auto;
	max-width: 1400px;
	padding: 0 1.5rem;
	position: relative;
	z-index: 5;
}

/* ===================================================================
   SECTION 3: OLD PRODUCT CARD STRUCTURE (.orange-wrapp)
   =================================================================== */

.col-30 {
	display: flex;
}

.col-30.eq {
	margin-right: 0;
}

.orange-wrapp {
	background: var(--white);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 1.2rem;
	display: flex;
	flex-direction: column;
	transition: all 0.3s ease;
	min-height: auto;
	position: relative;
	z-index: 1;
	max-width: 100%;
	overflow: hidden;
}

.orange-wrapp:hover {
	box-shadow: 0 8px 24px rgba(246, 163, 45, 0.12);
	border-color: var(--primary);
	transform: translateY(-2px);
}

.orange-wrapp h2 {
	font-family: 'Poppins', sans-serif;
	font-size: 1.1rem;
	font-weight: 700;
	margin: 0 0 0.8rem 0;
	color: var(--text);
	line-height: 1.3;
}

.orange-wrapp h2 a {
	text-decoration: none;
	color: inherit;
	transition: color 0.2s;
}

.orange-wrapp h2 a:hover {
	color: var(--primary);
}

.orange-wrapp h2 b {
	font-weight: 700;
	color: var(--primary);
}

/* Main Flex Container */
.product-main-flex {
	display: flex;
	gap: 1rem;
	margin-bottom: 1rem;
	flex: 1;
}

/* Left Column - Image */
.product-left-col {
	flex: 0 0 45%;
	padding: 0.5rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 240px;
}

.img-div {
	margin-bottom: 0.8rem;
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
}

.img-div img {
	max-width: 100%;
	max-height: 180px;
	height: auto;
	display: block;
	width: auto;
	object-fit: contain;
}

.img-div a {
	display: inline-block;
}

/* Details Link */
.details-link-wrapper {
	margin-top: 0.8rem;
	text-align: center;
	width: 100%;
}

.details-link-wrapper .orange-link {
	font-size: 0.65rem;
	display: inline-block;
	color: var(--primary);
	text-decoration: none;
	font-weight: 400;
	transition: all 0.2s;
}

.details-link-wrapper .orange-link:hover {
	text-decoration: underline;
	color: var(--primary-dark);
}

/* Energy Label */
.energy-label-container {
	margin-top: 0.8rem;
	text-align: center;
	width: 100%;
}

.energy-label-container a {
	display: inline-block;
	cursor: pointer;
	transition: transform 0.2s, box-shadow 0.2s;
	padding: 4px;
	border-radius: 3px;
}

.energy-label-container a:hover {
	transform: scale(1.1);
	background-color: rgba(246, 163, 45, 0.08);
}

.energy-label-svg {
	max-width: 50px;
	width: 100%;
	height: auto;
	display: block;
	border: 1px solid var(--border);
	border-radius: 3px;
	background: white;
	padding: 3px;
}

/* Right Column - Details */
.product-right-col {
	flex: 1;
	overflow: hidden;
	min-width: 0;
}

.product-details,
.product-right-col {
	word-wrap: break-word;
	overflow-wrap: break-word;
	word-break: break-word;
	hyphens: auto;
	-webkit-hyphens: auto;
	-ms-hyphens: auto;
}

.product-details {
	font-size: 0.85rem;
	line-height: 1.5;
	color: var(--text-light);
	margin-bottom: 0.8rem;
}

.product-details ul {
	margin: 0.4rem 0;
	padding-left: 1.2rem;
	list-style: disc;
}

.product-details li {
	margin: 0.2rem 0;
}

.product-details a {
	color: var(--primary);
	text-decoration: none;
	font-weight: 600;
	transition: color 0.2s;
}

.product-details a:hover {
	color: var(--primary-dark);
	text-decoration: underline;
}

/* Clear Sections */
.clear {
	display: flex;
	gap: 1rem;
	margin-bottom: 0.8rem;
}

.col-45 {
	flex: 0 0 45%;
}

.col-55 {
	flex: 0 0 55%;
}

/* Section Headers */
h6 {
	font-family: 'Poppins', sans-serif;
	font-size: 0.75rem;
	font-weight: 600;
	margin: 0 0 0.4rem 0;
	text-transform: uppercase;
	color: var(--text);
	letter-spacing: 0.5px;
}

/* Availability */
.col-45 span {
	font-size: 0.85rem;
	display: flex;
	align-items: center;
	gap: 0.3rem;
}

.col-45 img {
	width: 14px;
	height: 14px;
}

.col-45 i {
	font-style: italic;
	color: var(--text-light);
}

/* ===================================================================
   SECTION 4: COLOR & STORAGE SELECTION
   =================================================================== */

/* Color Selection */
.color-select {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.color-select li {
	display: flex;
	align-items: center;
	gap: 0.3rem;
}

.color-select input[type="radio"] {
	display: none;
	margin: 0;
}

.color-select label {
	width: 25px;
	height: 25px;
	border-radius: 50%;
	border: 2px solid var(--border);
	display: block;
	cursor: pointer;
	transition: all 0.2s;
	flex-shrink: 0;
	position: relative;
	z-index: 10;
}

.color-select input[type="radio"]:checked + label {
	border-color: var(--primary);
	box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--primary);
}

.color-select label:hover {
	border-color: var(--text-light);
	transform: scale(1.1);
}

/* Storage Selection */
.storage-label {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--text);
	display: block;
	margin-bottom: 0.4rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.storage-selector-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.storage-selector {
	display: flex;
	align-items: center;
}

.storage-selector input[type="radio"] {
	display: none;
	margin: 0;
}

.storage-selector label {
	padding: 0.3rem 0.6rem;
	border: 1px solid var(--border);
	border-radius: 4px;
	background: var(--white);
	cursor: pointer;
	font-size: 0.8rem;
	transition: all 0.2s;
	white-space: nowrap;
	position: relative;
	z-index: 10;
	font-weight: 500;
}

.storage-selector input[type="radio"]:checked + label {
	background: var(--primary);
	color: var(--white);
	border-color: var(--primary);
	font-weight: 600;
}

.storage-selector label:hover {
	border-color: var(--primary);
	background: #fff;
}

/* Legacy .space selector */
.space {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.space li {
	display: flex;
	align-items: center;
	gap: 0.3rem;
	font-size: 0.85rem;
}

.space input[type="radio"] {
	display: none;
	margin: 0;
}

.space label {
	padding: 0.3rem 0.6rem;
	border: 1px solid var(--border);
	border-radius: 4px;
	background: var(--white);
	cursor: pointer;
	font-size: 0.8rem;
	transition: all 0.2s;
	white-space: nowrap;
	position: relative;
	z-index: 10;
}

.space input[type="radio"]:checked + label {
	background: var(--primary);
	color: var(--white);
	border-color: var(--primary);
	font-weight: 600;
}

.space label:hover {
	border-color: var(--primary);
}

/* ===================================================================
   SECTION 5: COST & CTA
   =================================================================== */

.cost-details {
	margin-bottom: 0;
}

.whitbox {
	background: var(--bg);
	padding: 0.6rem;
	border-radius: 4px;
	text-align: center;
	border: 1px solid var(--border);
}

.einmalpreis {
	font-size: 0.7rem;
	color: var(--text-lighter);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.3rem;
	margin-bottom: 0.2rem;
}

.einmalpreis img {
	width: 12px;
	height: 12px;
}

.whitbox span {
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--primary);
	display: block;
}

.whitbox i {
	font-style: italic;
}

.price-display {
	cursor: help;
	border-bottom: 1px dotted var(--primary);
}

/* CTA Button */
.link-div {
	margin-top: auto;
	padding-top: 0.8rem;
	border-top: 1px solid var(--border);
}

.greenbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	background: var(--secondary);
	color: var(--white);
	padding: 0.75rem 1rem;
	border-radius: 4px;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.9rem;
	width: 100%;
	transition: all 0.3s;
	border: none;
	cursor: pointer;
	font-family: 'Sora', sans-serif;
}

.greenbtn:hover {
	background: #5ab81f;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(102, 204, 51, 0.2);
}

.greenbtn:active {
	transform: translateY(0);
}

.greenbtn img {
	width: 14px;
	height: auto;
}

/* ===================================================================
   SECTION 6: FANCYBOX / POPUPS
   =================================================================== */

.fancybox-slide {
	padding: 10vh 10vw !important;
}

.fancybox-energy-content {
	background: var(--white);
	padding: 2rem;
	border-radius: 8px;
	text-align: center;
}

.fancybox-energy-content h2 {
	font-family: 'Poppins', sans-serif;
	font-size: 1rem;
	font-weight: 700;
	margin-bottom: 1rem;
	color: var(--text);
	line-height: 1.3;
}

.fancybox-energy-content img {
	max-width: 100%;
	max-height: 60vh;
	height: auto;
	width: auto;
	margin: 0 auto 1rem;
	display: block;
	object-fit: contain;
}

.pdf-link {
	display: inline-block;
	background: var(--primary);
	color: var(--white);
	padding: 0.8rem 1.5rem;
	border-radius: 4px;
	text-decoration: none;
	font-weight: 600;
	transition: all 0.2s;
}

.pdf-link:hover {
	background: var(--primary-dark);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(246, 163, 45, 0.2);
}

/* ===================================================================
   SECTION 7: RESPONSIVE - TABLET (max-width: 1200px)
   =================================================================== */

@media (max-width: 1200px) {
	.products-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 1.8rem;
		padding: 0 1rem;
	}
}

/* ===================================================================
   SECTION 8: RESPONSIVE - MOBILE (max-width: 768px)
   =================================================================== */

@media (max-width: 768px) {
	/* Page Layout */
	.hero-section {
		padding: 1rem 0.5rem;
	}

	.hero-section h1 {
		font-size: 1.5rem;
	}

	.hero-section p {
		font-size: 0.85rem;
	}

	.filter-section {
		padding: 0.8rem 0.5rem;
	}

	.filter-group {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
	}

	.filter-group label {
		font-size: 0.8rem;
	}

	.filter-group select {
		width: 100%;
		padding: 0.6rem 2rem 0.6rem 0.6rem;
		font-size: 0.85rem;
	}

	.products-section {
		padding: 1rem 0.5rem;
	}

	/* Products Grid */
	.products-grid {
		grid-template-columns: 1fr;
		gap: 1.5rem;
		padding: 0 0.5rem;
	}

	.product-main-flex {
		flex-direction: column;
		gap: 0.8rem;
	}

	.product-left-col {
		flex: 0 0 auto;
		margin-bottom: 0;
	}

	/* Mobile Grid Layout for .orange-wrapp */
	.orange-wrapp {
		display: grid !important;
		grid-template-columns: 1fr 1fr;
		gap: 0.8rem;
		padding: 1rem;
	}

	.orange-wrapp > .clear {
		display: contents !important;
	}

	.orange-wrapp > .product-main-flex {
		display: contents !important;
	}

	.product-left-col {
		grid-column: 1;
		grid-row: 2;
		display: flex !important;
		flex-direction: column;
		gap: 0.5rem;
		align-items: flex-start;
		padding: 0 !important;
		min-height: auto !important;
	}

	.product-right-col {
		display: contents !important;
	}

	.orange-wrapp > h2 {
		grid-column: 1 / -1;
		grid-row: 1;
		font-size: 1rem;
		margin-bottom: 0.5rem;
	}

	.img-div {
		margin-bottom: 0 !important;
		width: 140px;
		min-height: 140px;
	}

	.img-div img {
		max-height: 140px !important;
		width: 100%;
		object-fit: contain;
	}

	.product-details {
		grid-column: 2;
		grid-row: 2;
		font-size: 0.75rem !important;
		line-height: 1.4;
		padding-left: 0.5rem;
		align-self: start;
		min-width: 0;
		word-wrap: break-word;
		overflow-wrap: break-word;
		word-break: break-word;
		hyphens: auto;
	}

	.product-details h5 {
		font-size: 0.75rem;
		font-weight: 600;
		margin: 0 0 0.3rem 0;
		color: var(--text);
	}

	.product-details ul {
		margin: 0;
		padding-left: 1rem;
		list-style: disc;
	}

	.product-details li {
		margin: 0.15rem 0;
	}

	.details-link-wrapper {
		margin-top: 0 !important;
		text-align: left !important;
		width: 100%;
	}

	.details-link-wrapper .orange-link {
		font-size: 0.65rem !important;
	}

	.energy-label-container {
		margin-top: 0 !important;
		text-align: left !important;
		width: 100%;
	}

	.energy-label-svg {
		max-width: 50px !important;
	}

	.product-details .bottom-link {
		font-size: 0.7rem !important;
		display: block;
		margin-top: 0.5rem;
	}

	/* Grid positioning with :has() */
	.orange-wrapp .col-55:has(.space),
	.orange-wrapp .col-55:has(.storage-selector-wrapper) {
		grid-column: 1 !important;
		grid-row: 3 !important;
	}

	.orange-wrapp .col-55:has(.color-select) {
		grid-column: 2 !important;
		grid-row: 3 !important;
	}

	.orange-wrapp .col-45:not(:has(.cost-details)) {
		grid-column: 1 !important;
		grid-row: 4 !important;
	}

	.orange-wrapp .col-45:has(.cost-details) {
		grid-column: 2 !important;
		grid-row: 4 !important;
	}

	.orange-wrapp > .link-div {
		grid-column: 1 / -1 !important;
		grid-row: 5 !important;
		margin-top: 0.5rem;
		padding-top: 0.8rem;
		border-top: 1px solid var(--border);
	}

	.col-45, .col-55 {
		width: 100% !important;
		float: none !important;
	}

	/* Smaller elements */
	h6 {
		font-size: 0.7rem;
		margin-bottom: 0.3rem;
	}

	.color-select label {
		width: 24px;
		height: 24px;
	}

	.space label,
	.storage-selector label {
		padding: 0.3rem 0.5rem;
		font-size: 0.7rem;
	}

	.whitbox {
		padding: 0.5rem;
	}

	.einmalpreis {
		font-size: 0.65rem;
	}

	.whitbox span {
		font-size: 0.95rem;
	}

	.greenbtn {
		padding: 0.65rem 0.8rem;
		font-size: 0.85rem;
	}

	.fancybox-energy-content h2 {
		font-size: 0.85rem;
	}
}

/* ===================================================================
   SECTION 9: RESPONSIVE - SMALL MOBILE (max-width: 480px)
   =================================================================== */

@media (max-width: 480px) {
	.hero-section h1 {
		font-size: 1.3rem;
	}

	.products-grid {
		gap: 0.8rem;
		padding: 0 0.5rem;
	}

	.product-main-flex {
		flex-direction: column;
	}

	.color-select label {
		width: 24px;
		height: 24px;
	}

	.space label,
	.storage-selector label {
		padding: 0.3rem 0.5rem;
		font-size: 0.75rem;
	}
}
