/**
 * Produtos & Promoções - GuiaWP — estilos do front. Mobile-first, sem depender de
 * utilitários responsivos do Tailwind pré-compilado.
 *
 * @author Dante Testa <https://dantetesta.com.br>
 * @since  1.0.0 - 2026-07-18
 */

.ppgw-sec-title { display: inline-flex; align-items: center; gap: .5rem; font-size: 1.25rem; font-weight: 800; color: #0f172a; margin: 0; }
.ppgw-sec-title .material-symbols-outlined { color: #059669; }
.ppgw-sec-head { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; }
.ppgw-sec-count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.75rem; height: 1.75rem; padding: 0 .5rem; border-radius: 999px; background: #ecfdf5; color: #047857; font-size: .8rem; font-weight: 800; }

/* ===== Banners (carrossel) ===== */
.ppgw-banners { margin: 2.5rem 0 0; }
.ppgw-banners__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.ppgw-banners__nav { display: inline-flex; gap: .5rem; }
.ppgw-arrow { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: 999px; border: 1px solid #e2e8f0; background: #fff; color: #475569; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.ppgw-arrow:hover { background: #059669; color: #fff; border-color: #059669; }
.ppgw-banners__track {
	display: flex;
	gap: 1rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	padding-bottom: .25rem;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	-ms-overflow-style: none;
}
.ppgw-banners__track::-webkit-scrollbar { display: none; }
.ppgw-banner {
	flex: 0 0 calc((100% - (var(--ppgw-cols) - 1) * 1rem) / var(--ppgw-cols));
	scroll-snap-align: start;
	border: none;
	padding: 0;
	background: #f1f5f9;
	border-radius: 1rem;
	overflow: hidden;
	cursor: pointer;
	aspect-ratio: 16 / 9;
}
.ppgw-banner img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.ppgw-banner:hover img { transform: scale(1.04); }

/* Lightbox banner */
.ppgw-lightbox { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.ppgw-lightbox[hidden] { display: none; }
.ppgw-lightbox__backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.8); }
.ppgw-lightbox__box { position: relative; z-index: 1; max-width: 92vw; max-height: 88vh; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.ppgw-lightbox__img { max-width: 92vw; max-height: 76vh; border-radius: .75rem; box-shadow: 0 30px 60px -15px rgba(0,0,0,.5); }
.ppgw-lightbox__x { position: absolute; top: -2.5rem; right: 0; background: none; border: none; color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; }
.ppgw-lightbox__link { display: inline-flex; align-items: center; gap: .5rem; padding: .75rem 1.5rem; border-radius: .7rem; background: linear-gradient(135deg,#059669,#10b981); color: #fff; font-weight: 800; text-decoration: none; }
.ppgw-lightbox__link:hover { filter: brightness(1.06); }

/* ===== Produtos (grid + card) ===== */
.ppgw-produtos { margin: 2.5rem 0 0; }
.ppgw-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .ppgw-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .ppgw-grid { grid-template-columns: repeat(3, 1fr); } .ppgw-grid--wide { grid-template-columns: repeat(4, 1fr); } }

.ppgw-card { display: flex; flex-direction: column; gap: .5rem; padding: 1.25rem; border: 1px solid #e2e8f0; border-radius: 1rem; background: #fff; text-align: left; cursor: pointer; transition: box-shadow .2s, border-color .2s, transform .2s; width: 100%; font: inherit; color: inherit; }
.ppgw-card:hover, .ppgw-card:focus-visible { border-color: #a7f3d0; box-shadow: 0 10px 25px -12px rgba(5,150,105,.35); transform: translateY(-2px); outline: none; }
.ppgw-card__titulo { font-size: 1rem; font-weight: 800; color: #0f172a; margin: 0; line-height: 1.3; }
.ppgw-card__empresa { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; color: #64748b; font-weight: 600; margin: 0; }
.ppgw-card__empresa .material-symbols-outlined { font-size: 1rem; }
.ppgw-card__preco { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; margin: 0; }
.ppgw-card__preco-old { color: #94a3b8; text-decoration: line-through; font-size: .8rem; }
.ppgw-card__preco-now { color: #047857; font-weight: 800; font-size: 1.05rem; }
.ppgw-card__promo-tag { background: #fee2e2; color: #b91c1c; font-size: .65rem; font-weight: 800; padding: .1rem .4rem; border-radius: 999px; text-transform: uppercase; }
.ppgw-card__resumo { font-size: .825rem; color: #64748b; margin: 0; line-height: 1.45; }
.ppgw-card__cta { display: inline-flex; align-items: center; gap: .35rem; margin-top: auto; padding-top: .5rem; color: #059669; font-size: .8rem; font-weight: 800; }
.ppgw-card__cta .material-symbols-outlined { font-size: 1.05rem; }

/* Sidebar CTA */
.ppgw-sidebar-cta { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .9rem 1rem; border-radius: .9rem; background: linear-gradient(135deg,#059669,#10b981); color: #fff; font-weight: 800; font-size: .9rem; text-decoration: none; box-shadow: 0 10px 20px -10px rgba(5,150,105,.6); transition: filter .2s, transform .2s; }
.ppgw-sidebar-cta:hover { filter: brightness(1.05); transform: translateY(-1px); }
.ppgw-sidebar-cta__arrow { margin-left: auto; }

/* ===== Modal de produto ===== */
.ppgw-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.ppgw-modal[hidden] { display: none; }
.ppgw-modal__backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.6); backdrop-filter: blur(2px); }
.ppgw-modal__box { position: relative; z-index: 1; width: 100%; max-width: 34rem; max-height: 88vh; overflow-y: auto; background: #fff; border-radius: 1.25rem; padding: 1.75rem; box-shadow: 0 30px 60px -15px rgba(0,0,0,.35); }
.ppgw-modal__box--com-empresa { max-width: 52rem; }
.ppgw-modal__x { position: absolute; top: .75rem; right: 1rem; border: none; background: none; font-size: 1.75rem; line-height: 1; color: #94a3b8; cursor: pointer; }
.ppgw-modal__x:hover { color: #0f172a; }
.ppgw-modal__layout { display: flex; flex-direction: column; gap: 1.25rem; }
.ppgw-modal__main { flex: 1 1 auto; min-width: 0; }
.ppgw-modal__badge { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .65rem; border-radius: 999px; background: #ecfdf5; color: #047857; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.ppgw-modal__badge .material-symbols-outlined { font-size: .9rem; }
.ppgw-modal__titulo { font-size: 1.35rem; font-weight: 800; color: #0f172a; margin: .75rem 0 .5rem; line-height: 1.25; }
.ppgw-modal__preco { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin: 0 0 .85rem; }
.ppgw-modal__preco-old { color: #94a3b8; text-decoration: line-through; font-size: 1rem; }
.ppgw-modal__preco-now { color: #047857; font-weight: 800; font-size: 1.4rem; }
.ppgw-modal__descricao { color: #334155; font-size: .925rem; line-height: 1.6; margin-bottom: 1.25rem; }
.ppgw-modal__descricao h2, .ppgw-editor__area h2 { font-size: 1.15rem; font-weight: 800; margin: .7rem 0 .35rem; color: #0f172a; }
.ppgw-modal__descricao h3, .ppgw-editor__area h3 { font-size: 1.02rem; font-weight: 800; margin: .6rem 0 .3rem; color: #0f172a; }
.ppgw-modal__descricao h4, .ppgw-editor__area h4 { font-size: .95rem; font-weight: 700; margin: .5rem 0 .25rem; color: #0f172a; }
.ppgw-modal__descricao p, .ppgw-editor__area p { margin: 0 0 .65rem; }
.ppgw-modal__descricao ul, .ppgw-editor__area ul { list-style: disc; padding-left: 1.25rem; margin: 0 0 .65rem; }
.ppgw-modal__descricao ol, .ppgw-editor__area ol { list-style: decimal; padding-left: 1.25rem; margin: 0 0 .65rem; }
.ppgw-modal__descricao li, .ppgw-editor__area li { margin: .15rem 0; }
.ppgw-modal__descricao a, .ppgw-editor__area a { color: #059669; text-decoration: underline; }
.ppgw-modal__descricao strong, .ppgw-editor__area strong { font-weight: 700; }
.ppgw-modal__contato { display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; padding: .85rem 1rem; border-radius: .8rem; background: linear-gradient(135deg,#059669,#10b981); color: #fff; font-weight: 800; font-size: .95rem; text-decoration: none; transition: filter .2s; }
.ppgw-modal__contato:hover { filter: brightness(1.06); }
.ppgw-modal__empresa { flex: 0 0 auto; border-top: 1px solid #e2e8f0; padding-top: 1.25rem; text-align: center; }
.ppgw-modal__empresa-label { display: block; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: #94a3b8; margin-bottom: .6rem; }
.ppgw-modal__empresa-foto { width: 5.5rem; height: 5.5rem; border-radius: 1rem; overflow: hidden; margin: 0 auto .75rem; background: #f1f5f9; }
.ppgw-modal__empresa-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ppgw-modal__empresa-nome { font-weight: 800; color: #0f172a; font-size: 1rem; margin: 0 0 .9rem; }
.ppgw-modal__empresa-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; width: 100%; padding: .7rem 1rem; border-radius: .7rem; border: 1px solid #a7f3d0; background: #ecfdf5; color: #047857; font-weight: 800; font-size: .85rem; text-decoration: none; }
.ppgw-modal__empresa-btn:hover { background: #d1fae5; }
.ppgw-modal__empresa-btn .material-symbols-outlined { font-size: 1.1rem; }
@media (min-width: 720px) {
	.ppgw-modal__box--com-empresa .ppgw-modal__layout { flex-direction: row; align-items: stretch; }
	.ppgw-modal__box--com-empresa .ppgw-modal__empresa { flex: 0 0 14rem; border-top: none; border-left: 1px solid #e2e8f0; padding-top: 0; padding-left: 1.5rem; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }
}

/* ===== Filtro (/produtos) ===== */
.ppgw-filtros { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; align-items: stretch; }
.ppgw-filtros__campo { position: relative; flex: 1 1 100%; min-width: 0; }
.ppgw-filtros__icone { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 1.15rem; pointer-events: none; }
.ppgw-filtros input[type="search"], .ppgw-filtros select { width: 100%; height: 2.85rem; border: 1px solid #e2e8f0; border-radius: .7rem; background: #fff; color: #0f172a; font-size: .9rem; padding: 0 .9rem; }
.ppgw-filtros__campo--busca input[type="search"] { padding-left: 2.4rem; }
.ppgw-filtros input:focus, .ppgw-filtros select:focus { outline: none; border-color: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.18); }
.ppgw-filtros__submit { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; height: 2.85rem; padding: 0 1.25rem; border: none; border-radius: .7rem; background: linear-gradient(135deg,#059669,#10b981); color: #fff; font-weight: 700; font-size: .9rem; cursor: pointer; flex: 1 1 100%; }
.ppgw-filtros__submit:hover { filter: brightness(1.06); }
.ppgw-filtros__limpar { display: inline-flex; align-items: center; justify-content: center; height: 2.85rem; padding: 0 1rem; color: #64748b; font-weight: 600; font-size: .85rem; text-decoration: none; flex: 1 1 100%; }
@media (min-width: 768px) {
	.ppgw-filtros { flex-wrap: nowrap; align-items: center; }
	.ppgw-filtros__campo--busca { flex: 1 1 auto; }
	.ppgw-filtros__campo { flex: 0 0 auto; }
	.ppgw-filtros select { min-width: 12rem; }
	.ppgw-filtros__submit, .ppgw-filtros__limpar { flex: 0 0 auto; }
}

/* ===== Editor WYSIWYG (form do produto) ===== */
.ppgw-editor { border: 1px solid #cbd5e1; border-radius: .5rem; overflow: hidden; background: #fff; }
.ppgw-editor:focus-within { border-color: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.15); }
.ppgw-editor__toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px; border-bottom: 1px solid #e2e8f0; background: #f8fafc; }
.ppgw-editor__btn { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border: none; background: none; border-radius: .375rem; color: #475569; cursor: pointer; }
.ppgw-editor__btn:hover { background: #e2e8f0; color: #0f172a; }
.ppgw-editor__btn .material-symbols-outlined { font-size: 1.1rem; }
.ppgw-editor__sep { width: 1px; height: 1.25rem; background: #e2e8f0; margin: 0 4px; }
.ppgw-editor__area { min-height: 8rem; max-height: 20rem; overflow-y: auto; padding: .75rem; font-size: .9rem; color: #0f172a; line-height: 1.6; outline: none; }
.ppgw-editor__area:empty:before { content: attr(data-placeholder); color: #94a3b8; pointer-events: none; }
.ppgw-editor__ia { display: inline-flex; align-items: center; gap: .35rem; margin-left: auto; padding: .3rem .7rem; border: none; border-radius: .5rem; background: linear-gradient(135deg,#7c3aed,#4f46e5); color: #fff; font-size: .75rem; font-weight: 700; cursor: pointer; }
.ppgw-editor__ia:hover { filter: brightness(1.08); }
.ppgw-editor__ia.is-loading { opacity: .7; cursor: default; }
.ppgw-editor__ia .material-symbols-outlined { font-size: 1rem; }

/* Repeater de banners (gestão) */
.ppgw-banner-row .ppgw-banner-remove { z-index: 2; }

/* Foto capa no card de produto */
.ppgw-card__foto { aspect-ratio: 16 / 10; border-radius: .6rem; overflow: hidden; background: #f1f5f9; margin-bottom: .25rem; }
.ppgw-card__foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ppgw-card__foto-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(135deg, #f1f5f9, #f1f5f9 10px, #e9eef4 10px, #e9eef4 20px); color: #cbd5e1; }
.ppgw-card__foto-ph .material-symbols-outlined { font-size: 2.75rem; }

/* Uploader de fotos do produto (gestão) */
.ppgw-fotos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr)); gap: .6rem; margin-bottom: .75rem; }
.ppgw-fotos-grid:empty { margin-bottom: 0; }
.ppgw-foto { position: relative; aspect-ratio: 1; border-radius: .6rem; overflow: hidden; border: 1px solid #e2e8f0; background: #f1f5f9; cursor: grab; }
.ppgw-foto img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.ppgw-foto.is-dragging { opacity: .4; }
.ppgw-foto__primary { display: none; position: absolute; bottom: 0; left: 0; right: 0; background: rgba(5,150,105,.92); color: #fff; font-size: .6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; text-align: center; padding: 2px; }
.ppgw-fotos-grid .ppgw-foto:first-child .ppgw-foto__primary { display: block; }
.ppgw-foto__remove { position: absolute; top: 3px; right: 3px; width: 1.5rem; height: 1.5rem; border: none; border-radius: 50%; background: rgba(15,23,42,.75); color: #fff; font-size: 1rem; line-height: 1; cursor: pointer; }
.ppgw-foto__remove:hover { background: #e11d48; }
.ppgw-fotos-add { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1rem; border: 2px dashed #cbd5e1; border-radius: .6rem; background: none; color: #475569; font-weight: 700; font-size: .8rem; cursor: pointer; }
.ppgw-fotos-add:hover { border-color: #059669; color: #059669; }
.ppgw-fotos-status { color: #64748b; }

/* Galeria de fotos/vídeo no modal do produto */
.ppgw-modal__galeria { margin-bottom: 1rem; }
.ppgw-modal__galeria-main { position: relative; aspect-ratio: 16 / 10; border-radius: .75rem; overflow: hidden; background: #0f172a; margin-bottom: .5rem; }
.ppgw-modal__galeria-main img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ppgw-modal__galeria-main iframe { width: 100%; height: 100%; border: 0; display: block; }
.ppgw-modal__galeria-poster { position: relative; width: 100%; height: 100%; border: none; padding: 0; background: #000; cursor: pointer; display: block; }
.ppgw-modal__galeria-poster img { width: 100%; height: 100%; object-fit: contain; }
.ppgw-modal__galeria-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.ppgw-modal__galeria-play .material-symbols-outlined { display: flex; align-items: center; justify-content: center; width: 3.5rem; height: 3.5rem; font-size: 2.2rem; color: #fff; background: rgba(0,0,0,.55); border-radius: 50%; }
.ppgw-modal__galeria-thumbs { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; }
.ppgw-modal__galeria-thumbs::-webkit-scrollbar { display: none; }
.ppgw-modal__galeria-thumb { position: relative; flex: 0 0 auto; width: 3.5rem; height: 3.5rem; border: 2px solid transparent; border-radius: .5rem; overflow: hidden; padding: 0; background: none; cursor: pointer; }
.ppgw-modal__galeria-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ppgw-modal__galeria-thumb.is-active { border-color: #059669; }
.ppgw-modal__galeria-thumb.is-video .ppgw-modal__galeria-play .material-symbols-outlined { width: 1.6rem; height: 1.6rem; font-size: 1.05rem; }

/* Play overlay na capa do card (produto só com vídeo) */
.ppgw-card__foto { position: relative; }
.ppgw-card__play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.ppgw-card__play .material-symbols-outlined { display: flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; font-size: 1.5rem; color: #fff; background: rgba(0,0,0,.55); border-radius: 50%; }
