/**
* Theme Name: PetPuzzy Child
* Description: This is a child theme of PetPuzzy, generated by Merlin WP.
* Author: <a href="https://leebrosus.com/">Duy Nguyen</a>
* Template: petpuzzy
* Version: 1.0.0
*/

section.elementor-section.elementor-top-section.elementor-element.elementor-element-0730689.elementor-section-boxed.elementor-section-height-default.elementor-section-height-default {
    padding: 10px;
}

.gpls-wcsamm-coming-soon-badge-img-wrapper {
    display: flex!important;
}

table.cart .product-quantity .plus, table.cart .product-quantity .minus {
    display: block!important;
}

.widget-products-blog li {
    max-width: 100%!important;
}

.star-rating span::before,.star-rating::before {
    content: "S S S S S"!important;
}

li#menu-item-18596 ul.sub-menu {
    top: 215%;
}

.entry-content a,.woocommerce-Tabs-panel--description  a {
    text-decoration: underline!important;
    font-weight: 800;
}

p.stock.in-stock {
    display: flex!important;
}

i.petpuzzy-icon-plus-square::before,.petpuzzy-icon-minus-square:before {
    content: " + ";
    color: #225d55!important;
}

.widget_product_categories li.current-cat > a {
    font-weight: 900!important;
    color: #fff!important;
    background: #225d55!important;
    border-radius: 5px!important;
    padding: 3px 8px!important;
}

@media (min-width: 1024px) {
.site-navigation ul.menu > li > a {
    padding: 12px 10px!important;
}
	
.site-navigation ul.menu {margin-left: 0em!important;
}
	
.brands-container img.product-brand-logo {
    height: 150px!important;
}
}

li.brand-item {
    width: 25%!important;
    float: left!important;
}

.woocommerce-cart .woocommerce-message, .woocommerce-checkout  .woocommerce-message {
    display: none;
}

ul.petpuzzy-products.products:not(.products-list) > li.product span.price {
    margin-top: 5px!important;
}

li.product .product-caption-action {
    flex-direction: column-reverse!important;
	margin-top: -8px!important;
}


.woocommerce-tabs.wc-tabs-wrapper div#trustpilot-widget-trustbox-3-wrapper {
    display: flex;
    justify-content: flex-start;
    margin-top: 30px!important;
    flex-direction: row;
}

div#tab-trustpilot div#trustpilot-widget-trustbox-2-wrapper {
    display: inline-flex!important;
    margin-left: 40px!important;
    margin-top: 20px!important;
    justify-content: flex-start!important;
}


@media (max-width: 767px) {

#simple-chat-button--container {
    bottom: 90px!important;
	right: 10pxx!important
}
	
ul.products li.product.product-style-list-1 .product-transition {
    flex: 0 0 50%!important;
    max-width: 50%!important;
}
	
.woosw-list .woosw-copy {
    display: flex;
    align-items: flex-start!important;
	flex-direction: column!important;
    margin-top: 20px;
}
	
	span.woosw-copy-url {
    margin-left: 0px!important;
    margin-top: 5px;
    margin-bottom: 10px;
}
	
.site-wishlist-side.side-wrap.active, .site-header-cart-side.side-wrap.active {
    width: 100%;
}

h2.resp-accordion {
    border-bottom: 0!important;
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
}
	
	div#trustpilot-widget-trustbox-2-wrapper {
    position: relative!important;
    display: flex;
    justify-content: flex-start;
}
	
	div#trustpilot-widget-trustbox-2 {
    margin-left: -27px!important;
}

}

    .cart_totals table th {
    word-break: normal!important;
}

.single-product .product-brand {
    float: left!important;
    margin-left: 0px!important;
    margin-top: 20px;
}

.single-product div.product .product_after_title {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    flex-direction: column-reverse;
}

li#tab-title-trustpilot a {display:flex;align-items: center;justify-content: center;width:200px;}
img.trustpilot-logo {width: 47%;    margin-left: 8px;
    margin-top: -6px;}

div#tab-trustpilot {
    font-size: 18px;
    font-weight: 900;
}

@media (max-width: 767px) {
	
div#trustpilot-widget-trustbox-1-wrapper {
    display: flex;
    margin-left: -50px!important;
    margin-top: 15px!important;
}	
	
	img.trustpilot-logo {
    width: 31%;
}

.petpuzzy-sorting {
    justify-content: center!important;
}
	p.woocommerce-result-count {
    text-align: center;
    margin: 0!important;
}
}

a.filter-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #225d55;
    color: #fff;
    padding: 8px;
    margin: 0 10px;
    margin-bottom: 20px;
    border-radius: 50px;
}

a.filter-toggle:focus, a.filter-toggle:hover {
    background: #ffbd59;
}

img.gpls-wcsamm-coming-soon-badge.gpls-wcsamm-coming-soon--single-badge {
    display: flex!important;
    margin-left: -12px!important;
    margin-top: 20px!important;
}

