/*
Theme Name: WalterAttimonelli
Theme URI: 
Author: CommerceGurus
Author URI: 
Template: shoptimizer
Version: 1.2.1
*/
#menu-item-63473 {
	margin-bottom: -56px !important;
	padding-bottom: 0 !important;
}
.product {
	z-index: 0;
}
.zoomImg {
	background-color: white;
}
div.product .product_meta {
	margin-top: 60px;
	z-index: -1;
}
.product_meta {
	width: 100vw;
	max-width: 100%;
	position: relative;
	left: unset !important;
	right: unset !important;
	margin-left: unset !important;
	margin-right: unset !important;
	text-align: center;
}

.b7qvm { display: grid !important; align-items: initial;
	grid-gap: 10px; grid-template-columns: repeat(10, 9%);
	list-style: none;
	margin-bottom: 28px !important;
}
li[data-term-id="6048"] { display: none }
@media (max-width: 967px){
	.b7qvm { grid-template-columns: repeat(8, 11%); }
	
}
@media (max-width: 767px){
	.b7qvm { grid-template-columns: repeat(6, 15%); }
	div.quadmenu-container div.textwidget ul.b7qvm {
		display:none !important;
	}
}
@media (max-width: 467px){
	.b7qvm { grid-template-columns: repeat(4, 21%); }
	.my-grid-layout { display: grid !important; }
}
@media (max-width: 377px){
	.b7qvm { grid-template-columns: repeat(3, 24%); }
}
.b7qvm li img {
	border: 1px solid gray;
	width: 80px; object-fit: contain;
	object-position: center;
	min-width: 80px; min-height: 80px;
}
.textwidget .b7qvm li img {
	border: 1px solid gray;
	width: 60px; object-fit: contain;
	object-position: center;
	min-width: 60px; min-height: 60px;
}


.archive .archive-header, .page-template-default .archive-header, .single-post .archive-header {
	padding-bottom: 0.5em;
	background: #f8f8f8;
	margin-bottom:0.7em
}
.shoptimizer-archive .archive-header .col-full, .shoptimizer-archive .archive-header .col-full .woocommerce-breadcrumb {
 background: #f8f8f8 !important;
 padding-bottom:0.2em !important;
 font-size: .91em !important;
}


@media (max-width: 770px) {

.elementor-shortcode div.woocommerce ul.products li.product a img {
	width: 78%;
	mix-blend-mode: darken !important;
	max-height: 146px;
	object-fit: cover;
}
.m-grid-1 .site-content li.product:not(.product-category) img {
	width: 79% !important;
}
}


