/*
Theme Name: AAG Shop
Theme URI: https://shop.aagflightacademy.de
Author: AAG Flight Academy
Description: Schlankes Block-Theme für den WooCommerce-Shop der AAG Flight Academy unter shop.aagflightacademy.de. Optisch an aagflightacademy.de angelehnt, ohne externe Schriften oder Build-Werkzeuge.
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.1
Version: 0.3.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aag-shop
Tags: block-theme, e-commerce, full-site-editing, accessibility-ready
WC requires at least: 10.0
WC tested up to: 11.1
*/

/* ---------------------------------------------------------------
   Basis
   --------------------------------------------------------------- */
html { scroll-padding-top: 6rem; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; }

.skip-link.screen-reader-text:focus {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--navy);
	z-index: 100000;
}

/* Sichtbarer Fokus für alle interaktiven Elemente (WCAG 2.4.7 / 2.4.13) */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--blue);
	outline-offset: 2px;
	border-radius: 4px;
}
.has-navy-background-color :where(a, button):focus-visible,
.aag-footer :where(a, button):focus-visible {
	outline-color: #8FB0FA;
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------------------------------------------------------------
   Header
   --------------------------------------------------------------- */
.aag-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgb(255 255 255 / 0.98);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--wp--preset--color--border);
}
.admin-bar .aag-header { top: var(--wp-admin--admin-bar--height, 32px); }
@media (max-width: 600px) { .admin-bar .aag-header { top: 0; } }

/* Header, Inhalt und Footer schließen ohne Block-Abstand aneinander an */
.wp-site-blocks > * { margin-block-start: 0; }

.aag-header__inner { min-height: 80px; align-items: center; }
@media (max-width: 781px) {
	.aag-header__inner { min-height: 64px; }
	/* Mobil wie auf der Hauptseite: Logo links, Menü-Schaltfläche ganz rechts */
	.aag-header__inner > .wp-block-navigation { order: 3; }
	.aag-header__inner > .aag-header__tools { order: 2; margin-left: auto; }
}

.aag-header .wp-block-site-logo img { height: 40px; width: auto; }
@media (max-width: 781px) { .aag-header .wp-block-site-logo img { height: 32px; } }

/* AAG-Logo (SVG aus assets/images) */
.aag-wordmark { margin: 0; line-height: 0; flex-shrink: 0; }
.aag-wordmark a { display: inline-block; }
.aag-wordmark img { display: block; height: 40px; width: auto; max-width: none; }
.aag-footer .aag-wordmark img { height: 34px; }
.aag-coming-soon .aag-wordmark img { height: 40px; }
@media (max-width: 781px) { .aag-header .aag-wordmark img { height: 30px; } }
@media (max-width: 480px) { .aag-header .aag-wordmark img { height: 26px; } .aag-header__tools { gap: 0; } }

.aag-header .wp-block-navigation-item__content {
	padding: 0.5rem 0.75rem;
	border-radius: 6px;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.aag-header .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--surface-alt); }
.aag-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content { color: var(--wp--preset--color--blue-strong); }
.aag-header .wp-block-navigation__responsive-container.is-menu-open { padding: 1.5rem; }
.aag-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 1.25rem; font-weight: 700; }
.aag-header .wp-block-navigation__responsive-container-open,
.aag-header .wp-block-navigation__responsive-container-close { min-width: 44px; min-height: 44px; justify-content: center; }

.aag-header__tools { gap: 0.25rem; }
.aag-header__tools .wc-block-mini-cart__button,
.aag-header__tools .wp-block-woocommerce-customer-account a { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--wp--preset--color--navy); }
.aag-header__tools .wc-block-mini-cart__button:hover,
.aag-header__tools .wp-block-woocommerce-customer-account a:hover { background: var(--wp--preset--color--surface-alt); }

.aag-backlink a {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-weight: 600;
	font-size: 0.875rem;
	color: var(--wp--preset--color--navy);
	text-decoration: none;
	padding: 0.5rem 0.75rem;
	border-radius: 9999px;
	border: 1px solid var(--wp--preset--color--border-strong);
}
.aag-backlink a:hover { background: var(--wp--preset--color--navy); color: var(--wp--preset--color--white); border-color: var(--wp--preset--color--navy); }
@media (max-width: 781px) { .aag-backlink { display: none; } }


/* ---------------------------------------------------------------
   Buttons
   --------------------------------------------------------------- */
.wp-block-button.is-style-outline > .wp-block-button__link,
.wp-block-button .wp-block-button__link.is-style-outline {
	background: transparent;
	color: var(--wp--preset--color--navy);
	border: 2px solid var(--wp--preset--color--navy);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--white);
}
.wp-block-button.is-style-aag-light > .wp-block-button__link {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--navy);
	border: 2px solid var(--wp--preset--color--white);
}
.wp-block-button.is-style-aag-light > .wp-block-button__link:hover { background: transparent; color: var(--wp--preset--color--white); }

