/* Coris – minimale Ergänzungen zu theme.json (Frontend + Editor). */

/* Sticky Header */
header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 50;
}
.admin-bar header.wp-block-template-part { top: var(--wp-admin--admin-bar--height, 32px); }
@media (max-width: 600px) {
	.admin-bar header.wp-block-template-part { top: 0; }
}
.coris-header { box-shadow: 0 1px 0 rgba(43, 42, 34, 0.02); }
.coris-topbar p { margin: 0; }
.coris-logo img { height: auto; }
@media (max-width: 781px) {
	.coris-hide-mobile { display: none; }
	.coris-topbar { text-align: center; }
	.coris-logo img { width: 84px !important; }
}

/* Header-Icons einheitlich */
.coris-header .wp-block-search__button,
.coris-header .wc-block-mini-cart__button,
.coris-header .wc-block-customer-account a {
	color: var(--wp--preset--color--primary-darker);
	background: transparent;
	border: 0;
	padding: 0.4rem;
}
.coris-header .wp-block-search__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	margin: 0;
}
.coris-header .wp-block-search__button svg { width: 1.5rem; height: 1.5rem; min-width: 0; min-height: 0; fill: currentColor; }
.coris-header .wp-block-search__input { height: 2.5rem; padding-block: 0; }
.coris-header .wp-block-search__inside-wrapper { border-color: var(--wp--preset--color--border); }

/* Navigation Overlay (mobil) */
.wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--40);
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--x-large);
}
.wp-block-navigation .current-menu-item > a,
.wp-block-navigation a[aria-current="page"] {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.35em;
}

/* Fokus sichtbar (Barrierefreiheit) */
:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

/* Formulare (inkl. Contact Form 7, WooCommerce-Klassik) */
:where(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="password"], input[type="search"], input[type="number"], input[type="date"], select, textarea) {
	font: inherit;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--surface);
	border: 1px solid #b9b09b;
	border-radius: 10px;
	padding: 0.7em 0.9em;
	max-width: 100%;
	box-sizing: border-box;
}
:where(input, select, textarea):focus {
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 0 0 3px var(--wp--preset--color--primary-light);
	outline: none;
}
textarea { min-height: 8em; }
.wpcf7 input[type="submit"], .wpcf7-submit {
	font: inherit;
	font-weight: 650;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	border: 0;
	border-radius: 999px;
	padding: 0.8em 1.6em;
	cursor: pointer;
}
.wpcf7 input[type="submit"]:hover { background: var(--wp--preset--color--primary-dark); }
.wpcf7-form p { margin-block: 0 1rem; }
.wpcf7-form label { font-weight: 600; font-size: var(--wp--preset--font-size--small); }
.wpcf7-form :where(input, textarea):not([type="submit"], [type="checkbox"], [type="radio"]) { width: 100%; }

/* Eyebrow / Kicker */
.coris-eyebrow {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin-bottom: 0;
}

/* Karten */
.coris-card, .wp-block-group.is-style-card {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 18px;
	padding: var(--wp--preset--spacing--40);
}
.coris-post-card { padding: var(--wp--preset--spacing--30); height: 100%; }
.coris-post-card .wp-block-post-featured-image { margin: 0; width: 100%; }
.coris-post-card .wp-block-post-title { margin: 0; }
.coris-post-card .wp-block-post-excerpt { margin: 0; }
.coris-post-card .wp-block-post-excerpt__more-text { display: none; }
.coris-sticky-aside { position: sticky; top: 8rem; }

/* Schritte */
.coris-step-number {
	display: inline-grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 999px;
	background: var(--wp--preset--color--primary-light);
	color: var(--wp--preset--color--primary-darker);
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
	margin: 0;
}

/* Kategorie-Kacheln: ganze Kachel klickbar */
.coris-tile { overflow: hidden; transition: transform .25s ease, box-shadow .25s ease; }
.coris-tile .wp-block-cover__image-background { transition: transform .6s ease; }
.coris-tile:hover { box-shadow: var(--wp--preset--shadow--lifted); }
.coris-tile:hover .wp-block-cover__image-background { transform: scale(1.04); }
.coris-tile h3 { margin: 0; }
.coris-tile h3 a { color: inherit; text-decoration: none; }
.coris-tile h3 a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.coris-tile:focus-within { outline: 3px solid var(--wp--preset--color--primary); outline-offset: 3px; }
.coris-tile .wp-block-cover__background { background: linear-gradient(180deg, rgba(47,59,29,0) 30%, rgba(47,59,29,.85) 100%) !important; opacity: 1 !important; }

/* Hero */
.coris-hero h1 { max-width: 14ch; }
@media (prefers-reduced-motion: reduce) {
	.coris-tile, .coris-tile .wp-block-cover__image-background { transition: none; }
}

/* Listen */
.coris-plain-list { list-style: none; padding-left: 0; }
.coris-plain-list li { margin-bottom: 0.35rem; }
.is-style-checks { list-style: none; padding-left: 0; }
.is-style-checks li { position: relative; padding-left: 1.75em; margin-bottom: 0.4em; }
.is-style-checks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.3em;
	width: 1.1em;
	height: 1.1em;
	border-radius: 999px;
	background: var(--wp--preset--color--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FAF7F0' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 70% no-repeat;
}

/* Tabelle Öffnungszeiten */
.coris-hours table { border-collapse: collapse; width: 100%; }
.coris-hours td { border: 0; border-bottom: 1px solid rgba(47, 59, 29, 0.15); padding: 0.6em 0; }
.coris-hours td:last-child { text-align: right; }