.archive img.gpls-wcsamm-coming-soon-badge.gpls-wcsamm-coming-soon--loop-badge {display:none!important;}

@media (min-width: 768px) {
	
.summary.entry-summary div#trustpilot-widget-trustbox-2-wrapper {
    display: flex!important;
    margin-left: -26px!important;
    margin-bottom: 20px!important;
}

table.shop_table_responsive tr.woocommerce-shipping-totals td {
    width: 70%!important;font-size: 14px!important;
}
	
	a.filter-toggle {display:none;}
}

span.hfe-menu-toggle.sub-arrow.hfe-menu-child-0 {
    pointer-events: none!important;
}


/********* MOBILE MENU SHIFTNAV ***********/

.shiftnav.shiftnav-shiftnav-main ul.shiftnav-menu li.menu-item.current-menu-item > .shiftnav-target, .shiftnav.shiftnav-shiftnav-main ul.shiftnav-menu li.menu-item ul.sub-menu .current-menu-item > .shiftnav-target {
    color: #225d55!important;
}

a.shiftnav-target,span.shiftnav-target {
    font-size: 18px!important;
}

shiftnav.shiftnav-shiftnav-main ul.shiftnav-menu.shiftnav-active-on-hover li.menu-item > .shiftnav-target:hover {
    background: #255d55;
    color: #ffffff!important;
}

.shiftnav-target img {
    width: 10%!important;
    margin-right: 10px!important;
	margin-bottom: -6px;
}

.shiftnav.shiftnav-skin-light ul.shiftnav-menu li.menu-item.shiftnav-active>.shiftnav-target, .shiftnav.shiftnav-skin-light ul.shiftnav-menu li.menu-item.shiftnav-in-transition>.shiftnav-target {
    color: #225d55!important;
    background: #ffbd59!important;
    border-top-color: transparent;
    border-bottom-color: transparent;
}

.shiftnav.shiftnav-skin-light ul.shiftnav-menu ul.sub-menu li.menu-item > .shiftnav-target {
	color: #255d55!important;}

div#shiftnav-main {
    z-index: 9999999999;
}

.shiftnav-toggle-button {
    background: transparent!important;
    font-size: 25px!important;
}

.shiftnav:before {box-shadow:none!important;}
div#shiftnav-main {
    box-shadow: 0 0 15px rgb(46 46 46 / 28%)!important;
}

.shiftnav .shiftnav-panel-close {
    background: transparent!important;
}

.fa-times:before {
    font-size: 25px;
}

.shiftnav:after {
    box-shadow: none!important;
}

.current-menu-item i.fa:before {
    color: #fff!important;
}

.shiftnav.shiftnav-skin-light ul.shiftnav-menu li.menu-item .shiftnav-submenu-activation {
    background: transparent!important;
}

a.shiftnav-target {font-size:18px!important;}

nav.shiftnav-nav li {
    border-bottom: 1px solid #c2c2c2;
}

.petpuzzy-wishlist-content .woosw-items div.woosw-item--remove span:before{
	content: "\e031";
}

.woosw-list table.woosw-content-items tr.woosw-content-item .woosw-content-item--remove span{
	cursor: pointer;
    position: relative;
}


.woosw-list table.woosw-content-items tr.woosw-content-item .woosw-content-item--remove span:before{
	content: "\e031";
	font-family: petpuzzy-icon;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    font-weight: 400;
    line-height: 1;
    vertical-align: middle;
    font-size: 18px;
    margin-top: -6px;
}

.woosw-content-item--add a.button .screen-reader-text {
    border: 0;
    clip: unset;
    -webkit-clip-path: inset(50%);
    clip-path: unset;
    height: auto;
    margin: unset;
    overflow: unset;
    padding: 0;
    position: unset !important;
    width: unset;
    word-wrap: break-word;
}

.hfe-submenu-icon-arrow .hfe-nav-menu .parent-has-child .sub-arrow i:before {
    content: '\f107';
}

.products-list-mobile .product-image {
    background: #fff;
}

div#order_review p.woocommerce-mini-cart__buttons.buttons:nth-child(2) {
    display: none;
}

div#order_review p.woocommerce-mini-cart__buttons.buttons a {
width:100%!important;text-align:center;margin-bottom:30px;
}

.page-id-12 .petpuzzy-freeshipping {
    display: none;
}

.page-id-12 a.cart-contents.petpuzzy-group-header-action,.page-id-11 a.cart-contents.petpuzzy-group-header-action {
    pointer-events: none;
}

.page-id-11 .cross-sells {
    display: none;
}

.main-header-content {
    padding-bottom: 30px;
}

.cross-sells {
    margin-bottom: 30px;
}


#colophon {
    position: relative;
    z-index: 10;
}

