/* Bricofix — base child theme styles: homepage sections. */

/* ==================================================
   Section title (shared across homepage sections)
   ================================================== */
.section-title {
	text-align: center;
	font-size: 2.1em;
	font-weight: 800;
	margin: 0 0 40px;
	position: relative;
	padding-bottom: 15px;
}

.section-title::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 0;
	height: 3px;
	background: var(--color-primary);
	border-radius: var(--radius-sm);
	transition: width 0.6s ease 0.15s;
}

.reveal-on-scroll.is-visible .section-title::after,
.section-title.is-visible::after {
	width: 60px;
}

/* Section titles outside a .reveal-on-scroll wrapper (e.g. inside static
   pages) still need the underline to show without JS involvement. */
.bricofix-about-page .section-title::after {
	width: 60px;
	transition: none;
}

/* ==================================================
   Hero — banner image (>=768px) with text fallback (<768px)
   ================================================== */
.bricofix-homepage-hero-banner {
	display: none;
}

@media (min-width: 768px) {
	.bricofix-homepage-hero-banner {
		display: flex;
		align-items: flex-end;
		justify-content: flex-end;
		background-image: url('../images/hero-banner.jpg');
		background-image: image-set(
			url('../images/hero-banner.webp') type('image/webp') 1x,
			url('../images/hero-banner.jpg') type('image/jpeg') 1x
		);
		background-size: contain;
		background-repeat: no-repeat;
		background-position: center;
		background-color: var(--color-secondary);
		/* Height follows the image's own ratio (no max-height cap): with
		   background-size:cover + a capped height, the box stopped matching
		   the image's aspect ratio and cover cropped visible chunks off the
		   top/bottom. contain + a matching aspect-ratio always shows the
		   full banner, letterboxed in the brand navy if the viewport is
		   unusually wide. */
		aspect-ratio: 2061 / 763;
		/* Full-bleed: break out of the theme's centered 1200px .col-full so the
		   banner spans the full viewport width with zero side/top/bottom gap. */
		width: 100vw;
		position: relative;
		left: 50%;
		right: 50%;
		margin-left: -50vw;
		margin-right: -50vw;
		margin-top: 0;
		margin-bottom: 0;
		padding: 0 40px 32px 0;
		animation: bricofix-fade-up 0.6s ease;
	}

	/* Localized scrim behind the CTA only, so the rest of the banner artwork
	   (title/badges baked into the image, on the left) stays uncovered. */
	.bricofix-homepage-hero-banner::before {
		content: "";
		position: absolute;
		right: 0;
		bottom: 0;
		width: min(480px, 55%);
		height: 60%;
		background: radial-gradient(circle at bottom right, rgba(0, 29, 68, 0.5) 0%, rgba(0, 29, 68, 0) 70%);
		pointer-events: none;
	}

	.bricofix-homepage-hero-banner .bricofix-btn {
		position: relative;
		z-index: 1;
	}

	/* Visually hidden, not display:none: this is the site's only <h1>
	   (inc/homepage.php) — removing it from the a11y tree on desktop left
	   the page with no exposed heading, since the banner replacing it is a
	   pure CSS background-image with no text. */
	.bricofix-homepage-hero {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}

	body.home .site-main {
		margin-top: 0;
	}
}

.bricofix-homepage-hero {
	background: var(--color-secondary);
	color: var(--color-text-inverse);
	padding: 90px 20px;
	text-align: center;
}

.bricofix-homepage-hero .hero-content {
	max-width: 700px;
	margin: 0 auto;
}

.bricofix-homepage-hero h1 {
	color: var(--color-text-inverse);
	font-size: 2.4em;
	margin: 0 0 20px;
}

.bricofix-homepage-hero p {
	font-size: 1.1em;
	margin: 0 0 30px;
	opacity: 0.9;
}

.bricofix-btn-large {
	padding: 16px 36px;
	font-size: 1.05em;
}

