/* ==========================================================
   Página de projeto (modelo de produto)
   Carregado só nas páginas /projetos/<projeto>/
   ========================================================== */

/* ---------- Compra: galeria + caixa ---------- */
.product { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 6vw, 4.5rem); }
.product-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(1.8rem, 4vw, 3.5rem); align-items: start; }

.gallery { display: grid; gap: 1rem; position: sticky; top: 1.2rem; }
.gallery-main { border-radius: 1.6rem; }
.gallery-photo { aspect-ratio: 1 / 1; border-radius: calc(1.6rem - 10px); }
.gallery-thumbs { display: flex; gap: .7rem; flex-wrap: wrap; }
.thumb { width: 80px; height: 80px; padding: 0; border: 3px solid var(--paper); border-radius: .9rem; overflow: hidden; cursor: pointer; background: var(--paper); box-shadow: 3px 4px 0 rgba(49,90,92,.15); opacity: .75; transition: opacity .2s ease, transform .2s ease; }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { opacity: 1; transform: translateY(-2px); }
.thumb.is-active { opacity: 1; border-color: var(--rose-deep); }

.buybox { display: grid; gap: 1rem; }
.product-title { font-size: clamp(2rem, 4vw, 2.8rem); }
.rating-line { display: inline-flex; align-items: center; gap: .6rem; justify-self: start; color: var(--ink-soft); text-decoration: none; font-size: .95rem; }
.rating-line:hover span { text-decoration: underline dashed; text-underline-offset: 4px; }
.stars { display: inline-flex; gap: 2px; }
.stars svg { width: 18px; height: 18px; fill: #e2a93b; }
.stars.is-empty svg, .stars svg.off { fill: none; stroke: #c9b48a; stroke-width: 1.6; stroke-linejoin: round; }
.product-summary { font-size: 1.1rem; }
.labels-left { justify-content: flex-start; margin: 0; padding: 0; list-style: none; }

/* Versões */
.versions { border: 0; margin: .3rem 0 0; padding: 0; display: grid; gap: .7rem; }
.versions legend { font-weight: 700; font-size: 1rem; margin-bottom: .5rem; padding: 0; }
.version { position: relative; display: block; cursor: pointer; }
.version input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.version-box { position: relative; display: grid; gap: .35rem; padding: 1rem 1.1rem 1rem 3rem; border-radius: 1rem; background: var(--paper); border: 2px solid rgba(49,90,92,.2); transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.version-box::before { content: ""; position: absolute; left: 1rem; top: 1.15rem; width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(49,90,92,.45); background: var(--paper); }
.version input:checked + .version-box { border-color: var(--rose-deep); background: #fff; box-shadow: 4px 5px 0 rgba(168,71,90,.18); }
.version input:checked + .version-box::before { border-color: var(--rose-deep); background: radial-gradient(circle, var(--rose-deep) 0 5px, var(--paper) 5.5px); }
.version input:focus-visible + .version-box { outline: 3px solid var(--rose-deep); outline-offset: 3px; }
.version-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.version-name { display: inline-flex; align-items: center; gap: .45rem; font-family: var(--display); font-weight: 800; font-size: 1.25rem; }
.version-name svg { width: 20px; height: 20px; color: var(--rose-deep); }
.version-price { font-weight: 700; color: var(--ink); white-space: nowrap; }
.version-desc { color: var(--ink-soft); font-size: .97rem; line-height: 1.45; }
.version-tag { position: absolute; top: -.7rem; right: 1rem; background: var(--butter); color: var(--ink); font-size: .78rem; font-weight: 700; padding: .15rem .6rem; border-radius: .4rem; transform: rotate(2deg); box-shadow: 2px 2px 0 rgba(49,90,92,.15); }

/* Preço e botão */
.price-box { display: grid; gap: .1rem; margin-top: .3rem; }
.price-old { color: var(--ink-soft); text-decoration: line-through; font-size: 1rem; }
.price-now { font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 4vw, 2.5rem); line-height: 1.1; }
.price-note { color: var(--ink-soft); font-size: .95rem; }
.btn-buy { justify-content: center; font-size: 1.15rem; padding: 1rem 1.5rem; width: 100%; }
.btn-buy svg { width: 22px; height: 22px; }
.buy-hint { font-size: .9rem; color: var(--ink-soft); text-align: center; }
.trust { list-style: none; margin: .4rem 0 0; padding: .9rem 0 0; display: grid; gap: .45rem; border-top: 1.5px dashed rgba(49,90,92,.25); font-size: .97rem; }
.trust li { display: flex; align-items: center; gap: .55rem; }
.trust svg { width: 18px; height: 18px; color: var(--whats); flex: none; }
.trust a { color: var(--ink); }

/* ---------- Seções abaixo da compra ---------- */
.pd-section { position: relative; padding-block: clamp(3.5rem, 7vw, 5rem); }
.pd-section::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 2px; background: repeating-linear-gradient(90deg, var(--seam-color, rgba(201,100,114,.5)) 0 7px, transparent 7px 13px); }
.section-head { display: grid; gap: .6rem; text-align: center; justify-items: center; margin-bottom: clamp(1.8rem, 4vw, 2.6rem); }
.section-head.left { text-align: left; justify-items: start; }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }

/* Digital x físico */
.compare-section { background: var(--paper); }
.compare { max-width: 52rem; margin-inline: auto; overflow-x: auto; border-radius: 1.2rem; background: #fff; box-shadow: 7px 8px 0 rgba(49,90,92,.1); border: 1px solid rgba(49,90,92,.12); }
.compare table { width: 100%; border-collapse: collapse; min-width: 460px; }
.compare th, .compare td { position: relative; padding: .85rem 1rem; border-bottom: 1px solid rgba(49,90,92,.1); text-align: center; }
.compare thead th { background: var(--mint); font-family: var(--display); font-size: 1.15rem; }
.compare thead th:first-child, .compare tbody th { text-align: left; }
.compare tbody th { font-weight: 700; }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare td svg { width: 22px; height: 22px; display: inline-block; vertical-align: middle; }
.compare td.yes svg { color: var(--whats); }
.compare td.no svg { color: #b9a3a7; }
.compare td.na { color: var(--ink-soft); font-size: .9rem; }

/* Sobre */
.about-section { background: var(--cream); }
.about-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.about-copy { display: grid; gap: 1rem; font-size: 1.08rem; }
.about-copy h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.about-box { position: relative; background: var(--paper); border-radius: 1.4rem; padding: 1.6rem; box-shadow: 7px 8px 0 rgba(49,90,92,.12); display: grid; gap: .8rem; }
.about-box::after { content: ""; position: absolute; inset: 8px; border: 2px dashed rgba(49,90,92,.16); border-radius: 1rem; pointer-events: none; }
.checklist.one-col { grid-template-columns: 1fr; margin: 0; }
.about-note { color: var(--ink-soft); font-size: .95rem; }

/* Como funciona */
.steps-section { background: var(--mint); --seam-color: rgba(49,90,92,.35); }
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem; counter-reset: none; }
.flow-step { background: var(--paper); border-radius: 1.3rem; padding: 1.5rem; display: grid; gap: .6rem; align-content: start; box-shadow: 6px 7px 0 rgba(49,90,92,.12); }
.flow-step h3 { font-size: 1.35rem; }
.flow-step p { color: var(--ink-soft); }

/* Ficha + dúvidas */
.specs-section { background: var(--paper); }
.specs-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.specs { margin: 0; display: grid; border-radius: 1.1rem; overflow: hidden; border: 1px solid rgba(49,90,92,.12); background: #fff; }
.specs div { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; padding: .8rem 1.1rem; border-bottom: 1px solid rgba(49,90,92,.1); }
.specs div:nth-child(odd) { background: var(--cream); }
.specs div:last-child { border-bottom: 0; }
.specs dt { font-weight: 700; }
.specs dd { margin: 0; color: var(--ink-soft); }

/* Avaliações */
.reviews-section { background: var(--cream); }
.reviews-grid { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: clamp(2rem, 4vw, 3rem); align-items: start; }
.reviews-summary { display: grid; gap: .6rem; justify-items: start; }
.score { font-family: var(--display); font-weight: 800; font-size: 3.2rem; line-height: 1; display: flex; align-items: baseline; gap: .4rem; }
.score small { font-size: 1.1rem; color: var(--ink-soft); font-weight: 700; }
.reviews-summary .stars svg { width: 22px; height: 22px; }
.reviews-count { color: var(--ink-soft); }
.bars { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .35rem; width: 100%; }
.bars li { display: grid; grid-template-columns: 2.4rem 1fr 1.6rem; align-items: center; gap: .6rem; font-size: .9rem; }
.bar { height: 8px; border-radius: 99px; background: rgba(49,90,92,.12); overflow: hidden; }
.bar i { display: block; height: 100%; background: #e2a93b; border-radius: 99px; }
.bar-n { text-align: right; color: var(--ink-soft); }
.reviews-list { display: grid; gap: 1rem; }
.reviews-empty { display: grid; gap: .6rem; justify-items: center; text-align: center; padding: 2.4rem 1.5rem; border-radius: 1.3rem; border: 2px dashed rgba(49,90,92,.25); background: rgba(255,253,247,.7); }
.reviews-empty svg { width: 40px; height: 40px; color: var(--rose-deep); }
.reviews-empty h3 { font-size: 1.4rem; }
.reviews-empty p { color: var(--ink-soft); max-width: 30rem; }
.review { position: relative; background: var(--paper); border-radius: 1.2rem; padding: 1.3rem 1.4rem; box-shadow: 5px 6px 0 rgba(49,90,92,.1); display: grid; gap: .5rem; }
.review-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--rose-soft); color: var(--rose-deep); font-weight: 800; font-family: var(--display); font-size: 1.2rem; }
.review-name { font-weight: 700; }
.review-meta { font-size: .88rem; color: var(--ink-soft); }
.review-title { font-size: 1.2rem; }
.review-text { color: var(--ink); }

/* Carrossel */
.more-section { background: var(--paper); }
.carousel-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.4rem; }
.carousel-head .section-head { margin-bottom: 0; }
.carousel-nav { display: flex; gap: .6rem; }
.carousel-btn { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: background .2s ease; }
.carousel-btn svg { width: 22px; height: 22px; }
.carousel-btn:hover { background: var(--mint); }
.carousel-btn:disabled { opacity: .35; cursor: default; background: var(--paper); }
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 1.4rem) / 4); gap: 1.4rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: .4rem .2rem 1.2rem; scrollbar-width: thin; }
.carousel:focus-visible { outline: 3px solid var(--rose-deep); outline-offset: 4px; border-radius: 1rem; }
.carousel > * { scroll-snap-align: start; }
.project-card.mini .project-title { font-size: 1.25rem; }
.project-card.mini .project-placeholder span { font-size: 1.7rem; }
.project-card.mini .project-body { padding: 1rem 1.2rem 1.3rem; }
.carousel-all { text-align: center; margin-top: 1.2rem; }