.descrizione-categorie {
    margin: 0 auto;
    width: 100%;
    top: 80px!important;
    position: relative;
            padding-bottom: 76px!important;
}

.woocommerce .elementor-element.elementor-products-grid ul.products li.product, .woocommerce div.product .elementor-element.elementor-products-grid .related.products ul.products li.product, .woocommerce div.product .elementor-element.elementor-products-grid .upsells.products ul.products li.product {
    width: 100%!important;
    max-width: 100%!important;
}


th.woocommerce-product-attributes-item__label {
    width: 35%!important;
}

td.woocommerce-product-attributes-item__value a {
    color: #1b897e!important;
    font-weight: 900!important;
}

table.woocommerce-product-attributes.shop_attributes {width:50%;}

li.product.product-style-default .price {
    color: var(--secondary);
    font-size: 16px;
    line-height: 26px;
    font-weight: 600;
}

li.product .product-caption-action {
    padding-right: 0px!important;
}

li#menu-item-18742 ul.sub-menu {
    display: none;
}

li#menu-item-18742  span.hfe-menu-toggle.sub-arrow.hfe-menu-child-0 {
    display: none;
}

tr.order-total td {
    vertical-align: middle;
}

small.includes_tax span.woocommerce-Price-amount.amount {
    font-size: 12px!important;
}

ul#shipping_method {
    margin-top: 15px;
}

.page-id-12  table th {
    vertical-align: top;
}
.cross-sells h2 {
    margin-top: 30px;
}

.cart_totals {
    z-index: 10;
}

.cart-collaterals {
    margin-bottom: 2em!important;
}

@media (min-width:767px) {
.page-id-11 .trustpilot-widget {
    padding: 50px 0px!important;
	z-index:0!important;    height: 120px;
}
}

div#trustpilot-widget-trustbox-0 {
    margin-bottom: 45px;
}

ul#menu-1-75a9555 .hfe-creative-menu {
    background: #fff;
}

.woosw-content-item--remove span:before {
    display: inline-block;
    content: '\e918';
    font-size: 16px;
    font-family: 'woosw';
    speak: none;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.woosw-popup-content-top {
    margin-bottom: 20px;
}

.site-wishlist-side .woosw-popup-content-bot, .site-wishlist-side .woosw-popup-content-top {
    display: flex!important;
}

span.woosw-name, span.woosw-count,.woosw-popup-content-bot-inner {
    display: none!important;
}

/* screen-reader-text: kept hidden globally — scopiamo solo dove serve */
.woosw-content-item--add a.button .screen-reader-text {
    position: unset !important;
    color: inherit !important;
    margin: 0 !important;
    clip-path: unset !important;
    height: auto !important;
    width: auto !important;
    overflow: visible !important;
}

#ship-to-different-address .woocommerce-form__input-checkbox {
    top: 80%!important;
}

a.showlogin {
    font-weight: 900;
}

.page-id-11 ul.products.columns-2 li.product {flex: 0 0 25%;max-width: 25%;}

del{
     background: linear-gradient(180deg, transparent 47.75%, currentColor 49.5%, currentColor 50.5%, transparent 52.25%);
color: red!important;font-size: 12px;
    }

small {
    font-size: 50%;
}

.single-product div.product p.price del {
    font-size: 20px!important;
}

li.cat-item.cat-item-2994,li.cat-item.cat-item-2995,li.cat-item.cat-item-3039,li.cat-item.cat-item-3040 {display:none;}


a.hfe-menu-item:hover,a.hfe-sub-menu-item {
    color: #1B897E!important;
}

i.petpuzzy-icon-plus-square::before {
    content: " + ";
        color:#45cfbc;
}

.petpuzzy-icon-minus-square:before {
    content: " - ";color:#45cfbc;
}

ul.sub-menu.mega-menu.custom-subwidth {
    padding: 0px!important;
}

.elementor-categories-item img {
    text-align:center!important;margin:0 auto;
}

.menu-item-17821 li.elementor-icon-list-item.elementor-inline-item,.menu-item-17819 li.elementor-icon-list-item.elementor-inline-item {float:left;margin-left:45px!important}

bdi,li.product.product-style-default .price {
    color: #1b897e;font-weight:700
}

span.sku_wrapper {
    display: none;
}
.woocommerce-variation-price span.price span.woocommerce-Price-amount.amount {
    font-size: 30px;
}

.single-product div.product .single_add_to_cart_button {
    background-color: #f76631;
}
.elementor-1897 .elementor-element.elementor-element-920f000 a:hover {
    color: #1b897e!important;
}


.swiper-container .product-image {
    background: #fff;
}

.spedizione-gratuita-carrello {
    font-size: 32px;
    color: #fff;
    text-align: center;
    padding: 42px 30px 42px 100px;
      background-color: #f5663b !important;
    border-radius: 5px;
    background-image: var(--wpr-bg-ddffa331-e135-46a5-be8f-b13ef5a57dc7);
    background-repeat: no-repeat;
    background-size: 8%;
    background-position-x: 18%;
    background-position-y: 50%;
        margin-bottom: 50px;
}

