/*
Theme Name: Blocksy Child – TreadmillsGuru
Template: blocksy
Version: 1.1.0
Description: Child theme per TreadmillsGuru (layout ispirato al precedente REHub).
Text Domain: tg
*/

:root{
	--tg-main:#ff823a;      /* arancione REHub (link, accenti) */
	--tg-nav:#c40000;       /* barra menu rossa */
	--tg-dark:#111111;
	--tg-btn:#43c801;       /* pulsanti verdi */
	--tg-btn-hover:#38a801;
	--tg-border:#e7e7e7;
	--theme-font-family:Roboto,"Helvetica Neue",Arial,sans-serif;
}
body{font-family:Roboto,"Helvetica Neue",Arial,sans-serif;font-size:15px;color:#222}

/* ================= HEADER ================= */
.ct-header [data-row*="middle"]{border-bottom:0}
.ct-header [data-row*="middle"] .ct-container{min-height:120px}
.ct-header [data-row*="middle"] [data-items]{gap:30px}
.ct-header [data-row*="middle"] [data-column="end"]{flex:1 1 auto}
.ct-header [data-row*="middle"] [data-column="end"] [data-items]{width:100%;justify-content:flex-end}
.ct-header-text{flex:1 1 auto;max-width:900px}
.ct-header-text .entry-content{width:100%}

.tg-htools{display:flex;align-items:center;gap:28px;width:100%}
.tg-search{flex:1 1 auto;display:flex;align-items:stretch;max-width:560px;margin:0 auto;border:1px solid #ddd;border-radius:4px;overflow:hidden;background:#fff}
.tg-search input[type=search]{flex:1 1 auto;border:0!important;height:40px;padding:0 14px;font-size:14px;box-shadow:none!important;border-radius:0!important}
.tg-search select{order:2;border:0!important;border-left:1px solid #eee!important;height:40px;padding:0 28px 0 12px;font-size:13px;max-width:150px;background-color:#fff;border-radius:0!important}
.tg-search button{order:3;width:46px;border:0;background:var(--tg-dark);color:#fff;cursor:pointer;display:grid;place-items:center;border-radius:0}
.tg-search button:hover{background:var(--tg-nav)}

.tg-hicons{display:flex;gap:22px;flex-shrink:0}
.tg-hicons a{position:relative;display:flex;flex-direction:column;align-items:center;gap:3px;font-size:12px;color:#333;text-decoration:none}
.tg-hicons a:hover{color:var(--tg-nav)}
.tg-count{position:absolute;top:-6px;right:2px;min-width:17px;height:17px;padding:0 4px;border-radius:9px;background:var(--tg-main);color:#fff;font-size:10px;line-height:17px;text-align:center}
.tg-count::after{content:attr(data-count)}
.tg-count[data-count="0"]{display:none}

/* Barra menu rossa */
.ct-header [data-row*="bottom"]{background:var(--tg-nav)!important}
.ct-header [data-row*="bottom"] .ct-container{min-height:40px}
.ct-header [data-row*="bottom"] .menu > li > a,
.ct-header [data-row*="bottom"] .ct-menu-link{color:#fff!important;font-weight:700;font-size:15px;--menu-item-height:40px}
.ct-header [data-row*="bottom"] .menu > li > a:hover,
.ct-header [data-row*="bottom"] .menu > li.current-menu-item > a{background:rgba(0,0,0,.18)}
.ct-header [data-row*="bottom"] .sub-menu{--dropdown-background-color:#fff}
.ct-header [data-row*="bottom"] .sub-menu a{color:#222!important;font-weight:400}

/* Voci a destra nella barra rossa (classe "floatright" già presente nel menu di REHub) */
.ct-header [data-row*="bottom"] [data-column="start"]{flex:1 1 auto}
.ct-header [data-row*="bottom"] [data-column="start"] [data-items],
.ct-header [data-row*="bottom"] [data-column="start"] nav,
.ct-header [data-row*="bottom"] [data-column="start"] .menu{flex:1 1 auto;width:100%}
.ct-header [data-row*="bottom"] .menu > li.floatright{margin-left:auto}

/* Mobile: ricerca a tutta larghezza */
@media (max-width:999px){
	.tg-htools{flex-wrap:wrap;gap:12px}
	.tg-hicons{display:none}
}

/* ================= TITOLI SEZIONE ================= */
.home .page-title,.home .hero-section{display:none}
h1,h2,h3,h4{font-family:Roboto,"Helvetica Neue",Arial,sans-serif;color:var(--tg-dark)}

/* ================= CARD CATEGORIA ================= */
.tg-cat-card{display:flex;align-items:center;justify-content:space-between;gap:16px;height:100%;padding:20px;border:1px solid var(--tg-border);background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.04)}
.tg-cat-card__title{font-size:14px;letter-spacing:.03em;text-transform:uppercase;font-weight:500;margin:0 0 10px}
.tg-cat-card__title a{color:inherit;text-decoration:none}
.tg-cat-card p{font-size:12px;line-height:1.35;margin:0 0 10px;color:#444}
.tg-cat-card__btn{font-size:12px;font-weight:700;color:var(--tg-main);text-decoration:none}
.tg-cat-card__img img{width:80px;height:80px;object-fit:contain}

/* ================= GRIGLIA IN EVIDENZA ================= */
.tg-fgrid{display:grid;grid-template-columns:2fr 1fr 1fr;grid-template-rows:repeat(2,220px);gap:8px}
.tg-fgrid__item{position:relative;display:flex;flex-direction:column;justify-content:flex-end;padding:18px;background:#333 center/cover no-repeat;color:#fff!important;text-decoration:none;overflow:hidden}
.tg-fgrid__item::before{content:"";position:absolute;inset:0;background:linear-gradient(to top,rgba(0,0,0,.85),rgba(0,0,0,.15) 65%)}
.tg-fgrid__item>*{position:relative}
.tg-fgrid__item.is-big{grid-row:span 2}
.tg-fgrid__title{font-weight:700;font-size:15px;line-height:1.25;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.tg-fgrid__item.is-big .tg-fgrid__title{font-size:26px}
.tg-fgrid__price{font-size:13px;margin-top:6px;color:#ffd5bd}
.tg-fgrid__price del{opacity:.7}
@media (max-width:768px){.tg-fgrid{grid-template-columns:1fr 1fr;grid-template-rows:auto}.tg-fgrid__item{min-height:160px}.tg-fgrid__item.is-big{grid-column:span 2;grid-row:auto;min-height:260px}}

/* ================= TAB PRODOTTI ================= */
.tg-tabs__nav{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-bottom:24px}
.tg-tabs__nav button{border:1px solid var(--tg-border);background:#fff;color:#333;padding:8px 16px;border-radius:20px;font-size:13px;cursor:pointer}
.tg-tabs__nav button.is-active,.tg-tabs__nav button:hover{background:var(--tg-dark);border-color:var(--tg-dark);color:#fff}

/* ================= CARD PRODOTTO (WooCommerce) ================= */
.woocommerce ul.products li.product,[data-products] .product{border:1px solid var(--tg-border);padding:14px;background:#fff;transition:box-shadow .2s}
.woocommerce ul.products li.product:hover,[data-products] .product:hover{box-shadow:0 6px 18px rgba(0,0,0,.08)}
[data-products] .product .price{color:var(--tg-dark);font-weight:700;font-size:17px}
[data-products] .product .price del{color:#999;font-weight:400;font-size:13px}
.woocommerce-loop-product__title{font-size:14px!important;font-weight:500!important;line-height:1.35}
.star-rating{color:#ffb400}
.button,.ct-button,.woocommerce a.button,button.single_add_to_cart_button,.tg-deal__btn{background:var(--tg-btn)!important;border-color:var(--tg-btn)!important;color:#fff!important}
.button:hover,.ct-button:hover,.woocommerce a.button:hover,button.single_add_to_cart_button:hover,.tg-deal__btn:hover{background:var(--tg-btn-hover)!important}
.onsale,.tg-deal__badge{background:#e33333!important;color:#fff}
/* pulsanti WPC compare/wishlist nelle card */
.woosc-btn,.woosw-btn{font-size:12px!important;background:none!important;color:#666!important;border:0!important;padding:4px 0!important}
.woosc-btn:hover,.woosw-btn:hover{color:var(--tg-main)!important}

/* Barra Already Sold */
.tg-sold{margin:8px 0 4px;font-size:12px;line-height:1.3}
.tg-sold__bar{height:6px;background:#e9e9e9;border-radius:3px;overflow:hidden}
.tg-sold__bar span{display:block;height:100%;background:var(--tg-main)}
.tg-sold__txt{display:flex;justify-content:space-between;margin-top:4px;color:#555}

/* ================= RECENSIONI ================= */
.tg-posts{display:grid;grid-template-columns:repeat(2,1fr);gap:18px 30px}
.tg-post{display:flex;gap:14px;align-items:flex-start}
.tg-post__img{flex:0 0 110px}
.tg-post__img img{width:110px!important;height:80px!important;aspect-ratio:auto!important;object-fit:cover;display:block}
.tg-post h3{font-size:15px;line-height:1.3;margin:0 0 6px}
.tg-post h3 a{color:var(--tg-dark);text-decoration:none}
.tg-post h3 a:hover{color:var(--tg-main)}
.tg-post__meta{font-size:12px;color:#888;text-transform:uppercase}
@media (max-width:768px){.tg-posts{grid-template-columns:1fr}}

/* ================= DEAL OF DAY ================= */
.tg-dealbox{border:2px solid var(--tg-main);background:#fff;padding:14px 16px 20px}
.tg-dealbox__head{display:flex;justify-content:space-between;align-items:center;padding-bottom:10px;margin-bottom:16px;border-bottom:1px solid var(--tg-border);color:var(--tg-main);font-size:14px}
.tg-dealbox__nav button{width:22px;height:22px;margin-left:4px;border:1px solid #999;background:#fff;color:#555;line-height:18px;font-size:16px;cursor:pointer;padding:0;border-radius:2px}
.tg-dealbox__nav button:hover{border-color:var(--tg-main);color:var(--tg-main)}
.tg-deal{position:relative;display:grid;grid-template-columns:45% 1fr;gap:18px;align-items:center}
.tg-deal[hidden]{display:none}
.tg-deal__badge{position:absolute;top:0;left:calc(45% - 40px);padding:3px 7px;border-radius:2px;font-size:11px;font-weight:700}
.tg-deal__img img{width:100%;height:auto;max-height:240px;object-fit:contain}
.tg-deal h3{font-size:15px;font-weight:700;line-height:1.4;margin:0 0 12px}
.tg-deal h3 a{color:var(--tg-dark);text-decoration:none}
.tg-deal__price{font-weight:700;font-size:18px;margin:0 0 14px;color:var(--tg-btn)}
.tg-deal__price del{color:#999;font-size:13px;font-weight:400}
.tg-deal__price ins{text-decoration:none}
.tg-countdown{margin:10px 0;font-size:12px;color:#666}
.tg-countdown span{display:inline-block;min-width:30px;padding:4px 2px;margin:0 2px;background:var(--tg-dark);color:#fff;font-weight:700;font-size:14px;border-radius:3px}
.tg-deal__btn{display:inline-block;padding:9px 22px;border-radius:20px;font-weight:700;font-size:13px;text-transform:uppercase;text-decoration:none;box-shadow:0 4px 10px rgba(67,200,1,.35)}
@media (max-width:600px){.tg-deal{grid-template-columns:1fr}.tg-deal__badge{left:0}}

/* ================= SIDEBAR ================= */
.ct-sidebar .widget-title{position:relative;font-size:15px;font-weight:500;padding-bottom:10px;margin-bottom:16px;border-bottom:1px solid var(--tg-border)}
.ct-sidebar .widget-title::after{content:"";position:absolute;left:0;bottom:-1px;width:40px;height:2px;background:var(--tg-main)}

/* ================= SCHEDA PRODOTTO ================= */
.single-product .product_title{font-size:24px;line-height:1.3}
.entry-summary .woosc-btn,.entry-summary .woosw-btn{display:inline-block;margin-right:18px}

/* ================= FOOTER ================= */
.ct-footer{background:#000!important;color:#bbb}
.ct-footer [data-row*="middle"]{background:#000!important}
.ct-footer [data-row*="bottom"]{background:#111!important;border-top:1px solid #222}
.ct-footer .textwidget,.ct-footer .textwidget p,.ct-footer-copyright,.ct-footer-copyright p{color:#bbb!important}
.ct-footer a{color:#ddd}
.ct-footer a:hover{color:var(--tg-main)}
.ct-footer .ct-social-box a{color:#ddd!important}
.ct-footer .ct-social-box svg{fill:#ddd!important}
.ct-footer .ct-social-box a:hover svg{fill:var(--tg-main)!important}
.ct-footer .widget-title,.ct-footer h2,.ct-footer h3{color:#fff}
.tg-footer-links{list-style:none;margin:0;padding:0}
.tg-footer-links li{margin-bottom:6px}

/* ================= SCHEDA PRODOTTO STILE REHUB ================= */
.single-product .product-entry-wrapper{--product-gallery-width:36%}
.single-product .ct-product-divider,.single-product .entry-summary>.price,.single-product .entry-summary>.woocommerce-product-details__short-description{display:none}
.tg-ph{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:12px 24px;margin:0 0 24px;padding-bottom:18px;border-bottom:1px solid var(--tg-border)}
.tg-ph__title{flex:1 1 420px;margin:0;font-size:22px;line-height:1.35;font-weight:500}
.tg-ph__actions{display:flex;gap:8px;flex-shrink:0}
.tg-ph__actions .woosw-btn,.tg-ph__actions .woosc-btn{border:1px solid var(--tg-main)!important;color:var(--tg-main)!important;background:#fff!important;border-radius:3px!important;padding:6px 12px!important;font-size:12px!important;line-height:1.2!important;cursor:pointer}
.tg-ph__actions .woosw-btn:hover,.tg-ph__actions .woosc-btn:hover{background:var(--tg-main)!important;color:#fff!important}
.entry-summary .woosw-btn,.entry-summary .woosc-btn{display:none!important}

.tg-box__meta{display:flex;flex-wrap:wrap;gap:6px 22px;font-size:12px;color:#777;margin-bottom:14px}
.tg-box__meta a{color:var(--tg-main)}
.tg-box__deal{display:flex;align-items:center;gap:22px;padding:18px 0;border-top:1px solid var(--tg-border);border-bottom:1px solid var(--tg-border)}
.tg-score{position:relative;flex:0 0 84px;width:84px;height:84px}
.tg-score svg{width:100%;height:100%}
.tg-score span{position:absolute;inset:0;display:grid;place-items:center;font-size:30px;font-weight:500;color:#222}
.tg-box__amount{font-size:22px;font-weight:500;color:#222;margin-bottom:4px}
.tg-box__amount del{font-size:15px;color:#999;margin-right:6px}
.tg-box__amount ins{text-decoration:none}
.tg-box__store{font-size:13px;color:#555;margin-bottom:10px}
.tg-box__buy{display:inline-block;padding:9px 24px;border-radius:22px;background:var(--tg-btn);color:#fff!important;font-weight:700;font-size:14px;text-transform:uppercase;text-decoration:none;box-shadow:0 4px 10px rgba(67,200,1,.35)}
.tg-box__buy:hover{background:var(--tg-btn-hover)}
.tg-box__features{margin:16px 0 0;padding:0;list-style:none;font-size:13px;line-height:1.5;color:#333}
.tg-box__features li{margin-bottom:6px}
.tg-box__desc{margin-top:16px;font-size:13px}
.tg-box__updated{font-size:12px;color:#888;margin-top:14px}
.tg-share{display:flex;gap:6px;margin:16px 0 6px}
.tg-share a{display:grid;place-items:center;width:28px;height:28px;border-radius:3px;color:#fff!important;font-weight:700;font-size:13px;text-decoration:none}
.tg-share .is-fb{background:#3b5998}.tg-share .is-x{background:#111}.tg-share .is-pin{background:#cb2027}.tg-share .is-mail{background:#3a8ee6}

.tg-sections{clear:both;margin-top:40px}
.tg-sec{margin-bottom:24px;border:1px solid var(--tg-border);background:#fff}
.tg-sec>summary{list-style:none;cursor:pointer;padding:14px 18px;background:#f7f7f7;border-bottom:1px solid var(--tg-border);font-weight:700;font-size:15px;position:relative}
.tg-sec>summary::-webkit-details-marker{display:none}
.tg-sec>summary::before{content:"\2261";color:var(--tg-main);margin-right:10px;font-size:18px}
.tg-sec>summary::after{content:"\25BE";position:absolute;right:18px;color:#666}
.tg-sec:not([open])>summary::after{content:"\25B8"}
.tg-sec__body{padding:20px}
.tg-sec .commentlist{margin:0;padding:0}

.tg-sticky{position:fixed;top:0;left:0;right:0;z-index:999;background:#fff;box-shadow:0 2px 10px rgba(0,0,0,.12)}
.admin-bar .tg-sticky{top:32px}
.tg-sticky__in{max-width:1290px;margin:0 auto;padding:8px 20px;display:flex;align-items:center;gap:14px}
.tg-sticky__in img{width:44px;height:44px;object-fit:contain}
.tg-sticky__txt{flex:1;min-width:0}
.tg-sticky__title{font-size:14px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tg-sticky nav{display:flex;gap:14px;font-size:12px}
.tg-sticky nav a{color:#777}.tg-sticky nav a:first-child{color:var(--tg-main);font-weight:700}
.tg-sticky__price{font-size:18px;font-weight:500}
.tg-sticky__price del{display:none}
.tg-sticky__price ins{text-decoration:none}
@media (max-width:768px){.tg-sticky nav,.tg-sticky__price{display:none}.tg-box__deal{flex-wrap:wrap}}

/* Sidebar della scheda prodotto: niente filtri, sì offerte */
.single-product .ct-sidebar .widget_price_filter,.single-product .ct-sidebar #block-2{display:none}
.tax-product_cat .ct-sidebar .tg-deal-widget,.post-type-archive-product .ct-sidebar .tg-deal-widget{display:none}

/* Avviso di ribasso prezzo (Content Egg) */
.tg-alert{margin-top:12px;font-size:13px}
.tg-alert>summary{list-style:none;cursor:pointer;color:var(--tg-btn);font-weight:500}
.tg-alert>summary::-webkit-details-marker{display:none}
.tg-alert>summary:hover{text-decoration:underline}
.tg-alert__body{margin-top:10px;padding:14px;border:1px solid var(--tg-border);background:#fafafa}
.tg-alert__body .media-heading,.tg-alert__body .cegg-price-tracker-panel,.tg-alert__body .col-md-4,.tg-alert__body .products>:not(:first-child){display:none!important}
.tg-alert__body .col-md-8{width:100%!important;max-width:100%!important;flex:0 0 100%!important;padding:0!important}
.tg-alert__body .egg-container,.tg-alert__body .row{margin:0!important}

/* ================= CONTACT US (WPForms) ================= */
.tg-contact-intro{max-width:720px;font-size:16px;color:#444;margin-bottom:24px}
.wpforms-container{max-width:720px}
.wpforms-container .wpforms-field-label{font-weight:500!important}
.wpforms-container input[type=text],.wpforms-container input[type=email],.wpforms-container textarea{border:1px solid #ddd!important;border-radius:4px!important;padding:10px 12px!important;box-shadow:none!important}
.wpforms-container input:focus,.wpforms-container textarea:focus{border-color:var(--tg-main)!important}
.wpforms-container .wpforms-submit{background:var(--tg-btn)!important;color:#fff!important;border:0!important;border-radius:22px!important;padding:11px 32px!important;font-weight:700!important;text-transform:uppercase;box-shadow:0 4px 10px rgba(67,200,1,.35)}
.wpforms-container .wpforms-submit:hover{background:var(--tg-btn-hover)!important}
.wpforms-confirmation-container-full{border-color:var(--tg-btn)!important;background:#f2fbea!important}
.wpforms-container .wpforms-field-medium{max-width:100%!important}

/* ================= TABELLA COMPARATIVA ================= */
.woosc_table td,.woosc_table th{vertical-align:top}
.woosc_table .td-label{font-weight:600;color:#333;white-space:nowrap}
.woosc_table .tg-na{color:#bbb}
.tg-cmp-score{font-size:18px;font-weight:700;color:#e33333}
.tg-cmp-features{margin:0;padding-left:16px;font-size:12px;line-height:1.45;color:#444}
.tg-cmp-features li{margin-bottom:6px}
.woosc_table .price{font-weight:700;font-size:16px;color:#111}
.woosc_table .price del{font-weight:400;font-size:13px;color:#999}
.woosc_table .price ins{text-decoration:none}

/* ================= MODALITÀ SENZA PREZZI ================= */
.tg-offers--list{display:flex;flex-direction:column;gap:12px}
.tg-offers--list .tg-offer{display:grid;grid-template-columns:90px 1fr auto;grid-template-areas:"img title btn" "img store btn";align-items:center;gap:4px 18px;padding:12px;border:1px solid var(--tg-border);background:#fff}
.tg-offers--list .tg-offer__img{grid-area:img}
.tg-offers--list .tg-offer__title{grid-area:title;font-weight:500;font-size:14px;line-height:1.35}
.tg-offers--list .tg-offer__store{grid-area:store;font-size:12px;color:#777}
.tg-offers--list .tg-offer__btn{grid-area:btn}
.tg-offers--grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:16px;margin:10px 0 20px}
.tg-offers--grid .tg-offer{display:flex;flex-direction:column;gap:8px;padding:14px;border:1px solid var(--tg-border);background:#fff;text-align:center}
.tg-offer__img img{width:100%;max-height:170px;height:auto;object-fit:contain;margin:0 auto}
.tg-offers--list .tg-offer__img img{max-height:80px}
.tg-offers--grid .tg-offer__title{font-size:13px;line-height:1.35}
.tg-offers--grid .tg-offer__store{font-size:12px;color:#777}
.tg-offer__btn{display:inline-block;padding:9px 18px;border-radius:22px;background:var(--tg-btn);color:#fff!important;font-weight:700;font-size:12px;text-transform:uppercase;text-decoration:none;white-space:nowrap}
.tg-offer__btn:hover{background:var(--tg-btn-hover)}
@media (max-width:600px){.tg-offers--list .tg-offer{grid-template-columns:70px 1fr;grid-template-areas:"img title" "img store" "btn btn"}.tg-offers--list .tg-offer__btn{text-align:center}}
.tg-deal__badge--score{background:#111!important}
.tg-fgrid__price:empty,.tg-box__price:empty{display:none}
/* card AIWiseMind negli articoli: il prezzo salvato non si aggiorna */
.aiwm-product-card .dpe-price-row{display:none!important}
