/* ==================================================
   R4A DARK PRODUCT ARCHIVE BASE
   File: assets/css/product-category-dark.css
   Purpose:
   - Shared archive design tokens and dark background.
   - Consolidated subcategory hero positioning and typography.
   - Scoped product image sizing for category archives.
================================================== */

/* ==================================================
   0. SCOPE + DESIGN TOKENS
================================================== */

body.woocommerce-shop,
body.post-type-archive-product,
body.tax-product_cat,
body.tax-product_tag,
body.r4a-product-category-archive:not(.home):not(.single-product),
body.r4a-product-tag-archive:not(.home):not(.single-product),
body.r4a-product-listing-page:not(.home):not(.single-product),
body.r4a-selected-product-page:not(.home):not(.single-product),
body.r4a-brand-archive:not(.home):not(.single-product),
body.page-slug-alle-produkte,
body.page-slug-bestseller,
body.page-slug-neue-produkte,
body.r4a-alle-produkte-page,
body.r4a-bestseller-page,
body.r4a-neue-produkte-page,
body.akj-static-product-page {
	--r4a-page-bg: #030406;
	--r4a-card-bg: #07080b;
	--r4a-panel-bg: #0b0d14;
	--r4a-red: #d00000;
	--r4a-red-bright: #ff1717;
	--r4a-white: #ffffff;
	--r4a-listing-max-width: 1760px;
	--r4a-listing-side-gap: 72px;
	--r4a-toolbar-select-width: 300px;
	--r4a-toolbar-column-width: 320px;
	--r4a-subcategory-copy-offset-x: -130px;
	--r4a-subcategory-copy-offset-y: -185px;
	background: var(--r4a-page-bg) !important;
	color: var(--r4a-white) !important;
}

body.woocommerce-shop .site-main,
body.post-type-archive-product .site-main,
body.tax-product_cat .site-main,
body.tax-product_tag .site-main,
body.r4a-product-category-archive:not(.home):not(.single-product) .site-main,
body.r4a-product-tag-archive:not(.home):not(.single-product) .site-main,
body.r4a-product-listing-page:not(.home):not(.single-product) .site-main,
body.r4a-selected-product-page:not(.home):not(.single-product) .site-main,
body.r4a-brand-archive:not(.home):not(.single-product) .site-main,
body.page-slug-alle-produkte .site-main,
body.page-slug-bestseller .site-main,
body.page-slug-neue-produkte .site-main,
body.r4a-alle-produkte-page .site-main,
body.r4a-bestseller-page .site-main,
body.r4a-neue-produkte-page .site-main,
body.akj-static-product-page .site-main {
	background: var(--r4a-page-bg) !important;
	color: var(--r4a-white) !important;
	padding-bottom: 70px !important;
}

/* =========================================================
   1. SUBCATEGORY HERO POSITION + CONTENT
   File: assets/css/product-category-dark.css
   Purpose:
   - Apply one consistent hero-copy position to supported subcategories.
   - Keep rules scoped to subcategory markup.
   - Avoid duplicate transforms and competing typography declarations.
========================================================= */

/* EN: Keep every mounted subcategory banner/header wrapper as a positioning context. */
html body.tax-product_cat .hero-section.r4a-subcategory-hero-mounted,
html body.tax-product_cat .woocommerce-products-header.r4a-subcategory-hero-mounted,
html body.tax-product_cat .page-title-container.r4a-subcategory-hero-mounted,
html body.tax-product_cat .ct-page-title.r4a-subcategory-hero-mounted,
html body.r4a-product-category-archive .hero-section.r4a-subcategory-hero-mounted,
html body.r4a-product-category-archive .woocommerce-products-header.r4a-subcategory-hero-mounted,
html body.r4a-product-category-archive .page-title-container.r4a-subcategory-hero-mounted,
html body.r4a-product-category-archive .ct-page-title.r4a-subcategory-hero-mounted {
	position: relative !important;
	overflow: visible !important;
}

/* EN: Prevent centered theme containers from clipping or re-positioning subcategory copy. */
html body.tax-product_cat .r4a-subcategory-hero-mounted > .ct-container,
html body.tax-product_cat .r4a-subcategory-hero-mounted .ct-container,
html body.r4a-product-category-archive .r4a-subcategory-hero-mounted > .ct-container,
html body.r4a-product-category-archive .r4a-subcategory-hero-mounted .ct-container {
	position: static !important;
	overflow: visible !important;
}

