/* mude 04/12/2026 - melhorias de conversao no celular (loja TrapeZape).
   Arquivo SEPARADO e carregado por ultimo no header.twig: para desfazer tudo, basta tirar o <link>.
   1. contraste do laranja (WCAG AA 4.5:1)   2. carrinho em cartao (<=600px)
   3. barra Comprar fixa no produto (<=767px) 4. banner de cookies compacto (<=599px) */

/* ===== 1. Contraste do laranja =====
   Branco sobre #F39C44 = 2,18:1 e #E0851F sobre branco = 2,78:1. #AD5607 da 5,11:1 com branco
   (4,68:1 sobre o creme #FBF4EA). Hover #8F4705 = 6,8:1. A identidade laranja fica; o fundo da faixa do
   topo (texto escuro) e o logo nao sao tocados. */
:root{
    --tz-peach-dark:#AD5607;
    --tz-laranja-aa:#AD5607;
    --tz-laranja-aa-hover:#8F4705;
}
/* fundos laranja com texto branco */
body .btn-primary, body #content .btn-primary,
body .btn-success, body #button-cart, body #button-cart.btn-success,
body .tz-vermais, body a.tza-chamada,
body .product-badge:not(.product-badge-esgotado), body .tz-badge:not(.tz-badge-esgotado), body a.tz-pill, body .pagination li.active span, body .nav-tabs .nav-link.active,
body a[style*="background:#F39C44" i], body a[style*="background: #F39C44" i], body a[style*="background: rgb(243, 156, 68)" i],
body .tz-gen-btn[style*="background: rgb(243, 156, 68)" i], body .tz-gen-btn[style*="background:#F39C44" i],
body .tz-gen-btn[style*="background-color: rgb(243, 156, 68)" i]{
    background-color:var(--tz-laranja-aa) !important;
    border-color:var(--tz-laranja-aa) !important;
    color:#fff !important;
}
body .btn-primary:hover, body .btn-primary:focus, body .btn-primary:active, body #content .btn-primary:hover,
body .btn-success:hover, body #button-cart:hover, body .tz-vermais:hover, body .tz-vermais:focus, body a.tza-chamada:hover{
    background-color:var(--tz-laranja-aa-hover) !important;
    border-color:var(--tz-laranja-aa-hover) !important;
    color:#fff !important;
    opacity:1;
}
/* categoria: chip ativo fica um tom abaixo dos demais (antes era o inverso) */
body a.tz-pill.is-active{ background-color:var(--tz-laranja-aa-hover) !important; border-color:var(--tz-laranja-aa-hover) !important; }
/* texto laranja sobre fundo claro (precos, links de destaque) */
body .product-carousel .item .product-thumb .caption .price,
body .product-thumb .caption .price, body .product-thumb .caption .price-new, body .price-new,
body .tz-card .tz-price-new, body .tz-price-new, body .live-search-item .product-price,
body .tza-preco, body .tz-col-cta, body .dropdown-item-parent,
body .tz-conta-acao, body .tz-inst-corpo a, body .tz-inst-cartao a,
body .tz-card-price, body .tz-filtro-toggle, body .tz-cat-head h1, body .tz-category .tz-cat-head h1,
body .tz-cart-dot, body .offcanvas-title.tz-hand,
body #offcanvasMenu .offcanvas-title, body .tz-offcanvas .offcanvas-title{
    color:var(--tz-laranja-aa) !important;
}