.spedizione-gratuita-carrello bdi {
    color: #282344;
}

.brands-container li.brand-item {
    width: 20%;
    float: left;
        list-style:none;
}

.widget_product_brands ul li:before {display:none;}

@media (max-width:476px){
	.page-id-11 .trustpilot-widget {
    height: 300px!important;
}
}

@media (max-width: 767px) {
    .brands-container li.brand-item {
        width: 50%;
        float: left;
    }

    #ship-to-different-address label {
        font-size: 18px;
    }

    table.woocommerce-product-attributes.shop_attributes {
        width:100%!important;
    }

    .page-id-11 ul.products.columns-2 li.product {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .cart-collaterals {
        margin-bottom: 0.235801em!important;
    }

    .cart_totals {
        padding: 20px 16px!important;
    }

    /* RIMOSSO: width:100% su ::before causava testo verticale nella cella spedizioni */
    table.shop_table_responsive tr td[data-title]::before {
        width: auto !important;
        font-size: 13px;
    }

    .spedizione-gratuita-carrello {
        font-size: 15px;
        line-height: 23px;
        background-size: 24%;
        background-position-x: 8%;
        background-position-y: 50%;
        margin-bottom: 50px;
        text-align: right;
        padding:20px 20px 20px 80px;
    }

    .spedizione-gratuita-carrello bdi {
        font-size: 25px!important;
        font-weight:900;
    }

    div#order_review {
        padding: 15px;
    }
}

.spedizione-gratuita-carrello bdi {
    font-size: 35px;font-weight:900;
}

.pum-container {
    background: transparent!important;
    padding: 0px!important;
}

div#popmake-18100 {
    border-radius: 30px;
}

div#alg_wc_widget_left_to_free_shipping-3 {
    background: #febc62;
    padding: 30px!important;
    font-size: 20px;
    color: #fff;
}

span.tagged_as {display:none!important;}

section#comments,.post-meta {
    display: none;
}

.post-style-1 .post-thumbnail .categories {
    display: none;
}


li.product .posted-in {
    display: none;
}

.mc4wp-form-fields input[type="submit"] {
    max-height: 50px!important;
}
p#ppc-button-minicart {padding: 0px 29px!important;}

a.checkout-button.button.alt.wc-forward {
    margin-bottom: 15px;
}

button.GooglePayButton.GooglePayButton--buy.GooglePayButton--dark {
    border-radius: 25px!important;
}

section.elementor-section.elementor-top-section.elementor-element.elementor-element-2716b02.elementor-section-content-middle.elementor-hidden-tablet.elementor-hidden-mobile_extra.elementor-hidden-mobile.elementor-section-boxed.elementor-section-height-default.elementor-section-height-default.elementor-sticky .hfe-nav-menu {padding:0px!important;}

section.elementor-section.elementor-top-section.elementor-element.elementor-element-2716b02.elementor-section-content-middle.elementor-hidden-tablet.elementor-hidden-mobile_extra.elementor-hidden-mobile.elementor-section-boxed.elementor-section-height-default.elementor-section-height-default.elementor-sticky .hfe-nav-menu .hfe-has-submenu {
    max-width: 211px!important;
}

section.elementor-section.elementor-top-section.elementor-element.elementor-element-2716b02.elementor-section-content-middle.elementor-hidden-tablet.elementor-hidden-mobile_extra.elementor-hidden-mobile.elementor-section-boxed.elementor-section-height-default.elementor-section-height-default.elementor-sticky .hfe-nav-menu .sub-menu {
    left: 60%!important;
}

.site-navigation ul.menu ul.sub-menu li.menu-item a {font-size:17px}

#petpuzzy-main-content {height:auto!important;}

@media (max-width: 880px) {
    div#popmake-18100 {
    width: 90%!important;
    height: auto;
    top: 10%!important;
    left: 20px!important;
    opacity: 1;
    display: block;
}
}

/* ==========================================
   FIX: Product titles - no truncation, wrap naturally
   ========================================== */

/* Grid product titles */
ul.products li.product h2,
ul.products li.product h3,
ul.products li.product .woocommerce-loop-product__title,
ul.products li.product .wc-block-grid__product-title,
ul.products .wc-block-grid__product h2,
ul.products .wc-block-grid__product h3,
ul.products .wc-block-grid__product .woocommerce-loop-product__title,
ul.products .wc-block-grid__product .wc-block-grid__product-title,
.wc-block-grid__products li.product h2,
.wc-block-grid__products li.product h3,
.wc-block-grid__products li.product .woocommerce-loop-product__title,
.wc-block-grid__products li.product .wc-block-grid__product-title,
.wc-block-grid__products .wc-block-grid__product h2,
.wc-block-grid__products .wc-block-grid__product h3,
.wc-block-grid__products .wc-block-grid__product .woocommerce-loop-product__title,
.wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-title {
    display: block !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    overflow: visible !important;
    text-overflow: unset !important;
}

