/*
 * Auto Product Generator — frontend styles
 *
 * Scoped to .apg-product so nothing leaks to the rest of the theme.
 * Uses CSS variables → theme can override colours / radii without forking.
 * Mobile-first; grid collapses to single column under 720px.
 */

.apg-product {
	--apg-fg: #1f2937;
	--apg-muted: #6b7280;
	--apg-accent: #2563eb;
	--apg-border: #e5e7eb;
	--apg-bg-soft: #f9fafb;
	--apg-radius: 12px;
	--apg-gap: clamp(1.5rem, 3vw, 2.5rem);

	color: var(--apg-fg);
	font-size: 1rem;
	line-height: 1.65;
	margin: 2rem 0;
	max-width: 100%;
}

.apg-product * { box-sizing: border-box; }

.apg-product .apg-section {
	margin: 0 0 var(--apg-gap);
}

.apg-product h2 {
	font-size: clamp(1.5rem, 2.4vw, 2rem);
	line-height: 1.25;
	margin: 0 0 1rem;
	font-weight: 700;
}

.apg-product h3 {
	font-size: 1.125rem;
	line-height: 1.35;
	margin: 0 0 .5rem;
	font-weight: 600;
}

.apg-product p { margin: 0 0 1rem; }
.apg-product p:last-child { margin-bottom: 0; }

/* ---------------- Hero ---------------- */
.apg-hero {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--apg-gap);
	align-items: center;
	background: var(--apg-bg-soft);
	border-radius: var(--apg-radius);
	padding: clamp(1.5rem, 3vw, 2.5rem);
}

.apg-hero__title {
	font-size: clamp(1.75rem, 3vw, 2.5rem);
	line-height: 1.2;
}

.apg-hero__tagline {
	font-size: 1.125rem;
	color: var(--apg-accent);
	font-weight: 600;
	margin-bottom: 1rem;
}

.apg-hero__lead {
	font-size: 1.05rem;
	color: var(--apg-fg);
}

.apg-hero__badges {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	padding: 0;
	margin: 1.25rem 0 0;
}

.apg-hero__badges li {
	background: #fff;
	border: 1px solid var(--apg-border);
	border-radius: 999px;
	padding: .25rem .75rem;
	font-size: .8125rem;
	font-weight: 600;
	letter-spacing: .02em;
}

.apg-hero__media {
	margin: 0;
}

.apg-hero__image {
	width: 100%;
	height: auto;
	border-radius: var(--apg-radius);
	display: block;
}

/* ---------------- Intro ---------------- */
.apg-intro {
	max-width: 70ch;
	margin-inline: auto;
	text-align: center;
}

.apg-intro__body {
	font-size: 1.05rem;
}

/* ---------------- Feature grid ---------------- */
.apg-feature-grid__heading,
.apg-feature-grid__subheading {
	text-align: center;
}

.apg-feature-grid__subheading {
	color: var(--apg-muted);
	margin-bottom: 2rem;
}

.apg-feature-grid__items {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: var(--apg-gap);
}

.apg-feature {
	background: #fff;
	border: 1px solid var(--apg-border);
	border-radius: var(--apg-radius);
	padding: 1.25rem;
	transition: transform .2s ease, box-shadow .2s ease;
}

.apg-feature:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 16px rgba(0,0,0,.06);
}

.apg-feature__media {
	margin: 0 0 1rem;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 8px;
	background: var(--apg-bg-soft);
}

.apg-feature__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.apg-feature__description {
	color: var(--apg-muted);
	font-size: .95rem;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 720px) {
	.apg-hero {
		grid-template-columns: 1fr;
	}
	.apg-hero__media {
		order: -1;
	}
}

/* =================================================================
 * v0.9.0 — 8 new section types
 * ================================================================= */

/* ---------------- FAQ ---------------- */
.apg-faq__heading,
.apg-faq__subheading { text-align: center; }
.apg-faq__subheading { color: var(--apg-muted); margin-bottom: 1.5rem; }

.apg-faq__items {
	max-width: 800px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: .5rem;
}

.apg-faq__item {
	background: #fff;
	border: 1px solid var(--apg-border);
	border-radius: 8px;
	overflow: hidden;
}
.apg-faq__item[open] { border-color: var(--apg-accent); }

