/* Lojinha da Comunidade da Nutrição */

/* Carrinho no cabeçalho */
.cdnl-carrinho{order:3;display:inline-flex;align-items:center;gap:8px;height:42px;padding:0 6px 0 14px;border:1.5px solid var(--cdn-linha);border-radius:6px;
  font-weight:650;font-size:.95rem;color:var(--cdn-tinta);text-decoration:none;white-space:nowrap}
.cdnl-carrinho:hover{border-color:var(--cdn-tinta);color:var(--cdn-tinta)}
.cdnl-carrinho-n{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:28px;padding:0 6px;border-radius:4px;background:var(--cdn-petroleo);color:#fff;font-size:.85rem;font-variant-numeric:tabular-nums}
.cdn-topo-grid .cdn-navegacao{order:2}

/* Hero */
.cdnl-hero{background:var(--cdn-nevoa);padding:72px 0 64px}
.cdnl-hero-grid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:64px;align-items:end}
.cdnl-hero-titulo{font-size:clamp(2.6rem,7vw,5.6rem);font-weight:800;font-stretch:72%;line-height:.92;letter-spacing:-.02em;max-width:11ch}
.cdnl-hero-texto{margin-top:24px;max-width:48ch;font-family:var(--cdn-serif);font-size:1.2rem;line-height:1.55;color:var(--cdn-suave)}
.cdnl-acoes{display:flex;flex-wrap:wrap;gap:12px;margin-top:28px}