/* WooCommerce-Schaltflächen an Markenbuttons angleichen */
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.wc-block-components-button:not(.is-link),
.wp-block-woocommerce-product-button .wp-block-button__link,
.single_add_to_cart_button {
	background: var(--wp--preset--color--blue-strong) !important;
	color: var(--wp--preset--color--white) !important;
	border: 2px solid var(--wp--preset--color--blue-strong) !important;
	border-radius: 8px !important;
	font-weight: 700 !important;
	padding: 0.75rem 1.375rem !important;
	line-height: 1.3 !important;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}
.woocommerce a.button:hover, .woocommerce button.button:hover,
.wc-block-components-button:not(.is-link):hover,
.wp-block-woocommerce-product-button .wp-block-button__link:hover,
.single_add_to_cart_button:hover {
	background: var(--wp--preset--color--navy) !important;
	border-color: var(--wp--preset--color--navy) !important;
}

/* ---------------------------------------------------------------
   Karten
   --------------------------------------------------------------- */
.is-style-aag-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 16px;
	box-shadow: var(--wp--preset--shadow--card);
	overflow: hidden;
}
.is-style-aag-card-highlight {
	background: var(--wp--preset--color--white);
	border: 2px solid var(--wp--preset--color--blue);
	border-radius: 16px;
	box-shadow: var(--wp--preset--shadow--card);
	overflow: hidden;
	position: relative;
}
.aag-card__body { padding: 1.5rem; }
.aag-card-grid > .wp-block-column { display: flex; }
.aag-card-grid > .wp-block-column > * { flex: 1; display: flex; flex-direction: column; }
.aag-card-grid .aag-card__body { display: flex; flex-direction: column; flex: 1; }
.aag-card-grid .aag-card__body > .wp-block-buttons:last-child { margin-top: auto; padding-top: 1rem; }

.aag-badge {
	display: inline-block;
	background: var(--wp--preset--color--blue-strong);
	color: var(--wp--preset--color--white);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 0.25rem 0.625rem;
	border-radius: 9999px;
}