.apg-faq__question {
	cursor: pointer;
	padding: 1rem 1.25rem;
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	user-select: none;
}
.apg-faq__question::-webkit-details-marker { display: none; }
.apg-faq__question::after {
	content: '+';
	font-size: 1.5rem;
	color: var(--apg-accent);
	font-weight: 300;
	transition: transform .2s;
	flex-shrink: 0;
}
.apg-faq__item[open] .apg-faq__question::after { content: '−'; }
.apg-faq__question h3 { margin: 0; font-size: 1rem; }

.apg-faq__answer {
	padding: 0 1.25rem 1rem;
	color: var(--apg-fg);
}

/* ---------------- Specifications ---------------- */
.apg-specs__heading { text-align: center; margin-bottom: 1.5rem; }

.apg-specs__list {
	max-width: 720px;
	margin: 0 auto;
	display: grid;
	gap: 0;
	border-top: 1px solid var(--apg-border);
}
.apg-specs__row {
	display: grid;
	grid-template-columns: minmax(180px, 1fr) 1.5fr;
	gap: 1rem;
	padding: .75rem 1rem;
	border-bottom: 1px solid var(--apg-border);
	margin: 0;
}
.apg-specs__row:nth-child(even) { background: var(--apg-bg-soft); }
.apg-specs__row dt { font-weight: 600; margin: 0; color: var(--apg-fg); }
.apg-specs__row dd { margin: 0; color: var(--apg-muted); font-variant-numeric: tabular-nums; }

@media (max-width: 560px) {
	.apg-specs__row { grid-template-columns: 1fr; gap: .25rem; padding: .75rem; }
}

/* ---------------- Testimonial ---------------- */
.apg-testimonial__heading { text-align: center; margin-bottom: 2rem; }

.apg-testimonial__items {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: var(--apg-gap);
}

.apg-testimonial__item {
	background: var(--apg-bg-soft);
	border-radius: var(--apg-radius);
	padding: 1.5rem;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	position: relative;
}
.apg-testimonial__item::before {
	content: '"';
	position: absolute;
	top: -.5rem;
	left: 1rem;
	font-size: 4rem;
	line-height: 1;
	color: var(--apg-accent);
	font-family: serif;
	opacity: .5;
}

.apg-testimonial__quote { margin: 0; padding-top: 1rem; font-style: italic; color: var(--apg-fg); }
.apg-testimonial__quote p:last-child { margin-bottom: 0; }

.apg-testimonial__author {
	display: flex;
	align-items: center;
	gap: .75rem;
	margin-top: auto;
}
.apg-testimonial__author-avatar {
	flex-shrink: 0;
}
.apg-testimonial__avatar {
	width: 48px; height: 48px;
	border-radius: 50%;
	object-fit: cover;
}
.apg-testimonial__author-meta {
	display: flex;
	flex-direction: column;
}
.apg-testimonial__author-name { font-weight: 600; color: var(--apg-fg); }
.apg-testimonial__author-role { font-size: .875rem; color: var(--apg-muted); }

/* ---------------- CTA ---------------- */
.apg-cta {
	background: var(--apg-accent);
	color: #fff;
	border-radius: var(--apg-radius);
	padding: clamp(2rem, 5vw, 3.5rem);
	text-align: center;
}
.apg-cta__heading { color: #fff; margin-bottom: 1rem; }
.apg-cta__body { color: rgba(255, 255, 255, .9); max-width: 60ch; margin: 0 auto 1.5rem; }
.apg-cta__body p { color: inherit; }

.apg-cta__action { margin: 0; }
.apg-cta__button {
	display: inline-block;
	background: #fff;
	color: var(--apg-accent);
	padding: .875rem 2rem;
	border-radius: 999px;
	font-weight: 700;
	text-decoration: none;
	transition: transform .15s, box-shadow .15s;
}
.apg-cta__button:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(0,0,0,.15);
}

/* ---------------- Stats ---------------- */
.apg-stats__heading,
.apg-stats__subheading { text-align: center; }
.apg-stats__subheading { color: var(--apg-muted); margin-bottom: 2rem; }

.apg-stats__items {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: var(--apg-gap);
}

.apg-stats__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 1.5rem 1rem;
}