/* Barra fixa de compra (celular) */
.buy-bar { position: fixed; z-index: 25; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem var(--gutter) calc(.75rem + env(safe-area-inset-bottom, 0px)); background: var(--paper); border-top: 2px dashed rgba(201,100,114,.5); box-shadow: 0 -6px 18px rgba(49,90,92,.12); }
.buy-bar-info { display: grid; line-height: 1.25; min-width: 0; }
.buy-bar-info strong { font-family: var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buy-bar-info span { font-size: .9rem; color: var(--ink-soft); }
.buy-bar .btn { padding: .7rem 1.1rem; flex: none; }
body.com-barra .whats-float, body.com-barra .cookie { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }

/* ---------- Responsivo ---------- */
@media (min-width: 901px) { .buy-bar { display: none !important; } }
@media (max-width: 1000px) { .carousel { grid-auto-columns: calc((100% - 2 * 1.4rem) / 3); } }
@media (max-width: 900px) {
  .product-grid, .about-grid, .specs-grid, .reviews-grid { grid-template-columns: 1fr; }
  .gallery { position: static; }
  .flow { grid-template-columns: 1fr; }
  .carousel { grid-auto-columns: calc((100% - 1.4rem) / 2); }
}
@media (max-width: 640px) {
  .thumb { width: 64px; height: 64px; }
  .specs div { grid-template-columns: 1fr; gap: .1rem; }
  .compare table { min-width: 0; font-size: .92rem; }
  .compare th, .compare td { padding: .7rem .55rem; }
  .compare thead th { font-size: 1rem; }
  .carousel { grid-auto-columns: 78%; }
  .carousel-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .carousel { scroll-behavior: auto; }
  .thumb, .version-box, .carousel-btn { transition: none; }
}