/* List product titles (product-block-list) */
li.product .product-block-list h2,
li.product .product-block-list h3,
li.product .product-block-list .woocommerce-loop-product__title,
li.product .product-block-list .wc-block-grid__product-title {
    display: block !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    overflow: visible !important;
    text-overflow: unset !important;
}

/* List style 1 */
ul.products li.product.product-style-list-1 h2.woocommerce-loop-product__title {
    display: block !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    overflow: visible !important;
    text-overflow: unset !important;
}

/* List style 2 */
ul.products li.product.product-style-list-2 h2.woocommerce-loop-product__title {
    display: block !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    overflow: visible !important;
    text-overflow: unset !important;
}

/* List style 3 */
ul.products li.product.product-style-list-3 h2.woocommerce-loop-product__title {
    display: block !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    overflow: visible !important;
    text-overflow: unset !important;
}

/* ==========================================
   Hide default WooCommerce pagination
   ========================================== */
.petpuzzy-woocommerce-pagination,
.woocommerce-pagination {
    display: none !important;
}

/* ==========================================
   Load More Button - "Scopri di più"
   ========================================== */
.petpuzzy-load-more-wrapper {
    text-align: center;
    margin: 30px 0;
    clear: both;
}
.petpuzzy-load-more-button {
    display: inline-block;
    background-color: #225d55;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    padding: 14px 40px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.petpuzzy-load-more-button:hover {
    background-color: #ffbd59;
    color: #225d55;
}
.petpuzzy-load-more-loading {
    font-size: 14px;
    color: #666;
    padding: 14px 0;
}

/* ==========================================================
   CART & CHECKOUT — Design moderno LalloHallo
   Nota: width:100% sul ::before è stato resettato sopra
   (causava testo «Tariffa unica:» verticale carattere×carattere)
   ========================================================== */

/* ----------------------------------------------------------
   CART TABLE — Tabella prodotti (desktop)
   ---------------------------------------------------------- */
table.shop_table.cart {
    border-collapse: collapse !important;
    width: 100% !important;
}

table.shop_table.cart thead th {
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-weight: 700 !important;
    color: #aaa !important;
    padding: 0 12px 14px !important;
    border-bottom: 2px solid #f0f0f0 !important;
}

table.shop_table.cart tbody td {
    vertical-align: middle !important;
    padding: 18px 12px !important;
    border-bottom: 1px solid #f5f5f5 !important;
}

table.shop_table.cart .product-name a {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #222 !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    line-height: 1.4 !important;
}

table.shop_table.cart .product-price .amount,
table.shop_table.cart .product-subtotal .amount {
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #225d55 !important;
    white-space: nowrap !important;
}

table.shop_table.cart .product-thumbnail img {
    width: 80px !important;
    height: 80px !important;
    object-fit: cover !important;
    border-radius: 10px !important;
}

/* ----------------------------------------------------------
   COUPON AREA
   ---------------------------------------------------------- */
.woocommerce-cart .coupon {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

.woocommerce-cart .coupon label {
    font-weight: 700 !important;
    margin-bottom: 0 !important;
    white-space: nowrap !important;
}

.woocommerce-cart .coupon .input-text {
    border-radius: 8px !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    flex: 1 !important;
    min-width: 140px !important;
}

.woocommerce-cart .coupon .button {
    border-radius: 8px !important;
    padding: 10px 22px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
}

/* ----------------------------------------------------------
   CART TOTALS CARD
   ---------------------------------------------------------- */
.cart_totals {
    background: #fff !important;
    border-radius: 18px !important;
    padding: 28px 26px !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08) !important;
    border: 1px solid #f0f0f0 !important;
}

.cart_totals > h2 {
    font-size: 18px !important;
    font-weight: 800 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    padding-bottom: 14px !important;
    border-bottom: 2px solid #225d55 !important;
    margin-bottom: 20px !important;
    color: #222 !important;
}

/* Tabella totali: layout fisso — th=40%, td=60%.
   Con table-layout:auto + white-space:nowrap su th,
   label lunghe come "Sconto 5% per carrello..."
   espandevano la colonna th lasciando pochissimo spazio
   alla td, causando spezzature mid-word. */
.cart_totals table {
    width: 100% !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
}

/* th = etichetta sinistra, larghezza fissa 40% */
.cart_totals table th {
    text-align: left !important;
    vertical-align: top !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #666 !important;
    padding: 12px 16px 12px 0 !important;
    white-space: normal !important;   /* permette il wrap su label lunghe */
    word-break: normal !important;
    width: 40% !important;
}