.apg-stats__number {
	font-size: clamp(2.5rem, 6vw, 4rem);
	font-weight: 800;
	color: var(--apg-accent);
	line-height: 1;
	margin-bottom: .5rem;
	font-variant-numeric: tabular-nums;
}
.apg-stats__label { font-weight: 600; color: var(--apg-fg); }
.apg-stats__description { color: var(--apg-muted); font-size: .875rem; margin-top: .25rem; }

/* ---------------- Before / After ---------------- */
.apg-before-after__heading { text-align: center; margin-bottom: 1rem; }
.apg-before-after__body { text-align: center; max-width: 70ch; margin: 0 auto 2rem; }

.apg-before-after__pair {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.apg-before-after__side {
	margin: 0;
	border-radius: var(--apg-radius);
	overflow: hidden;
	background: var(--apg-bg-soft);
	position: relative;
}

.apg-before-after__image {
	width: 100%;
	height: 100%;
	display: block;
	aspect-ratio: 4 / 5;
	object-fit: cover;
}

.apg-before-after__side figcaption {
	position: absolute;
	bottom: 0; left: 0; right: 0;
	padding: .5rem 1rem;
	background: rgba(0, 0, 0, .65);
	color: #fff;
	font-weight: 600;
	font-size: .875rem;
	text-align: center;
}

@media (max-width: 560px) {
	.apg-before-after__pair { grid-template-columns: 1fr; }
}

/* ---------------- Steps ---------------- */
.apg-steps__heading,
.apg-steps__subheading { text-align: center; }
.apg-steps__subheading { color: var(--apg-muted); margin-bottom: 2rem; }

.apg-steps__list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	counter-reset: apg-step;
}

.apg-steps__item {
	display: grid;
	grid-template-columns: 60px 1fr auto;
	gap: 1.5rem;
	align-items: start;
	background: #fff;
	border: 1px solid var(--apg-border);
	border-radius: var(--apg-radius);
	padding: 1.25rem;
}

.apg-steps__number {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--apg-accent);
	color: #fff;
	font-weight: 700;
	font-size: 1.5rem;
	line-height: 1;
	flex-shrink: 0;
	font-variant-numeric: tabular-nums;
}

.apg-steps__title { margin: 0 0 .5rem; font-size: 1.125rem; }
.apg-steps__description { margin: 0; color: var(--apg-muted); }

.apg-steps__media {
	margin: 0;
	max-width: 200px;
}
.apg-steps__image {
	width: 100%;
	height: auto;
	border-radius: 8px;
}

@media (max-width: 720px) {
	.apg-steps__item {
		grid-template-columns: 50px 1fr;
	}
	.apg-steps__media {
		grid-column: 1 / -1;
		max-width: 100%;
		order: 99;
	}
	.apg-steps__number {
		width: 50px;
		height: 50px;
		font-size: 1.25rem;
	}
}

/* ---------------- Highlight (pull quote / key fact) ---------------- */
.apg-highlight {
	display: flex;
	gap: clamp(1rem, 3vw, 2rem);
	align-items: center;
	background: linear-gradient(135deg, var(--apg-bg-soft) 0%, #fff 100%);
	border-left: 4px solid var(--apg-accent);
	border-radius: var(--apg-radius);
	padding: clamp(1.5rem, 3vw, 2.5rem);
}

.apg-highlight__media {
	flex-shrink: 0;
	width: 80px;
	height: 80px;
}
.apg-highlight__image {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
}

.apg-highlight__content {
	flex: 1;
}

.apg-highlight__heading {
	font-size: .75rem;
	text-transform: uppercase;
	letter-spacing: .08em;
	font-weight: 700;
	color: var(--apg-accent);
	margin: 0 0 .5rem;
}

.apg-highlight__body {
	font-size: clamp(1.125rem, 2vw, 1.5rem);
	line-height: 1.4;
	font-weight: 500;
	margin: 0;
	padding: 0;
	border: 0;
	font-style: normal;
	color: var(--apg-fg);
	quotes: '\201C' '\201D';
}

.apg-highlight__attribution {
	display: block;
	margin-top: 1rem;
	font-size: .875rem;
	color: var(--apg-muted);
	font-style: normal;
}

@media (max-width: 560px) {
	.apg-highlight {
		flex-direction: column;
		text-align: left;
	}
	.apg-highlight__media { width: 60px; height: 60px; }
}

/* ---------------- Pros / Cons ---------------- */
.apg-pros-cons__heading,
.apg-pros-cons__intro { text-align: center; }
.apg-pros-cons__intro { color: var(--apg-muted); margin-bottom: 1.5rem; max-width: 70ch; margin-inline: auto; }

.apg-pros-cons__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--apg-gap);
}
@media (max-width: 720px) {
	.apg-pros-cons__grid { grid-template-columns: 1fr; }
}

