/*
Theme Name: Good4u Ofertas
Description: Tema de agregador de ofertas do Good4u — grade de ofertas, sem carrinho/checkout.
Author: Good4u
Version: 1.0
Text Domain: good4u
Requires Plugins: woocommerce
*/

:root {
	--g4u-ink: #000000;
	--g4u-accent: #ff5b5c;
	--g4u-accent-dark: #e2494a;
	--g4u-cta: #00c375;
	--g4u-cta-dark: #00a863;
	--g4u-bg: #eef1f2;
	--g4u-box: #ffffff;
	--g4u-border: #dde2e4;
	--g4u-muted: #6b7378;
	--g4u-strike: #9aa1a5;
	--g4u-font-display: 'Poppins', sans-serif;
	--g4u-font-body: 'Montserrat', sans-serif;
	--g4u-radius: 10px;
	--g4u-shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 20px -12px rgba(0,0,0,.15);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--g4u-bg);
	color: var(--g4u-ink);
	font-family: var(--g4u-font-body);
	font-size: 15px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
	font-family: var(--g4u-font-display);
	font-weight: 700;
	line-height: 1.2;
	text-wrap: balance;
	margin: 0 0 .5em;
}

.g4u-wrap {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 15px;
}

@media (min-width: 1214px) {
	.g4u-wrap { padding: 0; }
}

/* ---------- header ---------- */

.g4u-header {
	background: var(--g4u-box);
	border-bottom: 1px solid var(--g4u-border);
	position: sticky;
	top: 0;
	z-index: 50;
	padding: 0 15px;
}

.g4u-header__bar {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 0;
}

@media (min-width: 768px) {
	.g4u-header__bar {
		gap: 24px;
		padding: 14px 0;
	}
}

.g4u-logo img {
	height: 32px;
	width: auto;
}

@media (min-width: 768px) {
	.g4u-logo img { height: 38px; }
}

.g4u-search {
	flex: 1;
	display: flex;
	min-width: 0;
}

@media (min-width: 768px) {
	.g4u-search { flex: 0 1 480px; }
}

.g4u-search input {
	flex: 1;
	width: 100%;
	border: 1px solid var(--g4u-border);
	border-right: none;
	border-radius: 8px 0 0 8px;
	padding: 10px 12px;
	font-family: var(--g4u-font-body);
	font-size: 16px; /* >=16px evita zoom automático no iOS */
	background: var(--g4u-bg);
	min-width: 0;
}

.g4u-search input:focus { outline: 2px solid var(--g4u-accent); outline-offset: -1px; }

.g4u-search button {
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	background: var(--g4u-ink);
	color: #fff;
	border-radius: 0 8px 8px 0;
	padding: 0 14px;
	min-width: 44px;
	cursor: pointer;
}

/* botão hambúrguer: só existe visualmente no mobile */
.g4u-menu-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	flex: 0 0 auto;
	border: 1px solid var(--g4u-border);
	border-radius: 8px;
	background: var(--g4u-box);
	color: var(--g4u-ink);
	cursor: pointer;
}

@media (min-width: 768px) {
	.g4u-menu-toggle { display: none; }
}

.g4u-nav {
	display: none;
	flex-direction: column;
	gap: 2px;
	padding: 8px 0 14px;
	font-size: 14px;
	font-weight: 600;
}

.g4u-nav.is-open { display: flex; }

.g4u-nav a {
	white-space: nowrap;
	color: var(--g4u-muted);
	padding: 10px 4px;
	border-bottom: 1px solid var(--g4u-border);
	display: flex;
	align-items: center;
}

@media (min-width: 768px) {
	.g4u-nav {
		display: flex;
		flex-direction: row;
		gap: 18px;
		padding: 4px 0 12px;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		font-size: 13.5px;
	}

	.g4u-nav a {
		padding: 10px 2px;
		border-bottom: 2px solid transparent;
	}
}

.g4u-nav a:hover,
.g4u-nav a.is-active {
	color: var(--g4u-ink);
	border-color: var(--g4u-accent);
}

