/* =========================================================
   Eco Pulse — loja de peças (estilo marketplace; complementa style.css)
   ========================================================= */
body.shop { background: #ECEEF1; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Cabeçalho ---------- */
.shop-head { position: sticky; top: 0; z-index: 50; background: var(--navy); color: #fff; box-shadow: 0 1px 0 rgba(0, 0, 0, .1); }
.shop-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1.6rem; padding-block: .8rem .55rem; }
.shop-logo { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.shop-logo img { width: 142px; height: auto; }
.shop-tag { padding: .15rem .55rem; border-radius: 6px; background: var(--green-bright); color: var(--navy-ink); font-weight: 700; font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; }
.shop-search { display: flex; max-width: 640px; width: 100%; background: #fff; border-radius: 6px; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); overflow: hidden; }
.shop-search input { flex: 1; min-width: 0; border: 0; padding: .78rem 1rem; font: 400 1rem var(--font-body); color: var(--text); background: transparent; }
.shop-search input:focus { outline: none; }
.shop-search:focus-within { box-shadow: 0 0 0 3px var(--green-bright); }
.shop-search button { flex: none; width: 52px; border: 0; border-left: 1px solid var(--line); background: #fff; cursor: pointer; display: grid; place-items: center; }
.shop-search button svg { width: 20px; height: 20px; fill: none; stroke: var(--text-2); stroke-width: 2; stroke-linecap: round; }
.shop-search button:hover svg { stroke: var(--green); }
.shop-wa { display: flex; align-items: center; gap: .55rem; color: #fff; text-decoration: none; font-size: .82rem; line-height: 1.25; }
.shop-wa svg { width: 26px; height: 26px; fill: var(--green-bright); flex: none; }
.shop-wa span { display: grid; color: var(--text-inv-2); }
.shop-wa b { color: #fff; font-weight: 600; }
.shop-wa:hover b { color: var(--green-bright); }

.shop-cats { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding-block: .2rem .55rem; font-size: .86rem; }
.shop-cats-list, .shop-links { display: flex; gap: 1.1rem; white-space: nowrap; }
.shop-cats-list { overflow-x: auto; scrollbar-width: none; }
.shop-cats-list::-webkit-scrollbar { display: none; }
.shop-cats a { color: rgba(255, 255, 255, .78); text-decoration: none; padding: .25rem 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.shop-cats a:hover { color: #fff; }
.shop-cats-list a.is-active { color: #fff; border-bottom-color: var(--green-bright); }
.shop-links a { color: var(--text-inv-2); }

/* ---------- Faixa "como funciona" ---------- */
.shop-how { background: var(--surface); border-bottom: 1px solid var(--line); }
.shop-how-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding-block: .9rem; flex-wrap: wrap; }
.shop-how-t { font-size: .95rem; color: var(--text-2); }
.shop-how-t b { color: var(--navy); font-weight: 600; }
.shop-how ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.4rem; font-size: .88rem; font-weight: 500; color: var(--navy); }
.shop-how li { display: flex; align-items: center; gap: .45rem; }
.shop-how li span { width: 1.45rem; height: 1.45rem; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green); font: 700 .75rem var(--font-display); }

/* ---------- Listagem ---------- */
.shop-main { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 1.6rem; padding-block: 1.6rem 4rem; align-items: start; }
.shop-filters { position: sticky; top: 130px; }
.filters-head { display: none; }
.f-group { padding-bottom: 1.3rem; }
.f-h { font-weight: 600; font-size: .95rem; color: var(--text); margin-bottom: .55rem; }
.f-cats { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.f-cats button {
  width: 100%; display: flex; justify-content: space-between; gap: .5rem; text-align: left; border: 0; background: none; cursor: pointer;
  padding: .32rem 0; font: 400 .9rem var(--font-body); color: var(--text-2); transition: color .2s;
}
.f-cats button span { color: #9AA8B8; font-size: .82rem; }
.f-cats button:hover:not(:disabled) { color: var(--green); }
.f-cats button[aria-pressed="true"] { color: var(--navy); font-weight: 600; }
.f-cats button:disabled { opacity: .45; cursor: default; }
.f-checks { display: grid; gap: .35rem; }
.f-checks label { display: flex; align-items: center; gap: .55rem; font-size: .9rem; color: var(--text-2); cursor: pointer; }
.f-checks input { width: 17px; height: 17px; accent-color: var(--green); margin: 0; }
.f-checks small { margin-left: auto; color: #9AA8B8; font-size: .82rem; }
.f-clear { border: 0; background: none; padding: 0; color: var(--green); font: 600 .88rem var(--font-body); cursor: pointer; }
.f-clear:hover { text-decoration: underline; }

.results-bar { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1rem; }
.results-bar h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.3rem, 2.4vw, 1.6rem); color: var(--text); letter-spacing: -0.01em; }
.res-count { font-size: .88rem; color: var(--text-2); margin-top: .15rem; }
.results-tools { display: flex; align-items: center; gap: .6rem; }
.sort { display: flex; align-items: center; gap: .5rem; font-size: .88rem; color: var(--text-2); }
.sort select { border: 0; background: transparent; font: 600 .9rem var(--font-body); color: var(--navy); cursor: pointer; padding: .3rem 0; }
.filters-open { display: none; align-items: center; gap: .4rem; padding: .5rem .85rem; border-radius: 8px; border: 1px solid var(--line); background: #fff; font: 600 .88rem var(--font-body); color: var(--navy); cursor: pointer; }
.filters-open svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.active-filters { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1rem; }
.active-filters[hidden] { display: none; }
.active-filters button { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .7rem; border-radius: 999px; border: 1px solid #C8D3DE; background: #fff; font: 500 .84rem var(--font-body); color: var(--navy); cursor: pointer; }
.active-filters button span { font-size: 1rem; line-height: 1; color: var(--text-2); }
.active-filters button:hover { border-color: var(--green); }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
.card {
  display: flex; flex-direction: column; background: #fff; border-radius: 8px; overflow: clip; text-decoration: none; color: var(--text);
  box-shadow: 0 1px 2px rgba(3, 30, 56, .12); transition: box-shadow .25s, transform .25s var(--ease);
}
.card:hover { box-shadow: 0 10px 24px rgba(3, 30, 56, .14); transform: translateY(-2px); }
.card-img { aspect-ratio: 1; display: grid; place-items: center; background: #F5F7F9; border-bottom: 1px solid #EEF1F4; }
.card-img img { width: 100%; height: 100%; object-fit: contain; }
.part-art { width: 66%; height: auto; transition: transform .4s var(--ease); }
.card:hover .part-art { transform: scale(1.05); }
.card-body { display: flex; flex-direction: column; gap: .2rem; padding: .9rem 1rem 1.1rem; flex: 1; }
.card-cat { font-size: .75rem; color: #8492A3; }
.card-t { font: 400 .95rem/1.35 var(--font-body); color: var(--text); letter-spacing: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.card-price { font-size: 1.12rem; font-weight: 500; color: var(--text); margin-top: .35rem; }
.card-ship { display: flex; align-items: center; gap: .3rem; font-size: .84rem; font-weight: 600; color: var(--green); }
.card-ship svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.card-para { margin-top: auto; padding-top: .45rem; font-size: .78rem; color: #8492A3; }

/* ilustrações */
.i-f { fill: #DCE5EE; stroke: var(--navy); stroke-width: 4; stroke-linejoin: round; }
.i-d, .i-d circle { fill: var(--navy); }
.i-a { fill: var(--green); }
.i-w { fill: #fff; }
.i-l { fill: none; stroke: var(--navy); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.i-rod { stroke: #6B7C93; stroke-width: 12; }
.i-t { fill: none; stroke: var(--navy); stroke-width: 2; opacity: .45; }
.i-w-l { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; opacity: .85; }
.i-a-l { fill: none; stroke: var(--green); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.i-tick { fill: none; stroke: var(--navy); stroke-width: 6; stroke-dasharray: 2 9; }
.i-belt { fill: none; stroke: var(--navy); stroke-width: 8; stroke-linejoin: round; }
.i-pipe-o { fill: none; stroke: var(--navy); stroke-width: 28; stroke-linejoin: round; }
.i-pipe-i { fill: none; stroke: #C9D6E2; stroke-width: 20; stroke-linejoin: round; }
.i-hose { fill: none; stroke: var(--green); stroke-width: 8; }

.empty { background: #fff; border-radius: 8px; padding: clamp(2rem, 5vw, 3rem); text-align: center; display: grid; justify-items: center; gap: .8rem; }
.empty[hidden] { display: none; }
.empty svg { width: 64px; height: 64px; fill: none; stroke: #9AA8B8; stroke-width: 3; stroke-linecap: round; }
.empty h2 { font-size: 1.25rem; color: var(--navy); }
.empty p { color: var(--text-2); max-width: 32rem; }

.filters-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(3, 30, 56, .5); }

/* ---------- Página da peça ---------- */
.prod { padding-block: 1.1rem 4rem; }
.prod-crumbs { display: flex; flex-wrap: wrap; gap: .45rem; font-size: .85rem; color: var(--text-2); margin-bottom: .9rem; }
.prod-crumbs a { color: var(--navy); text-decoration: none; }
.prod-crumbs a:hover { color: var(--green); text-decoration: underline; }
.prod-crumbs span[aria-hidden] { color: #9AA8B8; }
.prod-missing { background: #fff; border-radius: 8px; padding: 3rem 2rem; text-align: center; display: grid; justify-items: center; gap: 1rem; }
.prod-missing[hidden] { display: none; }
.prod-missing h1 { font-size: 1.6rem; color: var(--navy); }
.prod-missing p { color: var(--text-2); }

.prod-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) 340px; gap: 2rem; background: #fff; border-radius: 8px; padding: 1.6rem; box-shadow: 0 1px 2px rgba(3, 30, 56, .12); align-items: start; }
.prod-grid[hidden] { display: none; }
.prod-img { aspect-ratio: 1; display: grid; place-items: center; background: #F5F7F9; border-radius: 8px; }
.prod-img img { width: 100%; height: 100%; object-fit: contain; }
.part-art-lg { width: 70%; animation: art-in .7s var(--ease) backwards; }
@keyframes art-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
.prod-img-note { font-size: .78rem; color: #8492A3; margin-top: .6rem; text-align: center; }

.prod-cat { font-size: .82rem; color: var(--text-2); }
.prod-info h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.35rem, 2.4vw, 1.7rem); line-height: 1.2; color: var(--text); letter-spacing: -0.01em; margin-top: .3rem; }
.prod-sub { color: var(--text-2); margin-top: .6rem; }
.prod-price { margin: 1.3rem 0; }
.price-l { font-size: 1.7rem; font-weight: 400; color: var(--text); line-height: 1.2; }
.price-s { font-size: .86rem; color: var(--text-2); margin-top: .2rem; }
.prod-para { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: .88rem; color: var(--text-2); }
.prod-para a { padding: .25rem .65rem; border-radius: 999px; background: #EAF1F8; color: var(--navy); font-weight: 600; text-decoration: none; font-size: .82rem; }
.prod-para a:hover { background: var(--navy); color: #fff; }
.prod-inform { margin-top: 1.6rem; }
.prod-inform h2 { font-size: 1rem; font-family: var(--font-body); font-weight: 600; color: var(--text); }
.prod-inform .checks { margin-top: .8rem; padding-top: .9rem; }

.buy-box { position: sticky; top: 130px; border: 1px solid var(--line); border-radius: 10px; padding: 1.3rem; display: grid; gap: 1rem; }
.buy-ship { display: flex; align-items: center; gap: .35rem; font-size: .88rem; font-weight: 600; color: var(--green); }
.buy-ship svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.buy-box h2 { font-family: var(--font-body); font-weight: 600; font-size: 1.1rem; color: var(--text); letter-spacing: 0; margin-top: -.4rem; }
#orderForm { display: grid; gap: .9rem; }
#orderForm .field label { font-size: .86rem; margin-bottom: .4rem; color: var(--text); }
#orderForm .field label small { font-weight: 400; color: var(--text-2); }
#orderForm .field[hidden] { display: none; }
#orderForm input, #orderForm select, #orderForm textarea {
  width: 100%; padding: .7rem .85rem; border-radius: 8px; border: 1px solid #C8D3DE; background: #fff;
  font: 400 .95rem var(--font-body); color: var(--text); transition: border-color .2s, box-shadow .2s;
}
#orderForm select { appearance: none; padding-right: 2.4rem; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23063E70' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right .8rem center/15px no-repeat; }
#orderForm textarea { resize: vertical; }
#orderForm input:focus, #orderForm select:focus, #orderForm textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(32, 118, 65, .15); }
.qty { display: inline-grid; grid-template-columns: 40px 64px 40px; border: 1px solid #C8D3DE; border-radius: 8px; overflow: hidden; }
.qty button { border: 0; background: #F5F7F9; font-size: 1.2rem; color: var(--navy); cursor: pointer; }
.qty button:hover { background: var(--green-soft); color: var(--green); }
#orderForm .qty input { border: 0; border-radius: 0; text-align: center; font-weight: 600; padding: .6rem 0; box-shadow: none; }

.wa-preview { background: #EAE6DF; border-radius: 10px; padding: .8rem; }
.wa-preview-h { font-size: .75rem; color: #6B6457; margin-bottom: .5rem; }
.wa-bubble {
  position: relative; background: #D9FDD3; border-radius: 0 8px 8px 8px; padding: .6rem .75rem; font-size: .82rem; line-height: 1.45;
  color: #111B21; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); word-break: break-word; margin-left: 8px;
}
.wa-bubble::before { content: ""; position: absolute; left: -8px; top: 0; border-top: 8px solid #D9FDD3; border-left: 8px solid transparent; }
.buy-trust { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; font-size: .8rem; color: var(--text-2); }
.buy-trust li { padding-left: 1.1rem; position: relative; }
.buy-trust li::before { content: ""; position: absolute; left: 0; top: .5em; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

.prod-desc, .prod-steps, .prod-related { margin-top: 1.4rem; background: #fff; border-radius: 8px; padding: 1.6rem; box-shadow: 0 1px 2px rgba(3, 30, 56, .12); }
.prod-desc[hidden], .prod-steps[hidden], .prod-related[hidden] { display: none; }
.prod-desc h2, .prod-steps h2, .prod-related h2 { font-family: var(--font-body); font-weight: 600; font-size: 1.2rem; color: var(--text); letter-spacing: 0; margin-bottom: .8rem; }
.prod-desc p { color: var(--text-2); max-width: 52rem; }
.prod-steps ol { list-style: none; counter-reset: st; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.prod-steps li { counter-increment: st; position: relative; display: grid; gap: .2rem; padding: 1rem 1rem 1rem 3.4rem; border-radius: 10px; background: #F5F7F9; }
.prod-steps li::before { content: counter(st); position: absolute; left: 1rem; top: 1rem; width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font: 700 .85rem var(--font-display); }
.prod-steps b { color: var(--navy); font-weight: 600; }
.prod-steps span { font-size: .9rem; color: var(--text-2); }
.prod-related .grid-row { grid-template-columns: repeat(4, 1fr); }
.prod-related .card { box-shadow: none; border: 1px solid #E3E8EE; }
.prod-related .card:hover { box-shadow: 0 10px 24px rgba(3, 30, 56, .12); }

/* ---------- Rodapé ---------- */
.shop-foot { background: var(--navy-ink); color: var(--text-inv-2); font-size: .84rem; }
.shop-foot-in { display: grid; gap: .5rem; padding-block: 1.6rem; }
.shop-foot a { color: #fff; }

/* ---------- Responsivo ---------- */
@media (max-width: 1080px) {
  .prod-grid { grid-template-columns: 1fr 1fr; }
  .buy-box { grid-column: 1 / -1; position: static; grid-template-columns: 1fr 1fr; align-items: start; }
  .buy-ship, .buy-box h2, .buy-trust { grid-column: 1 / -1; }
  .prod-related .grid-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .shop-top { grid-template-columns: auto auto; gap: .7rem 1rem; }
  .shop-search { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .shop-wa { justify-self: end; }
  .shop-links { display: none; }
  .shop-main { grid-template-columns: 1fr; padding-top: 1rem; }
  .filters-open { display: inline-flex; }
  .shop-filters {
    position: fixed; z-index: 80; top: 0; bottom: 0; left: 0; width: min(86vw, 340px); overflow-y: auto;
    background: #fff; padding: 1.2rem 1.4rem 2rem; transform: translateX(-102%); transition: transform .35s var(--ease); box-shadow: 0 0 40px rgba(0, 0, 0, .2);
  }
  .shop-filters.is-open { transform: none; }
  .filters-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
  .filters-h { font: 600 1.1rem var(--font-display); color: var(--navy); }
  .filters-close { width: 40px; height: 40px; border: 0; border-radius: 8px; background: #F5F7F9; font-size: 1.5rem; color: var(--navy); cursor: pointer; }
  .shop-how ol { display: none; }
}
@media (max-width: 700px) {
  .shop-wa span { display: none; }
  .grid { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .card-body { padding: .7rem .75rem .9rem; }
  .card-t { font-size: .88rem; }
  .card-price { font-size: 1rem; }
  .results-bar { flex-wrap: wrap; }
  .sort span { display: none; }
  .prod-grid { grid-template-columns: 1fr; padding: 1rem; gap: 1.3rem; }
  .buy-box { grid-template-columns: 1fr; }
  .prod-steps ol { grid-template-columns: 1fr; }
  .prod-desc, .prod-steps, .prod-related { padding: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .part-art, .shop-filters { transition: none; }
  .card:hover { transform: none; }
  .card:hover .part-art { transform: none; }
  .part-art-lg { animation: none; }
}
