/* ============================================================
   Custom CSS - 5gg Carni
   ============================================================ */

/* Override Storefront .site-footer link color */
.site-footer a:not(.button):not(.components-button) {
    color: var(--medium-gray);
}

header .navbar-brand img {
    max-height: 84px;
}

header .navbar-brand {
    padding: 10px 0;
}

.site-footer a {
    text-decoration: none;
}

/* Sezione Azienda: testo che cambia colore con lo scroll */
.azienda-color-change {
    color: #fff;
    mix-blend-mode: difference;
}

/* Fix: prodotto singolo deve occupare il 100% della larghezza */
.single-product .product,
.single-product #primary .product,
.single-product .site-content .product {
    width: 100%;
    max-width: 100%;
    float: none;
}

/* Product card: contenitore quadrato (1:1) con immagine centrata */
.crafto-product-img-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    overflow: hidden;
    background-color: #f7f7f7;
}
.crafto-product-img-wrap img.crafto-product-img-contain {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Rimuovi effetto zoom hover sulle immagini prodotto */
.woocommerce ul.products .shop-box:hover .shop-image img,
.shop-box:hover .shop-image img,
.shop-box:hover .crafto-product-img-wrap img {
    transform: translate(-50%, -50%) !important;
}

/* Tabella info prodotto nel loop */
.crafto-product-info-table {
    border-collapse: collapse;
    margin-top: 8px;
}
.crafto-product-info-table td {
    vertical-align: top;
    padding: 4px 8px 4px 0;
    font-size: 13px;
    line-height: 20px;
}
.crafto-product-info-table td:first-child {
    white-space: nowrap;
    width: 45%;
}
.crafto-product-info-table td:last-child {
    width: 55%;
}
.crafto-product-info-table td p {
    margin: 0;
}

/* Pagina Prodotti: thumbnail sottocategoria rotonda con doppio bordo */
.crafto-subcat-thumb {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    padding: 3px;
    background-color: var(--base-color, #fee300);
    display: flex;
    align-items: center;
    justify-content: center;
}
.crafto-subcat-thumb img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
}

/* Pagina Prodotti: testata categoria con immagine di sfondo */
.crafto-cat-header {
    height: 200px;
    position: relative;
    background-size: cover;
    background-position: center;
}
@media (max-width: 767px) {
    .crafto-cat-header {
        height: 140px;
    }
}

.shop-box {
	border: 1px solid #eee;
}

.shop-box .shop-footer {
    padding: 0 10px;
}

/* Badge categorie prodotto (gialle) */
.crafto-cat-badge {
    display: inline-block;
    padding: 2px 10px;
    font-size: 11px;
    line-height: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 3px;
    background-color: var(--base-color, #fee300);
    color: #333;
    text-decoration: none;
    transition: opacity .2s;
}
.crafto-cat-badge:hover {
    opacity: 0.75;
    color: #333;
}

/* Gallery slider dentro la product card */
.crafto-product-gallery-slider {
    position: relative;
    width: 100%;
    min-width: 0; /* fix per CSS Grid: permette a Swiper di calcolare la larghezza */
}
.crafto-product-gallery-slider .swiper-wrapper {
    align-items: stretch;
}

/* Fix: i figli del grid devono avere min-width:0 per Swiper */
.crafto-shop-grid li.product {
    min-width: 0;
    overflow: hidden;
}
.crafto-shop-grid li.product .shop-box {
    min-width: 0;
    overflow: hidden;
}

.crafto-gallery-nav {
    width: 30px;
    height: 30px;
    background-color: rgba(255,255,255,0.85);
    border-radius: 50%;
    color: #333;
    opacity: 0;
    transition: opacity .2s;
	border: 1px solid #eee;
}
.crafto-gallery-nav::after {
    font-size: 12px;
    font-weight: 700;
}
.shop-box:hover .crafto-gallery-nav {
    opacity: 1;
}

.shop-box .title-product  {
	line-height: normal;
}

/* Sidebar widget titles: dimensioni più contenute */
.crafto-shop-sidebar .widget > span,
.offcanvas-body .widget > span,
.crafto-mobile-filters .widget > span {
    font-size: 15px !important;
}

/* Sidebar mobile: inline sotto il page title */
@media (max-width: 991px) {
    .crafto-mobile-filters {
        padding: 15px 0;
    }
	
	.navbar-nav {
		margin-left: 0;
	}
	
	.navbar-nav .dropdown-menu .mega-menu .row .col {
		flex: 0 0 auto;
		width: 100%;
	}
}

#block-8.widget_block {
	padding: 0 10px;
	margin-bottom: 0 !important;
}

button.wc-block-product-filters__open-overlay {
    padding: 10px 20px;
    background-color: #232323;
    text-align: center;
    color: #fff;
    justify-content: center;
}

a:focus, button:focus, .button.alt:focus, input:focus, textarea:focus, input[type="button"]:focus, input[type="reset"]:focus, input[type="submit"]:focus, input[type="email"]:focus, input[type="tel"]:focus, input[type="url"]:focus, input[type="password"]:focus, input[type="search"]:focus {
    outline: 0;
	box-shadow: none;
}