/* ---------- hero ---------- */

.g4u-hero {
	padding: 34px 0 8px;
}

.g4u-hero h1 {
	font-size: clamp(22px, 3.2vw, 32px);
}

.g4u-hero p {
	color: var(--g4u-muted);
	margin: 0;
	font-size: 14.5px;
}

/* ---------- tabs ---------- */

.g4u-tabs {
	display: flex;
	gap: 8px;
	margin: 22px 0 18px;
	flex-wrap: wrap;
}

.g4u-tabs a {
	font-family: var(--g4u-font-display);
	font-weight: 600;
	font-size: 13.5px;
	padding: 11px 16px;
	min-height: 40px;
	display: inline-flex;
	align-items: center;
	border-radius: 999px;
	background: var(--g4u-box);
	border: 1px solid var(--g4u-border);
	color: var(--g4u-muted);
}

.g4u-tabs a.is-active {
	background: var(--g4u-ink);
	border-color: var(--g4u-ink);
	color: #fff;
}

/* ---------- grid & card ---------- */

.g4u-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	padding: 4px 0 48px;
}

@media (min-width: 560px) {
	.g4u-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
}

.g4u-card {
	background: var(--g4u-box);
	border: 1px solid var(--g4u-border);
	border-radius: var(--g4u-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow .15s ease, transform .15s ease;
}

.g4u-card:hover {
	box-shadow: var(--g4u-shadow);
	transform: translateY(-2px);
}

.g4u-card__media {
	position: relative;
	aspect-ratio: 1 / 1;
	background: var(--g4u-box);
}

.g4u-card__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.g4u-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	background: var(--g4u-accent);
	color: #fff;
	font-family: var(--g4u-font-display);
	font-weight: 700;
	font-size: 12px;
	padding: 3px 8px;
	border-radius: 6px;
	line-height: 1.4;
}

.g4u-store {
	position: absolute;
	bottom: 10px;
	left: 10px;
	background: rgba(255,255,255,.92);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	padding: 4px 8px;
	border-radius: 6px;
	text-transform: uppercase;
	letter-spacing: .03em;
	line-height: 0;
}

/* !important pq o CSS do WooCommerce (.woocommerce img { height: auto }) tem
   mais especificidade que uma classe sozinha e sobrescreveria esses tamanhos fixos. */
.g4u-store img {
	height: 12px !important;
	width: auto !important;
}

.g4u-deal__meta-logo {
	height: 16px !important;
	width: auto !important;
}

.g4u-card__body {
	padding: 12px 14px 14px;
	display: flex;
	flex-direction: column;
	gap: 0px;
	flex: 1;
}

.g4u-card__title { margin-bottom: 6px; }
.g4u-shipping { margin-bottom: 6px; }

.g4u-card__stats {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 4px;
	font-size: .65rem;
	font-weight: 500;
}

.g4u-card__stats-sold { opacity: .7; }

.g4u-card__stats-rating {
	color: #ff9f1a;
	font-weight: 900;
}

.g4u-card__title {
	font-family: var(--g4u-font-body);
	font-weight: 600;
	font-size: 13.5px;
	line-height: 1.35;
	color: var(--g4u-ink);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.7em;
}

.g4u-price {
	margin-top: auto;
}

.g4u-price__old {
	display: block;
	font-size: 12px;
	color: var(--g4u-strike);
	text-decoration: line-through;
}

.g4u-price__now {
	display: block;
	font-family: var(--g4u-font-display);
	font-weight: 700;
	font-size: 21px;
	letter-spacing: -1px;
	color: #00c375;
}

.g4u-price__now--text {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--g4u-accent-dark);
	font-family: var(--g4u-font-body);
}

.g4u-cta {
	display: block;
	text-align: center;
	background: var(--g4u-cta);
	color: #fff;
	font-family: var(--g4u-font-display);
	font-weight: 600;
	font-size: 13px;
	padding: 10px;
	border-radius: 8px;
	margin-top: 4px;
	border: none;
	cursor: pointer;
}

