/**
 * Shoptimizer — Gutenberg content styles
 * ======================================
 *
 * The theme was written for a classic (shortcode) content model, so core block
 * layouts arrive unstyled: columns stack with no gap, images keep their natural
 * size and overflow, and quotes/accordions have no rhythm.
 *
 * This stylesheet gives the block library the same design language as the rest
 * of the theme — same type scale, radii and spacing as main.css. It only loads
 * on singular content that actually contains blocks.
 *
 * @package FluentCartShopper
 * @since   1.1.0
 */

/* --------------------------------------------------------------------------
   0. Page frame
   -------------------------------------------------------------------------- */

/* These pages carry their own H1 and skip the theme's page header. The
   breadcrumb supplies the top spacing, exactly like the shop archive. */
body.page-template-template-fullwidth-no-heading .archive-header,
body.page-template-template-fullwidth .archive-header {
	padding-top: 1rem;
}

/* --------------------------------------------------------------------------
   1. Rhythm
   -------------------------------------------------------------------------- */

.entry-content > * {
	margin-top: 0;
	margin-bottom: 1.25rem;
}

.entry-content > * + h2,
.entry-content > * + h3 {
	margin-top: 2.25rem;
}

.entry-content h2 {
	font-size: clamp(1.375rem, 1.18rem + 0.94vw, 1.875rem);
	line-height: 1.25;
}

.entry-content h3 {
	font-size: clamp(1.125rem, 1.03rem + 0.47vw, 1.375rem);
	line-height: 1.3;
}

.entry-content h6 {
	margin-bottom: 0.35rem;
	color: #72767c;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.entry-content p,
.entry-content li {
	font-size: 1rem;
	line-height: 1.65;
	color: #444;
}

/* --------------------------------------------------------------------------
   2. Columns
   -------------------------------------------------------------------------- */

.entry-content .wp-block-columns {
	display: flex;
	flex-wrap: wrap;
	gap: 2rem;
	margin-bottom: 2rem;
	align-items: flex-start;
}

.entry-content .wp-block-columns > .wp-block-column {
	flex: 1 1 0;
	min-width: 0;
}

@media (max-width: 781px) {
	.entry-content .wp-block-columns {
		display: block;
	}

	.entry-content .wp-block-columns > .wp-block-column + .wp-block-column {
		margin-top: 1.5rem;
	}
}

/* --------------------------------------------------------------------------
   3. Images
   -------------------------------------------------------------------------- */

.entry-content .wp-block-image {
	margin: 0;
}

.entry-content .wp-block-image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 6px;
}

/* Rows of equal-height pictures (feature strip, team, test avatars). */
.entry-content .wp-block-columns > .wp-block-column > .wp-block-image:only-child img,
.entry-content .wp-block-column > .wp-block-image img {
	object-fit: cover;
}

.entry-content .wp-block-column > .wp-block-image:first-child:not(:only-child) img {
	aspect-ratio: 4 / 3;
}

.entry-content .wp-block-column > .wp-block-image:only-child img {
	aspect-ratio: 3 / 2;
}

/* Team portraits: small squares, not giant coloured discs. */
.entry-content .wp-block-columns > .wp-block-column > .wp-block-image:first-child img[alt^="Nicole"],
.entry-content .wp-block-columns > .wp-block-column > .wp-block-image:first-child img[alt^="Bjorn"],
.entry-content .wp-block-columns > .wp-block-column > .wp-block-image:first-child img[alt^="Charlotte"],
.entry-content .wp-block-columns > .wp-block-column > .wp-block-image:first-child img[alt^="Sam"] {
	width: 96px;
	height: 96px;
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	margin-bottom: 0.75rem;
}

/* --------------------------------------------------------------------------
   4. Groups, buttons, separators
   -------------------------------------------------------------------------- */

.entry-content .wp-block-group.is-layout-constrained > *,
.entry-content .wp-block-group__inner-container.is-layout-constrained > * {
	max-width: 46rem;
	margin-left: auto;
	margin-right: auto;
}