/* FAQ / Details */
.wp-block-details summary {
	cursor: pointer;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 560;
	color: var(--wp--preset--color--primary-darker);
	list-style: none;
	position: relative;
	padding-right: 2rem;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: "+";
	position: absolute;
	right: 0.25rem;
	top: 50%;
	transform: translateY(-50%);
	font-family: var(--wp--preset--font-family--body);
	font-size: 1.5em;
	font-weight: 400;
	color: var(--wp--preset--color--primary);
}
.wp-block-details[open] summary::after { content: "–"; }
.wp-block-details > :not(summary) { margin-top: 0.75rem; }

/* Porträt */
.coris-portrait img { max-width: 320px; width: 100%; }

/* WooCommerce */
.wc-block-components-product-badge, .wc-block-components-product-sale-badge {
	background: var(--wp--preset--color--brown);
	color: var(--wp--preset--color--base);
	border: 0;
	border-radius: 999px;
}
.wp-block-woocommerce-product-template .wc-block-components-product-image img { border-radius: 14px; }
.wp-block-woocommerce-product-template li { gap: 0.4rem; }
.wc-block-components-product-button .wp-block-button__link { padding: 0.6em 1.2em; }
.coris-shop-sidebar { position: relative; }
@media (min-width: 782px) {
	.coris-shop-layout > .coris-shop-sidebar { position: sticky; top: 8rem; align-self: flex-start; }
}
.wp-block-woocommerce-product-details.is-style-minimal .wc-tabs li a { font-weight: 600; }
.coris-usp { margin-top: var(--wp--preset--spacing--30); }
.wc-block-mini-cart__badge { background: var(--wp--preset--color--primary); color: var(--wp--preset--color--base); }
.wc-block-components-button:not(.is-link) { border-radius: 999px; }

/* Hinweisbox (Block-Stil "coris-notice" für Gruppe/Absatz) */
.is-style-coris-notice {
	background: var(--wp--preset--color--primary-light);
	color: var(--wp--preset--color--primary-darker);
	border-left: 5px solid var(--wp--preset--color--primary);
	border-radius: 12px;
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
}
.is-style-coris-notice > :first-child { margin-top: 0; }
.is-style-coris-notice > :last-child { margin-bottom: 0; }
.is-style-coris-notice a { color: var(--wp--preset--color--primary-darker); }

/* Leeres Template (Linktree) */
.coris-blank-main { min-height: 100vh; }

/* Plugin wp-opening-hours: Tabellen an Theme anpassen */
.op-table { border-collapse: collapse; }
.op-table th, .op-table td { padding: 0.2em 0.6em 0.2em 0; text-align: left; }
.op-row.highlighted, .op-row.highlighted * { color: var(--wp--preset--color--primary-dark) !important; font-weight: 700; }

/* Autorinnen-Box unter Beiträgen */
.coris-author-box { align-items: center; }
.coris-author-box__img { flex-shrink: 0; margin: 0; }
.coris-author-box p { margin: 0; }
@media (max-width: 480px) {
	.coris-author-box { flex-direction: column; align-items: flex-start; }
}

/* Rubrik-Einleitung (Kategoriebeschreibung) */
.coris-term-intro > p:first-child { font-size: var(--wp--preset--font-size--large); color: var(--wp--preset--color--contrast); }
.coris-term-intro p { color: var(--wp--preset--color--muted); }
.coris-term-intro p + p { margin-top: 0.8em; }
.coris-term-intro a { color: var(--wp--preset--color--primary-darker); text-underline-offset: 0.15em; }

/* Variantenauswahl (variable Produkte): Beschriftung über dem Feld, Feld volle Breite, gut lesbar.
   Überschreibt WooCommerce (feste Höhe 3em + geerbte line-height 2em schnitten den Text ab). */
.woocommerce div.product form.cart table.variations,
.woocommerce div.product form.cart table.variations tbody,
.woocommerce div.product form.cart table.variations tr,
.woocommerce div.product form.cart table.variations th,
.woocommerce div.product form.cart table.variations td {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	line-height: 1.4;
	text-align: left;
}
.woocommerce div.product form.cart table.variations { margin: 0 0 1.25em; max-width: 26rem; }
.woocommerce div.product form.cart table.variations tr + tr { margin-top: 1em; }
.woocommerce div.product form.cart table.variations th.label { margin-bottom: 0.4em; }
.woocommerce div.product form.cart table.variations th.label label {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 650;
	color: var(--wp--preset--color--contrast);
	line-height: 1.4;
}
.woocommerce div.product form.cart table.variations td select,
.woocommerce div.product form.cart .variations select {
	display: block;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	height: auto;
	min-height: 3rem;
	margin: 0;
	padding: 0.75em 2.75em 0.75em 1em;
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.4;
	color: var(--wp--preset--color--contrast);
	background-color: var(--wp--preset--color--surface);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235D743A' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.9em center;
	background-size: 1.15em;
	border: 1.5px solid #9d9580;
	border-radius: 12px;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	text-overflow: ellipsis;
}
.woocommerce div.product form.cart .variations select:hover { border-color: var(--wp--preset--color--primary); }
.woocommerce div.product form.cart .variations select:focus {
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 0 0 3px var(--wp--preset--color--primary-light);
	outline: none;
}
.woocommerce div.product form.cart .variations select option { color: #2b2a22; background: #fff; }
/* „Auswahl zurücksetzen“ */
.woocommerce div.product form.cart .reset_variations {
	display: inline-block;
	margin-top: 0.5em;
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--primary-darker);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}
/* Preis/Verfügbarkeit der gewählten Variante */
.woocommerce div.product form.cart .single_variation_wrap .woocommerce-variation { margin-bottom: 1em; }
.woocommerce div.product form.cart .single_variation_wrap .woocommerce-variation-price .price {
	font-size: var(--wp--preset--font-size--large);
	font-weight: 650;
	color: var(--wp--preset--color--contrast);
}
