/*
Theme Name:     Shoptimizer child theme
Theme URI:      
Description:    Shoptimizer child theme.
Author:         mchevallier
Author URI:     
Template:       shoptimizer
Text Domain:	shoptimizer
Version:        0.1.0
*/

/* Suggestions mini-cart vide (widget) */
.mini-cart-empty-upsell {
  margin: 16px 0 4px;
  padding: 12px 0;
  border-top: 1px solid var(--shp-border, #eee);
}

.mini-cart-empty-upsell__title {
  font-size: 1rem;
  margin: 0 auto;
  max-width: 250px;
  font-weight: 600;
}

.mini-cart-empty-upsell__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.mini-cart-empty-upsell__item {
  display: grid;
  grid-template-columns: clamp(56px, 12vh,80px) minmax(0, 1fr) 85px;   /* image | titre/prix | bouton */
  grid-template-rows: auto auto;           /* rang1 = titre | rang2 = prix */
  align-items: center;
  padding: 5px;
  border: 1px solid var(--shp-border, #eee);
  border-radius: 12px;
  background: var(--shp-card, #fff);
}

.mini-cart-empty-upsell__image {
  grid-row: 1 / span 2; /* image sur 2 rangs */
  display: block;
  border-radius: 10px;
  overflow: hidden;
}

.mini-cart-empty-upsell__image img { width: 100%; height: auto; display: block; }

.mini-cart-empty-upsell__name {
  grid-column: 2; grid-row: 1;
  font-size: .80rem; line-height: 1.1;
  color: inherit; text-decoration: none;
  text-align:left;
}

.mini-cart-empty-upsell__name:hover { text-decoration: underline; }

.mini-cart-empty-upsell__price {
  grid-column: 2; grid-row: 2;
  font-weight: 600; font-size: .95rem;
}

.mini-cart-empty-upsell__cta {
  grid-column: 3; grid-row: 1 / span 2; /* bouton sur 2 rangs */
  display: flex; align-items: stretch; justify-content: center;
}
.shoptimizer-mini-cart-wrap .widget_shopping_cart li:last-child{
	border:1px solid var(--shp-border, #eee) !important;
}
.mini-cart-empty-upsell__cta .button {
  width: 100%; 
  height: 100%;
  display: inline-flex; 
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 10px 12px;
  text-align: center;
  white-space: nowrap;
}
a.button.add_to_cart_button.ajax_add_to_cart:hover{
	background-color: #ca322c;
}

/* Surcharge */
.shoptimizer-mini-cart-wrap .widget_shopping_cart li:last-child{
	border: 1px solid var(--shp-border, #eee);
}
.shoptimizer-empty-mini-cart ul:not(.products) li.mini-cart-empty-upsell__item a{
	border:unset;
	line-height:1;
	max-height:80px;
	margin-bottom:0px;
	padding:5px;
	overflow:hidden;
	&:last-child{
		width: 50%;
		svg{
			width:24px;
			height:24px;
			margin-bottom: 0;
		}
		&:hover{
			filter:contrast(200%);
		}
	}
}
.widget_shopping_cart a.button:not(.checkout){
	background-color:#ca322c;
	color:white;
}
.shoptimizer-empty-mini-cart ul:not(.products) li a:hover{
	/*filter:contrast(200%);*/
}
.mini-cart-empty-upsell__price {
	font-size: 0.70rem;
	text-align:left;
	padding-left:5px;
}

@media (max-width: 380px) {
  .mini-cart-empty-upsell__item { grid-template-columns: 64px 1fr 98px; }
}

/**
 * Patch background images gallery
*/
/* --- Lightbox PhotoSwipe (overlay + conteneurs) --- */
.pswp__bg { background-color: #fff !important; opacity: 1 !important; }
.pswp__scroll-wrap, .pswp__container, .pswp__item { background-color: #fff !important; }

/* --- Galerie produit CommerceKit / Woo --- */
.ck-product-gallery,
.ck-product-gallery__panel,
.ck-product-gallery__image,
.woocommerce-product-gallery,
.woocommerce-product-gallery__wrapper,
.woocommerce-product-gallery__image,
.woocommerce-product-gallery__wrapper figure {
  background: #fff !important;
}

/* Neutralise tout blend/filtres qui assombrissent les PNG */
.ck-product-gallery img,
.woocommerce-product-gallery__wrapper img,
.pswp__img {
  mix-blend-mode: normal !important;
  background: transparent !important; /* au cas où une couleur leur serait appliquée */
}

/* Si zoom externe (EasyZoom / CommerceKit flyout) */
.easyzoom-flyout,
.ck-zoom-pane,
.ck-zoom-pane img {
  background: #fff !important;
  mix-blend-mode: normal !important;
}
