/* public_html/assets/css/produto.css */

/* =========================
   BASE
========================= */
.product-page{
  background: #fff;
  padding: 28px 0 70px;
}

.container{
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
}

.pstate{
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  background: #fff;
}
.pstate h1{ margin: 0 0 8px; font-size: 22px; }
.pstate p{ margin: 0 0 14px; color: var(--muted); line-height: 1.6; }

.pbtn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid var(--line);
}
.pbtn--dark{
  background: #111;
  color: #fff;
  border-color: #111;
}

/* =========================
   BREADCRUMB
========================= */
.pbreadcrumb{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  font-size: 12px;
  color: rgba(27,20,18,.70);
}

.pbreadcrumb a{
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.pbreadcrumb__sep{
  opacity: .55;
}

/* =========================
   WRAP (GALERIA + INFO)
========================= */
.pwrap{
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 34px;
  align-items: start;
}

/* =========================
   GALERIA
========================= */
.pgallery{
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 16px;
  align-items: start;
}

.pgallery__thumbs{
  display: grid;
  gap: 10px;
  align-content: start;
}

.pthumb{
  width: 84px;
  height: 84px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 6px;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.pthumb:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(0,0,0,.06);
}

.pthumb.is-active{
  border-color: rgba(111,123,69,.55);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.pthumb img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pgallery__main{
  min-width: 0;
}

.pmain{
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #f7f7f7;
  padding: 14px;
}

.pmain img{
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain; /* não corta */
  object-position: center;
  display: block;
}

/* =========================
   INFO
========================= */
.pinfo{
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  background: #fff;
}

.pbrand{
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.ptitle{
  margin: 0 0 10px;
  font-size: clamp(22px, 2.2vw, 34px);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: .02em;
}

.pdesc{
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
  max-width: 68ch;
}

.pprice{
  margin: 0 0 16px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: .01em;
}

.pline{
  height: 1px;
  background: var(--line);
  margin: 14px 0;
}

.psku{
  margin: 0 0 14px;
  font-size: 12px;
  color: rgba(27,20,18,.65);
}

/* =========================
   COMPRAR
========================= */
.pbuy{
  display: grid;
  gap: 12px;
}

.pqty{
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  width: min(220px, 100%);
  background: #fff;
}

.pqty__btn{
  border: 0;
  background: #f6f6f6;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pqty__btn:hover{
  filter: brightness(1.02);
}

.pqty__input{
  border: 0;
  text-align: center;
  height: 44px;
  font-size: 14px;
  outline: none;
}

/* remove setas no Chrome */
.pqty__input::-webkit-outer-spin-button,
.pqty__input::-webkit-inner-spin-button{
  -webkit-appearance: none;
  margin: 0;
}
/* remove setas no Firefox */
.pqty__input[type=number]{
  -moz-appearance: textfield;
}

.padd{
  width: 100%;
  height: 54px;
  border-radius: 12px;
  border: 1px solid rgba(111,123,69,.85);
  background: rgba(111,123,69,.92);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  transition: transform .2s ease, filter .2s ease, box-shadow .2s ease;
}

.padd:hover{
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 12px 22px rgba(0,0,0,.10);
}

.padd__icon{
  font-size: 16px;
  line-height: 1;
}

/* =========================
   DETAILS (Descrição)
========================= */
.pdetails{
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.pdetails summary{
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: 12px;
  color: rgba(27,20,18,.78);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pdetails summary::-webkit-details-marker{ display: none; }

.pdetails summary::after{
  content: "›";
  transform: rotate(90deg);
  opacity: .75;
  transition: transform .2s ease;
  font-size: 16px;
}

.pdetails[open] summary::after{
  transform: rotate(-90deg);
}

.pdetails__body{
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.75;
  font-size: 14px;
}

/* =========================
   RELACIONADOS
========================= */
.prelated{
  margin-top: 46px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.prelated__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.prelated__title{
  margin: 0;
  font-size: 18px;
  letter-spacing: .10em;
  text-transform: uppercase;
  font-weight: 600;
}

.prelated__arrows{
  display: inline-flex;
  gap: 8px;
}

.prelated__arrow{
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.prelated__arrow:hover{
  box-shadow: 0 10px 18px rgba(0,0,0,.06);
  transform: translateY(-1px);
}

.prelated__track{
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 260px);
  gap: 18px;

  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 6px;
}
.prelated__track::-webkit-scrollbar{ height: 8px; }
.prelated__track::-webkit-scrollbar-thumb{ background: rgba(0,0,0,.12); border-radius: 99px; }
.prelated__track::-webkit-scrollbar-track{ background: rgba(0,0,0,.06); border-radius: 99px; }

.rcard{
  scroll-snap-align: start;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
  display: grid;
  gap: 10px;
  transition: transform .2s ease, box-shadow .2s ease;
}

.rcard:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(0,0,0,.07);
}

.rcard__media{
  display: block;
  background: #f7f7f7;
  border-radius: 12px;
  overflow: hidden;
  padding: 10px;
}

.rcard__media img{
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain; /* não corta */
  display: block;
}

.rcard__title{
  margin: 0;
  font-size: 13px;
  letter-spacing: .10em;
  text-transform: uppercase;
  font-weight: 600;
  line-height: 1.25;

  /* segura altura para alinhar cards */
  min-height: 34px;
}

.rcard__price{
  margin: 0;
  font-weight: 700;
  color: rgba(27,20,18,.85);
}

.rcard__btn{
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(111,123,69,.50);
  color: rgba(111,123,69,.95);
  background: rgba(111,123,69,.08);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: 12px;
}

.rcard__btn:hover{
  filter: brightness(1.03);
}

/* =========================
   RESPONSIVO
========================= */
@media (max-width: 980px){
  .pwrap{
    grid-template-columns: 1fr;
  }

  .pgallery{
    grid-template-columns: 72px 1fr;
  }

  .pthumb{
    width: 72px;
    height: 72px;
  }

  .pinfo{
    position: static;
  }
}

@media (max-width: 560px){
  .pgallery{
    grid-template-columns: 1fr;
  }

  .pgallery__thumbs{
    grid-auto-flow: column;
    grid-auto-columns: 72px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
  }

  .pthumb{
    scroll-snap-align: start;
  }

  .pprice{
    font-size: 26px;
  }
}
