/* OrderKlaus — minimal, no-hover WooCommerce app theme */

/* Roboto, self-hosted (no runtime connection to Google Fonts) */
@font-face {
	font-family: 'Roboto';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/roboto-400-latin.woff2') format('woff2');
}

@font-face {
	font-family: 'Roboto';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('../fonts/roboto-500-latin.woff2') format('woff2');
}

@font-face {
	font-family: 'Roboto';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('../fonts/roboto-700-latin.woff2') format('woff2');
}

:root {
	--ok-font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--ok-page-bg: #1a1a1a;
	--ok-box-bg: #000000;
	--ok-notice-1-bg: #e8491d;
	--ok-notice-1-text: #ffffff;
	--ok-notice-2-bg: #e8491d;
	--ok-notice-2-text: #ffffff;
	--ok-notice-3-bg: #e8491d;
	--ok-notice-3-text: #ffffff;
	--ok-text: #ffffff;
	--ok-icon: #ffffff;
	--ok-cart-width: 360px;
	--ok-header-height: 68px;
	--ok-content-padding: 24px;
	--ok-logo-scale: 1;
	--ok-icon-size: 26px;
	--ok-tile-radius: 4px;
	--ok-tile-font-size: 17px;
	--ok-tile-text-transform: none;
	--ok-cart-header-bg: #000000;
	--ok-cart-header-text: #ffffff;
	--ok-cart-body-bg: #ffffff;
	--ok-cart-body-text: #1a1a1a;
	--ok-cart-coupon-bg: #f4f4f4;
	--ok-cart-coupon-text: #1a1a1a;
	--ok-cart-coupon-button-bg: #1a1a1a;
	--ok-cart-coupon-button-text: #ffffff;
	--ok-cart-summary-bg: #ffffff;
	--ok-cart-summary-text: #1a1a1a;
	--ok-cart-checkout-bg: #6b6b6b;
	--ok-cart-checkout-text: #ffffff;
	--ok-footer-bg: #000000;
	--ok-footer-item-bg: #2a2a2a;
	--ok-footer-text: #ffffff;
	--ok-footer-icon: #ffffff;
	--ok-content-box-bg: #2a2a2a;
	--ok-content-box-text: #ffffff;
}

/* Kill hover/transition effects globally, as requested */
*,
*::before,
*::after {
	transition: none !important;
	animation-duration: 0s !important;
}
a:hover,
button:hover,
.button:hover,
input:hover {
	opacity: 1 !important;
	text-decoration: none !important;
	filter: none !important;
}

html, body.ok-body {
	background: var(--ok-page-bg);
	color: var(--ok-text);
}

body.ok-body,
.ok-body input,
.ok-body select,
.ok-body button {
	font-family: var(--ok-font-family);
}

a {
	color: inherit;
	text-decoration: none;
}

.ok-page {
	min-height: 100vh;
}

/* Header */
.ok-header {
	position: sticky;
	top: 0;
	z-index: 50;
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: var(--ok-header-height);
	padding: 10px 20px;
	background: var(--ok-box-bg);
	color: var(--ok-text);
}

.ok-header__side {
	flex: 1 1 0;
	display: flex;
	align-items: center;
	gap: 14px;
}

.ok-header__side--right {
	justify-content: flex-end;
}

.ok-header__logo {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 6px;
	position: relative;
	z-index: 1;
}

.ok-header__logo .custom-logo-link {
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
}

.ok-header__logo img {
	max-height: calc(72px * var(--ok-logo-scale));
	width: auto;
	display: block;
}

