/* ella shop – Felder auf der Produktseite */

.ella-felder {
	display: grid;
	gap: 1.4rem;
	width: 100%;
	margin: 0.5rem 0 1.5rem;
	font-weight: 400;
}

.ella-feld { border: 0; margin: 0; padding: 0; min-width: 0; }
.ella-feld[hidden] { display: none; }
.ella-feld > label,
.ella-feld > legend {
	display: block;
	margin-bottom: 0.45rem;
	font-family: var(--wp--preset--font-family--josefin-slab, serif);
	font-size: 1.15rem;
	text-transform: lowercase;
	padding: 0;
}
.ella-freiwillig,
.ella-auswahl { font-family: var(--wp--preset--font-family--jost, sans-serif); font-size: 0.85rem; color: var(--wp--preset--color--grau, #7f7363); }
.ella-auswahl:not(:empty)::before { content: "· "; }

.ella-feld input[type="text"],
.ella-feld input[type="number"],
.ella-feld select {
	width: 100%;
	box-sizing: border-box;
	padding: 0.75em 0.9em;
	border: 1px solid var(--wp--custom--rahmen, #e3d3c7);
	border-radius: 6px;
	background: #fff;
	font: inherit;
	color: inherit;
}
.ella-feld input:is([type="text"], [type="number"]):focus,
.ella-feld select:focus { outline: none; border-color: var(--wp--preset--color--apricot, #ba7e5b); box-shadow: 0 0 0 1px var(--wp--preset--color--apricot, #ba7e5b); }
.ella-feld--betrag input { max-width: 10rem; }

/* Knöpfe für wenige Möglichkeiten (z. B. titel: ja / nein) */
.ella-knoepfe { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.ella-knopf { position: relative; }
.ella-knopf input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ella-knopf span {
	display: block;
	min-width: 5.5rem;
	box-sizing: border-box;
	padding: 0.65em 1.4em;
	border: 1px solid var(--wp--custom--rahmen, #e3d3c7);
	border-radius: 999px;
	background: #fff;
	text-align: center;
	text-transform: lowercase;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.ella-knopf:hover span { border-color: var(--wp--preset--color--beige, #e8cfbf); background: var(--wp--preset--color--creme, #fdfbf8); }
.ella-knopf input:checked ~ span { background: var(--wp--preset--color--braun, #533e31); border-color: var(--wp--preset--color--braun, #533e31); color: var(--wp--preset--color--creme, #fdfbf8); }
.ella-knopf input:focus-visible ~ span { outline: 2px solid var(--wp--preset--color--apricot, #ba7e5b); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
	.ella-knopf span { transition: none; }
}
/* Knöpfe mit Bild (Timeless: klassischer titel / design titel) */
.ella-knoepfe--bilder { display: grid; grid-template-columns: repeat(2, minmax(0, 11rem)); }
.ella-knoepfe--bilder .ella-knopf {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	padding: 0.5rem;
	border: 1px solid var(--wp--custom--rahmen, #e3d3c7);
	border-radius: 0.6rem;
	background: #fff;
}
.ella-knoepfe--bilder .ella-knopf:has(input:checked) { border-color: var(--wp--preset--color--braun, #533e31); box-shadow: 0 0 0 1px var(--wp--preset--color--braun, #533e31); }
.ella-knoepfe--bilder img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0.35rem; }
.ella-knoepfe--bilder small { position: absolute; top: 0.9rem; left: 0.9rem; padding: 0.1em 0.5em; border-radius: 999px; background: rgba(255, 255, 255, 0.9); font-size: 0.75rem; }
.ella-knoepfe--bilder span { min-width: 0; padding: 0.5em 0.6em; }

.ella-hinweis { margin: 0.4rem 0 0; font-size: 0.85rem; line-height: 1.5; color: var(--wp--preset--color--grau, #7f7363); }

/* Kacheln */
.ella-kacheln {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
	gap: 0.6rem;
}
.ella-kacheln--gross { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.ella-kacheln--motive { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
/* Titeldesigns der Druckerei: ganzes Design auf Weiss, Handy drei pro Zeile */
.ella-kacheln--designs { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.ella-kacheln--designs .ella-wahl img { aspect-ratio: 4 / 3; object-fit: contain; background: #fff; }

/* Gutschein «senden an»: Name und Adresse ganze Breite, PLZ und Ort nebeneinander */
.ella-adresse { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0.7rem 0.6rem; }
.ella-adresse__name,
.ella-adresse__adresse { grid-column: 1 / -1; }
.ella-adresse label { display: block; margin-bottom: 0.25rem; font-size: 0.85rem; color: var(--wp--preset--color--grau, #7f7363); }
.ella-feld--adresse .ella-hinweis { margin-top: 0.5rem; }

/* Eigenes Bild: Upload oder Bildnummer */
.ella-feld--upload input[type="file"] {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 0.9em;
	border: 1px dashed var(--wp--custom--rahmen, #e3d3c7);
	border-radius: 6px;
	background: var(--wp--preset--color--sand, #f6ece5);
	font: inherit;
	font-size: 0.9rem;
	cursor: pointer;
}
.ella-feld--upload input[type="file"]::file-selector-button {
	margin-right: 0.8em;
	padding: 0.5em 1.1em;
	border: 0;
	border-radius: 999px;
	background: var(--wp--preset--color--braun, #533e31);
	color: var(--wp--preset--color--creme, #fffdfa);
	font: inherit;
	text-transform: lowercase;
	cursor: pointer;
}
.ella-feld--upload .ella-oder { display: block; margin: 0.8rem 0 0.4rem; font-size: 0.9rem; color: var(--wp--preset--color--grau, #7f7363); }
.ella-feld--upload input[type="text"] { max-width: 14rem; }

.ella-wahl { position: relative; display: block; cursor: pointer; text-align: center; font-size: 0.72rem; line-height: 1.25; color: var(--wp--preset--color--grau, #7f7363); }
.ella-wahl input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ella-wahl img {
	display: block;
	box-sizing: border-box; /* Rahmen innerhalb der Kachel, sonst 2 px breiter als die Zelle */
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 6px;
	border: 1px solid var(--wp--custom--rahmen, #e3d3c7);
	transition: box-shadow 0.15s ease;
}
.ella-kacheln--gross .ella-wahl img { aspect-ratio: 4 / 3; object-fit: contain; background: #fff; }
.ella-wahl span { display: block; margin-top: 0.3rem; text-transform: lowercase; }
.ella-wahl:hover img { box-shadow: 0 0 0 2px var(--wp--preset--color--beige, #e8cfbf); }
.ella-wahl input:checked + img { box-shadow: 0 0 0 2px var(--wp--preset--color--braun, #533e31); }
.ella-wahl input:checked ~ span { color: var(--wp--preset--color--braun, #533e31); font-weight: 500; }
.ella-wahl input:focus-visible + img { outline: 2px solid var(--wp--preset--color--apricot, #ba7e5b); outline-offset: 3px; }

/* Beim Darüberfahren mit der Maus vergrössern – wächst nach oben, die Beschriftung bleibt sichtbar */
@media (hover: hover) and (pointer: fine) {
	.ella-wahl img { transform-origin: 50% 100%; transition: transform 0.25s ease, box-shadow 0.25s ease; }
	.ella-wahl:hover { z-index: 3; }
	.ella-wahl:hover img { transform: scale(1.7); box-shadow: 0 12px 28px rgba(83, 62, 49, 0.28); }
	.ella-wahl:hover input:checked + img { box-shadow: 0 0 0 2px var(--wp--preset--color--braun, #533e31), 0 12px 28px rgba(83, 62, 49, 0.28); }
	.ella-kacheln--gross .ella-wahl:hover img { transform: scale(1.5); }
	.ella-kacheln--designs .ella-wahl:hover img { transform: scale(1.8); }
}
@media (prefers-reduced-motion: reduce) {
	.ella-wahl img { transition: none; }
}

/* Motive: ganzes Bild im echten Format (A4/A3, hoch oder quer), mittig in einem quadratischen Feld.
   Prozent-Ränder beziehen sich auf die Breite – so passt Querformat (Höhe 70,71 %) genau ins Quadrat. */
.ella-zelle { position: relative; min-width: 0; }
.ella-kacheln--motive .ella-wahl img { height: auto; object-fit: cover; border-radius: 3px; }
.ella-zelle--hoch .ella-wahl img { width: 70.71%; aspect-ratio: 1 / 1.41421; margin: 0 auto; }
.ella-zelle--quer .ella-wahl img { aspect-ratio: 1.41421 / 1; margin: 14.645% 0; }
.ella-kacheln--motive .ella-wahl span { margin-top: 0; padding-top: 0.3rem; } /* kein Zusammenfallen mit dem Bildrand */

/* Lupe: öffnet die grosse Ansicht */
.ella-lupe {
	position: absolute;
	top: 0.25rem;
	right: calc(14.645% + 0.25rem);
	z-index: 4;
	width: 1.55rem;
	height: 1.55rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.86) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23533e31' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 20.5 20.5M10.5 7.8v5.4M7.8 10.5h5.4'/%3E%3C/svg%3E") center / 0.9rem no-repeat;
	box-shadow: 0 1px 3px rgba(83, 62, 49, 0.25);
	cursor: zoom-in;
}
.ella-lupe::after { content: ""; position: absolute; inset: -0.5rem; } /* grössere Tippfläche */
.ella-zelle--quer .ella-lupe { right: 0.25rem; margin-top: 14.645%; }
.ella-lupe:focus-visible { outline: 2px solid var(--wp--preset--color--apricot, #ba7e5b); outline-offset: 2px; }

.ella-alle-ansehen {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0 0 0.8rem;
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	font-size: 0.85rem;
	color: var(--wp--preset--color--braun, #533e31);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}
.ella-alle-ansehen::before {
	content: "";
	width: 1rem;
	height: 1rem;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23533e31' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 20.5 20.5M10.5 7.8v5.4M7.8 10.5h5.4'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ella-alle-ansehen:hover { color: var(--wp--preset--color--apricot, #ba7e5b); }
.ella-alle-ansehen:focus-visible { outline: 2px solid var(--wp--preset--color--apricot, #ba7e5b); outline-offset: 3px; }

@media (hover: hover) and (pointer: fine) {
	/* Mit der Maus: Lupe beim Darüberfahren, statt die Kachel zu vergrössern */
	.ella-lupe { opacity: 0; transition: opacity 0.2s ease; }
	.ella-zelle:hover .ella-lupe,
	.ella-lupe:focus-visible { opacity: 1; }
	.ella-kacheln--motive .ella-wahl:hover img { transform: none; box-shadow: 0 0 0 2px var(--wp--preset--color--beige, #e8cfbf); }
	.ella-kacheln--motive .ella-wahl:hover input:checked + img { box-shadow: 0 0 0 2px var(--wp--preset--color--braun, #533e31); }
}

/* Grosse Ansicht */
html.ella-ansicht-offen { overflow: hidden; }
.ella-ansicht {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 1rem;
	box-sizing: border-box;
	border: 0;
	background: transparent;
	color: #fff;
	font-family: var(--wp--preset--font-family--jost, sans-serif);
	overscroll-behavior: contain;
}
.ella-ansicht[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; }
.ella-ansicht::backdrop { background: rgba(28, 22, 18, 0.97); }
.ella-ansicht__bild {
	display: block;
	--hoehe: calc(100vh - 9rem);
	width: min(calc(100vw - 2rem), calc(var(--hoehe) * var(--r, 1)), var(--w, 1600px));
	height: auto;
	aspect-ratio: var(--r, 1);
	border-radius: 3px;
	background: #2b221c;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
@supports (height: 100dvh) {
	.ella-ansicht__bild { --hoehe: calc(100dvh - 9rem); } /* Handy: ohne die Adressleiste */
}
.ella-ansicht__leiste { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.6rem 1.2rem; }
.ella-ansicht__titel { margin: 0; font-family: var(--wp--preset--font-family--josefin-slab, serif); font-size: 1.25rem; }
.ella-ansicht__zaehler { font-size: 0.85rem; color: rgba(255, 255, 255, 0.6); }
.ella-ansicht__waehlen {
	padding: 0.7em 1.5em;
	border: 0;
	border-radius: 999px;
	background: #fff;
	color: var(--wp--preset--color--braun, #533e31);
	font: inherit;
	font-size: 0.95rem;
	cursor: pointer;
}
.ella-ansicht__waehlen[aria-pressed="true"] { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55); }
.ella-ansicht__zu,
.ella-ansicht__pfeil {
	position: fixed;
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	cursor: pointer;
}
.ella-ansicht__zu { top: 0.75rem; right: 0.75rem; }
.ella-ansicht__pfeil { top: 50%; transform: translateY(-50%); }
.ella-ansicht__pfeil--zurueck { left: 0.75rem; }
.ella-ansicht__pfeil--weiter { right: 0.75rem; }
.ella-ansicht__zu:hover,
.ella-ansicht__pfeil:hover { background: rgba(255, 255, 255, 0.28); }
.ella-ansicht :focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.ella-gemeinsam { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 0.8rem; font-size: 0.9rem; cursor: pointer; }
.ella-gemeinsam input { accent-color: var(--wp--preset--color--braun, #533e31); }

/* Gruppen beim Hochzeitsalbum */
.ella-gruppe { border-top: 1px solid var(--wp--custom--rahmen, #e3d3c7); padding: 0.6rem 0; }
.ella-gruppe:last-of-type { border-bottom: 1px solid var(--wp--custom--rahmen, #e3d3c7); }
.ella-gruppe summary { cursor: pointer; text-transform: lowercase; padding: 0.2rem 0; }
.ella-gruppe summary span { color: var(--wp--preset--color--grau, #7f7363); font-size: 0.85rem; }
.ella-gruppe .ella-kacheln { margin-top: 0.7rem; }

/* Beispieltexte hell, damit sie nicht wie ausgefüllt wirken */
.ella-feld input::placeholder { color: #b8aba1; opacity: 1; }

/* ---------- 1.5.0: Fehlermeldungen, Preis, Bildvorschau, Muster gross ---------- */

/* Eigene Meldung beim Feld (statt Browser-Blase) */
.ella-fehler {
	margin: 0.45rem 0 0;
	font-size: 0.85rem;
	line-height: 1.35;
	color: #a1371f;
}
.ella-fehler::before { content: "! "; font-weight: 600; }
.ella-feld.ella-hat-fehler { box-shadow: -3px 0 0 #a1371f; padding-left: 0.75rem; }
.ella-feld.ella-hat-fehler input[type="text"],
.ella-feld.ella-hat-fehler input[type="number"],
td.ella-hat-fehler select { border-color: #a1371f !important; }

/* Genauer Preis steht oben in der Pille – unten nicht nochmals */
.ella-preis-gewaehlt .woocommerce-variation-price { display: none; }

/* Vorschau des eigenen Bilds */
.ella-vorschau {
	display: block;
	max-width: 10rem;
	max-height: 10rem;
	margin-top: 0.6rem;
	border-radius: 4px;
	object-fit: contain;
	box-shadow: 0 1px 4px rgba(83, 62, 49, 0.2);
}
.ella-vorschau[hidden] { display: none; }

/* Musterkacheln: Lupe zum Vergrössern (auf dem Handy immer sichtbar) */
.ella-wahl__lupe {
	position: absolute;
	top: 0.25rem;
	right: 0.25rem;
	z-index: 4;
	width: 1.55rem;
	height: 1.55rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.86) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23533e31' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 20.5 20.5M10.5 7.8v5.4M7.8 10.5h5.4'/%3E%3C/svg%3E") center / 0.9rem no-repeat;
	box-shadow: 0 1px 3px rgba(83, 62, 49, 0.25);
	cursor: zoom-in;
}
.ella-wahl__lupe::after { content: ""; position: absolute; inset: -0.4rem; }
.ella-wahl__lupe:focus-visible { outline: 2px solid var(--wp--preset--color--apricot, #ba7e5b); outline-offset: 2px; }
.ella-knopf { position: relative; }
@media (hover: hover) and (pointer: fine) {
	.ella-wahl__lupe { opacity: 0; transition: opacity 0.2s ease; }
	.ella-wahl:hover .ella-wahl__lupe,
	.ella-knopf:hover .ella-wahl__lupe,
	.ella-wahl__lupe:focus-visible { opacity: 1; }
}

.ella-muster {
	width: min(92vw, 34rem);
	padding: 1rem 1rem 0.75rem;
	border: 0;
	border-radius: 8px;
	background: #fff;
	text-align: center;
	color: var(--wp--preset--color--braun, #533e31);
}
.ella-muster::backdrop { background: rgba(40, 30, 24, 0.7); }
.ella-muster img { display: block; width: 100%; height: auto; max-height: 75vh; object-fit: contain; image-rendering: auto; }
.ella-muster p { margin: 0.6rem 0 0; font-size: 0.95rem; text-transform: lowercase; }
.ella-muster__zu {
	position: absolute;
	top: 0.25rem;
	right: 0.25rem;
	width: 2.75rem;
	height: 2.75rem;
	border: 0;
	background: none;
	font-size: 1.6rem;
	line-height: 1;
	color: inherit;
	cursor: pointer;
}

/* 1.6.0: Hinweis in einer aufgeklappten Materialgruppe (z. B. Volluto bei Timeless mit Bild) */
.ella-gruppe__hinweis {
	margin: 0.2rem 0 0.8rem;
	padding: 0.55rem 0.8rem;
	border-left: 3px solid var(--wp--preset--color--apricot, #ba7e5b);
	background: rgba(186, 126, 91, 0.08);
	font-size: 0.88rem;
	line-height: 1.4;
	color: var(--wp--preset--color--braun, #533e31);
}

/* 1.8.0: Aufpreise und Anzahl */
.ella-plus { font-size: 0.78em; font-weight: 400; color: var(--wp--preset--color--apricot, #ba7e5b); white-space: nowrap; }
.ella-gruppe summary .ella-plus { margin-left: 0.35rem; }
.ella-feld--anzahl input[type="number"] { max-width: 7rem; }

/* 1.9.0: Geschenkverpackung */
.ella-haken { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; font-size: 1rem; }
.ella-haken input { width: 1.15rem; height: 1.15rem; accent-color: var(--wp--preset--color--braun, #533e31); }

/* Versand-Rest im leeren Warenkorb ausblenden (display von .ella-aktion schlägt sonst [hidden]). */
.ella-aktion[hidden] { display: none !important; }
