.as-vereine-shop__intro {
	max-width: 900px;
	margin-left: auto;
	margin-right: auto;
	padding-top: 40px;
	padding-left: 24px;
	padding-right: 24px;
	margin-bottom: 24px;
}

.as-vereine-shop__intro table {
	border-collapse: collapse;
	margin: 12px 0;
}

.as-vereine-shop__intro table td,
.as-vereine-shop__intro table th {
	border: 1px solid #ddd;
	padding: 6px 12px;
}

.as-vereine-shop__layout {
	display: flex;
	flex-wrap: wrap;
	gap: 32px;
	align-items: flex-start;
}

/* Sidebar (Filter + Warenkorb) steht im Markup wie bei Blocksys eigener
   Produktübersicht NACH dem Grid (section vor aside) - Blocksys dynamisches
   CSS positioniert sie über data-sidebar="left" trotzdem links. order:-1 ist
   der Fallback, falls dieses CSS in diesem Custom-Template-Kontext nicht
   greift, siehe templates/verein-shop.php. */
.as-vereine-shop__sidebar {
	order: -1;
	flex: 0 1 260px;
	min-width: 220px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* Sticky nur ab Desktop-Breite - 1000px ist Blocksys eigene Tablet/Desktop-
   Grenze (siehe wp-content/themes/blocksy/inc/dynamic-css.php: "@media
   (max-width: 999.98px)" für Tablet), damit Tablet konsistent mit dem Theme
   als "nicht Desktop" behandelt wird und dort wie auf Mobile nicht sticky ist.
   top etwas grösser als 0, damit der Warenkorb-Titel nicht unter einem
   fixen/stickyen Theme-Header verschwindet - bei Bedarf an die tatsächliche
   Header-Höhe anpassen. */
@media (min-width: 1000px) {
	.as-vereine-shop__sidebar {
		position: sticky;
		top: 100px;
		align-self: flex-start;
		max-height: calc(100vh - 100px);
		overflow-y: auto;
	}
}

.as-vereine-shop__main {
	flex: 1 1 640px;
	min-width: 0;
}

.as-vereine-sidebar-box {
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	padding: 16px;
}

.as-vereine-sidebar-box__title {
	margin: 0 0 12px;
	font-size: 1em;
}

.as-vereine-shop__filter-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.as-vereine-shop__filter-option {
	display: block;
	padding: 4px 0;
	text-decoration: none;
	color: inherit;
}

.as-vereine-shop__filter-option.is-active {
	font-weight: 700;
}

.as-vereine-shop__cart .widget_shopping_cart {
	margin: 0;
}

.as-vereine-shop__cart img {
	max-width: 195px;
	height: auto;
}

#as-vereine-shop-cart p.woocommerce-mini-cart__buttons.buttons a {
	padding: 0px;
}

.as-vereine-shop__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 24px;
}