.ok-header__sitename {
	font-size: 1.4rem;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.ok-header__icon {
	color: var(--ok-icon);
	display: inline-flex;
	position: relative;
}

/* Slim titlebar: back arrow + contextual page title, own colors */
.ok-titlebar {
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: var(--ok-header-height);
	padding: 6px var(--ok-content-padding);
	margin-top: 22px;
	background: var(--ok-titlebar-bg);
	color: var(--ok-titlebar-text);
	font-weight: 700;
	font-size: 1.5rem;
	line-height: 1.25;
	text-align: left;
}

.ok-titlebar__back {
	flex: 0 0 auto;
	display: flex;
}

.ok-titlebar__back-link {
	color: inherit;
	display: inline-flex;
}

.ok-titlebar__back-link svg {
	width: 26px;
	height: 26px;
}

.ok-titlebar__title {
	flex: 1 1 auto;
	min-width: 0;
}

.ok-titlebar__spacer {
	flex: 0 0 16px;
}

.ok-header__back svg,
.ok-header__icon svg {
	width: var(--ok-icon-size);
	height: var(--ok-icon-size);
}

.ok-header__cart-count {
	position: absolute;
	top: -6px;
	right: -8px;
	background: var(--ok-notice-1-bg);
	color: #fff;
	font-size: 0.65rem;
	line-height: 1;
	border-radius: 999px;
	min-width: 16px;
	height: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 3px;
}

/* Homepage layout */
.ok-home {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	padding: 20px var(--ok-content-padding);
	max-width: 1400px;
	margin: 0 auto;
}

@media (min-width: 900px) {
	.ok-home {
		grid-template-columns: 1fr var(--ok-cart-width);
		align-items: start;
	}
}

.ok-home__main {
	display: flex;
	flex-direction: column;
	gap: 20px;
	min-width: 0;
}

/* Notice boxes */
.ok-notice-box {
	padding: 24px;
	border-radius: 4px;
}

.ok-notice-box[data-empty="1"] {
	display: none;
}

.ok-notice-text p {
	margin: 0 0 0.6em;
}

.ok-notice-text p:last-child {
	margin-bottom: 0;
}

/* Category tile grid */
.ok-category-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}

@media (min-width: 640px) {
	.ok-category-grid {
		grid-template-columns: 1fr 1fr;
	}
}

.ok-category-tile {
	position: relative;
	display: block;
	border-radius: var(--ok-tile-radius);
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: var(--ok-box-bg);
}

.ok-category-tile img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ok-category-tile__label {
	position: absolute;
	left: 16px;
	bottom: 14px;
	font-weight: 700;
	font-size: var(--ok-tile-font-size);
	text-transform: var(--ok-tile-text-transform);
	color: #fff;
	text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

/* Cart panel — the styled box is a desktop-only sidebar. On mobile only the
   header cart icon is used, so hide this entirely below the breakpoint. */
.ok-home__cart {
	display: none;
	min-width: 0;
}

@media (min-width: 900px) {
	.ok-home__cart {
		display: block;
		position: sticky;
		top: calc(var(--ok-header-actual-height, var(--ok-header-height)) + 20px);
		z-index: 10;
	}
}

.ok-cart-panel {
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.ok-cart-panel__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-weight: 700;
	font-size: 1.1rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 16px 20px;
	background: var(--ok-cart-header-bg);
	color: var(--ok-cart-header-text);
}

.ok-cart-panel__body {
	background: var(--ok-cart-body-bg);
	color: var(--ok-cart-body-text);
	padding: 20px;
	min-height: 60px;
}

.ok-cart-panel__body .woocommerce-mini-cart__empty-message {
	opacity: 0.8;
	text-align: center;
	padding: 12px 0;
	margin: 0;
}

.ok-cart-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid rgba(0,0,0,0.08);
}

.ok-cart-item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.ok-cart-item:first-child {
	padding-top: 0;
}

.ok-cart-item__remove {
	flex: 0 0 auto;
	color: inherit;
	opacity: 0.5;
	font-size: 1.1rem;
	line-height: 1;
	background: none;
	border: none;
}

.ok-cart-item__title {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 0.92rem;
}

.ok-cart-item__qty {
	flex: 0 0 auto;
	border: 1px solid rgba(0,0,0,0.15);
	border-radius: 4px;
	padding: 2px 4px;
	background: #fff;
	color: inherit;
	font-size: 0.85rem;
}

.ok-cart-item__price {
	flex: 0 0 auto;
	font-weight: 700;
	font-size: 0.92rem;
	white-space: nowrap;
}

.ok-cart-panel__view-cart {
	display: block;
	text-align: center;
	padding: 12px 20px;
	background: var(--ok-cart-summary-bg);
	color: var(--ok-cart-summary-text);
	font-weight: 600;
	font-size: 0.85rem;
	opacity: 0.85;
	border-top: 1px solid rgba(0,0,0,0.08);
}

.ok-cart-panel__coupon {
	background: var(--ok-cart-coupon-bg);
	color: var(--ok-cart-coupon-text);
	padding: 16px 20px;
	display: flex;
	gap: 8px;
}

.ok-cart-panel__coupon .woocommerce-coupon-form {
	display: flex;
	gap: 8px;
	width: 100%;
}

.ok-cart-panel__coupon .woocommerce-coupon-form p {
	margin: 0;
	flex: 1 1 auto;
	display: flex;
	gap: 8px;
}