.g4u-cta:hover { background: var(--g4u-cta-dark); }

.g4u-cta--outline {
	background: transparent;
	border: 1.5px solid var(--g4u-ink);
	color: var(--g4u-ink);
}

/* ---------- single deal page ---------- */

.g4u-breadcrumb {
	font-size: 12.5px;
	color: var(--g4u-muted);
	padding: 14px 0 0;
}

.g4u-breadcrumb p { margin: 0; }
.g4u-breadcrumb a { color: var(--g4u-muted); text-decoration: underline; }

.g4u-deal {
	background: var(--g4u-box);
	border: 1px solid var(--g4u-border);
	border-radius: var(--g4u-radius);
	padding: 18px;
	margin: 18px 0;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 20px;
}

@media (min-width: 768px) {
	.g4u-deal {
		padding: 28px;
		margin: 28px 0;
		grid-template-columns: 340px minmax(0, 1fr);
		gap: 32px;
	}
}

.g4u-deal__gallery {
	min-width: 0;
}

.g4u-deal__gallery img {
	width: 100%;
	max-width: 100%;
	height: auto;
	border-radius: var(--g4u-radius);
	background: var(--g4u-box);
	border: 1px solid var(--g4u-border);
	aspect-ratio: 1/1;
	object-fit: contain;
}

.g4u-deal__badges {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 6px;
}

.g4u-deal__meta {
	color: var(--g4u-muted);
	font-size: 13px;
}

.g4u-deal__rating {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px 8px;
	font-size: .7rem;
	text-transform: uppercase;
	font-weight: 600;
	color: var(--g4u-muted);
	margin-bottom: 14px;
}

.g4u-deal__rating > *:not(:first-child)::before {
	content: "|";
	margin-right: 8px;
	color: var(--g4u-border);
	font-weight: 400;
}

.g4u-star-row {
	display: inline-flex;
	gap: 1px;
}

.g4u-star {
	position: relative;
	display: inline-block;
	font-size: 13px;
	line-height: 1;
}

.g4u-star__bg { color: var(--g4u-border); }

.g4u-star__fill {
	position: absolute;
	top: 0;
	left: 0;
	overflow: hidden;
	white-space: nowrap;
	color: #ff9f1a;
}

.g4u-shopee-reviews__note {
	font-size: 13px;
	color: var(--g4u-muted);
	margin: 0 0 16px;
}

.g4u-shopee-reviews {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 12px;
}

.g4u-shopee-review {
	background: var(--g4u-box);
	border: 1px solid var(--g4u-border);
	border-radius: var(--g4u-radius);
	padding: 16px 18px;
}

.g4u-shopee-review__top {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}

.g4u-shopee-review__head {
	display: flex;
	flex-direction: column;
	margin-bottom: -2px;
}

.g4u-shopee-review__head strong { font-size: 13.5px; }
.g4u-shopee-review__head span { font-size: 12px; color: var(--g4u-muted); }

.g4u-shopee-review p {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.6;
	color: var(--g4u-ink);
}

.g4u-shopee-review__avatar-img {
	flex: 0 0 auto;
	width: 38px;
	height: 38px;
	object-fit: cover;
	border-radius: 50%;
	border: 1px solid var(--g4u-border);
}

.g4u-shopee-review__avatar {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--g4u-bg);
	color: var(--g4u-strike);
}

.g4u-shopee-review__avatar svg {
	width: 20px;
	height: 20px;
}

.g4u-shopee-reviews__all {
	display: inline-flex;
	width: auto;
	margin-top: 6px;
	line-height: 1;
	align-items: center;
}

.g4u-shopee-reviews__all:hover {
	border-color: transparent;
	color: #fff;
}

.g4u-shipping {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11.5px;
	font-weight: 700;
	color: #1a8f5f;
	background: #e6f6ee;
	padding: 3px 9px;
	border-radius: 999px;
	text-transform: uppercase;
	letter-spacing: .02em;
}

.g4u-card__body .g4u-shipping {
	align-self: flex-start;
}

