/*
Theme Name:  Storely Child
Template:    storely
Version:     1.1
Author:      Augusto G. Deróide
Description: Tema customizado para Paraflex
*/


/* ── Notificação "adicionado ao carrinho" ───────────────────────────────── */
/* WooCommerce usa float:right no botão, causando encostamento no texto.    */
/* Flex com order/margin-left:auto garante texto à esq e botão à dir.       */
.woocommerce-message {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 12px !important;
}
.woocommerce-message .button {
  float: none !important;
  flex-shrink: 0;
  white-space: nowrap;
  order: 10;           /* empurra o botão para depois do texto */
  margin: 0 0 0 auto !important; /* cola o botão na direita */
}

/* ── Cart count badge — largura automática ──────────────────────────────── */
/* Seletor correto: .cart-count é o próprio span (sem filho interno)        */
.menu-right-list li.cart-wrapper .cart-icon-wrap span.cart-count,
.cart-wrapper .cart-icon-wrap span.cart-count {
  width: auto !important;
  min-width: 20px;
  padding: 0 5px !important;
  border-radius: 10px !important;
  white-space: nowrap;
  box-sizing: border-box;
}

/* ── Preço à vista / à prazo ─────────────────────────────────────────────── */
.pf-preco {
  margin: 4px 0 0;
  line-height: 1.4;
}
.pf-de-preco {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 0 0 2px;
  flex-wrap: wrap;
}
.pf-de-label {
  font-size: .78em;
  color: #888;
}
.pf-de-label s {
  text-decoration: line-through;
}
.pf-badge-off {
  display: inline-block;
  background: #e53935;
  color: #fff;
  font-size: .72em;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
  line-height: 1.5;
}
.pf-avista-val {
  font-size: 1.15em;
  font-weight: 700;
  color: #42a5f5;
  margin: 0;
}
.pf-avista-label {
  font-size: .78em;
  color: #2e7d32;
  margin: 1px 0 3px;
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}
.pf-avista-label,
.pf-avista-label * {
  display: inline !important;
}
.pf-avista-pct {
  font-weight: 700;
}
.pf-prazo {
  font-size: .8em;
  color: #e67e22;
  margin: 0;
}
.pf-prazo-val {
  font-weight: 700;
}

/* ── Página de produto individual — título ──────────────────────────────── */
.single-product h1.product_title {
  font-size: 1.25em !important;
  margin-bottom: 20px !important;
}

/* ── Página de produto individual — campo de quantidade ─────────────────── */
.single-product .quantity {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  gap: 0 !important;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
  height: 42px;
  box-sizing: border-box;
}
/* Esconde label screen-reader para não virar flex item visível */
.single-product .quantity .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}
.single-product .quantity input.qty {
  width: 80px !important;
  min-width: 80px !important;
  border: none !important;
  border-left: 1px solid #ddd !important;
  border-right: none !important;
  border-radius: 0 !important;
  text-align: center !important;
  font-size: .95em !important;
  font-weight: 600 !important;
  padding: 0 6px !important;
  background: #fff !important;
  box-shadow: none !important;
  outline: none !important;
  height: 100% !important;
  box-sizing: border-box !important;
}
.pf-qty-step {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  border: none;
  border-radius: 0;
  background: #f5f5f5;
  font-size: 1.3em;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  color: #333;
  flex-shrink: 0;
  padding: 0;
  height: 100%;
  box-sizing: border-box;
}
.pf-qty-step:hover {
  background: #e0e0e0;
}

/* ── Página de produto individual — preço ───────────────────────────────── */
.single-product .pf-single-preco {
  margin: 0 0 16px;
  line-height: 1.5;
}
.single-product .pf-single-de-preco {
  justify-content: flex-start !important;
  margin-bottom: 6px;
}
.single-product .pf-single-de-preco .pf-de-label {
  font-size: 1.1em;
}
.single-product .pf-single-de-preco .pf-badge-off {
  font-size: .95em;
}
.single-product .pf-avista-val {
  font-size: 2.3em;
}
.single-product .pf-avista-label {
  font-size: 1em;
  margin-bottom: 2px;
}
.single-product .pf-prazo {
  font-size: 1.1em;
}

/* ── Disclaimer de imagem — entre imagem principal e thumbnails ─────────── */
.pf-img-disclaimer {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  font-size: .78em;
  color: #999;
  margin: 6px 0 4px;
  font-style: italic;
  clear: both;
  float: none;
}

/* ── Galeria do produto — cursor clicável e clip para animação de slide ───── */
.woocommerce-product-gallery__image {
  cursor: pointer;
  overflow: hidden; /* necessário para o clip do slide lateral */
}
.woocommerce-product-gallery__image a,
.woocommerce-product-gallery__image a:focus,
.woocommerce-product-gallery__image a:active {
  display: block;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* ── Imagem principal própria (substitui o img nativo do WooCommerce) ──────── */
.pf-gal-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  cursor: pointer;
}

/* ── Strip de miniaturas na página do produto ────────────────────────────── */
.pf-gal-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
}
.pf-gal-thumb {
  width: 68px !important;
  height: 68px !important;
  max-width: 68px !important;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid #ddd;
  opacity: 0.65;
  transition: opacity .15s, border-color .15s;
}
.pf-gal-thumb:hover {
  opacity: 1;
  border-color: #999;
}
.pf-gal-thumb.active {
  border-color: #2271b1;
  opacity: 1;
}