/* td = valore destra, prende il restante 60% */
.cart_totals table td {
    text-align: right !important;
    vertical-align: top !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #333 !important;
    padding: 12px 0 !important;
    width: 60% !important;
    word-break: normal !important;       /* NON spezza le parole */
    overflow-wrap: break-word !important; /* solo se una parola è davvero troppo lunga */
    min-width: 0 !important;
}

/* CHIAVE: la cella spedizione deve avere larghezza automatica
   e il suo contenuto (ul#shipping_method) deve fluire normalmente */
.cart_totals .woocommerce-shipping-totals td {
    text-align: right !important;
    min-width: 0 !important;
}

/* ==========================================================
   FIX DEFINITIVO — cart_totals table
   
   Il tema parent (petpuzzy/assets/css/woocommerce.css riga 97)
   imposta GLOBALMENTE (non in media query):
     table.shop_table_responsive tr td { display: block; clear: both; }
   
   Questo trasforma ogni <td> in un blocco a larghezza piena,
   rompendo qualsiasi layout a due colonne (th | td).
   
   Soluzione: forziamo display:table-cell sul td della tabella
   dei totali per ripristinare il comportamento normale di tabella.
   Nascondiamo anche ::before/::after che aggiungono l'etichetta
   data-title flottante a sinistra (già visibile nella <th>).
   ========================================================== */

/* 1. Ripristina display:table-cell (annulla display:block del parent) */
.cart_totals table tr th,
.cart_totals table tr td {
    display: table-cell !important;
    clear: none !important;
    float: none !important;
    text-align: left !important;
}

.cart_totals table tr td {
    text-align: right !important;
}

/* 2. Nascondi ::before/::after (etichetta data-title duplicata) */
.cart_totals table tr td::before,
.cart_totals table tr td::after,
.cart_totals table tr td[data-title]::before {
    display: none !important;
    content: "" !important;
    float: none !important;
    width: 0 !important;
}


/* ----------------------------------------------------------
   SHIPPING METHOD — Fix completo testo verticale
   ---------------------------------------------------------- */
ul#shipping_method {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

ul#shipping_method li {
    display: block !important;    /* NON flex — evita collasso della larghezza */
    text-align: right !important;
    padding: 4px 0 !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    min-width: 0 !important;
    width: auto !important;
}

ul#shipping_method li input[type="radio"] {
    margin-right: 6px !important;
    vertical-align: middle !important;
}

ul#shipping_method li label {
    display: inline !important;
    text-align: right !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #444 !important;
    white-space: normal !important;
    word-break: normal !important;
    cursor: pointer !important;
}

ul#shipping_method li label .amount {
    font-weight: 700 !important;
    color: #225d55 !important;
}

/* Testo «Le opzioni di spedizione saranno aggiornate...» */
.woocommerce-shipping-destination,
.woocommerce-shipping-calculator > p {
    font-size: 13px !important;
    color: #888 !important;
    text-align: right !important;
    margin: 6px 0 !important;
    white-space: normal !important;
    word-break: normal !important;
}

.shipping-calculator-button {
    font-size: 13px !important;
    color: #225d55 !important;
    text-decoration: underline !important;
}

/* Subtotale */
.cart_totals .cart-subtotal th,
.cart_totals .cart-subtotal td {
    padding-bottom: 16px !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

.cart_totals .cart-subtotal .amount {
    font-size: 17px !important;
    font-weight: 800 !important;
    color: #225d55 !important;
}

/* Totale */
.cart_totals .order-total {
    border-top: 2px solid #225d55 !important;
}

.cart_totals .order-total th {
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #222 !important;
    padding-top: 20px !important;
    white-space: nowrap !important;
}

.cart_totals .order-total td {
    padding-top: 20px !important;
}

.cart_totals .order-total .amount {
    font-size: 26px !important;
    font-weight: 800 !important;
    color: #225d55 !important;
    white-space: nowrap !important;
}

/* Nota IVA inclusa: piccola, grigia, non prominente */
.cart_totals small.includes_tax,
.cart_totals .order-total small.includes_tax {
    display: block !important;
    margin-top: 6px !important;
    font-size: 10px !important;
    line-height: 1.4 !important;
    color: #aaa !important;
    font-weight: 400 !important;
    white-space: normal !important;
}

/* L'importo IVA dentro la nota deve restare piccolo
   (senza !important il .amount verde grande lo sovrascrive) */
.cart_totals small.includes_tax .woocommerce-Price-amount,
.cart_totals small.includes_tax .amount {
    font-size: 10px !important;
    font-weight: 600 !important;
    color: #aaa !important;
}

/* Pulsante procedi all'ordine */
.cart_totals .checkout-button {
    display: block !important;
    width: 100% !important;
    margin-top: 22px !important;
    padding: 16px 24px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    border-radius: 50px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    background-color: #f76631 !important;
    color: #fff !important;
    text-align: center !important;
    transition: all 0.25s ease !important;
    box-shadow: 0 4px 14px rgba(247,102,49,0.25) !important;
}

.cart_totals .checkout-button:hover {
    background-color: #e55520 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(247,102,49,0.4) !important;
}

/* ----------------------------------------------------------
   CHECKOUT ORDER REVIEW
   ---------------------------------------------------------- */
#order_review {
    background: #fff !important;
    border-radius: 18px !important;
    padding: 28px 26px !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08) !important;
    border: 1px solid #f0f0f0 !important;
}