/* ===== 2. Carrinho em cartao no celular ===== */
.tz-qty-step{ display:none; }
@media (max-width:600px){
    body #checkout-cart .table-responsive{ overflow:visible; border:0; margin:0; }
    body #checkout-cart .tz-cart-table{ display:block; width:100%; border:0 !important; background:transparent; margin:0; }
    body #checkout-cart .tz-cart-table thead{ display:none; }
    body #checkout-cart .tz-cart-table tbody{ display:block; }
    body #checkout-cart .tz-cart-table tbody tr{
        display:grid;
        grid-template-columns:76px minmax(0,1fr) auto;
        grid-template-areas:
            "img name  name"
            "img price total"
            "img qty   qty";
        column-gap:12px; row-gap:6px; align-items:center;
        padding:12px; margin:0 0 12px;
        background:#fff; border:1px solid var(--tz-line,#F0E4D6); border-radius:14px;
        box-shadow:0 1px 3px rgba(46,42,38,.05);
    }
    body #checkout-cart .tz-cart-table tbody tr > td{
        display:block; border:0 !important; padding:0 !important; background:transparent !important; min-width:0;
    }
    body #checkout-cart .tz-cart-table td.tz-c-img{ grid-area:img; align-self:start; text-align:left !important; }
    body #checkout-cart .tz-cart-table td.tz-c-img img{ width:76px; height:76px; object-fit:cover; border-radius:10px; padding:0; border:1px solid var(--tz-line,#F0E4D6); }
    body #checkout-cart .tz-cart-table td.tz-c-name{ grid-area:name; text-align:left !important; font-size:14px; line-height:1.35; font-weight:600; overflow-wrap:anywhere; }
    body #checkout-cart .tz-cart-table td.tz-c-name a{ color:var(--tz-ink,#2E2A26); text-decoration:none; }
    body #checkout-cart .tz-cart-table td.tz-c-name small{ display:inline; font-weight:400; color:#6B6158; font-size:12.5px; }
    /* a coluna "Modelo" repetia o nome do produto */
    body #checkout-cart .tz-cart-table td.tz-c-model{ display:none !important; }
    body #checkout-cart .tz-cart-table td.tz-c-price{
        grid-area:price; text-align:left !important; font-size:12.5px; line-height:1.3; color:#6B6158;
    }
    body #checkout-cart .tz-cart-table td.tz-c-price::before{ content:attr(data-label) ": "; }
    body #checkout-cart .tz-cart-table td.tz-c-total{
        grid-area:total; align-self:center; text-align:right !important; font-size:16px; font-weight:700; color:var(--tz-laranja-aa,#AD5607); white-space:nowrap;
    }
    body #checkout-cart .tz-cart-table td.tz-c-qty{ grid-area:qty; text-align:left !important; }
    /* stepper: [-] [n] [+]   [lixeira] */
    body #checkout-cart .tz-cart-table td.tz-c-qty .input-group{
        display:flex !important; flex-wrap:nowrap; align-items:center; gap:6px; width:100%; max-width:none !important;
    }
    body #checkout-cart .tz-cart-table .tz-qty-step{
        display:inline-flex; align-items:center; justify-content:center; flex:none;
        width:44px; height:44px; padding:0; border-radius:50%;
        background:#fff; border:1px solid var(--tz-line,#F0E4D6); color:var(--tz-ink,#2E2A26); font-size:13px; cursor:pointer;
    }
    body #checkout-cart .tz-cart-table .tz-qty-step:active{ background:var(--tz-cream-2,#FBF4EA); }
    body #checkout-cart .tz-cart-table td.tz-c-qty input.form-control{
        flex:none; width:48px !important; min-width:0; height:44px !important; padding:0 !important; text-align:center; font-size:16px; border-radius:10px;
    }
    body #checkout-cart .tz-cart-table td.tz-c-qty .input-group-btn{ display:flex; width:auto; margin-left:auto; }
    body #checkout-cart .tz-cart-table .tz-qty-update{ display:none !important; }  /* o + e - ja atualizam sozinhos */
    body #checkout-cart .tz-cart-table td.tz-c-qty .btn-danger{
        width:44px !important; height:44px !important; min-width:44px; padding:0 !important; border-radius:50% !important;
        display:inline-flex; align-items:center; justify-content:center;
        background:#fff !important; border:1px solid var(--tz-line,#F0E4D6) !important; color:#9A9082 !important;
    }
    body #checkout-cart .tz-cart-table tr.tz-atualizando{ opacity:.55; pointer-events:none; }
    /* totais e botao Finalizar sem estourar a largura */
    body #checkout-cart .col-sm-4.offset-sm-8{ width:100%; margin-left:0; }
    body #checkout-cart .d-flex.justify-content-between a.btn-primary{ width:100%; text-align:center; min-height:48px; display:inline-flex; align-items:center; justify-content:center; }
}

/* ===== 3. Barra Comprar fixa (produto, so celular) ===== */
.tz-buybar{ display:none; }
@media (max-width:767px){
    .tz-buybar{
        position:fixed; left:0; right:0; bottom:0; z-index:9980;
        display:flex; align-items:center; gap:12px;
        padding:10px 14px calc(10px + env(safe-area-inset-bottom));
        background:#fff; border-top:1px solid var(--tz-line,#F0E4D6); box-shadow:0 -6px 20px rgba(46,42,38,.10);
        transform:translateY(110%); visibility:hidden;
        transition:transform .2s ease, visibility 0s linear .2s;
    }
    .tz-buybar.is-on{ transform:none; visibility:visible; transition:transform .2s ease; }
    .tz-buybar-preco{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; line-height:1.25; }
    .tz-buybar-nome{ font-size:12px; color:#6B6158; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .tz-buybar-preco strong{ font-size:19px; font-weight:700; color:var(--tz-laranja-aa,#AD5607); }
    .tz-buybar-btn{
        flex:none; min-height:48px; padding:0 30px; border:0; border-radius:999px;
        background:var(--tz-laranja-aa,#AD5607); color:#fff; font-size:16px; font-weight:700; letter-spacing:.3px;
    }
    .tz-buybar-btn:active{ background:var(--tz-laranja-aa-hover,#8F4705); }
    .tz-buybar-btn[disabled]{ opacity:.6; }
    /* espaco para a barra nao cobrir o fim da pagina, e o WhatsApp flutuante sobe */
    body.tz-buybar-on{ padding-bottom:calc(76px + env(safe-area-inset-bottom)); }
    body.tz-buybar-on .tz-zap{ bottom:calc(84px + env(safe-area-inset-bottom)) !important; }
}
@media (prefers-reduced-motion:reduce){ .tz-buybar, .tz-buybar.is-on{ transition:none; } }

/* ===== 4. Banner de cookies compacto no celular =====
   O banner vem do script compartilhado mude.ag/rastreio (classes .mc-b / .mc-a). Aqui so a aparencia
   NESTA loja, sem mexer no arquivo central. Texto e botoes iguais; menos folga e fonte menor. */
@media (max-width:599px){
    body .mc-b{
        left:8px !important; right:8px !important; bottom:8px !important;
        padding:10px 12px !important; font-size:13px !important; line-height:1.35 !important; border-radius:12px !important;
        box-shadow:0 4px 18px rgba(0,0,0,.16) !important;
    }
    body .mc-b p{ margin:0 0 8px !important; }
    body .mc-b .mc-a{ gap:8px !important; }
    body .mc-b .mc-a button{ min-height:40px !important; padding:6px 12px !important; font-size:14px !important; border-radius:10px !important; }
}