.cdnl-rotulo{background:#fff;border:2px solid var(--cdn-tinta);padding:14px 16px 12px}
.cdnl-rotulo-titulo,.cdnl-entrega-titulo{font-size:2.05rem;font-weight:800;font-stretch:68%;line-height:1;padding-bottom:6px;border-bottom:1px solid var(--cdn-tinta)}
.cdnl-rotulo-porcao{font-size:.95rem;font-weight:600;padding:6px 0 8px;border-bottom:10px solid var(--cdn-tinta)}
.cdnl-rotulo dl,.cdnl-entrega dl{margin:0}
.cdnl-rotulo dl div,.cdnl-entrega dl div{display:flex;justify-content:space-between;gap:16px;padding:7px 0;border-bottom:1px solid var(--cdn-tinta)}
.cdnl-rotulo dt,.cdnl-entrega dt{font-weight:500}
.cdnl-rotulo dd,.cdnl-entrega dd{margin:0;font-weight:800;font-variant-numeric:tabular-nums;text-align:right}
.cdnl-rotulo dl .cdnl-rotulo-fim,.cdnl-entrega dl .cdnl-entrega-fim{border-top:5px solid var(--cdn-tinta);border-bottom:none;margin-top:-1px}
.cdnl-rotulo-nota{margin-top:6px;padding-top:6px;border-top:1px solid var(--cdn-tinta);font-size:.8rem;color:var(--cdn-suave)}

/* Seções */
.cdnl-secao{padding:72px 0}
.cdnl-secao--nevoa{background:var(--cdn-nevoa)}
.cdnl-secao-topo{display:flex;align-items:baseline;justify-content:space-between;gap:16px;flex-wrap:wrap}
.cdnl-secao-topo .cdn-secao-titulo{margin-bottom:0}
.cdnl-secao-desc{margin:10px 0 0;max-width:56ch;font-family:var(--cdn-serif);font-size:1.08rem;color:var(--cdn-suave)}
.cdnl-secao-topo + .cdnl-grade,.cdnl-secao-desc + .cdnl-grade{margin-top:36px}
.cdnl-link{font-weight:650;color:var(--cdn-folha);text-decoration:none;border-bottom:2px solid currentColor;padding-bottom:1px}
.cdnl-link:hover{color:var(--cdn-petroleo)}

/* Capas dos PDFs (retrato, como uma página A4) */
.cdnl-capa{position:relative;display:block;overflow:hidden;border-radius:4px;background:#fff;aspect-ratio:3/4;box-shadow:0 1px 0 var(--cdn-linha),0 10px 24px -14px rgba(19,35,32,.35)}
.cdnl-capa img{width:100%;height:100%;object-fit:cover}
.cdnl-selo{position:absolute;left:10px;top:10px;padding:5px 10px;border-radius:4px;background:var(--cdn-folha);color:#fff;font-size:.82rem;font-weight:700;line-height:1.3}

/* Destaque */
.cdnl-destaque{display:grid;grid-template-columns:minmax(0,380px) minmax(0,1fr);gap:56px;align-items:center}
.cdnl-destaque h3{margin-top:10px;font-size:clamp(1.9rem,3.6vw,2.9rem);font-weight:800;font-stretch:78%;line-height:1.04;letter-spacing:-.015em}
.cdnl-destaque h3 a{color:var(--cdn-tinta);text-decoration:none}
.cdnl-destaque h3 a:hover{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:5px}
.cdnl-autoria{margin:10px 0 0;font-size:.95rem;color:var(--cdn-suave)}
.cdnl-resumo{margin-top:16px;max-width:52ch;font-family:var(--cdn-serif);font-size:1.12rem;line-height:1.6;color:var(--cdn-tinta)}
.cdnl-resumo p{margin:0}.cdnl-resumo p + p{margin-top:.8em}
.cdnl-preco{margin:12px 0 0;font-weight:750;font-size:1.15rem;color:var(--cdn-petroleo)}
.cdnl-preco--grande{margin-top:22px;font-size:2rem;font-weight:800;font-stretch:84%}
.cdnl-preco del{color:var(--cdn-suave);font-weight:500;font-size:.7em;margin-right:6px}
.cdnl-preco ins{text-decoration:none}

/* Categorias */
.cdnl-categorias{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}
.cdnl-categorias a{display:grid;grid-template-columns:64px minmax(0,1fr);grid-template-rows:auto auto;column-gap:14px;align-items:center;
  padding:14px;background:#fff;border:1.5px solid var(--cdn-linha);border-radius:6px;color:var(--cdn-tinta);text-decoration:none;height:100%}
.cdnl-categorias a:hover{border-color:var(--cdn-tinta)}
.cdnl-cat-img{grid-row:1 / span 2;width:64px;height:64px;border-radius:4px;overflow:hidden;background:repeating-linear-gradient(0deg,transparent 0 10px,rgba(13,59,55,.1) 10px 11px),var(--cdn-nevoa)}
.cdnl-cat-img img{width:100%;height:100%;object-fit:cover}
.cdnl-cat-nome{font-weight:700;font-stretch:88%;font-size:1.08rem;line-height:1.2;align-self:end}
.cdnl-cat-n{font-size:.88rem;color:var(--cdn-suave);align-self:start}

/* Grade de PDFs */
.cdnl-grade{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:48px 36px}
.cdnl-card{display:flex;flex-direction:column;min-width:0}
.cdnl-card .cdnl-capa{margin-bottom:16px}
.cdnl-card-titulo{font-size:1.25rem;font-weight:700;font-stretch:88%;line-height:1.2}
.cdnl-card-titulo a{color:var(--cdn-tinta);text-decoration:none}
.cdnl-card-titulo a:hover{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px}
.cdnl-ficha{margin:6px 0 0;font-size:.9rem;color:var(--cdn-suave)}


/* Loja do WooCommerce: capas em retrato e ficha */
.woocommerce ul.products li.product a img{aspect-ratio:3/4;object-fit:cover;background:#fff;box-shadow:0 1px 0 var(--cdn-linha),0 10px 24px -14px rgba(19,35,32,.35)}
.woocommerce ul.products li.product .cdnl-ficha{margin:6px 0 0}
.woocommerce span.onsale{left:10px;right:auto;top:10px;border-radius:4px}
.woocommerce div.product div.images{max-width:460px}
.woocommerce div.product div.images img{box-shadow:0 1px 0 var(--cdn-linha),0 16px 36px -18px rgba(19,35,32,.4)}

/* Página do produto: ficha do PDF e conteúdo */
.woocommerce div.product .cdnl-autoria{margin:-6px 0 14px}
.cdnl-entrega{margin:28px 0 0;max-width:380px;background:#fff;border:2px solid var(--cdn-tinta);padding:14px 16px 10px}
.cdnl-entrega-titulo{font-size:1.7rem}
.cdnl-entrega dl{border-top:8px solid var(--cdn-tinta);margin-top:8px}
.cdnl-dentro{margin-top:28px}
.cdnl-dentro h2{font-size:1.25rem;font-weight:750;font-stretch:86%;margin:0 0 10px}
.cdnl-dentro ul{margin:0;padding-left:1.2em;font-family:var(--cdn-serif);font-size:1.06rem;line-height:1.6}
.cdnl-dentro li + li{margin-top:.35em}
.cdnl-dentro li::marker{color:var(--cdn-folha)}

/* Minha conta → Downloads e pedido recebido */
.woocommerce-table--order-downloads .download-file a,.woocommerce-MyAccount-downloads .download-file a{display:inline-flex;align-items:center;min-height:40px;padding:0 16px;border-radius:6px;background:var(--cdn-petroleo);color:#fff;font-weight:650;text-decoration:none}
.woocommerce-table--order-downloads .download-file a:hover,.woocommerce-MyAccount-downloads .download-file a:hover{background:var(--cdn-folha);color:#fff}
.woocommerce-order-received .woocommerce-thankyou-order-received{font-family:var(--cdn-sans);font-size:1.6rem;font-weight:800;font-stretch:78%;line-height:1.1;margin-bottom:20px}

@media (max-width:960px){
  .cdnl-carrinho{order:0;margin-left:auto}
  .cdnl-hero-grid{grid-template-columns:1fr;gap:44px}
  .cdnl-rotulo{max-width:380px}
  .cdnl-destaque{grid-template-columns:minmax(0,260px) minmax(0,1fr);gap:32px}
  .cdnl-categorias{grid-template-columns:repeat(2,minmax(0,1fr))}
  .cdnl-grade{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:640px){
  .cdnl-carrinho{height:44px;padding:0 6px}
  .cdnl-carrinho-rotulo{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .cdnl-carrinho::before{content:"";width:20px;height:20px;margin:0 2px 0 4px;background:currentColor;
    -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z'/%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E") center/contain no-repeat;
    mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z'/%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E") center/contain no-repeat}
  .cdnl-hero{padding:44px 0 40px}
  .cdnl-hero-titulo{font-size:clamp(2.4rem,13vw,3.8rem)}
  .cdnl-hero-texto{font-size:1.08rem}
  .cdnl-acoes .cdn-btn{flex:1 1 100%}
  .cdnl-rotulo{max-width:none}
  .cdnl-secao{padding:48px 0}
  .cdnl-destaque{grid-template-columns:1fr;gap:24px}
  .cdnl-destaque .cdnl-capa{max-width:240px}
  .cdnl-categorias{grid-template-columns:1fr;gap:10px}
  .cdnl-grade{grid-template-columns:repeat(2,minmax(0,1fr));gap:32px 16px}
  .cdnl-card-titulo{font-size:1.05rem}
  .cdnl-preco{font-size:1.02rem}
  .cdnl-preco--grande{font-size:1.7rem}
  .cdnl-selo{left:6px;top:6px;padding:4px 7px;font-size:.72rem}
  .cdnl-secao-topo .cdnl-link{display:none}
  .cdnl-entrega{max-width:none}
}

/* ===================================================================
   Categoria e Loja: vitrine que vende
   =================================================================== */
.cdn-loja{padding-top:28px}
.post-type-archive-product .cdn-loja,.tax-product_cat .cdn-loja,.tax-product_tag .cdn-loja{padding-top:0}
.post-type-archive-product .cdn-trilha,.tax-product_cat .cdn-trilha,.tax-product_tag .cdn-trilha{padding-top:20px!important}
.post-type-archive-product .woocommerce-products-header,.tax-product_cat .woocommerce-products-header,.tax-product_tag .woocommerce-products-header{
  margin:0 calc(50% - 50vw) 0;padding:44px max(24px, calc(50vw - 566px)) 8px;background:var(--cdn-nevoa)}
.cdn-loja .cdn-trilha{margin-bottom:0}
.post-type-archive-product .cdn-trilha,.tax-product_cat .cdn-trilha{margin:0 calc(50% - 50vw);padding:0 max(24px, calc(50vw - 566px)) 0;background:var(--cdn-nevoa);padding-top:4px}
.cdn-loja .woocommerce-products-header__title{font-size:clamp(2.4rem,6vw,4.6rem);margin:0}
.cdn-loja .term-description{margin:14px 0 0;max-width:60ch}
.cdn-loja .term-description p{margin:0}

/* Topo com o rótulo e os argumentos de compra */
.cdnl-arquivo-topo{display:grid;grid-template-columns:340px minmax(0,1fr);gap:48px;align-items:center;
  margin:0 calc(50% - 50vw) 36px;padding:28px max(24px, calc(50vw - 566px)) 48px;background:var(--cdn-nevoa)}
.cdnl-rotulo--arquivo{max-width:340px}
.cdnl-rotulo--arquivo .cdnl-rotulo-titulo{font-size:1.85rem}
.cdnl-rotulo--arquivo dd .amount{font-weight:800}
.cdnl-garantias{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px}
.cdnl-garantias li{padding-top:14px;border-top:6px solid var(--cdn-tinta);font-family:var(--cdn-serif);font-size:1.02rem;line-height:1.55;color:var(--cdn-suave)}
.cdnl-garantias strong{display:block;margin-bottom:4px;font-family:var(--cdn-sans);font-size:1.12rem;font-weight:750;font-stretch:88%;color:var(--cdn-tinta)}

/* Barra de resultados e ordenação */
.cdnl-barra-loja{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 20px;margin-bottom:28px;padding-bottom:16px;border-bottom:1px solid var(--cdn-linha)}
.cdnl-barra-loja .woocommerce-notices-wrapper{flex:1 1 100%}
.cdnl-barra-loja .woocommerce-notices-wrapper:empty{display:none}
.cdnl-barra-loja .woocommerce-result-count{margin:0;float:none;font-weight:600;color:var(--cdn-tinta)}
.cdnl-barra-loja .woocommerce-ordering{margin:0;float:none}

/* Cards de produto */
.woocommerce ul.products{grid-template-columns:repeat(4,minmax(0,1fr));gap:28px 22px}
.woocommerce ul.products li.product{position:relative;padding:14px 14px 16px;background:#fff;border:1.5px solid var(--cdn-linha);border-radius:8px;transition:border-color .15s,box-shadow .15s,transform .15s}
.woocommerce ul.products li.product:hover{border-color:var(--cdn-tinta);box-shadow:0 16px 32px -20px rgba(19,35,32,.45);transform:translateY(-2px)}
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link{position:relative;display:flex;flex-direction:column;flex:1 1 auto;color:var(--cdn-tinta)}
.woocommerce ul.products li.product a img{margin:0 0 14px;width:100%}
.woocommerce ul.products li.product .woocommerce-loop-product__title{font-size:1.08rem;line-height:1.25;font-stretch:90%}
.woocommerce ul.products li.product a:hover .woocommerce-loop-product__title{text-decoration:none}
.woocommerce ul.products li.product .cdnl-ficha{font-size:.85rem}
.woocommerce ul.products li.product .price{margin:12px 0 0;font-size:1.45rem;font-weight:800;font-stretch:84%;line-height:1.1;color:var(--cdn-petroleo)}
.woocommerce ul.products li.product .price del{display:block;margin-bottom:2px;font-size:.62em;font-weight:500;color:var(--cdn-suave)}
.cdnl-entrega-curta{margin:4px 0 14px;font-size:.82rem;font-weight:600;color:var(--cdn-folha)}
.woocommerce ul.products li.product .button{align-self:stretch;width:100%;margin-top:auto;min-height:46px}
.woocommerce ul.products li.product .added_to_cart{text-align:center}

/* Selos */
.cdnl-selos{position:absolute;left:8px;top:8px;z-index:2;display:flex;flex-direction:column;align-items:flex-start;gap:6px;pointer-events:none}
.cdnl-selos .cdnl-selo{position:static;padding:4px 9px;border-radius:4px;font-size:.78rem;font-weight:750;line-height:1.3;box-shadow:0 2px 6px rgba(19,35,32,.18)}
.cdnl-selo--economia{background:var(--cdn-folha);color:#fff}
.cdnl-selo--vendido{background:#F2C14E;color:var(--cdn-tinta)}
.cdnl-selo--novo{background:#fff;color:var(--cdn-petroleo);border:1.5px solid var(--cdn-petroleo)}

@media (max-width:1100px){
  .woocommerce ul.products{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:960px){
  .cdnl-arquivo-topo{grid-template-columns:1fr;gap:28px}
  .cdnl-garantias{grid-template-columns:1fr;gap:16px}
}
@media (max-width:640px){
  .post-type-archive-product .woocommerce-products-header,.tax-product_cat .woocommerce-products-header{padding:28px 16px 4px}
  .post-type-archive-product .cdn-trilha,.tax-product_cat .cdn-trilha{padding-left:16px;padding-right:16px}
  .cdnl-arquivo-topo{padding:20px 16px 32px;margin-bottom:24px}
  .cdnl-rotulo--arquivo{max-width:none}
  .cdnl-garantias{gap:8px}
  .cdnl-garantias li{display:flex;align-items:center;gap:10px;padding:0;border:0}
  .cdnl-garantias li::before{content:"";flex:0 0 22px;height:22px;border-radius:50%;background:var(--cdn-folha) center/12px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")}
  .cdnl-garantias strong{margin:0;font-size:1rem}
  .cdnl-garantias span{display:none}
  .cdnl-rotulo--arquivo .cdnl-rotulo-titulo{font-size:1.6rem}
  .cdnl-arquivo-topo{gap:20px}
  .woocommerce ul.products{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .woocommerce ul.products li.product{padding:10px 10px 12px}
  .woocommerce ul.products li.product .woocommerce-loop-product__title{font-size:.95rem}
  .woocommerce ul.products li.product .price{font-size:1.2rem}
  .cdnl-entrega-curta{font-size:.74rem}
  .woocommerce ul.products li.product .button{min-height:42px;padding:0 8px;font-size:.92rem}
  .cdnl-selos .cdnl-selo{font-size:.68rem;padding:3px 6px}
  .cdnl-barra-loja{flex-direction:column;align-items:stretch}
  .cdnl-barra-loja .woocommerce-ordering select{width:100%}
}
@media (prefers-reduced-motion:reduce){
  .woocommerce ul.products li.product:hover{transform:none}
}