.g4u-shipping--full {
	color: #0086ff;
	background: #e5f2ff;
}

.g4u-deal__price {
	margin: 14px 0 18px;
}

.g4u-deal__price .g4u-price__old { font-size: 15px; }
.g4u-deal__price .g4u-price__now { font-size: 28px; }
.g4u-deal__price .g4u-price__now--text { font-size: 16px; }

.g4u-deal__cta {
	display: inline-block;
	padding: 14px 30px;
	font-size: 15px;
}

.g4u-coupon {
	margin-bottom: 14px;
}

.g4u-coupon__tag {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #e6f6ee;
	border: 1px dashed #1a8f5f;
	border-radius: 8px;
	padding: 6px 8px 6px 12px;
	font-family: var(--g4u-font-display);
	font-size: 12.5px;
}

.g4u-coupon__tag strong { color: #1a8f5f; }

.g4u-coupon__code {
	font-weight: 700;
	letter-spacing: .03em;
	color: var(--g4u-ink);
}

.g4u-coupon__copy {
	background: #fff;
	border: 1px solid #1a8f5f;
	color: #1a8f5f;
	font-family: var(--g4u-font-display);
	font-weight: 600;
	font-size: 12px;
	padding: 5px 10px;
	border-radius: 6px;
	cursor: pointer;
}

.g4u-coupon__copy:hover { background: #1a8f5f; color: #fff; }

.g4u-coupon__note {
	margin: 6px 0 0;
	font-size: 12px;
	color: var(--g4u-muted);
}

.g4u-deal__desc {
	margin-top: 26px;
	line-height: 1.7;
	font-size: 14.5px;
	max-width: 65ch;
}

.g4u-deal__desc h2 { font-size: 18px; margin-top: 1.2em; }

.g4u-deal__tags {
	margin-top: 24px;
	padding-top: 18px;
	border-top: 1px solid var(--g4u-border);
}

.g4u-deal__tags-label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--g4u-muted);
	margin-bottom: 8px;
}

.g4u-tag-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.g4u-tag {
	font-size: 12.5px;
	font-weight: 600;
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--g4u-bg);
	color: var(--g4u-muted);
	border: 1px solid var(--g4u-border);
}

.g4u-tag:hover { color: var(--g4u-ink); border-color: var(--g4u-accent); }

/* ---------- loja / vendedor ---------- */

.g4u-store-card {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	background: var(--g4u-box);
	border: 1px solid var(--g4u-border);
	border-radius: var(--g4u-radius);
	padding: 20px;
	margin: 0 0 28px;
}

.g4u-store-card__logos {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 12px;
}

.g4u-store-card__sep {
	width: 1px;
	align-self: stretch;
	min-height: 40px;
	background: var(--g4u-border);
}

.g4u-store-card__badge {
	flex: 0 0 auto;
	color: #fff;
	font-family: var(--g4u-font-display);
	font-weight: 700;
	font-size: 13px;
	padding: 8px 14px;
	border-radius: 8px;
	white-space: nowrap;
}

.g4u-store-card__logo {
	flex: 0 0 auto;
	width: 56px !important;
	height: 56px !important;
	object-fit: cover;
	border-radius: 50%;
	border: 1px solid var(--g4u-border);
	background: var(--g4u-box);
}

.g4u-store-card__logo--network {
	width: 84px !important;
	height: 27px !important;
	object-fit: contain;
	border-radius: 0;
	border: none;
	background: none;
}

.g4u-store-card strong {
	display: block;
	font-family: var(--g4u-font-display);
	font-size: 15px;
	margin-bottom: -2px;
}

.g4u-store-card p {
	margin: 0;
	font-size: 13.5px;
	color: var(--g4u-muted);
	line-height: 1.6;
}

@media (max-width: 480px) {
	.g4u-store-card { flex-direction: column; }
}

/* ---------- comentários ---------- */

.g4u-comments {
	margin-top: 20px;
	padding-top: 8px;
}