.as-vereine-card {
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.as-vereine-card__gallery {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.as-vereine-card__image {
	display: block;
	width: 100%;
	cursor: zoom-in;
	border: 0;
	background: transparent;
	padding: 0;
}

.as-vereine-card__image img {
	display: block;
	width: 100%;
	height: auto;
}

.as-vereine-card__thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.as-vereine-card__thumb {
	padding: 0;
	border: 2px solid transparent;
	border-radius: 4px;
	background: transparent;
	cursor: pointer;
	line-height: 0;
}

.as-vereine-card__thumb img {
	display: block;
	width: 44px;
	height: 44px;
	object-fit: cover;
	border-radius: 2px;
}

.as-vereine-card__thumb.is-active {
	border-color: #1e1e1e;
}

.as-vereine-card__title {
	font-size: 1em;
	margin: 0;
}

.as-vereine-card__geschlecht,
.as-vereine-card__farbe {
	font-size: 0.85em;
	color: #666;
}

.as-vereine-card__price {
	font-weight: 600;
}

.as-vereine-card__attribute {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.as-vereine-card__options {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.as-vereine-card__option {
	min-width: 2.5em;
	padding: 4px 8px;
	border: 1px solid #ccc;
	background: #fff;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.85em;
}

.as-vereine-card__option.is-selected {
	background: #1e1e1e;
	color: #fff;
	border-color: #1e1e1e;
}

.as-vereine-card__personalization {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* Höhere Spezifität als die Regel oben, damit das hidden-Attribut (von
   verein-shop-quick-add.js gesetzt/entfernt) tatsächlich greift - ohne das
   würde die Klassenregel .as-vereine-card__personalization{display:flex}
   das native [hidden]-Verhalten überschreiben. */
.as-vereine-card__personalization[hidden] {
	display: none;
}

.as-vereine-card__personalization-intro {
	margin: 0;
	font-size: 0.85em;
	color: #666;
}

.as-vereine-card__personalization-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 0.85em;
}

.as-vereine-card__personalization-hint {
	color: #666;
	font-size: 0.9em;
}

.as-vereine-card__personalization-input {
	width: 100%;
	padding: 6px 8px;
	border: 1px solid #ccc;
	border-radius: 4px;
}

.as-vereine-card__actions {
	display: flex;
	gap: 8px;
	align-items: stretch;
	margin-top: auto;
}

.as-vereine-card__qty {
	width: 3.5em;
}

.as-vereine-card__add {
	flex: 1 1 auto;
}

button.as-vereine-card__add.button {
	line-height: 1.15rem;
}

.as-vereine-card__add:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.as-vereine-card__message {
	font-size: 0.85em;
	color: #a94442;
	margin: 0;
}

.as-vereine-card__unavailable {
	font-size: 0.85em;
	color: #666;
}

/* Lightbox */
.as-vereine-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.85);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100000;
}

.as-vereine-lightbox[hidden] {
	display: none;
}

.as-vereine-lightbox__image {
	max-width: 90vw;
	max-height: 85vh;
	display: block;
	background-color: #FAFAFA;
}

.as-vereine-lightbox__close,
.as-vereine-lightbox__prev,
.as-vereine-lightbox__next {
	position: absolute;
	background: transparent;
	border: 0;
	color: #fff;
	font-size: 2.5rem;
	line-height: 1;
	cursor: pointer;
	padding: 8px 16px;
}

.as-vereine-lightbox__close {
	top: 12px;
	right: 12px;
	font-size: 2rem;
}

.as-vereine-lightbox__prev {
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
}

.as-vereine-lightbox__next {
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
}

body.as-vereine-lightbox-open {
	overflow: hidden;
}

/* Bewusst dieselbe Grenze wie beim Sticky-Umschalten oben (Blocksys eigene
   Tablet/Desktop-Grenze) - ein schmaler ~260px-Sidebar-Warenkorb wäre auf
   Tablet-Breiten weiterhin eng; volle Breite (wie auf Mobile) nutzt den
   vorhandenen Platz besser als z. B. 50%, die auf vielen Tablet-Grössen
   (~768px) immer noch recht knapp wäre. */
@media (max-width: 999.98px) {
	.as-vereine-shop__layout {
		flex-direction: column;
	}

	.as-vereine-shop__sidebar {
		flex-basis: auto;
		min-width: 0;
	}
}

/* Schwebender "Zum Warenkorb"-Button - nur Tablet/Mobile (< 1000px, gleiche
   Blocksy-Grenze wie beim Sticky-Sidebar-Umschalten oben), erscheint per JS
   erst nach etwas Scroll-Distanz (siehe verein-shop-mobile-cart-button.js). */
.as-vereine-mobile-cart-button {
	display: none;
	position: fixed;
	bottom: 16px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 9000;
	background: #1e1e1e;
	color: #fff;
	padding: 12px 24px;
	border-radius: 999px;
	text-decoration: none;
	font-weight: 600;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

@media (max-width: 999.98px) {
	.as-vereine-mobile-cart-button:not([hidden]) {
		display: inline-flex;
	}
}

/* Set-/Bundle-Konfigurator-Modal (siehe AS_Vereine_Set_Configurator) */
.as-vereine-set-modal[hidden] {
	display: none;
}

.as-vereine-set-modal__backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 100000;
}

.as-vereine-set-modal__dialog {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 100001;
	background: #fff;
	border-radius: 8px;
	padding: 24px;
	width: calc(100% - 32px);
	max-width: 480px;
	max-height: 85vh;
	overflow-y: auto;
}

.as-vereine-set-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	background: transparent;
	border: 0;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.as-vereine-set-modal__title {
	margin: 0 0 16px;
	padding-right: 24px;
}

.as-vereine-set-modal__item {
	padding: 12px 0;
	border-top: 1px solid #e5e5e5;
}

.as-vereine-set-modal__item-name {
	font-weight: 600;
	margin-bottom: 8px;
}

.as-vereine-set-modal__sizes {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.as-vereine-set-modal__size-option {
	min-width: 2.5em;
	padding: 4px 8px;
	border: 1px solid #ccc;
	background: #fff;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.85em;
}

.as-vereine-set-modal__size-option.is-selected {
	background: #1e1e1e;
	color: #fff;
	border-color: #1e1e1e;
}

.as-vereine-set-modal__size-option:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.as-vereine-set-modal__fields {
	padding-top: 16px;
	border-top: 1px solid #e5e5e5;
	margin-top: 4px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.as-vereine-set-modal__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.as-vereine-set-modal__field-hint {
	color: #666;
	font-size: 0.9em;
}

.as-vereine-set-modal__field-input {
	width: 100%;
	padding: 6px 8px;
	border: 1px solid #ccc;
	border-radius: 4px;
}

.as-vereine-set-modal__message {
	color: #a94442;
	font-size: 0.85em;
}

.as-vereine-set-modal__submit {
	width: 100%;
	margin-top: 16px;
}

.as-vereine-set-modal__submit:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

body.as-vereine-set-modal-open {
	overflow: hidden;
}