.aag-eyebrow {
	color: var(--wp--preset--color--blue-strong);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

/* Merkmallisten mit Häkchen in Markenblau */
.is-style-aag-checklist { list-style: none; padding-left: 0; }
.is-style-aag-checklist li { position: relative; padding-left: 1.75rem; margin-bottom: 0.5rem; }
.is-style-aag-checklist li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.3em;
	width: 1.1rem;
	height: 1.1rem;
	background: var(--wp--preset--color--blue);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------------------------------------------------------------
   Bild-Platzhalter (bis freigegebene Fotos vorliegen)
   --------------------------------------------------------------- */
.aag-placeholder {
	position: relative;
	display: grid;
	place-items: center;
	aspect-ratio: 16 / 9;
	background:
		repeating-linear-gradient(135deg, rgb(255 255 255 / 0.05) 0 2px, transparent 2px 22px),
		linear-gradient(135deg, #1C244B 0%, #2B3A78 55%, #467FF7 140%);
	color: rgb(255 255 255 / 0.9);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	text-align: center;
	margin: 0;
	padding: 1rem;
}
.aag-placeholder--square { aspect-ratio: 1 / 1; }

/* Freigegebene Fotos aus der Mediathek */
.aag-photo { margin: 0; aspect-ratio: 16 / 9; overflow: hidden; }
.aag-photo--tall { aspect-ratio: 4 / 3; border-radius: 16px; }
.aag-photo--square { aspect-ratio: 1 / 1; }
.aag-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aag-placeholder--tall { aspect-ratio: 4 / 3; }

/* ---------------------------------------------------------------
   Hero
   --------------------------------------------------------------- */
.aag-hero {
	background:
		linear-gradient(100deg, rgb(28 36 75 / 0.96) 0%, rgb(28 36 75 / 0.85) 45%, rgb(28 36 75 / 0.55) 100%),
		repeating-linear-gradient(135deg, rgb(255 255 255 / 0.04) 0 2px, transparent 2px 28px),
		linear-gradient(135deg, #1C244B 0%, #2B3A78 60%, #467FF7 160%);
	color: var(--wp--preset--color--white);
}
.aag-hero h1 { color: var(--wp--preset--color--white); }
.aag-hero .aag-eyebrow { color: #8FB0FA; }
.aag-hero__glass {
	background: rgb(255 255 255 / 0.08);
	border: 1px solid rgb(255 255 255 / 0.14);
	border-radius: 24px;
}

/* ---------------------------------------------------------------
   Ablauf (nummerierte Schritte)
   --------------------------------------------------------------- */
.aag-steps { counter-reset: aag-step; }
.aag-step { counter-increment: aag-step; }
.aag-step .aag-step__title::before {
	content: counter(aag-step);
	display: inline-grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	margin-right: 0.75rem;
	border-radius: 9999px;
	background: var(--wp--preset--color--blue-strong);
	color: var(--wp--preset--color--white);
	font-size: 1rem;
	font-weight: 700;
	vertical-align: middle;
}

/* ---------------------------------------------------------------
   FAQ (details-Block)
   --------------------------------------------------------------- */
.wp-block-details {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 12px;
	padding: 1rem 1.25rem;
}
.wp-block-details + .wp-block-details { margin-top: 0.75rem; }
.wp-block-details summary { font-weight: 700; color: var(--wp--preset--color--navy); cursor: pointer; }
.wp-block-details[open] summary { margin-bottom: 0.5rem; }

/* ---------------------------------------------------------------
   Erlebnis-Fakten (Produktinformationen)
   --------------------------------------------------------------- */
.aag-facts { border-radius: 16px; }
.aag-facts h3 { font-size: 1rem; margin: 0 0 0.25rem; }
.aag-facts p { margin: 0 0 0.875rem; }
.aag-facts > .wp-block-heading:first-child { margin-bottom: 1rem; }
.aag-todo { background: #FFF7E0; border-left: 4px solid #B45309; padding: 0.25rem 0.5rem; }

/* ---------------------------------------------------------------
   Formulare / WooCommerce
   --------------------------------------------------------------- */
input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="password"], input[type="search"], select, textarea,
.wc-block-components-text-input input, .wc-block-components-textarea {
	border: 1px solid #D1D5DB;
	border-radius: 8px;
	padding: 0.75rem;
	font: inherit;
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--white);
}
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--wp--preset--color--blue); }

.wc-block-product-template .wc-block-product,
.wp-block-woocommerce-product-template > li {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 16px;
	box-shadow: var(--wp--preset--shadow--card);
	overflow: hidden;
	padding-bottom: 1.25rem;
}
.wc-block-product-template .wc-block-product > :not(.wc-block-components-product-image),
.wp-block-woocommerce-product-template > li > :not(.wc-block-components-product-image) { padding-inline: 1.25rem; }
.wc-block-components-product-image img { border-radius: 0; aspect-ratio: 4 / 3; object-fit: cover; }
.wc-block-components-product-price { color: var(--wp--preset--color--navy); font-weight: 700; }
.woocommerce-store-notice, p.demo_store { background: var(--wp--preset--color--navy) !important; }

.aag-shop-panel { border-radius: 16px; }

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */
.aag-footer a { color: var(--wp--preset--color--footer-link); text-decoration: none; }
.aag-footer a:hover { color: var(--wp--preset--color--white); text-decoration: underline; }
.aag-footer h2 { color: var(--wp--preset--color--white); }
.aag-footer .wp-block-list { list-style: none; padding-left: 0; }
.aag-footer .wp-block-list li { margin-bottom: 0.5rem; }
.aag-footer__bottom { border-top: 1px solid rgb(255 255 255 / 0.12); }

/* ---------------------------------------------------------------
   Demnächst verfügbar (WooCommerce Coming Soon)
   --------------------------------------------------------------- */
.aag-coming-soon { padding-inline: clamp(1rem, 4vw, 1.5rem); }
.aag-coming-soon__login a {
	display: inline-block;
	padding: 0.625rem 1.125rem;
	border: 2px solid var(--wp--preset--color--navy);
	border-radius: 8px;
	color: var(--wp--preset--color--navy);
	font-weight: 700;
	font-size: 0.875rem;
	text-decoration: none;
}
.aag-coming-soon__login a:hover { background: var(--wp--preset--color--navy); color: var(--wp--preset--color--white); }

/* ---------------------------------------------------------------
   Rechtstexte (übernommen, kompakte Typografie)
   --------------------------------------------------------------- */
.aag-legal { font-size: 0.9375rem; }
.aag-legal h2 { font-size: 1.375rem; margin: 2rem 0 0.5rem; }
.aag-legal h3, .aag-legal h4 { font-size: 1rem; letter-spacing: 0; margin: 1rem 0 0.125rem; }
.aag-legal h3 + p, .aag-legal h4 + p { margin-top: 0; }
.aag-legal p { margin: 0 0 0.75rem; }

/* ---------------------------------------------------------------
   Formulare (Contact Form 7)
   --------------------------------------------------------------- */
.wpcf7-form { max-width: 640px; }
.wpcf7-form label { display: block; font-weight: 600; color: var(--wp--preset--color--navy); }
.wpcf7-form input:not([type="checkbox"]):not([type="submit"]),
.wpcf7-form select,
.wpcf7-form textarea { width: 100%; box-sizing: border-box; margin-top: 0.375rem; font-weight: 400; }
.wpcf7-form .wpcf7-acceptance .wpcf7-list-item { margin: 0; }
.wpcf7-form input[type="submit"] {
	background: var(--wp--preset--color--blue-strong);
	color: var(--wp--preset--color--white);
	border: 2px solid var(--wp--preset--color--blue-strong);
	border-radius: 8px;
	font: inherit;
	font-weight: 700;
	padding: 0.75rem 1.375rem;
	cursor: pointer;
}
.wpcf7-form input[type="submit"]:hover:not(:disabled) { background: var(--wp--preset--color--navy); border-color: var(--wp--preset--color--navy); }
.wpcf7-form input[type="submit"]:disabled { opacity: 0.55; cursor: not-allowed; }
.wpcf7-not-valid-tip { color: #B42318; font-size: 0.875rem; }
.wpcf7 form .wpcf7-response-output { border-radius: 8px; margin: 1.5rem 0 0; padding: 0.75rem 1rem; }