/* EN: Apply the requested fixed position to all subcategory hero copy blocks. */
html body.tax-product_cat .r4a-subcategory-hero-mounted .r4a-category-hero-copy,
html body.r4a-product-category-archive .r4a-subcategory-hero-mounted .r4a-category-hero-copy,
html body.tax-product_cat section.r4a-subcategory-hero-copy.r4a-category-hero-copy,
html body.r4a-product-category-archive section.r4a-subcategory-hero-copy.r4a-category-hero-copy,
html body.tax-product_cat .r4a-category-hero-copy.r4a-subcategory-hero-copy,
html body.r4a-product-category-archive .r4a-category-hero-copy.r4a-subcategory-hero-copy {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	right: auto !important;
	bottom: auto !important;
	z-index: 90 !important;
	width: min(720px, calc(100vw - 32px)) !important;
	max-width: 720px !important;
	margin: 0 !important;
	padding: 0 !important;
	text-align: left !important;
	transform: translate3d(
		var(--r4a-subcategory-copy-offset-x),
		var(--r4a-subcategory-copy-offset-y),
		0
	) !important;
}

/* EN: Breadcrumb reset for every subcategory banner. */
html body.tax-product_cat .r4a-category-hero-copy .woocommerce-breadcrumb,
html body.r4a-product-category-archive .r4a-category-hero-copy .woocommerce-breadcrumb,
html body.tax-product_cat .r4a-category-hero-breadcrumbs,
html body.r4a-product-category-archive .r4a-category-hero-breadcrumbs {
	display: block !important;
	margin: 0 0 8px !important;
	padding: 0 !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	line-height: 1.25 !important;
	color: rgba(255, 255, 255, 0.84) !important;
	background: transparent !important;
}

html body.tax-product_cat .r4a-category-hero-copy .woocommerce-breadcrumb a,
html body.r4a-product-category-archive .r4a-category-hero-copy .woocommerce-breadcrumb a,
html body.tax-product_cat .r4a-category-hero-breadcrumbs a,
html body.r4a-product-category-archive .r4a-category-hero-breadcrumbs a {
	color: rgba(255, 255, 255, 0.84) !important;
	text-decoration: none !important;
	background: transparent !important;
}

/* EN: Top label styling shared by all subcategory banners. */
html body.tax-product_cat .r4a-category-hero-eyebrow,
html body.r4a-product-category-archive .r4a-category-hero-eyebrow {
	margin: 0 0 8px !important;
	font-size: 13px !important;
	font-weight: 900 !important;
	line-height: 1.15 !important;
	letter-spacing: 0.16em !important;
	text-transform: uppercase !important;
	color: var(--r4a-red-bright) !important;
}

/* EN: Shared intro styling. */

html body.tax-product_cat .r4a-category-hero-intro,
html body.r4a-product-category-archive .r4a-category-hero-intro {
	max-width: 640px !important;
	margin: 0 0 12px !important;
	font-size: 15px !important;
	font-weight: 500 !important;
	line-height: 1.5 !important;
	color: rgba(255, 255, 255, 0.9) !important;
}

/* EN: Shared bullet grid styling. */
html body.tax-product_cat .r4a-category-hero-bullets,
html body.r4a-product-category-archive .r4a-category-hero-bullets {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	column-gap: 22px !important;
	row-gap: 8px !important;
	max-width: 640px !important;
	margin: 0 0 12px !important;
	padding: 0 !important;
	list-style: none !important;
}

html body.tax-product_cat .r4a-category-hero-bullets li,
html body.r4a-product-category-archive .r4a-category-hero-bullets li {
	position: relative !important;
	margin: 0 !important;
	padding-left: 18px !important;
	font-size: 14px !important;
	font-weight: 800 !important;
	line-height: 1.32 !important;
	color: #ffffff !important;
}

html body.tax-product_cat .r4a-category-hero-bullets li::before,
html body.r4a-product-category-archive .r4a-category-hero-bullets li::before {
	content: "" !important;
	position: absolute !important;
	top: 0.55em !important;
	left: 0 !important;
	width: 7px !important;
	height: 7px !important;
	border-radius: 50% !important;
	background: var(--r4a-red-bright) !important;
	box-shadow: 0 0 12px rgba(255, 23, 23, 0.72) !important;
}

/* EN: Shared notice box styling. */
html body.tax-product_cat .r4a-category-hero-notice,
html body.r4a-product-category-archive .r4a-category-hero-notice {
	max-width: 640px !important;
	margin: 0 !important;
	padding: 11px 14px !important;
	border-left: 3px solid #ff1717 !important;
	background: rgba(0, 0, 0, 0.42) !important;
	font-size: 13px !important;
	font-weight: 650 !important;
	line-height: 1.42 !important;
	color: rgba(255, 255, 255, 0.84) !important;
}

