/*
Theme Name: Traços do Tempo
Description: Tema por blocos da Traços do Tempo, com loja WooCommerce no estilo da página inicial.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 7.4
Author: Traços do Tempo
Text Domain: tracos
License: GPLv2 or later
*/

/* Cartões de produto e de categoria */
.tdt-card{background:#fff;border:1px solid var(--wp--preset--color--linha);border-radius:18px;overflow:hidden;transition:transform .15s ease,box-shadow .15s ease;height:100%;display:flex;flex-direction:column}
.tdt-card:hover{transform:translateY(-3px);box-shadow:0 10px 24px rgba(33,29,26,.10)}
.wc-block-product-template .tdt-card .wc-block-components-product-image{margin:0!important}
.wc-block-product-template .tdt-card img{aspect-ratio:1/1;object-fit:cover;width:100%;border-radius:0!important}
.tdt-card .tdt-card-body{padding:16px 18px 18px;display:flex;flex-direction:column;gap:4px;flex-grow:1}
.tdt-card .taxonomy-product_cat,.tdt-eyebrow{font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--wp--preset--color--terracota)}
.tdt-card .taxonomy-product_cat a{color:inherit;text-decoration:none;pointer-events:none}
.tdt-card .wp-block-post-title{margin:0;font-family:var(--wp--preset--font-family--bricolage);font-weight:700;font-size:19px;line-height:1.2;letter-spacing:-.01em;text-align:left}
.tdt-card .wp-block-post-title a{color:var(--wp--preset--color--tinta);text-decoration:none}
.tdt-card .wp-block-post-title a::after{content:"";position:absolute;inset:0}
.tdt-card{position:relative}
.tdt-card .tdt-card-foot{margin-top:auto;padding-top:12px;display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.tdt-card .wc-block-components-product-price{font-weight:800;font-size:17px;color:var(--wp--preset--color--tinta);text-align:left!important}
.tdt-card .tdt-cta{font-weight:700;font-size:14px;white-space:nowrap}
.tdt-card:hover .tdt-cta{color:var(--wp--preset--color--terracota)}
.tdt-card .wc-block-components-product-sale-badge{border-radius:999px;background:var(--wp--preset--color--tinta);color:#fff;border:0;font-size:12px;padding:5px 10px;top:12px;left:12px;right:auto}

/* Barra de filtros */
.tdt-toolbar{border-top:1px solid var(--wp--preset--color--linha);border-bottom:1px solid var(--wp--preset--color--linha);padding:14px 0}
.tdt-chips{display:flex;flex-wrap:wrap;gap:8px}
.tdt-chip{display:inline-flex;align-items:center;min-height:44px;box-sizing:border-box;padding:0 16px;border-radius:999px;border:1px solid #D8CFC5;background:#fff;color:var(--wp--preset--color--tinta);font-weight:600;font-size:14px;text-decoration:none;white-space:nowrap}
.tdt-chip:hover{border-color:var(--wp--preset--color--tinta);color:var(--wp--preset--color--tinta)}
.tdt-chip.is-active{background:var(--wp--preset--color--tinta);border-color:var(--wp--preset--color--tinta);color:#fff}
.tdt-chip small{opacity:.6;margin-left:6px;font-size:12px}
.tdt-toolbar-right{display:flex;align-items:center;gap:12px;font-size:14px}
.tdt-toolbar-right .woocommerce-result-count{margin:0;color:var(--wp--preset--color--suave)}
.tdt-toolbar-right .woocommerce-ordering{margin:0}
.tdt-toolbar-right select{font:inherit;font-weight:600;padding:10px 14px;border-radius:999px;border:1px solid #D8CFC5;background:#fff;color:var(--wp--preset--color--tinta)}

/* Grelha de categorias */
.tdt-cats{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:14px;margin:0;padding:0;list-style:none}
.tdt-cat{display:flex;flex-direction:column;background:#fff;border:1px solid var(--wp--preset--color--linha);border-radius:16px;overflow:hidden;text-decoration:none;color:var(--wp--preset--color--tinta);transition:transform .15s ease,box-shadow .15s ease}
.tdt-cat:hover{transform:translateY(-3px);box-shadow:0 10px 24px rgba(33,29,26,.10);color:var(--wp--preset--color--tinta)}
.tdt-cat img{width:100%;aspect-ratio:4/3;object-fit:cover;display:block}
.tdt-cat span{display:block;padding:12px 14px 0;font-weight:700;font-size:15px;line-height:1.25}
.tdt-cat small{display:block;padding:2px 14px 14px;font-size:13px;color:var(--wp--preset--color--suave)}

/* Topo de categoria */
.tdt-hero{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr));gap:40px;align-items:center}
.tdt-hero h1{margin:0;font-family:var(--wp--preset--font-family--bricolage);font-weight:800;font-size:clamp(38px,6vw,60px);line-height:1;letter-spacing:-.03em}
.tdt-hero .tdt-desc{margin:16px 0 0;font-size:18px;color:#4F4842;max-width:540px}
.tdt-hero .tdt-desc p{margin:0}
.tdt-pills{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}
.tdt-pill{background:#fff;border:1px solid var(--wp--preset--color--linha);border-radius:999px;padding:8px 14px;font-size:14px;font-weight:600}
.tdt-hero-imgs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.tdt-hero-imgs img{width:100%;aspect-ratio:4/5;object-fit:cover;border-radius:20px;display:block}
.tdt-hero-imgs img:nth-child(2){margin-top:36px}
.tdt-hero-imgs img:only-child{grid-column:1/-1;aspect-ratio:16/10}

/* Cabeçalho */
.tdt-header .wp-block-site-logo img{border-radius:50%}
.tdt-header .wp-block-navigation a{font-weight:600}
.tdt-header .wp-block-navigation .current-menu-item>a,.tdt-header .wp-block-navigation a[aria-current]{color:var(--wp--preset--color--terracota)}
.tdt-header .wc-block-mini-cart__button{border:1.5px solid var(--wp--preset--color--tinta);border-radius:999px;padding:8px 14px;font-weight:700}

/* Aviso da loja (portes grátis) */
.woocommerce-store-notice,p.demo_store{background:var(--wp--preset--color--tinta)!important;color:#F6F3EF!important;font-family:var(--wp--preset--font-family--manrope);font-size:14px;padding:10px 16px!important;box-sizing:border-box}
.woocommerce-store-notice a{color:#F6F3EF!important}

/* Página inicial (conteúdo feito para o tema antigo) */
.tdt-home{margin-top:0!important}

/* Telemóvel */
@media (max-width:640px){
 .tdt-card .tdt-card-body{padding:10px 12px 12px}
 .tdt-card .wp-block-post-title{font-size:15px}
 .tdt-card .taxonomy-product_cat,.tdt-card .tdt-cta{display:none}
 .tdt-card .wc-block-components-product-price{font-size:15px}
 .tdt-chips{flex-wrap:nowrap;overflow-x:auto;margin:0 -16px;padding:0 16px 4px}
 .tdt-cats{grid-template-columns:repeat(2,minmax(0,1fr))}

}

/* Página de produto */
.woocommerce-product-gallery .flex-viewport,.woocommerce-product-gallery__image img{border-radius:18px}
.woocommerce-product-gallery .flex-control-thumbs{gap:8px;margin-top:8px!important}
.woocommerce-product-gallery .flex-control-thumbs li{border-radius:10px;overflow:hidden}
.wp-block-woocommerce-related-products .wp-block-post-title{font-size:16px!important;font-weight:700}
.wp-block-woocommerce-related-products img{border-radius:14px}
.single-product .quantity input.qty{border:1px solid #D8CFC5;border-radius:999px;min-height:48px;text-align:center}