/* ==================================================
   Categories
   ================================================== */
.bricofix-homepage-categories {
	padding: 40px 20px 24px;
}

.category-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}

/* Icon-only cards: no box/border, the icon itself is the visual anchor. */
.category-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	text-align: center;
	padding: 10px;
	color: var(--color-text-main);
	transition: transform 0.3s ease;
}

.category-card:hover {
	transform: translateY(-5px);
}

.category-card:hover h3 {
	color: var(--color-primary);
}

.category-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 68px;
	height: 68px;
	color: var(--color-primary);
	transition: transform 0.3s ease, color 0.3s ease;
}

.category-card:hover .category-icon {
	transform: scale(1.12);
	color: var(--color-primary-hover);
}

.category-card h3 {
	margin: 0;
	font-size: 1.05em;
	transition: color 0.25s ease;
}

/* ==================================================
   Product sections (Nouveautés / Meilleures ventes)
   ================================================== */
.bricofix-homepage-products {
	padding: 24px 20px 60px;
}

/* ==================================================
   Horizontal swipe carousel (Nouveautés / Meilleures ventes):
   scroll-snap with a deliberate partial card peeking at the edge so it
   reads as "more to scroll", no prev/next button UI.
   ================================================== */
.bricofix-carousel ul.products {
	display: flex;
	flex-wrap: nowrap;
	overflow-x: auto;
	gap: 20px;
	padding: 4px 4px 14px;
	margin: 0;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.bricofix-carousel ul.products::-webkit-scrollbar {
	display: none;
}

.bricofix-carousel ul.products li.product {
	scroll-snap-align: start;
	flex: 0 0 auto;
	width: calc((100% - 3 * 20px) / 3.5);
}

@media (max-width: 768px) {
	.bricofix-carousel ul.products li.product {
		width: calc((100% - 20px) / 1.6);
	}
}

/* ==================================================
   Brand logos — transparent, borderless, logo fills the frame.
   ================================================== */
.bricofix-homepage-brands {
	padding: 24px 20px 60px;
}

.brand-logo-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 30px;
	align-items: center;
}

.brand-logo-card {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 3 / 2;
	filter: grayscale(35%);
	opacity: 0.85;
	transition: filter 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}

.brand-logo-card:hover {
	filter: grayscale(0%);
	opacity: 1;
	transform: scale(1.05);
}

.brand-logo-card img {
	max-width: 100%;
	max-height: 100%;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

/* ==================================================
   Sidebar widgets (shop, single product, static pages)
   ================================================== */
.widget-area .widget {
	background: var(--color-bg-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	padding: var(--space-md);
	margin-bottom: var(--space-md);
}

.widget-area .widget-title,
.widget-area .widget > h2,
.widget-area .widget > h3 {
	font-family: var(--font-heading);
	font-size: 1.1em;
	border-bottom: 2px solid var(--color-primary);
	padding-bottom: 10px;
	margin: 0 0 16px;
	display: block;
}

.widget-area .widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.widget-area .widget ul li {
	margin-bottom: 8px;
}

.widget-area .widget .woocommerce-widget-layered-nav-list,
.widget-area .widget .product-categories,
.widget-area .widget .wc-block-price-filter,
.widget-area .widget .tagcloud {
	font-size: 0.95em;
}

.widget-area .widget .count {
	color: var(--color-text-muted);
	font-weight: 400;
	margin-left: 4px;
}

.widget-area .widget .tagcloud a {
	display: inline-block;
	margin: 0 6px 6px 0;
	padding: 4px 10px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	color: var(--color-link-text);
	font-size: 1em !important;
}

.widget-area .widget .tagcloud a:hover {
	background: var(--color-primary);
	border-color: var(--color-primary);
	color: var(--color-text-inverse);
}

/* ==================================================
   Static content pages (Contact, À Propos)
   ================================================== */
.bricofix-contact-page {
	display: grid;
	grid-template-columns: 1.3fr 1fr;
	gap: 40px;
	padding: 20px 0 60px;
}

.bricofix-contact-form,
.bricofix-contact-info {
	background: var(--color-bg-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	padding: 32px;
}

.bricofix-contact-form h2,
.bricofix-contact-info h2 {
	margin-top: 0;
}

.bricofix-contact-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
}

.bricofix-contact-form input,
.bricofix-contact-form textarea {
	width: 100%;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	padding: 10px 14px;
	font-family: var(--font-body);
	margin-bottom: 18px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bricofix-contact-form input:focus,
.bricofix-contact-form textarea:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px rgba(254, 105, 8, 0.12);
}

.bricofix-contact-info-item {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	margin-bottom: 22px;
}

.bricofix-contact-info-item:last-child {
	margin-bottom: 0;
}

.bricofix-contact-info-icon {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--color-bg-body);
	color: var(--color-primary);
	display: flex;
	align-items: center;
	justify-content: center;
}

.bricofix-contact-info-item h4 {
	margin: 0 0 4px;
}

.bricofix-contact-info-item p {
	margin: 0;
	color: var(--color-text-muted);
}

.bricofix-about-page {
	padding: 20px 0 60px;
}

.bricofix-about-intro {
	max-width: 800px;
	margin: 0 auto 50px;
	text-align: center;
}

.bricofix-about-stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
	margin-bottom: 50px;
}