#order_review .woocommerce-checkout-review-order-table th,
#order_review .woocommerce-checkout-review-order-table td {
    padding: 12px 8px !important;
    vertical-align: middle !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
}

#order_review .woocommerce-checkout-review-order-table td {
    text-align: right !important;
}

#order_review .woocommerce-checkout-review-order-table td.product-name {
    text-align: left !important;
}

#order_review .woocommerce-checkout-review-order-table .amount {
    white-space: nowrap !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #225d55 !important;
}

#order_review .woocommerce-checkout-review-order-table .order-total th,
#order_review .woocommerce-checkout-review-order-table .order-total td {
    padding-top: 18px !important;
    border-top: 2px solid #225d55 !important;
}

#order_review .woocommerce-checkout-review-order-table .order-total .amount {
    font-size: 24px !important;
    font-weight: 800 !important;
    color: #225d55 !important;
}

#order_review .woocommerce-checkout-review-order-table .cart-subtotal .amount {
    font-size: 17px !important;
    font-weight: 800 !important;
    color: #225d55 !important;
}

/* Nota IVA nel checkout — selettore ad alta specificità per battere
   la regola .order-total .amount (font-size:24px !important) */
#order_review .woocommerce-checkout-review-order-table .order-total small.includes_tax,
#order_review .woocommerce-checkout-review-order-table small.includes_tax {
    display: block !important;
    margin-top: 6px !important;
    font-size: 11px !important;
    line-height: 1.5 !important;
    color: #aaa !important;
    font-weight: 400 !important;
    white-space: normal !important;
}

/* L'importo €x,xx dentro la nota IVA — forza small grigio
   battendo il selettore .order-total .amount (che lo rende verde 24px) */
#order_review .woocommerce-checkout-review-order-table .order-total small.includes_tax .woocommerce-Price-amount,
#order_review .woocommerce-checkout-review-order-table .order-total small.includes_tax .amount,
#order_review .woocommerce-checkout-review-order-table small.includes_tax .woocommerce-Price-amount,
#order_review .woocommerce-checkout-review-order-table small.includes_tax .amount {
    font-size: 11px !important;
    font-weight: 500 !important;
    color: #aaa !important;
    white-space: normal !important;
}


/* Ripristina display:table-cell per order_review
   (stesso fix applicato a cart_totals per display:block del parent) */
#order_review table tr th,
#order_review table tr td {
    display: table-cell !important;
    clear: none !important;
    float: none !important;
}

#order_review table tr td {
    text-align: right !important;
}

#order_review table tr td::before,
#order_review table tr td::after,
#order_review table tr td[data-title]::before {
    display: none !important;
    content: "" !important;
    float: none !important;
    width: 0 !important;
}

/* ----------------------------------------------------------
   MOBILE ≤767px — Cart & Checkout
   ---------------------------------------------------------- */