/* EN: Tablet keeps the same positioning logic with reduced text width. */
@media (max-width: 1180px) and (min-width: 768px) {
	html body.tax-product_cat .r4a-subcategory-hero-mounted .r4a-category-hero-copy,
	html body.r4a-product-category-archive .r4a-subcategory-hero-mounted .r4a-category-hero-copy,
	html body.tax-product_cat section.r4a-subcategory-hero-copy.r4a-category-hero-copy,
	html body.r4a-product-category-archive section.r4a-subcategory-hero-copy.r4a-category-hero-copy,
	html body.tax-product_cat .r4a-category-hero-copy.r4a-subcategory-hero-copy,
	html body.r4a-product-category-archive .r4a-category-hero-copy.r4a-subcategory-hero-copy {
		width: min(650px, calc(100vw - 32px)) !important;
		max-width: 650px !important;
	}
}

/* EN: Mobile fallback prevents overflow and keeps copy readable. */
@media (max-width: 767px) {
	html body.tax-product_cat .r4a-subcategory-hero-mounted .r4a-category-hero-copy,
	html body.r4a-product-category-archive .r4a-subcategory-hero-mounted .r4a-category-hero-copy,
	html body.tax-product_cat section.r4a-subcategory-hero-copy.r4a-category-hero-copy,
	html body.r4a-product-category-archive section.r4a-subcategory-hero-copy.r4a-category-hero-copy,
	html body.tax-product_cat .r4a-category-hero-copy.r4a-subcategory-hero-copy,
	html body.r4a-product-category-archive .r4a-category-hero-copy.r4a-subcategory-hero-copy {
		top: 42px !important;
		left: 12px !important;
		right: 12px !important;
		width: auto !important;
		max-width: none !important;
		transform: none !important;
	}


	html body.tax-product_cat .r4a-category-hero-bullets,
	html body.r4a-product-category-archive .r4a-category-hero-bullets {
		grid-template-columns: 1fr !important;
	}
}


/* =========================================================
   3. PRODUCT LOOP H3
   File: assets/css/product-category-dark.css
   Purpose:
   - Keep product card typography intact after WooCommerce loop titles change from H2 to H3.
========================================================= */

html body.tax-product_cat h3.woocommerce-loop-product__title,
html body.post-type-archive-product h3.woocommerce-loop-product__title,
html body.woocommerce-shop h3.woocommerce-loop-product__title,
html body.r4a-product-category-archive h3.woocommerce-loop-product__title,
html body.r4a-product-listing-page h3.woocommerce-loop-product__title {
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
	font-size: inherit !important;
	font-weight: inherit !important;
	line-height: inherit !important;
	text-decoration: none !important;
}

/* =========================================================
   4. PRODUCT CATEGORY ARCHIVES – LARGER PRODUCT IMAGES
   Scope:
   - Main WooCommerce product categories.
   - All product subcategories.
   - Other product loops remain unchanged.
========================================================= */

/* EN: Keep enlarged thumbnails centered and clipped inside the media area. */
html body.tax-product_cat ul.products li.product .ct-media-container {
	width: 100% !important;
	overflow: hidden !important;
}

html body.tax-product_cat ul.products li.product .ct-media-container > a {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	height: 100% !important;
}

html body.tax-product_cat ul.products li.product .ct-media-container img {
	display: block !important;
	width: 100% !important;
	margin: 0 auto !important;
	object-fit: contain !important;
	object-position: center center !important;
	transform: none !important;
}

/* EN: Desktop product image area. */
@media (min-width: 1000px) {
	html body.tax-product_cat ul.products li.product .ct-media-container {
		min-height: 300px !important;
		height: 300px !important;
	}

	html body.tax-product_cat ul.products li.product .ct-media-container img {
		height: 290px !important;
		max-height: 290px !important;
	}
}

/* EN: Tablet product image area. */
@media (min-width: 690px) and (max-width: 999px) {
	html body.tax-product_cat ul.products li.product .ct-media-container {
		min-height: 230px !important;
		height: 230px !important;
	}

	html body.tax-product_cat ul.products li.product .ct-media-container img {
		height: 220px !important;
		max-height: 220px !important;
	}
}

/* EN: Mobile product image area. */
@media (max-width: 689px) {
	html body.tax-product_cat ul.products li.product .ct-media-container {
		min-height: 200px !important;
		height: 200px !important;
	}

	html body.tax-product_cat ul.products li.product .ct-media-container img {
		height: 190px !important;
		max-height: 190px !important;
	}
}