span[aria-controls="modal-dispo"], span[aria-controls="modal-limitata"], span[aria-controls="modal-riassortimento"]{
	font-size: 16px; text-decoration: underline;
	font-weight: bold; text-underline-offset: 5px;
}
span[aria-controls="modal-riassortimento"]{color: #e69b0c;}
span[aria-controls="modal-limitata"], span[aria-controls="modal-dispo"]{color: #078c07;}

.content-area .summary .onsale { color: #990000db; position: relative; top: 15px}
.avmpos1 { color: #b0b0b0; 	font-size: 13px}
.f13{font-size: 13px !important}

.woo-variation-swatches .variable-items-wrapper {
	max-width: 475px}
.woo-variation-gallery-wrapper .woo-variation-gallery-container {
	margin-top: 12px}
.woo-variation-gallery-slider-wrapper {
	width: 100%;
	display: block}
.product_title.entry-title {
	padding: 34px 0 16px;margin-bottom:18px;
}
.product-details-wrapper {
	border-top: 1px solid #ececec;
}

div.product .woocommerce-product-rating { margin: 0 0 13px 0 }
.woocommerce-review-link { display: none}


header.woocommerce-products-header, .shoptimizer-category-banner {
	background-color: transparent !important
}
header.woocommerce-products-header img.cg-cat-image {
	width: 137px !important; margin: 0 auto !important; padding: 30px 0;
}
.woocommerce-page.wc-active #pagediv #content .term-description{
	padding: 40px 10px;
}

.single-product div.product_meta { padding-top:28px!important; border:0 !important}
/*
div.product .product_meta .posted_in,
div.product .product_meta .sku_wrapper,
div.product .product_meta .tagged_as {
display: block;
margin: 0;
}
*/
.single-product .posted_in { display:none !important}

div.product .product_meta {
border: none; background: transparent;
}


.content-area p.stock {
	padding-top: 0px;
}
.stock.out-of-stock {
	color: #e2401c;
	background: #FFD6CF;
	width: 143px;
	padding: 10px 6px 2px 6px;
	line-height: 31px;
	border-radius: 4px;
	border: 1px solid #e2401c !important;
}
form.variations_form #ckwtl-button3 {
	margin-left: 0px !important;
	width: 98.5% !important;
}

div.wapf-field-container.wapf-field-checkboxes.conlentigraduate .wapf-field-input input[type="checkbox"] {opacity:0 !important}
div.wapf-field-container.wapf-field-checkboxes.conlentigraduate div.wapf-field-input div.wapf-checkboxes div.wapf-checkable label.wapf-input-label span.wapf-label-text {
	background: #141e8d;
	padding: 14px 22px;
	width: 100% !important;
	display: block;
	border-radius: 4px;
	border: 1px solid #4868ca;
	font-size: 16px;
	text-align: center;
	font-weight: 600;
	color: white;
}
div.wapf-field-container.wapf-field-checkboxes.conlentigraduate div.wapf-field-input div.wapf-checkboxes div.wapf-checkable label.wapf-input-label span.wapf-label-text:hover {
	background: #4868ca}
form.variations_form label .ckwtl-os-label-text {
	font-size: 13px;
	text-decoration: none !important;
	text-transform: none;
	letter-spacing: 0px;
	border-bottom: 2px solid #4868ca;
	color: #4868ca;
}
.woo-variation-swatches .variable-items-wrapper .variable-item img {
	object-fit: cover;
}



.menu-primary-menu-container > ul > li > a {
	padding-right: .9em;
	padding-left: .9em;
}
.wc-clogo {width: 100%; text-align: center; padding: 28px 0;
}.wc-clogo img { width: 188px; margin: 0 auto}

body.archive h1.woocommerce-products-header__title.page-title {display:none}

.woo-variation-swatches.wvs-style-squared .variable-items-wrapper .variable-item {
	border-radius: 2px;
	width: 110px; height: auto;
}

.site-header-cart a.cart-contents .count::after,
.site-header-cart a.cart-contents .count, .shoptimizer-cart-icon i 
{
	border: 1px solid #000 !important
}
.site-header-cart a.cart-contents .count::after,
.site-header-cart a.cart-contents .count {
	background: #fff !important
}
.site-header-cart a.cart-contents:hover .count, .site-header-cart a.cart-contents:hover .count {
	background-color: #4e4d4b !important;
}
.site-header-cart a.cart-contents .count{
	color: #888 !important
}
.site-header-cart a.cart-contents .count:hover{
	color: #fff !important
}
.header-4-container div.header-4-inner div.col-full-nav ul.site-header-cart.menu li div.cart-click a.cart-contents span.amount span.woocommerce-Price-amount.amount {display:none}

ul.products li.product:not(.product-category)::before {
	box-shadow: 0 0 10px rgba(114,114,114,.1);
	
}

body ul.products li.product img {	margin: 0 auto 1.3em;
	padding: 12px 22px;
}

.col-full.topbar-wrapper {
    background: black !important;
}.top-bar{
    color: white !important;
}

.onsale, .product-label {
	background-color: #cf5375 !important;
	opacity: 0.92;
}

div.shoptimizer-archive div.archive-header div.col-full,
.woocommerce-breadcrumb,
.single-product .content-area, .single-product .site-main {
    margin-bottom: 0;
    background: #fff}
.woocommerce-breadcrumb, .menu li a, .variations tbody tr td.label label span {	  text-transform: uppercase;
font-size: 12px}
.woocommerce-variation-description {
	color: #6c6c6c;
}
.copyright p {font-size:12px}
.woocommerce-variation-description span {
    padding-right: 7px;
    font-weight: 600;
}
.woocommerce-variation-description {
    padding-top: 5px;
    font-size: 15px;
    line-height: 27px;
}

.price ins, .summary .yith-wcwl-add-to-wishlist a::before, .commercekit-wishlist a i::before, .commercekit-wishlist-table .price, .commercekit-wishlist-table .price ins, .commercekit-ajs-product-price, .commercekit-ajs-product-price ins, .widget-area .widget.widget_categories a:hover, #secondary .widget ul li a:hover, #secondary.widget-area .widget li.chosen a, .widget-area .widget a:hover, #secondary .widget_recent_comments ul li a:hover, .woocommerce-pagination .page-numbers li .page-numbers.current, div.product p.price, body:not(.mobile-toggled) .main-navigation ul.menu li.full-width.menu-item-has-children ul li.highlight > a, body:not(.mobile-toggled) .main-navigation ul.menu li.full-width.menu-item-has-children ul li.highlight > a:hover, #secondary .widget ins span.amount, #secondary .widget ins span.amount span, .search-results article h2 a:hover {
	color: #898989 !important
}
.woocommerce-variation-price {
	color: #333 !important;
	margin: 10px 0 3px 0;
}
.woocommerce-variation-price .price .amount {
    font-size: 19px;
}
div.product-details-wrapper div.summary.entry-summary p.price {
	font-size: 22px;
	padding-bottom: 18px;
}
div.product-details-wrapper div.summary.entry-summary span.onsale{
	display:none
}

.cart .single_add_to_cart_button {
	width: 98% !important;
	margin-left: 1px !important;
}


@media (min-width:993px) {
	.col-full.main-header {
		padding-top: 28px;
		padding-bottom: 20px;
	}
	.col-full-nav {
		box-shadow: 0 -2px 11px #c8c8c8;
	}
	.site-header .site-search {
		margin-left: 5em;
	}
body.header-4:not(.full-width-header) .header-4-inner {
	max-width: 1368px;
}
#site-navigation {
	margin: 0 auto;
}
	div.product .summary {
	position: relative;
	width: 45%;
	margin-right: 1%;
}
	body ul.products li.product img {
	padding: 15px 25px !important;
	object-fit: cover;
	max-height: 228px;
}
	
.woocommerce-cart .content-area, .woocommerce-checkout .content-area {
    float: unset !important;
    width: 86%;
    margin: 0 auto;
}

}

@media (max-width:993px) {
	/** FIX **/
	html {overflow-x: hidden;}
	
	
span.sideopen-icon {
	padding: 4px 27px 0px 5px;
	font-size: 18px;
	margin: 17px 2px 4px 0;
	float: inline-start;
}

	header.woocommerce-products-header img.cg-cat-image {
	width: 90% !important;
}
	.woo-variation-product-gallery {
	width: 100% !important;
	max-width: 100% !important;
}
		.woocommerce-pagination .page-numbers li .page-numbers {
	width: 44px !important;
	height: 44px !important;
	border: 1px solid #e2e2e2 !important;
	border-radius: 1px;
	box-shadow: 0 4px 12px -2px rgba(0,0,0,.08);
	line-height: 40px !important;
}
	
	.dettagli__imgs {
	flex-direction: column !important
}
	.image.wp-image-7643.attachment-full.size-full.wvs-attachment-image {
	margin: 0 auto;
}
	footer.site-footer div.col-full div#custom_html-4.widget_text.widget.widget_custom_html div.textwidget.custom-html-widget, 
	.copyright * 
	{text-align:center}
	

	li.product:not(.product-category) img {
    transform: scale(1.25);
}

}


.commercekit-wishlist.mini {
	position: absolute;
	right: 24px !important;
	top: 2px !important;
	background: #ffffff5c !important;

}.spinner > div, .widget_price_filter .ui-slider .ui-slider-range, .widget_price_filter .ui-slider .ui-slider-handle, #page .woocommerce-tabs ul.tabs li span, #secondary.widget-area .widget .tagcloud a:hover, .widget-area .widget.widget_product_tag_cloud a:hover, footer .mc4wp-form input[type="submit"], #payment .payment_methods li.woocommerce-PaymentMethod > input[type="radio"]:first-child:checked + label::before, #payment .payment_methods li.wc_payment_method > input[type="radio"]:first-child:checked + label::before, #shipping_method > li > input[type="radio"]:first-child:checked + label::before, ul#shipping_method li:only-child label::before, .image-border .elementor-image::after, ul.products li.product .yith-wcwl-wishlistexistsbrowse a::before, ul.products li.product .yith-wcwl-wishlistaddedbrowse a::before, ul.products li.product .yith-wcwl-add-button a::before, .summary .yith-wcwl-add-to-wishlist a::before, .commercekit-wishlist a i.cg-wishlist-t::before, .commercekit-wishlist a i.cg-wishlist::before, .summary .commercekit-wishlist a i.cg-wishlist-t::before, #page .woocommerce-tabs ul.tabs li a span, .main-navigation ul li a span strong, .widget_layered_nav ul.woocommerce-widget-layered-nav-list li.chosen::before {
	background-color: #666 !important;
}
.header-5.wc-active .site-header-cart a.cart-contents {
	border: 1px solid #fff !important;
}

body.single-product .commercekit-wishlist, 
.quantity.buttons_added, 
a.reset_variations, 
.woocommerce-checkout.woocommerce-page div.header-4-container div.header-4-inner div.col-full-nav a.search-trigger {display:none !important}
.woocommerce-cart .woocommerce-cart-form__contents td.product-quantity div.quantity {display:block !important}


.image-element {width: 100%; }
.section-guide-sizes { padding: 2.25rem 0; background-color: #f6f6f6 }
.grey {background-color: #f6f6f6 }

.caratteristiche{
clear:both; overflow:hidden;
text-align:center; border-top:1px solid #eee;
padding:2.25rem 0;
}
.caratteristiche ul {list-style: none;}
.dettagli__imgs {
    display:flex;
    padding-right: calc(2.617924em - 20px);
    padding-left: calc(2.617924em - 20px);
    max-width: calc(1170px + 40px);
    margin: 0 auto;

padding-top: 55px;
padding-bottom: 50px;
flex-direction: row;
align-items: center;
justify-content: space-around;
}

.tec-figure { display:flex; flex-direction:column-reverse }
.tec-figure__wrapper { position:relative; margin:1.5rem }
.tec-figure__wrapper ul { position:absolute; right:0; bottom:0; left:0 }
.tec-figure__wrapper li { position:absolute; text-align:center }
.tec-figure__wrapper li:before {
 position:absolute;
 display:block;
 content:"";
 background-color:#000
}
.tec-figure__wrapper li.feature-component:before {
 background-color:#d8d8d8
}
.tec-figure__wrapper li.is-lens.feature-component {
 margin-bottom:1.125rem
}
.tec-figure__wrapper li.is-lens.feature-component .container-span {
 position:absolute;
 bottom:0;
 transform:translate(-50%)
}
.tec-figure__wrapper li.is-height.feature-component {
 margin-left:1.125rem
}
.tec-figure__wrapper li.is-height.feature-component .container-span {
 position:absolute;
 transform:translate(-5%,50%);
 bottom:50%;
 text-align:initial
}
.tec-figure__wrapper li>span {
 background-color:#fff;
 display:inline-block;
 padding:0 .375rem;
 position:relative
}
.tec-figure__wrapper li.is-lens {
 left:0;
 top:100%;
 width:45%;
 margin-top:2rem;
}
.tec-figure__wrapper li .is-new-line {
 display:block;
 font-weight:600
}
.tec-figure__wrapper li.is-lens:before {
 height:1px; left:0;
 width:100%; top:50%
}
.tec-figure__wrapper li.is-length,
.tec-figure__wrapper li.is-width {
 top:100%;
 margin-top: 2rem;
 left:0;
 width:100%
}
.tec-figure__wrapper li.is-length:before,
.tec-figure__wrapper li.is-width:before {
 height:1px; left:0;
 width:100%; top:50%
}
.tec-figure__wrapper li.is-height {
 height:100%; left:100%;
 top:0; white-space:nowrap
}
.tec-figure__wrapper li.is-height:after {
 content:""; display:inline-block;
 height:100%; vertical-align:middle; width:0
}
.tec-figure__wrapper li.is-height>span { padding:.375rem 0 }
.tec-figure__wrapper li.is-height:before {
 height:100%; left:50%;
 margin-left:-.0625rem;
 width:1px; top:0
}
.is-contrasted .tec-figure__wrapper li:before,
.tec-figure__wrapper .is-contrasted li:before {
 background-color:#fff
}
.is-contrasted .tec-figure__wrapper li span,
.tec-figure__wrapper .is-contrasted li span {
 background-color:#1d1d1d
}
.is-grey .tec-figure__wrapper li span,
.tec-figure__wrapper .is-grey li span {
 background-color:#f6f6f6
}
.is-sr-only {
	border: 0 !important;
	clip: rect(1px,1px,1px,1px) !important;
	-webkit-clip-path: inset(50%) !important;
	clip-path: inset(50%) !important;
	height: 1px !important;
	overflow: hidden !important;
	padding: 0 !important;
	position: absolute !important;
	width: 1px !important;
	white-space: nowrap !important;
}
.size-guide-description {
  padding: .61575em 0;
	text-align: left;
  margin: 0 auto;
  max-width: 50%;
}.size-guide-description p { margin: 0 0 .41575em;}



/** Modal script css **/

.modal { display: none }
.modal__overlay {
      position: fixed; opacity: 0;
      top: 0; right: 0;
      bottom: 0; left: 0;
      width: 100%; z-index: 200;
      
      transition: opacity 0.2s;
      will-change: opacity;
      background-color: #000;
      -webkit-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
      user-select: none;      
    }

    .modal__header {
      padding: 1.5rem; display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 1px solid #ddd;
    }
    .modal__close {
      margin: 0; padding: 0;
      border: none; background-color: transparent;
      cursor: pointer;
      background-image: url("data:image/svg+xml,%0A%3Csvg width='15px' height='16px' viewBox='0 0 15 16' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cg id='2.-Menu' transform='translate(-15.000000, -13.000000)' stroke='%23000000'%3E%3Cg id='Group' transform='translate(15.000000, 13.521000)'%3E%3Cpath d='M0,0.479000129 L15,14.2971819' id='Path-3'%3E%3C/path%3E%3Cpath d='M0,14.7761821 L15,-1.24344979e-14' id='Path-3'%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
      width: 15px;
      height: 15px;
    }

    .modal__wrapper {
      width: 100%; z-index: 9999;
      overflow: auto; opacity: 0;
      max-width: 540px; max-height: 80vh;
      
      transition: transform 0.2s, opacity 0.2s;
      will-change: transform;
      background-color: #fff;
     
      display: flex;
      flex-direction: column; 

      -webkit-transform: translateY(5%);
      transform: translateY(5%);
      -webkit-overflow-scrolling: touch; /* enables momentum scrolling in iOS overflow elements */

      box-shadow: 0 2px 6px #777;
      border-radius: 5px; margin: 20px
    }
    .modal__content {
      position: relative; overflow-x: hidden;
      overflow-y: auto; height: 100%;
      flex-grow: 1; padding: 1.5rem
    }
	.modal__header, .modal__content h5 {font-weight:600}
    .modal.is-active {
      display: flex; justify-content: center;
      align-items: center; position: fixed;
      top: 0; right: 0;
      left: 0; bottom: 0; z-index: 9999
    }
    .modal.is-visible .modal__wrapper { opacity: 1; -webkit-transform: translateY(0); transform: translateY(0) }
    .modal.is-visible .modal__overlay {opacity: 0.5}
	.openmod-m {cursor: pointer}
/** END Modal script css **/

/* body.tax-product_cat*/

.product-label.type-bubble
{
	/** display: none !important; **/
	border: 1px solid black !important;
	background-color: white !important;
    color: black !important;

}

/* body.tax-product_cat .sale-item.product-label.type-bubble
{
	display: none !important;
}

*/

.stock.out-of-stock
{
	border: 1px solid black !important;
	background-color: white !important;
	color: black !important;
}
.product p.stock.out-of-stock::before {
	background: black !important;
}


.custom-sale-price {
    font-weight: normal;
    font-size: 1em;
    color: #898989;
}

.custom-sale-price + small {
    display: block;
    margin-top: 4px;
}

.heyLight-inline.widget-summary.red {
  display: block;
  width: 100%;
  clear: both;
}


/**
 * ==============================
 * BANNER SCONTO PER BRAND SPECIFICI
 * ------------------------------
 * Mostra un banner con un codice sconto solo nelle pagine di prodotto
 * appartenenti ai brand: Valentino, Celine, Cartier, Fendi, Dior.
 * ------------------------------
 * - Attributo prodotto: "Brand"
 * - Slug dell'attributo: "brand" (Tassonomia completa: "pa_brand")
 * - Codice sconto: SALE-10
 * - Posizione: Prima della descrizione del prodotto
 * - WooCommerce Hook: woocommerce_before_single_product
 * ==============================
 */

add_action('woocommerce_before_single_product', function() {
    global $product;

    if (!$product || !is_product()) {
        return; // Esci se non è una pagina prodotto
    }

    // Lista degli slug dei brand per cui mostrare il banner
    $allowed_brands = ['valentino', 'celine', 'cartier', 'fendi', 'dior'];

    // Recupera i termini dell'attributo "brand" (slug completo: pa_brand)
    $product_brands = wp_get_post_terms($product->get_id(), 'pa_brand', ['fields' => 'slugs']);

    // Controlla se almeno uno dei brand del prodotto è nella lista
    if (array_intersect($allowed_brands, $product_brands)) {
        ?>
        <div class="discount-banner">
            <p style="font-family: Oxygen; font-size: 18px; font-weight: 600;">Extra sconto 10% - Codice sconto: 
                <a href="#" id="discount-code">SALE-10</a>
                <span style="font-family: Oxygen; font-size: 12px; font-weight: 400;"> (Clicca e copia il codice)</span>
            </p>
            <p style="font-family: Oxygen; font-size: 15px; font-weight: 400;">Risparmia ancora, utilizza questo codice sconto in cassa!</p>
        </div>

        <script>
            document.addEventListener("DOMContentLoaded", function() {
                const discountCode = document.getElementById('discount-code');
                if (discountCode) {
                    discountCode.addEventListener('click', (event) => {
                        event.preventDefault();
                        navigator.clipboard.writeText(discountCode.textContent)
                            .then(() => { alert('Codice sconto copiato!'); })
                            .catch(err => { console.error('Errore durante la copia del codice: ', err); });
                    });
                }
            });
        </script>

        <style>
            .discount-banner {
                background: linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(72,104,202,1) 50%, rgba(67,70,75,1) 100%);
                padding: 8px 15px;
                color: white;
                text-align: left;
                width: 100%;
                max-width: 600px;
                box-sizing: border-box;
                margin-top: 15px;
            }
            .discount-banner p { margin: 0; line-height: 1.4; }
            #discount-code { color: white; text-decoration: none; cursor: pointer; }
        </style>
        <?php
    }
});