@media (max-width: 767px) {

    /* === CART TABLE === */
    table.shop_table_responsive.cart thead {
        display: none !important;
    }

    /* Ogni riga prodotto diventa un blocco con immagine a sinistra */
    table.shop_table_responsive.cart .cart_item {
        position: relative !important;
        display: block !important;
        padding-left: 96px !important;
        padding-top: 12px !important;
        padding-bottom: 12px !important;
        border-top: 1px solid #f0f0f0 !important;
    }

    table.shop_table_responsive.cart .cart_item:first-child {
        border-top: none !important;
    }

    /* Thumbnail assoluta a sinistra */
    table.shop_table_responsive.cart td.product-thumbnail {
        position: absolute !important;
        left: 0 !important;
        top: 12px !important;
        padding: 0 !important;
        border: none !important;
        width: 80px !important;
    }

    table.shop_table_responsive.cart td.product-thumbnail img {
        width: 80px !important;
        height: 80px !important;
        object-fit: cover !important;
        border-radius: 8px !important;
        margin: 0 !important;
    }

    /* Nome prodotto */
    table.shop_table_responsive.cart td.product-name {
        display: block !important;
        text-align: left !important;
        border: none !important;
        padding: 0 0 6px !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
    }

    /* Nasconde il ::before label nel nome — usiamo solo il link */
    table.shop_table_responsive.cart td.product-name::before {
        display: none !important;
        content: '' !important;
    }

    table.shop_table_responsive.cart td.product-name a {
        font-size: 14px !important;
        font-weight: 700 !important;
        color: #222 !important;
        white-space: normal !important;
        display: block !important;
        line-height: 1.4 !important;
    }

    /* Prezzo, Quantità, Subtotale: block, label a sinistra, valore in linea */
    table.shop_table_responsive.cart td.product-price,
    table.shop_table_responsive.cart td.product-subtotal,
    table.shop_table_responsive.cart td.product-quantity {
        display: block !important;
        border: none !important;
        padding: 3px 0 !important;
        text-align: left !important;
        font-size: 13px !important;
        color: #555 !important;
        overflow: hidden !important; /* clearfix per il float del ::before */
    }

    /* ::before su SOLO le celle della tabella prodotti del carrello,
       NON sulla tabella dei totali (tabella diversa) */
    table.shop_table_responsive.cart td.product-price::before,
    table.shop_table_responsive.cart td.product-subtotal::before,
    table.shop_table_responsive.cart td.product-quantity::before {
        content: attr(data-title) ": " !important;
        font-weight: 600 !important;
        font-size: 12px !important;
        color: #aaa !important;
        float: left !important;
        white-space: nowrap !important;
        width: auto !important;  /* CRITICAL: non usare 100% */
    }

    table.shop_table_responsive.cart td.product-price .amount,
    table.shop_table_responsive.cart td.product-subtotal .amount {
        font-size: 14px !important;
        font-weight: 700 !important;
        color: #225d55 !important;
        float: right !important;
    }

    /* Pulsante rimuovi */
    table.shop_table_responsive.cart td.product-remove {
        position: absolute !important;
        top: 10px !important;
        right: 0 !important;
        padding: 0 !important;
        border: none !important;
        z-index: 2 !important;
    }

    /* Row actions (coupon + aggiorna) */
    table.shop_table_responsive.cart td.actions {
        display: block !important;
        padding: 16px 0 !important;
        border-top: 1px solid #f0f0f0 !important;
    }

    /* Blocca eventuali ::before su tutte le altre td responsive */
    table.shop_table_responsive tr td[data-title]::before {
        width: auto !important;   /* CRITICAL: NO 100% */
        font-size: 13px !important;
    }

    /* === COUPON === */
    .woocommerce-cart .coupon {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .woocommerce-cart .coupon .input-text {
        width: 100% !important;
        min-width: 0 !important;
    }

    /* === CART TOTALS === */
    .cart_totals {
        padding: 20px 16px !important;
        border-radius: 14px !important;
    }

    .cart_totals > h2 {
        font-size: 15px !important;
        text-align: center !important;
    }

    /* Tabella totali in mobile: layout fisso 45/55 */
    .cart_totals table {
        table-layout: fixed !important;
        width: 100% !important;
    }

    .cart_totals table th {
        font-size: 13px !important;
        padding: 10px 10px 10px 0 !important;
        width: 45% !important;
        white-space: normal !important;
        word-break: normal !important;
        text-align: left !important;
    }

    .cart_totals table td {
        font-size: 13px !important;
        padding: 10px 0 !important;
        width: 55% !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
        min-width: 0 !important;
        text-align: right !important;
    }

    /* Shipping cell mobile */
    .cart_totals .woocommerce-shipping-totals td {
        text-align: right !important;
    }

    /* Shipping method mobile: testo fluisce normalmente */
    ul#shipping_method li {
        display: block !important;
        text-align: right !important;
        white-space: normal !important;
        word-break: normal !important;
        padding: 4px 0 !important;
    }

    ul#shipping_method li label {
        display: inline !important;
        font-size: 13px !important;
        white-space: normal !important;
        word-break: normal !important;
    }

    .cart_totals .cart-subtotal .amount {
        font-size: 16px !important;
    }

    .cart_totals .order-total .amount {
        font-size: 22px !important;
    }

    .cart_totals .checkout-button {
        font-size: 15px !important;
        padding: 14px 20px !important;
    }

    /* === CHECKOUT ORDER REVIEW === */
    #order_review {
        padding: 20px 16px !important;
        border-radius: 14px !important;
    }

    #order_review .woocommerce-checkout-review-order-table th,
    #order_review .woocommerce-checkout-review-order-table td {
        padding: 10px 4px !important;
        font-size: 13px !important;
    }

    #order_review .woocommerce-checkout-review-order-table .amount {
        font-size: 14px !important;
        white-space: nowrap !important;
    }

    #order_review .woocommerce-checkout-review-order-table .order-total .amount {
        font-size: 20px !important;
    }

    /* === CART COLLATERALS === */
    .cart-collaterals {
        margin-bottom: 0 !important;
    }

    .woocommerce-cart .cart-collaterals .cart_totals {
        width: 100% !important;
        float: none !important;
    }
}