.ok-cart-panel__coupon input[name="coupon_code"] {
	flex: 1 1 auto;
	min-width: 0;
	border: none;
	border-radius: 4px;
	padding: 10px 12px;
	background: #fff;
	color: var(--ok-cart-coupon-text);
}

.ok-cart-panel__coupon button {
	flex: 0 0 auto;
	border: none;
	border-radius: 4px;
	padding: 10px 16px;
	background: var(--ok-cart-coupon-button-bg);
	color: var(--ok-cart-coupon-button-text);
	font-weight: 700;
	text-transform: uppercase;
	font-size: 0.8rem;
	cursor: pointer;
}

.ok-cart-panel__summary {
	background: var(--ok-cart-summary-bg);
	color: var(--ok-cart-summary-text);
	padding: 16px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-top: 1px solid rgba(0,0,0,0.08);
}

.ok-cart-panel__summary-count {
	opacity: 0.75;
	font-size: 0.85rem;
}

.ok-cart-panel__summary-total {
	font-weight: 700;
	font-size: 1.1rem;
}

.ok-cart-panel__checkout {
	display: block;
	text-align: center;
	padding: 16px 20px;
	background: var(--ok-cart-checkout-bg);
	color: var(--ok-cart-checkout-text);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* Auf der Startseite gibt es bereits den großen Warenkorb — das Header-Icon
   dort ab Desktop-Breite ausblenden, es bleibt nur mobil sichtbar. */
@media (min-width: 900px) {
	body.home .ok-header__cart {
		display: none;
	}
}

/* Seitentitel (Kategorie-/Shop-/Konto-Seiten): Abstand oben + linksbündig,
   auf gleicher Breite wie der übrige Seiteninhalt. Auf der Startseite hat
   .ok-home bereits eigenes Padding, daher hier ausgenommen. */
body:not(.home) #content,
body:not(.home) #primary {
	padding-left: var(--ok-content-padding);
	padding-right: var(--ok-content-padding);
	box-sizing: border-box;
}

/* Breathing room between the titlebar and whatever follows (cart, account,
   product loop, ...) — the titlebar itself has no bottom padding to speak of. */
body:not(.home) #primary {
	padding-top: 28px;
}

/* The contextual title now lives in .ok-titlebar — hide the old inline one. */
.woocommerce-products-header__title.page-title,
.page-title,
.entry-header .entry-title {
	display: none;
}

/* Footer-Menü: jeder Punkt als eigener Icon-Button */
.ok-footer {
	display: block !important;
	float: none !important;
	width: 100% !important;
	padding: 24px var(--ok-content-padding);
	background: var(--ok-footer-bg);
	margin-top: 40px;
	border-top: 1px solid rgba(128, 128, 128, 0.3);
}

.ok-footer__menu {
	display: grid !important;
	float: none !important;
	width: 100% !important;
	list-style: none;
	margin: 0 auto !important;
	padding: 0 !important;
	grid-template-columns: 1fr;
	gap: 10px;
	max-width: 1400px;
}

@media (min-width: 640px) {
	.ok-footer__menu {
		grid-template-columns: 1fr 1fr;
	}
}

.ok-footer__item {
	display: block !important;
	float: none !important;
	width: auto !important;
	margin: 0 !important;
}

.ok-footer__link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 18px;
	border-radius: 8px;
	background: var(--ok-footer-item-bg);
	color: var(--ok-footer-text);
}

.ok-footer__link .dashicons {
	flex: 0 0 auto;
	color: var(--ok-footer-icon);
	font-size: 28px;
	width: 28px;
	height: 28px;
	line-height: 1;
	opacity: 1;
}

.ok-footer__label {
	font-size: 0.95rem;
	font-weight: 500;
}

/* Small, icon-sized hint images — all 4 fit side by side even on mobile. */
.ok-footer__images {
	display: flex !important;
	float: none !important;
	width: 100% !important;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: center;
	gap: 14px;
	max-width: 1400px;
	margin: 28px auto 0;
}

.ok-footer__image {
	width: auto;
	height: 32px;
	max-width: 60px;
	object-fit: contain;
	display: block;
}

/* -------------------------------------------------------------------------
 * Product grid + cards
 * ---------------------------------------------------------------------- */

.ok-products-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	justify-content: start;
	gap: 16px;
	list-style: none;
	margin: 0;
	padding: 0;
}

@media (min-width: 700px) {
	.ok-products-grid {
		grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	}
}