.apg-pros-cons__column {
	background: #fff;
	border: 1px solid var(--apg-border);
	border-radius: var(--apg-radius);
	padding: 1.5rem;
}

.apg-pros-cons__column--pros {
	border-top: 4px solid #00a32a;
}
.apg-pros-cons__column--cons {
	border-top: 4px solid #f0a830;
}

.apg-pros-cons__col-heading {
	margin: 0 0 1rem;
	font-size: 1.125rem;
}
.apg-pros-cons__column--pros .apg-pros-cons__col-heading { color: #007a1f; }
.apg-pros-cons__column--cons .apg-pros-cons__col-heading { color: #8a5c00; }

.apg-pros-cons__list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: .75rem;
}

.apg-pros-cons__list li {
	display: flex;
	align-items: flex-start;
	gap: .5rem;
	padding-left: 1.5rem;
	position: relative;
	line-height: 1.5;
}

.apg-pros-cons__column--pros .apg-pros-cons__list li::before {
	content: '✓';
	position: absolute;
	left: 0;
	color: #00a32a;
	font-weight: 700;
	font-size: 1.125rem;
	line-height: 1.3;
}
.apg-pros-cons__column--cons .apg-pros-cons__list li::before {
	content: '!';
	position: absolute;
	left: 0;
	width: 18px;
	height: 18px;
	background: #f0a830;
	color: #fff;
	border-radius: 50%;
	text-align: center;
	font-size: .75rem;
	font-weight: 700;
	line-height: 18px;
	top: 3px;
}

/* ---------------- Awards / Certifikáty ---------------- */
.apg-awards__heading,
.apg-awards__subheading { text-align: center; }
.apg-awards__subheading { color: var(--apg-muted); margin-bottom: 2rem; }

.apg-awards__items {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: var(--apg-gap);
}

.apg-awards__item {
	background: #fff;
	border: 1px solid var(--apg-border);
	border-radius: var(--apg-radius);
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: .75rem;
	transition: transform .2s ease, box-shadow .2s ease;
}

.apg-awards__item:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 16px rgba(0,0,0,.06);
}

.apg-awards__media {
	margin: 0;
	width: 80px;
	height: 80px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.apg-awards__image {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.apg-awards__name {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 700;
}

.apg-awards__year {
	font-size: .8125rem;
	color: var(--apg-muted);
	font-variant-numeric: tabular-nums;
}

.apg-awards__description {
	color: var(--apg-muted);
	font-size: .9rem;
	margin: 0;
}

/* ---------------- Comparison ---------------- */
.apg-comparison__heading,
.apg-comparison__subheading { text-align: center; }
.apg-comparison__subheading { color: var(--apg-muted); margin-bottom: 2rem; }

.apg-comparison__table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid var(--apg-border);
	border-radius: var(--apg-radius);
	overflow: hidden;
	background: #fff;
}

.apg-comparison__table th,
.apg-comparison__table td {
	padding: .875rem 1rem;
	text-align: left;
	border-bottom: 1px solid var(--apg-border);
	vertical-align: top;
}
.apg-comparison__table th {
	background: var(--apg-bg-soft);
	font-weight: 700;
	font-size: .9rem;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: var(--apg-fg);
}
.apg-comparison__table tbody tr:last-child td { border-bottom: 0; }

.apg-comparison__feature { font-weight: 600; }
.apg-comparison__left   { color: var(--apg-accent); }
.apg-comparison__right  { color: var(--apg-muted); }

@media (max-width: 560px) {
	.apg-comparison__table { font-size: .875rem; }
	.apg-comparison__table th, .apg-comparison__table td { padding: .5rem; }
}