.entry-content .wp-block-group:not(.is-layout-constrained) {
	max-width: 46rem;
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}

.entry-content .wp-block-buttons {
	margin: 1.5rem 0;
}

.entry-content .wp-block-button__link {
	display: inline-block;
	padding: 0.85em 1.5em;
	border: 0;
	border-radius: 4px;
	background-color: #43454b;
	color: #fff;
	font-size: clamp(0.875rem, 0.8115rem + 0.2033vw, 0.9375rem);
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.entry-content .wp-block-button__link:hover {
	background-color: #2c2d33;
	color: #fff;
}

.entry-content hr.wp-block-separator {
	margin: 2.5rem auto;
	border: 0;
	border-top: 1px solid #e2e4e7;
	max-width: 46rem;
}

/* --------------------------------------------------------------------------
   5. Details (accordions) and quotes
   -------------------------------------------------------------------------- */

.entry-content details.wp-block-details {
	margin: 0 0 0.7rem;
	padding: 1rem 1.25rem;
	border: 1px solid #e6e7ea;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

.entry-content details.wp-block-details[open] {
	border-color: #d6d9de;
}

.entry-content details.wp-block-details summary {
	display: block;
	cursor: pointer;
	list-style: none;
	position: relative;
	padding: 0 2rem 0 0;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.35;
	color: #2c2d33;
}

.entry-content details.wp-block-details summary::-webkit-details-marker {
	display: none;
}

.entry-content details.wp-block-details summary::after {
	content: '';
	position: absolute;
	top: 0.45em;
	right: 0.35rem;
	width: 7px;
	height: 7px;
	border-right: 1.5px solid #72767c;
	border-bottom: 1.5px solid #72767c;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
}

.entry-content details.wp-block-details[open] summary::after {
	transform: rotate(-135deg);
	top: 0.6em;
}

.entry-content details.wp-block-details p {
	margin: 0.5rem 0 0;
	color: #4a4d52;
	font-size: 0.9375rem;
	line-height: 1.6;
}

/* The details block ships a wrapping <div> in some versions: kill its margins
   so the rows stay compact. */
.entry-content details.wp-block-details > *:not(summary) {
	margin-bottom: 0;
}

.entry-content .wp-block-quote {
	margin: 0 0 1.5rem;
	padding: 1.25rem 1.5rem;
	border-left: 3px solid #43454b;
	background: #f8f9fa;
	border-radius: 0 6px 6px 0;
}

.entry-content .wp-block-quote p {
	margin: 0;
	font-size: 1.0625rem;
	line-height: 1.6;
	color: #2c2d33;
}

.entry-content .wp-block-quote cite {
	display: block;
	margin-top: 0.85rem;
	color: #72767c;
	font-size: 0.8125rem;
	font-style: normal;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   6. Lists
   -------------------------------------------------------------------------- */

.entry-content ul.wp-block-list {
	padding-left: 1.1rem;
}

.entry-content ul.wp-block-list li {
	margin-bottom: 0.4rem;
}


/* --------------------------------------------------------------------------
   7. Blog listing
   -------------------------------------------------------------------------- */

/* Post bodies imported from the demo carry portrait images at natural size,
   which swallows the column. Halve them on the listing only. */
.blog .entry-content img,
.archive .entry-content img,
.blog .post-thumbnail img,
.archive .post-thumbnail img {
	max-width: 50%;
	height: auto;
	border-radius: 4px;
}

@media (max-width: 600px) {
	.blog .entry-content img,
	.archive .entry-content img,
	.blog .post-thumbnail img,
	.archive .post-thumbnail img {
		max-width: 100%;
	}
}


/* --------------------------------------------------------------------------
   8. Contact page
   -------------------------------------------------------------------------- */

.entry-content .fcs-map {
	margin: 0 0 2.5rem;
	border-radius: 8px;
	overflow: hidden;
	line-height: 0;
}

.entry-content .fcs-map iframe {
	width: 100%;
	height: 420px;
	border: 0;
	display: block;
}

@media (max-width: 781px) {
	.entry-content .fcs-map iframe {
		height: 280px;
	}
}

.fcs-contact-form {
	margin-top: 1.25rem;
}

.fcs-contact__form {
	display: flex;
	flex-wrap: wrap;
	gap: 0 1rem;
}

.fcs-contact__form .fcs-field {
	flex: 1 1 100%;
	margin: 0 0 1rem;
}

.fcs-contact__form .fcs-field--half {
	flex: 1 1 calc(50% - 0.5rem);
	min-width: 0;
}

.fcs-contact__form label {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: #2c2d33;
}

.fcs-contact__form label span {
	color: #b32d2e;
}

.fcs-contact__form input[type='text'],
.fcs-contact__form input[type='email'],
.fcs-contact__form textarea {
	width: 100%;
	padding: 0.7em 0.85em;
	border: 1px solid #d2d6dc;
	border-radius: 6px;
	background: #fff;
	font-size: 0.9375rem;
	line-height: 1.4;
}

.fcs-contact__form textarea {
	resize: vertical;
}

.fcs-contact__form input:focus,
.fcs-contact__form textarea:focus {
	outline: 2px solid #43454b;
	outline-offset: 1px;
}

.fcs-contact__form .fcs-submit {
	display: inline-block;
	padding: 0.85em 1.75em;
	border: 0;
	border-radius: 6px;
	background: #43454b;
	color: #fff;
	font-size: 0.9375rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.fcs-contact__form .fcs-submit:hover {
	background: #2c2d33;
}

/* Honeypot: present for bots, invisible for humans. */
.fcs-contact__form .fcs-hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.fcs-contact__notice {
	margin: 0 0 1.25rem;
	padding: 0.85rem 1rem;
	border-radius: 6px;
	font-size: 0.9375rem;
}

.fcs-contact__notice.is-success {
	background: #eef7ee;
	border-left: 3px solid #2e7d32;
	color: #1b5e20;
}

.fcs-contact__notice.is-error {
	background: #fdeeee;
	border-left: 3px solid #b32d2e;
	color: #8a1f20;
}

/* --------------------------------------------------------------------------
   9. Home — category cards, icons, brands
   -------------------------------------------------------------------------- */

.entry-content .fcs-category-card {
	overflow: hidden;
	border-radius: 8px;
	isolation: isolate;
}

.entry-content .fcs-category-card .wp-block-cover__inner-container {
	padding: 1.5rem;
	text-align: left;
	width: 100%;
}

.entry-content .fcs-category-card h3 {
	margin: 0 0 0.15rem;
	color: #fff;
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.2;
}

.entry-content .fcs-category-card p {
	margin: 0 0 0.9rem;
	color: rgba(255, 255, 255, 0.85);
	font-size: 0.9375rem;
}

.entry-content .fcs-category-card .wp-block-buttons {
	margin: 0;
}

.entry-content .fcs-category-card .wp-block-button__link {
	padding: 0.55em 1.1em;
	background: #fff;
	color: #1a1b1f;
	font-size: 0.8125rem;
	font-weight: 600;
}

.entry-content .fcs-category-card .wp-block-button__link:hover {
	background: #eef0f2;
	color: #1a1b1f;
}

/* Feature icons: line art, fixed size, no rounded frame. */
.entry-content .wp-block-column > .wp-block-image:first-child:not(:only-child) img[src$=".svg"] {
	width: 56px;
	height: 56px;
	aspect-ratio: auto;
	object-fit: contain;
	border-radius: 0;
	margin-bottom: 0.9rem;
}

/* Brand strip: six small wordmarks. */
.entry-content .wp-block-columns:has(img[src*="brand-"]) {
	align-items: center;
	gap: 1.5rem;
	margin-top: 2rem;
}

.entry-content img[src*="brand-"] {
	width: 100%;
	max-width: 160px;
	height: auto;
	opacity: 0.75;
	filter: grayscale(1);
}

@media (max-width: 781px) {
	.entry-content .wp-block-columns:has(img[src*="brand-"]) {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
	}

	.entry-content img[src*="brand-"] {
		max-width: 120px;
		margin: 0 auto;
	}
}

/* --------------------------------------------------------------------------
   10. Home — hero band, offer band, testimonials
   -------------------------------------------------------------------------- */

/* Hero: light band, big headline, image on the right. */
.entry-content .fcs-hero {
	padding: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 3rem);
	margin-bottom: 2.5rem;
	border-radius: 8px;
}

.entry-content .fcs-hero .wp-block-columns {
	margin-bottom: 0;
	align-items: center;
}

.entry-content .fcs-hero__title {
	margin-bottom: 1rem;
	font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
	line-height: 1.1;
	letter-spacing: -0.02em;
}

.entry-content .fcs-hero p {
	max-width: 34ch;
	font-size: 1.0625rem;
	line-height: 1.55;
}

.entry-content .fcs-hero .wp-block-image img {
	border-radius: 6px;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

/* Category cards sit tighter than a normal row. */
.entry-content .fcs-categories {
	gap: 0.75rem;
	margin-bottom: 2.5rem;
}

.entry-content .fcs-categories .wp-block-column {
	flex-basis: 0;
}

/* Centred section titles. */
.entry-content .fcs-center {
	text-align: center;
	margin-top: 2.5rem;
}

/* Advantages: centred icon, heading and text, like the demo. */
.entry-content .fcs-advantages {
	text-align: center;
	margin-bottom: 3rem;
}

.entry-content .fcs-advantages .wp-block-image img {
	margin-right: auto;
	margin-left: auto;
}

.entry-content .fcs-advantages p {
	max-width: 32ch;
	margin-right: auto;
	margin-left: auto;
}

/* Testimonials: no frame, a short signature rule, then the name. */
.entry-content .fcs-signature {
	margin: 1.5rem 0 0.75rem;
	max-width: 46px;
	border: 0;
	border-top: 2px solid #2c2d33;
}

.entry-content hr.fcs-signature + p {
	margin-top: 0;
	font-size: 0.875rem;
	font-weight: 700;
	color: #2c2d33;
}

/* Offer of the week: dark band, white text, white button. */
.entry-content .fcs-offer {
	padding: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 4vw, 3rem);
	margin: 3rem 0;
	border-radius: 8px;
	color: #fff;
}

.entry-content .fcs-offer .wp-block-columns {
	margin-bottom: 0;
	align-items: center;
}

.entry-content .fcs-offer h2,
.entry-content .fcs-offer h3,
.entry-content .fcs-offer p {
	color: #fff;
}

.entry-content .fcs-offer p {
	max-width: 38ch;
	opacity: 0.85;
}

.entry-content .fcs-offer .wp-block-button__link {
	background: #fff;
	color: #1a1b1f;
}

.entry-content .fcs-offer .wp-block-button__link:hover {
	background: #e6e7ea;
	color: #1a1b1f;
}

.entry-content .fcs-offer .wp-block-image img {
	border-radius: 6px;
	aspect-ratio: 3 / 4;
	object-fit: cover;
}

/* Brands row. */
.entry-content .fcs-brands {
	align-items: center;
	gap: 1.5rem;
	margin-top: 2rem;
}

.entry-content .fcs-brands img {
	max-width: 160px;
	width: 100%;
	height: auto;
	opacity: 0.75;
	filter: grayscale(1);
}

@media (max-width: 781px) {
	.entry-content .fcs-brands {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
	}

	.entry-content .fcs-brands img {
		max-width: 120px;
		margin: 0 auto;
	}
}