.ok-products-grid li.product {
	float: none;
	width: auto;
	margin: 0;
}

.ok-product-card {
	display: flex;
	flex-direction: column;
	background: var(--ok-cart-body-bg);
	color: var(--ok-cart-body-text);
	border-radius: var(--ok-tile-radius);
	overflow: hidden;
	margin: 0 !important;
}

.ok-product-card__media {
	position: relative;
	aspect-ratio: 4 / 3;
	padding: 10px 10px 0;
	background: var(--ok-cart-body-bg);
}

.ok-product-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: calc(var(--ok-tile-radius) - 2px);
	display: block;
}

.ok-product-card__body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 14px 16px 16px;
	flex: 1 1 auto;
}

.ok-product-card__title {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 700;
	text-transform: uppercase;
}

.ok-product-card__desc {
	margin: 0;
	font-size: 0.82rem;
	opacity: 0.75;
	flex: 1 1 auto;
}

/* One pill, visually split into a price segment (add-to-cart) and an info
   segment, separated by a solid divider — but still one rounded button. */
.ok-product-card__actions {
	display: flex;
	align-items: stretch;
	margin-top: 8px;
	border-radius: 999px;
	overflow: hidden;
	background: var(--ok-notice-1-bg);
}

.ok-product-card__button {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	flex: 1 1 auto;
	min-width: 0;
	padding: 10px 16px;
	border: none;
	background: transparent;
	color: #fff;
	font-weight: 700;
	font-size: 0.85rem;
	cursor: pointer;
	text-align: left;
}

.ok-product-card__price {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ok-product-card__price .woocommerce-Price-amount {
	color: inherit;
}

.ok-product-card__info {
	flex: 0 0 25%;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-left: 3px solid #fff;
	background: transparent;
	color: #fff;
	font-weight: 700;
	font-style: italic;
	font-size: 1rem;
	cursor: pointer;
}

/* -------------------------------------------------------------------------
 * Modal (product info + variation selection)
 * ---------------------------------------------------------------------- */

.ok-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: none;
}

.ok-modal.is-open {
	display: block;
}

.ok-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
}

.ok-modal__dialog {
	position: relative;
	z-index: 1;
	max-width: 480px;
	max-height: 85vh;
	margin: 7vh auto 0;
	overflow-y: auto;
	background: var(--ok-cart-body-bg);
	color: var(--ok-cart-body-text);
	border-radius: 12px;
	padding: 28px 24px;
}

.ok-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: none;
	background: rgba(0, 0, 0, 0.08);
	color: inherit;
	font-size: 1.2rem;
	line-height: 1;
	cursor: pointer;
}

.ok-modal__title {
	margin: 0 0 14px;
	font-size: 1.3rem;
	font-weight: 700;
	padding-right: 30px;
}

body.ok-modal-open {
	overflow: hidden;
}

/* Safety net: hide the default sorting/result-count row in case the PHP
   removal doesn't match this WooCommerce version's exact hook priority. */
.woocommerce-ordering,
.woocommerce-result-count {
	display: none !important;
}

/* -------------------------------------------------------------------------
 * Unterkategorien-Filter (Kategorie-Archivseiten)
 * ---------------------------------------------------------------------- */

.ok-subcat-filter {
	display: flex !important;
	float: none !important;
	width: 100% !important;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 24px !important;
	padding: 0 !important;
}

.ok-subcat-filter__item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 20px;
	border-radius: 999px;
	border: 2px solid var(--ok-notice-1-bg);
	background: transparent;
	color: var(--ok-cart-body-text);
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
}

.ok-subcat-filter__item:has(input:checked) {
	background: var(--ok-notice-1-bg);
	color: #fff;
}

.ok-subcat-filter__checkbox {
	width: 18px;
	height: 18px;
	accent-color: var(--ok-notice-1-bg);
}

/* -------------------------------------------------------------------------
 * "OrderKlaus Box" block style — pick it in the editor's block-style panel
 * on any Group block to turn it into a stand-alone content card. Lets pages
 * like Impressum be built as several stacked boxes without any code.
 * ---------------------------------------------------------------------- */

.wp-block-group.is-style-ok-box {
	background: var(--ok-content-box-bg);
	color: var(--ok-content-box-text);
	border-radius: 12px;
	padding: 28px;
	margin-bottom: 20px;
}

.wp-block-group.is-style-ok-box a {
	color: inherit;
	text-decoration: underline;
}
