/*!
Theme Name: Kadence Child
Theme URI: https://www.kadencewp.com/kadence-theme/
Template: kadence
Author: Kadence WP
Author URI: https://www.kadencewp.com/
Description: A child theme for the Kadence Theme.
Version: 1.0.0
License: GNU General Public License v3.0 (or later)
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: kadence-child
*/

/* Theme customization starts here
-------------------------------------------------------------- */

/* -------------------------------------------------------
   Fix widget Alma — le kit Elementor (.elementor-kit-* button)
   applique la couleur d'accent du thème à tous les <button>,
   ce qui écrase les styles du widget Alma.
   ------------------------------------------------------- */
body [id*="alma"] button,
body [id*="alma"] button:hover,
body [id*="alma"] button:focus {
	background-color: var(--light-gray, #dcdcdc);
	color: var(--off-black, #1a1a1a);
}

body [id*="alma"] button[class*="active"],
body [id*="alma"] button[class*="active"]:hover,
body [id*="alma"] button[class*="active"]:focus {
	background-color: var(--off-black, #1a1a1a);
	color: var(--white, #ffffff);
}

:root {
	--white: #ffffff;
	--light-gray: #f0f0f0;
	--dark-gray: #6c6c6c;
	--off-black: #1a1a1a;
	--alma-orange: #fa5022;
}

/* Fix responsive panier WooCommerce Blocks :
   le bloc .alignwide s'étend à 100vw sans padding,
   ce qui fait déborder le contenu sur mobile */
.woocommerce-cart .wp-block-woocommerce-cart.alignwide {
	width: auto;
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
}

/* Masquer la description courte des produits dans le panier */
.wc-block-cart .wc-block-components-product-metadata {
	display: none;
}

/* -------------------------------------------------------
   Marque sur fiche produit
   ------------------------------------------------------- */
.cristime-product-brand {
	display: block;
	margin-bottom: 0.25rem;
	font-size: 0.85rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #888;
	text-decoration: none;
}

.cristime-product-brand:hover {
	color: #333;
}

/* -------------------------------------------------------
   Grille des marques [cristime_brands]
   ------------------------------------------------------- */
.cristime-brands-grid {
	display: grid;
	grid-template-columns: repeat(var(--brands-columns, 5), 1fr);
	gap: 1.5rem;
	padding: 1rem 0;
}

.cristime-brand-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	padding: 1.5rem 1rem;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	text-decoration: none;
	color: inherit;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cristime-brand-card:hover {
	border-color: #bbb;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.cristime-brand-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 80px;
}

.cristime-brand-logo img {
	max-width: 100%;
	max-height: 80px;
	width: auto;
	height: auto;
	object-fit: contain;
}

.cristime-brand-name-fallback {
	font-size: 1.1rem;
	font-weight: 600;
	text-align: center;
}

.cristime-brand-label {
	font-size: 0.875rem;
	text-align: center;
	color: #333;
}

/* Responsive */
@media (max-width: 1024px) {
	.cristime-brands-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

@media (max-width: 768px) {
	.cristime-brands-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 1rem;
	}
}

@media (max-width: 480px) {
	.cristime-brands-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 0.75rem;
	}

	.cristime-brand-card {
		padding: 1rem 0.75rem;
	}

	.cristime-brand-logo {
		height: 60px;
	}

	.cristime-brand-logo img {
		max-height: 60px;
	}
}