.bricofix-stat-card {
	background: var(--color-bg-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	padding: 28px 20px;
	text-align: center;
	transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.bricofix-stat-card:hover {
	box-shadow: var(--shadow-md);
	transform: translateY(-4px);
}

.bricofix-stat-card .stat-number {
	font-family: var(--font-heading);
	font-size: 2em;
	font-weight: 800;
	color: var(--color-primary);
	display: block;
}

.bricofix-about-values {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	margin-bottom: 50px;
}

.value-card {
	background: var(--color-bg-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	padding: 28px 24px;
	transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.value-card:hover {
	box-shadow: var(--shadow-md);
	transform: translateY(-4px);
}

.value-card h3 {
	color: var(--color-primary);
	margin-bottom: 10px;
}

.value-card p {
	color: var(--color-text-muted);
	margin: 0;
}

/* ==================================================
   Empty states — 404 & no search results (Storefront's default
   markup: .error-404/.no-results + .page-content), previously
   completely unstyled (raw WP core look, no branding/CTA).
   ================================================== */
.error-404,
.no-results {
	max-width: 700px;
	margin: 0 auto;
	padding: 60px 20px;
	text-align: center;
}

.error-404 .page-title,
.no-results .page-title {
	font-size: 2em;
}

.error-404 .page-content,
.no-results .page-content {
	color: var(--color-text-muted);
}

.error-404 .page-content p,
.no-results .page-content p {
	margin-bottom: 24px;
}

.error-404 .search-form,
.no-results .search-form {
	display: flex;
	max-width: 420px;
	margin: 0 auto 32px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	overflow: hidden;
}

.error-404 .search-form .search-field,
.no-results .search-form .search-field {
	flex: 1;
	border: none;
	padding: 11px 16px;
	font-family: var(--font-body);
}

.error-404 .search-form .search-submit,
.no-results .search-form .search-submit {
	border: none;
	background: var(--color-primary);
	color: var(--color-text-inverse);
	padding: 0 20px;
	cursor: pointer;
	font-weight: 600;
	transition: background-color 0.25s ease;
}

.error-404 .search-form .search-submit:hover,
.no-results .search-form .search-submit:hover {
	background: var(--color-primary-hover);
}

.fourohfour-columns-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	margin-top: 40px;
	text-align: left;
}

@media (max-width: 768px) {
	.fourohfour-columns-2 {
		grid-template-columns: 1fr;
	}
}
