/**
 * Achadinhos - 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-08-12
 */

/* ===== Grid + card (listagem/carrossel) ===== */
.agw-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 640px) { .agw-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .agw-grid { grid-template-columns: repeat(4, 1fr); } }

.agw-card { display: flex; flex-direction: column; border: 1px solid #e2e8f0; border-radius: 1rem; background: #fff; overflow: hidden; text-decoration: none; color: inherit; transition: box-shadow .2s, border-color .2s, transform .2s; }
.agw-card:hover, .agw-card:focus-visible { border-color: #fde68a; box-shadow: 0 10px 25px -12px rgba(217,119,6,.3); transform: translateY(-2px); outline: none; }
.agw-card__foto { aspect-ratio: 3 / 2; background: #f1f5f9; overflow: hidden; }
.agw-card__foto img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.agw-card:hover .agw-card__foto img { transform: scale(1.04); }
.agw-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; }
.agw-card__foto-ph .material-symbols-outlined { font-size: 2.75rem; }
.agw-card__body { padding: 1rem; display: flex; flex-direction: column; gap: .3rem; }
.agw-card__cat { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #d97706; }
.agw-card__titulo { font-size: .95rem; font-weight: 800; color: #0f172a; margin: 0; line-height: 1.35; }
.agw-card__preco { font-weight: 800; color: #047857; font-size: 1.05rem; margin: 0; }
.agw-card__cta { display: inline-flex; align-items: center; gap: .3rem; margin-top: auto; padding-top: .4rem; color: #d97706; font-size: .8rem; font-weight: 800; }
.agw-card__cta .material-symbols-outlined { font-size: 1.05rem; }

/* ===== Filtro (/achadinhos) ===== */
.agw-filtros { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; align-items: stretch; }
.agw-filtros__campo { position: relative; flex: 1 1 100%; min-width: 0; }
.agw-filtros__icone { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 1.15rem; pointer-events: none; }
.agw-filtros input[type="search"], .agw-filtros select { width: 100%; height: 2.85rem; border: 1px solid #e2e8f0; border-radius: .7rem; background: #fff; color: #0f172a; font-size: .9rem; padding: 0 .9rem; }
.agw-filtros__campo--busca input[type="search"] { padding-left: 2.4rem; }
.agw-filtros input:focus, .agw-filtros select:focus { outline: none; border-color: #d97706; box-shadow: 0 0 0 3px rgba(217,119,6,.18); }
.agw-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,#d97706,#f59e0b); color: #fff; font-weight: 700; font-size: .9rem; cursor: pointer; flex: 1 1 100%; }
.agw-filtros__submit:hover { filter: brightness(1.06); }
.agw-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) {
	.agw-filtros { flex-wrap: nowrap; align-items: center; }
	.agw-filtros__campo--busca { flex: 1 1 auto; }
	.agw-filtros__campo { flex: 0 0 auto; }
	.agw-filtros select { min-width: 12rem; }
	.agw-filtros__submit, .agw-filtros__limpar { flex: 0 0 auto; }
}

/* ===== Editor WYSIWYG (form) ===== */
.agw-editor { border: 1px solid #cbd5e1; border-radius: .5rem; overflow: hidden; background: #fff; }
.agw-editor:focus-within { border-color: #d97706; box-shadow: 0 0 0 3px rgba(217,119,6,.15); }
.agw-editor__toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px; border-bottom: 1px solid #e2e8f0; background: #f8fafc; }
.agw-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; }
.agw-editor__btn:hover { background: #e2e8f0; color: #0f172a; }
.agw-editor__btn .material-symbols-outlined { font-size: 1.1rem; }
.agw-editor__sep { width: 1px; height: 1.25rem; background: #e2e8f0; margin: 0 4px; }
.agw-editor__area { min-height: 8rem; max-height: 20rem; overflow-y: auto; padding: .75rem; font-size: .9rem; color: #0f172a; line-height: 1.6; outline: none; }
.agw-editor__area:empty:before { content: attr(data-placeholder); color: #94a3b8; pointer-events: none; }
.agw-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; }
.agw-editor__ia:hover { filter: brightness(1.08); }
.agw-editor__ia.is-loading { opacity: .7; cursor: default; }
.agw-editor__ia .material-symbols-outlined { font-size: 1rem; }

/* Uploader de fotos (gestão) */
.agw-fotos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr)); gap: .6rem; margin-bottom: .75rem; }
.agw-fotos-grid:empty { margin-bottom: 0; }
.agw-foto { position: relative; aspect-ratio: 1; border-radius: .6rem; overflow: hidden; border: 1px solid #e2e8f0; background: #f1f5f9; cursor: grab; }
.agw-foto img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.agw-foto.is-dragging { opacity: .4; }
.agw-foto__primary { display: none; position: absolute; bottom: 0; left: 0; right: 0; background: rgba(217,119,6,.92); color: #fff; font-size: .6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; text-align: center; padding: 2px; }
.agw-fotos-grid .agw-foto:first-child .agw-foto__primary { display: block; }
.agw-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; }
.agw-foto__remove:hover { background: #e11d48; }
.agw-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; }
.agw-fotos-add:hover { border-color: #d97706; color: #d97706; }
.agw-fotos-status { color: #64748b; }

/* ===== Single ===== */
.agw-single__grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 900px) { .agw-single__grid { grid-template-columns: 3fr 2fr; align-items: start; } }
.agw-single__main { aspect-ratio: 4 / 3; border-radius: 1rem; overflow: hidden; background: #f1f5f9; }
.agw-single__main img { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
.agw-single__main--ph { display: flex; align-items: center; justify-content: center; color: #cbd5e1; }
.agw-single__main--ph .material-symbols-outlined { font-size: 4rem; }
.agw-single__thumbs { display: flex; gap: .5rem; margin-top: .6rem; overflow-x: auto; scrollbar-width: none; }
.agw-single__thumbs::-webkit-scrollbar { display: none; }
.agw-single__thumb { flex: 0 0 auto; width: 4.5rem; height: 4.5rem; border-radius: .6rem; overflow: hidden; border: 2px solid transparent; padding: 0; background: none; cursor: pointer; }
.agw-single__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.agw-single__thumb.is-active { border-color: #d97706; }
.agw-single__cat { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #d97706; }
.agw-single__titulo { font-size: 1.6rem; font-weight: 800; color: #0f172a; margin: .4rem 0 1rem; line-height: 1.3; }
.agw-single__valor-principal { font-size: 1.9rem; font-weight: 800; color: #047857; margin: 0 0 .3rem; }
.agw-single__disclaimer { display: flex; align-items: flex-start; gap: .4rem; font-size: .8rem; color: #94a3b8; margin: 0 0 1.25rem; }
.agw-single__disclaimer .material-symbols-outlined { font-size: 1rem; margin-top: .05rem; }
.agw-single__ofertas { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1.5rem; }
.agw-single__oferta { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .85rem 1rem; border: 1px solid #fde68a; border-radius: .8rem; background: #fffbeb; text-decoration: none; color: #0f172a; font-weight: 700; transition: background .2s, border-color .2s; }
.agw-single__oferta:hover { background: #fef3c7; border-color: #f59e0b; }
.agw-single__oferta-loja { display: inline-flex; align-items: center; gap: .5rem; }
.agw-single__oferta-loja .material-symbols-outlined { color: #d97706; }
.agw-single__oferta-right { display: inline-flex; align-items: center; gap: .6rem; }
.agw-single__oferta-preco { color: #047857; font-weight: 800; }
.agw-single__descricao-wrap { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid #e2e8f0; max-width: 46rem; }
.agw-single__descricao-titulo { font-size: 1.15rem; font-weight: 800; color: #0f172a; margin: 0 0 .9rem; }
.agw-single__descricao { color: #334155; font-size: .95rem; line-height: 1.7; }
.agw-single__descricao h2, .agw-single__descricao h3, .agw-single__descricao h4 { font-weight: 800; color: #0f172a; margin: 1rem 0 .4rem; }
.agw-single__descricao p { margin: 0 0 .75rem; }
.agw-single__descricao ul { list-style: disc; padding-left: 1.25rem; margin: 0 0 .75rem; }
.agw-single__descricao ol { list-style: decimal; padding-left: 1.25rem; margin: 0 0 .75rem; }
.agw-single__descricao a { color: #d97706; text-decoration: underline; }
