/* Pedagógica B2C — Single product (.ped-sp-*, sticky add-to-cart).
   Extraído verbatim de main.css (carregado só nesta rota, depois de main.css). */

/* ==========================================================================
   SINGLE PRODUCT PAGE — B2B Moderno
   ========================================================================== */

/* ── Layout geral ───────────────────────────────────────────────────────── */
.ped-single-product { padding: 0 0 48px; }

.ped-sp-layout {
  display: grid;
  grid-template-columns: 520px 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 56px;
}

/* ══════════════════════════════════════════
   GALERIA
   ══════════════════════════════════════════ */
.ped-sp-gallery {
  position: sticky;
  top: calc(var(--ped-header-height) + var(--ped-navbar-height) + 16px);
  align-self: start;
}

/* Imagem principal */
.ped-sp-gallery__main {
  position: relative;
  background: var(--ped-white);
  border: 1px solid var(--ped-gray-border);
  border-radius: var(--ped-radius);
  overflow: hidden;
  margin-bottom: 12px;
}

.ped-sp-gallery__zoom-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
}

.ped-sp-gallery__main-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .35s ease, opacity .2s ease;
}
.ped-sp-gallery__main-img:hover { transform: scale(1.04); }

/* Transição ao trocar imagem */

.ped-sp-gallery__discount,
.ped-sp-gallery__unavailable {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 10;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .3px;
  line-height: 1.2;
}
.ped-sp-gallery__discount   { background: #e53935; color: #fff; }
.ped-sp-gallery__unavailable{ background: #888; color: #fff; }
.ped-sp-gallery__preorder {
  position: absolute; top: 12px; left: 12px; z-index: 10;
  display: inline-flex; align-items: center; gap: 6px;
  background: #f59e0b; color: #fff;
  padding: 6px 12px; border-radius: var(--ped-radius-sm, 6px);
  font-size: .82rem; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(245, 158, 11, .3);
}
.ped-sp-gallery__preorder i { font-size: .9rem; }

/* Bloco de pré-venda na coluna de info, antes do botão comprar */
.ped-sp-preorder-box {
  display: flex; align-items: flex-start; gap: 14px;
  background: #fffbeb; border: 1px solid #fcd34d;
  border-left: 4px solid #f59e0b;
  border-radius: var(--ped-radius);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.ped-sp-preorder-box__icon {
  flex: 0 0 auto; font-size: 1.6rem; color: #b45309; line-height: 1;
}
.ped-sp-preorder-box__text {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
  font-size: .9rem; color: #78350f; line-height: 1.4;
}
.ped-sp-preorder-box__text strong { color: #78350f; font-weight: 800; }
.ped-sp-preorder-box__text strong strong { color: #b45309; }

/* Setas de navegação dentro do box da imagem principal */
.ped-sp-gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,.88);
  border: 1px solid var(--ped-gray-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ped-primary);
  font-size: 16px;
  padding: 0;
  line-height: 1;
  opacity: 1;
  transition: background var(--ped-transition), color var(--ped-transition);
}
.ped-sp-gallery__nav:hover { background: var(--ped-primary); color: var(--ped-white); border-color: var(--ped-primary); }
.ped-sp-gallery__nav--prev { left: 10px; }
.ped-sp-gallery__nav--next { right: 10px; }

/* ══════════════════════════════════════════
   INFORMAÇÕES / COLUNA DIREITA
   ══════════════════════════════════════════ */

/* Categorias */
.ped-sp-cats {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.ped-sp-cat-link {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--ped-primary);
  background: rgba(39,59,155,.08);
  padding: 3px 10px;
  border-radius: 50px;
  transition: background var(--ped-transition), color var(--ped-transition);
}
.ped-sp-cat-link:hover { background: var(--ped-primary); color: #fff; }

/* Título */
.ped-sp-title {
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 700;
  color: var(--ped-text);
  line-height: 1.3;
  margin-bottom: 12px;
}

/* Meta (SKU, estoque, avaliações) */
.ped-sp-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.ped-sp-meta__item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--ped-gray-text);
}
.ped-sp-meta__label { font-weight: 600; }
.ped-sp-meta__item--stock i { font-size: 14px; }
.ped-sp-meta__item--stock.is-instock { color: var(--ped-green-dark); }
.ped-sp-meta__item--stock.is-outstock { color: #e53935; }
.ped-sp-meta__review-count { color: var(--ped-primary); font-size: 12px; text-decoration: underline; }

/* Rating stars */
.ped-sp-meta .star-rating { font-size: 14px; }

/* ── Bloco de preço ──────────────────────────────────────────────────────── */
.ped-sp-pricing {
  margin-bottom: 20px;
}

/* "A partir de" — só visível em produto variável com range de preços, e
   removido via JS quando uma variação é selecionada. */
.ped-sp-pricing__from-prefix {
  display: block;
  font-size: 13px;
  color: var(--ped-gray-text, #666);
  margin-bottom: 4px;
  font-weight: 500;
}

/* Esconde blocos duplicados que vêm do tmpl-variation-template do WC:
   - preço: já mostramos no .ped-sp-pricing acima.
   - descrição: já vira o <h1> (nome real do produto), não repetir embaixo. */
.ped-sp-variations-form .woocommerce-variation-price,
.ped-sp-variations-form .woocommerce-variation-description {
  display: none !important;
}

.ped-sp-pricing__old {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #999;
  margin-bottom: 6px;
}
.ped-sp-pricing__old del { font-size: 14px; color: #bbb; }
.ped-sp-pricing__save {
  background: #fff3e0;
  color: #e65100;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 50px;
  border: 1px solid #ffe0b2;
}

/* PIX em destaque (acima do preço cheio) */
.ped-sp-pricing__pix-row {
  display: flex; align-items: baseline; flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.ped-sp-pricing__pix-value {
  font-size: clamp(28px, 4.4vw, 36px);
  font-weight: 800; color: var(--ped-primary); line-height: 1;
}
.ped-sp-pricing__pix-value .woocommerce-Price-amount,
.ped-sp-pricing__pix-value bdi { font-size: inherit; font-weight: inherit; color: inherit; }
.ped-sp-pricing__pix-value .woocommerce-Price-currencySymbol { font-size: 18px; font-weight: 700; }
.ped-sp-pricing__pix-label {
  font-size: .82rem; font-weight: 700; color: #15803d;
  background: #dcfce7; padding: 4px 10px; border-radius: 999px;
}

.ped-sp-pricing__current {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
  font-size: .9rem; color: var(--ped-gray-text);
}

.ped-sp-pricing__value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ped-text);
  line-height: 1;
  font-family: var(--ped-font);
}
.ped-sp-pricing__value .woocommerce-Price-amount,
.ped-sp-pricing__value bdi { font-size: inherit; font-weight: inherit; color: inherit; }
.ped-sp-pricing__value .woocommerce-Price-currencySymbol { font-size: inherit; font-weight: inherit; }

.ped-sp-pricing__pix {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ped-gray-text);
  background: #fff;
  border-radius: 6px;
  padding: 7px 12px;
  border: 1px dashed #c8e6c9;
}
.ped-sp-pricing__pix i { color: #27ae60; font-size: 14px; }

.ped-sp-pricing__consult { font-size: 15px; color: var(--ped-gray-text); font-style: italic; margin: 0; }

/* ── Add to cart custom (página de produto) ──────────────────────────────── */
.ped-sp-add-to-cart { margin-bottom: 20px; }

/* Esconde qty input nativo do WC se o single-product.php padrão for usado */
.ped-sp-add-to-cart .quantity,
.ped-sp-add-to-cart .ped-product-card__qty-wrap { display: none !important; }

/* ── Produto variável: dropdowns das variações ───────────────────────────── */
.ped-sp-variations {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.ped-sp-variation {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ped-sp-variation__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ped-text, #1d2327);
}
.ped-sp-variation__select,
.ped-sp-variations select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--ped-gray-border, #c3c4c7);
  border-radius: 6px;
  background: var(--ped-white, #fff);
  font-size: 14px;
  color: var(--ped-text, #1d2327);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='%23666' d='M3 5l5 6 5-6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
  padding-right: 36px;
}
.ped-sp-variation__select:focus,
.ped-sp-variations select:focus {
  outline: none;
  border-color: var(--ped-primary, #2271b1);
  box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.15);
}
/* Botão Comprar inicialmente desabilitado em variable até seleção válida */
.ped-sp-buy-btn:disabled,
.ped-sp-buy-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
/* Single variation: mensagem de preço/estoque após escolha — herda do tema */
.single_variation_wrap .single_variation {
  margin-bottom: 12px;
}
.single_variation_wrap .single_variation .price {
  font-weight: 600;
}
.single_variation_wrap .single_variation .stock {
  font-size: 13px;
  color: var(--ped-gray-text, #666);
  margin-top: 4px;
}
.single_variation_wrap .single_variation .stock.out-of-stock {
  color: #d63638;
}

.ped-sp-buy-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex-wrap: nowrap;
}

/* Stepper de quantidade na página do produto */
.ped-sp-qty {
  display: inline-flex;
  align-items: stretch;
  border: 1.5px solid var(--ped-gray-border);
  border-radius: var(--ped-radius);
  background: var(--ped-white);
  overflow: hidden;
  flex: 0 0 auto;
}
.ped-sp-qty__btn {
  width: 42px;
  border: 0;
  background: transparent;
  font-size: 22px;
  font-weight: 700;
  color: var(--ped-text);
  cursor: pointer;
  transition: background var(--ped-transition);
  line-height: 1;
  padding: 0;
}
.ped-sp-qty__btn:hover { background: var(--ped-gray-bg, #f4f4f5); }
.ped-sp-qty__btn:focus-visible { outline: 2px solid var(--ped-primary); outline-offset: -2px; }
.ped-sp-qty__input {
  width: 48px;
  border: 0;
  border-left: 1px solid var(--ped-gray-border);
  border-right: 1px solid var(--ped-gray-border);
  background: transparent;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--ped-text);
  -moz-appearance: textfield;
  appearance: textfield;
}
.ped-sp-qty__input::-webkit-outer-spin-button,
.ped-sp-qty__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.ped-sp-qty__input:focus { outline: 2px solid var(--ped-primary); outline-offset: -2px; }
.ped-sp-buy-row .ped-sp-buy-btn { flex: 1 1 auto; }

@media (max-width: 479.98px) {
  .ped-sp-qty__btn { width: 38px; font-size: 20px; }
  .ped-sp-qty__input { width: 44px; font-size: 15px; }
}

/* Botão comprar — azul, tamanho maior que o card */
.ped-sp-buy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--ped-primary);
  color: #fff;
  border: none;
  border-radius: var(--ped-radius);
  padding: 13px 36px;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--ped-font);
  cursor: pointer;
  transition: background var(--ped-transition), transform var(--ped-transition);
  letter-spacing: .3px;
  flex: 1;
  min-width: 180px;
}
.ped-sp-buy-btn i { font-size: 20px; }
.ped-sp-buy-btn:hover {
  background: var(--ped-primary-dark);
  color: #fff;
  transform: translateY(-1px);
}
.ped-sp-buy-btn.loading { opacity: .7; pointer-events: none; }

/* ── Indisponível ───────────────────────────────────────────────────────── */
.ped-sp-outofstock-msg {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: var(--ped-radius);
  padding: 14px 16px;
  font-size: 13px;
  color: #795548;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.ped-sp-outofstock-msg i { font-size: 18px; color: #f9a825; flex-shrink: 0; }
.ped-sp-outofstock-msg a { color: var(--ped-primary); font-weight: 600; text-decoration: underline; margin-left: auto; }

/* ── Benefits mini-bar ──────────────────────────────────────────────────── */
.ped-sp-benefits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
  padding: 16px;
  background: var(--ped-gray-bg);
  border-radius: var(--ped-radius);
  border: 1px solid var(--ped-gray-border);
}
.ped-sp-benefit {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ped-gray-text);
}
.ped-sp-benefit i { font-size: 16px; color: var(--ped-primary); flex-shrink: 0; }

/* ── Compartilhar ───────────────────────────────────────────────────────── */
.ped-sp-share {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ped-sp-share__label { font-size: 12px; color: var(--ped-gray-text); }
.ped-sp-share__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--ped-gray-border);
  font-size: 15px;
  transition: all var(--ped-transition);
  background: transparent;
  cursor: pointer;
  color: var(--ped-gray-text);
  text-decoration: none;
}
.ped-sp-share__btn--wa:hover  { background: #25d366; border-color: #25d366; color: #fff; }
.ped-sp-share__btn--fb:hover  { background: #1877f2; border-color: #1877f2; color: #fff; }
.ped-sp-share__btn--copy:hover{ background: var(--ped-primary); border-color: var(--ped-primary); color: #fff; }

/* ══════════════════════════════════════════
   TABS
   ══════════════════════════════════════════ */
.ped-sp-tabs {
  margin-bottom: 48px;
  border: 1px solid var(--ped-gray-border);
  border-radius: var(--ped-radius);
  overflow: hidden;
}

.ped-sp-tabs__nav {
  display: flex;
  background: var(--ped-gray-bg);
  border-bottom: 1px solid var(--ped-gray-border);
  overflow-x: auto;
  scrollbar-width: none;
}
.ped-sp-tabs__nav::-webkit-scrollbar { display: none; }

.ped-sp-tab-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: none;
  padding: 16px 24px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--ped-font);
  color: var(--ped-gray-text);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: color var(--ped-transition), border-color var(--ped-transition), background var(--ped-transition);
  white-space: nowrap;
}
.ped-sp-tab-btn i { font-size: 16px; }
.ped-sp-tab-btn:hover { color: var(--ped-primary); background: rgba(39,59,155,.04); }
.ped-sp-tab-btn.is-active {
  color: var(--ped-primary);
  border-bottom-color: var(--ped-primary);
  background: var(--ped-white);
}

.ped-tab-count {
  background: var(--ped-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50px;
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
}

.ped-sp-tab-panel {
  padding: 28px 32px;
  background: var(--ped-white);
}
.ped-sp-tab-panel[hidden] { display: none; }

/* Conteúdo da descrição */
.ped-sp-description { font-size: 14px; color: var(--ped-gray-text); line-height: 1.7; }
.ped-sp-description h2, .ped-sp-description h3, .ped-sp-description h4 { color: var(--ped-text); margin-top: 20px; margin-bottom: 8px; }
.ped-sp-description ul { list-style: disc; padding-left: 20px; margin-bottom: 12px; }
.ped-sp-description li { margin-bottom: 4px; }
.ped-sp-description img { max-width: 100%; border-radius: 6px; margin: 12px 0; }

.ped-sp-no-content { color: var(--ped-gray-text); font-style: italic; font-size: 14px; }

/* Tabela de especificações */
.ped-sp-specs-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ped-sp-specs-table tr { border-bottom: 1px solid var(--ped-gray-border); }
.ped-sp-specs-table tr:last-child { border-bottom: none; }
.ped-sp-specs-table th {
  width: 34%;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--ped-text);
  background: var(--ped-gray-bg);
  text-align: left;
  vertical-align: top;
}
.ped-sp-specs-table td {
  padding: 12px 16px;
  color: var(--ped-gray-text);
  vertical-align: top;
}
.ped-sp-specs-table tr:nth-child(even) td { background: rgba(0,0,0,.01); }

/* ── Related products section ────────────────────────────────────────────── */
.ped-sp-related { border-top: 1px solid var(--ped-gray-border); }
.ped-sp-related .ped-product-grid-section { padding-top: 36px; }

/* ══════════════════════════════════════════
   RESPONSIVE — Single Product
   ══════════════════════════════════════════ */
@media (max-width: 1199px) {
  .ped-sp-layout { grid-template-columns: 420px 1fr; gap: 32px; }
}

@media (max-width: 991px) {
  .ped-sp-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .ped-sp-gallery { position: static; }
  .ped-sp-gallery__main { max-width: 500px; margin: 0 auto 6px; }
  .ped-sp-cats { margin-bottom: 6px; }
  .ped-sp-title { margin-bottom: 8px; }
}

@media (max-width: 767px) {
  .ped-sp-tab-btn { padding: 13px 16px; font-size: 13px; }
  .ped-sp-tab-panel { padding: 20px 16px; }
  .ped-sp-specs-table th,
  .ped-sp-specs-table td { padding: 10px 12px; }
  .ped-sp-benefits { grid-template-columns: 1fr 1fr; }
}

/* ══════════════════════════════════════════
   STICKY ADD-TO-CART — página de produto
   ══════════════════════════════════════════ */
.ped-sticky-atc {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1040;
  background: var(--ped-white);
  border-top: 2px solid var(--ped-gray-border);

  padding: 10px 0;
  /* Inicialmente fora da tela (abaixo) */
  transform: translateY(110%);
  visibility: hidden;
  pointer-events: none;
  transition: transform .32s cubic-bezier(.4,0,.2,1), visibility .32s;
}
.ped-sticky-atc.is-visible {
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}
.ped-sticky-atc__inner {
  display: flex;
  align-items: center;
  gap: 16px;
}
.ped-sticky-atc__product {
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.ped-sticky-atc__thumb {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border: 1px solid var(--ped-gray-border);
  border-radius: var(--ped-radius-sm);
  flex-shrink: 0;
}
.ped-sticky-atc__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ped-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ped-sticky-atc__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}
/* Preço no sticky bar (mobile) — espelha o bloco principal,
   só que mais compacto. */
.ped-sticky-atc__price {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.ped-sticky-atc__pix-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.ped-sticky-atc__pix-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--ped-primary);
  line-height: 1;
}
.ped-sticky-atc__pix-value .woocommerce-Price-amount,
.ped-sticky-atc__pix-value bdi { font-size: inherit; font-weight: inherit; color: inherit; }
.ped-sticky-atc__pix-value .woocommerce-Price-currencySymbol { font-size: 12px; font-weight: 700; }
.ped-sticky-atc__pix-badge {
  font-size: 10px;
  font-weight: 700;
  color: #15803d;
  background: #dcfce7;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}
.ped-sticky-atc__current {
  font-size: 11px;
  color: var(--ped-gray-text);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ped-sticky-atc__current-value {
  font-weight: 700;
  color: var(--ped-text);
}
.ped-sticky-atc__current-value .woocommerce-Price-amount,
.ped-sticky-atc__current-value bdi { font-size: inherit; font-weight: inherit; color: inherit; }
@media (max-width: 767.98px) {
  .ped-sticky-atc__inner { gap: 12px; }
  .ped-sticky-atc__actions {
    flex: 0 0 auto;
    margin-left: auto;
  }
  .ped-sticky-atc__btn {
    flex: 0 0 auto;
    padding: 12px 22px;
  }
}
.ped-sticky-atc__btn {
  white-space: nowrap;
  padding-left: 20px;
  padding-right: 20px;
}
.ped-sticky-atc .ped-qty-btn {
  width: 46px;
  height: 46px;
  font-size: 22px;
}
.ped-sticky-atc .ped-qty-input {
  width: 58px;
  height: 46px;
  font-size: 18px;
}