.g4u-comments .comments-title,
.g4u-comments #reply-title {
	font-family: var(--g4u-font-display);
	font-size: 20px;
	margin-bottom: 16px;
}

.g4u-comments ol.comment-list,
.woocommerce #reviews #comments ol.commentlist {
	list-style: none;
	margin: 0 0 24px;
	padding: 0;
}

.g4u-comments .comment-body {
	background: var(--g4u-box);
	border: 1px solid var(--g4u-border);
	border-radius: var(--g4u-radius);
	padding: 16px 18px;
	margin-bottom: 12px;
}

.g4u-comments .comment-author { font-weight: 600; font-size: 14px; }
.g4u-comments .comment-metadata { font-size: 12px; color: var(--g4u-muted); margin-bottom: 8px; }
.g4u-comments .comment-metadata a { color: var(--g4u-muted); }

.g4u-comments .comment-form input[type="text"],
.g4u-comments .comment-form input[type="email"],
.g4u-comments .comment-form input[type="url"],
.g4u-comments .comment-form textarea {
	width: 100%;
	border: 1px solid var(--g4u-border);
	border-radius: 8px;
	padding: 10px 12px;
	font-family: var(--g4u-font-body);
	font-size: 15px;
	background: var(--g4u-bg);
	margin-bottom: 12px;
}

.g4u-comments .comment-form-comment { display: flex; flex-direction: column; }

.g4u-comments .comment-form p { margin: 0 0 12px; }

.g4u-comments .form-submit input {
	background: var(--g4u-accent);
	color: #fff;
	border: none;
	font-family: var(--g4u-font-display);
	font-weight: 600;
	font-size: 14px;
	padding: 11px 24px;
	border-radius: 8px;
	cursor: pointer;
}

.g4u-comments .form-submit input:hover { background: var(--g4u-accent-dark); }

.g4u-deal__desc video,
.g4u-deal__desc .wp-video,
.g4u-deal__desc iframe {
	max-width: 100%;
	height: auto;
}

.g4u-deal__thumbs {
	display: flex;
	gap: 8px;
	margin-top: 10px;
}

.g4u-thumb {
	padding: 0;
	border: none;
	background: transparent;
	cursor: pointer;
	line-height: 0;
}

.g4u-deal__thumbs img {
	width: 60px;
	height: 60px;
	object-fit: contain;
	background: var(--g4u-box);
	border-radius: 6px;
	border: 2px solid var(--g4u-border);
	transition: border-color .15s ease;
}

.g4u-thumb:hover img { border-color: var(--g4u-strike); }

.g4u-thumb.is-active img { border-color: var(--g4u-accent); }

.g4u-pagination {
	display: flex;
	gap: 6px;
	justify-content: center;
	padding-bottom: 40px;
	font-family: var(--g4u-font-display);
	font-weight: 600;
	font-size: 13px;
}

.g4u-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	border-radius: 8px;
	background: var(--g4u-box);
	border: 1px solid var(--g4u-border);
	color: var(--g4u-muted);
	padding: 0 8px;
}

.g4u-pagination .page-numbers.current {
	background: var(--g4u-ink);
	border-color: var(--g4u-ink);
	color: #fff;
}

/* ---------- footer ---------- */

.g4u-footer {
	background: var(--g4u-ink);
	color: #cfd3d5;
	margin-top: 40px;
	padding: 36px 0 24px;
	font-size: 13px;
}

.g4u-footer a { color: #fff; }

.g4u-footer__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 24px;
	margin-bottom: 24px;
}

.g4u-footer h4 {
	color: #fff;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .04em;
	margin-bottom: 12px;
}

.g4u-footer__bottom {
	border-top: 1px solid rgba(255,255,255,.12);
	padding-top: 18px;
	color: #8b9195;
}

/* ---------- empty state ---------- */

.g4u-empty {
	padding: 60px 0;
	text-align: center;
	color: var(--g4u-muted);
}

/* Toque: todo alvo interativo (link/botão) deve ter no mínimo 44px de altura */
.g4u-cta,
.g4u-card {
	min-height: 44px;
}