/* ── Lightbox customizado (pf-lb) ───────────────────────────────────────── */
.pf-lb {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.pf-lb--open { display: flex; }
body.pf-lb--noscroll { overflow: hidden; }

.pf-lb__bg {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .90);
}

/* Imagem central */
.pf-lb__stage {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 78vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pf-lb__img {
  max-width: 88vw;
  max-height: 74vh;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

/* Botão fechar */
.pf-lb__close {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 2;
  background: rgba(0,0,0,.45);
  border: none;
  color: #fff;
  font-size: 22px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.pf-lb__close:hover { background: rgba(0,0,0,.7); }

/* Setas de navegação */
.pf-lb__prev,
.pf-lb__next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(0,0,0,.4);
  border: none;
  color: #fff;
  font-size: 36px;
  width: 48px;
  height: 64px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pf-lb__prev { left: 10px; }
.pf-lb__next { right: 10px; }
.pf-lb__prev:hover,
.pf-lb__next:hover { background: rgba(0,0,0,.65); }

/* Carrossel de thumbnails */
.pf-lb__thumbs {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 90vw;
}
.pf-lb__thumb {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid rgba(255,255,255,.25);
  opacity: .55;
  transition: opacity .15s, border-color .15s;
}
.pf-lb__thumb:hover { opacity: .85; }
.pf-lb__thumb.active {
  border: 3px solid #fff;
  opacity: 1;
}

/* ── Controle de quantidade ──────────────────────────────────────────────── */
.pf-qty {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  width: 100%;
  height: 42px;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  box-sizing: border-box;
}
.pf-qty-btn {
  flex: 0 0 42px;
  height: 100%;
  background: #f5f5f5;
  border: none;
  font-size: 1.2em;
  cursor: pointer;
  color: #333;
  transition: background .15s;
  padding: 0;
}
.pf-qty-btn:hover {
  background: #e0e0e0;
}
.pf-qty-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding-left: 8px;
}
.pf-qty input[type="text"] {
  display: block !important;
  flex: 1 !important;
  min-width: 0 !important;
  width: 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  text-align: center !important;
  font-size: .9em !important;
  font-weight: 600 !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 4px !important;
  letter-spacing: 0 !important;
}
.pf-qty-un {
  font-size: .85em;
  color: #888;
  white-space: nowrap;
  padding-right: 8px;
}
/* Unidade dentro do .quantity da página single (flex item entre input e botão +) */
.single-product .quantity .pf-qty-un {
  display: flex;
  align-items: center;
  padding: 0 6px;
  font-size: .8em;
  color: #999;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* ── Hover imagem nos cards de produto ───────────────────────────────────── */
/* Acelerar transição do zoom: 1.5s → 0.4s */
.woocommerce ul.products li.product .product-img a img {
  transition: transform 0.4s ease !important;
}

/* Reduzir zoom de scale(1.1) para scale(1.08) */
.woocommerce ul.products li.product .product-single:hover .product-img a img,
.woocommerce ul.products li.product .product-single:focus-within .product-img a img {
  transform: scale(1.08) !important;
}

/* ── Mini-cart dropdown ──────────────────────────────────────────────────── */
/* Limita altura e habilita scroll interno */
.cart-container {
  max-height: 85vh;
}
.cart-data {
  overflow-y: auto;
  flex: 1;
  min-height: 0;    /* permite o flex item encolher abaixo do conteúdo */
}
/* Reduzir espaçamento entre itens */
.cart-product {
  padding: 10px 12px !important;
}
/* Reduzir fonte do nome do produto (mesmo tamanho dos cards) */
span.cart-pname,
span.cart-pname a {
  font-size: 14px;
}

/* ── Cards de produto — altura uniforme ─────────────────────────────────── */
.woocommerce ul.products:not(.owl-carousel),
.woocommerce-page ul.products:not(.owl-carousel) {
  display: flex !important;
  flex-wrap: wrap;
  align-items: stretch;
}
.woocommerce ul.products:not(.owl-carousel) li.product,
.woocommerce-page ul.products:not(.owl-carousel) li.product {
  float: none !important;
  clear: none !important;
  display: flex !important;
  flex-direction: column;
  box-sizing: border-box;
}
.woocommerce ul.products:not(.owl-carousel) li.product > .product,
.woocommerce-page ul.products:not(.owl-carousel) li.product > .product {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
}
.woocommerce ul.products li.product > .product > .product-single {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Título no topo, preço+botão empurrados para baixo com espaço livre no meio */
.woocommerce ul.products li.product .product-single .product-content-outer {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}
/* product-content cresce para empurrar o preço para baixo do espaço livre */
.woocommerce ul.products li.product .product-single .product-content {
  padding: 6px !important;
  flex: 1;
  display: flex;
  flex-direction: column;
}
/* h3 absorve o espaço extra — o preço fica sempre na mesma posição vertical */
.woocommerce ul.products li.product .product-single .product-content h3 {
  flex: 1;
}
/* product-action precisa de largura explícita ao virar flex item */
.woocommerce ul.products li.product .product-single .product-action {
  width: 100%;
  box-sizing: border-box;
}

/* ── Título do produto — fonte ───────────────────────────────────────────── */
.woocommerce ul.products li.product .product-single h3 {
  font-size: 14px !important;
  margin-bottom: 5px;
  line-height: 1.3;
}

/* ── Imagem — reduzir espaço vertical ───────────────────────────────────── */
.woocommerce ul.products li.product .product-single .product-img {
  padding: 6px !important;
  min-height: 160px !important;
}

