/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes / Iberuna
 * Template: blocksy
 * Text Domain: blocksy
 * Version: 1.2.1
 */

/* =========================================================
   IBERUNA — RESULTADOS DE PESQUISA DE PEÇAS
   ========================================================= */

.iberuna-search-page {
	background: #f6f7f8;
	padding: 52px 20px 72px;
	min-height: 60vh;
}

.iberuna-search-container {
	width: 100%;
	max-width: 1180px;
	margin: 0 auto;
}

/* Cabeçalho */

.iberuna-search-header {
	margin-bottom: 32px;
}

.iberuna-search-eyebrow {
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #667085;
}

.iberuna-search-header h1 {
	margin: 0;
	font-size: clamp(28px, 4vw, 42px);
	line-height: 1.15;
	font-weight: 700;
	color: #172b4d;
}

.iberuna-search-count {
	margin: 10px 0 24px;
	font-size: 15px;
	color: #667085;
}

/* Caixa de pesquisa */

.iberuna-search-again {
	max-width: 760px;
}

.iberuna-search-again form,
.iberuna-search-empty form {
	position: relative;
	display: flex;
	width: 100%;
}

.iberuna-search-again input[type="search"],
.iberuna-search-empty input[type="search"] {
	width: 100%;
	min-height: 52px;
	padding: 0 56px 0 18px;
	border: 1px solid #d0d5dd;
	border-radius: 8px;
	background: #fff;
	font-size: 16px;
	color: #172b4d;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.iberuna-search-again input[type="search"]:focus,
.iberuna-search-empty input[type="search"]:focus {
	outline: none;
	border-color: #667085;
	box-shadow: 0 0 0 3px rgba(102, 112, 133, 0.12);
}

.iberuna-search-again button,
.iberuna-search-empty button {
	min-width: 52px;
}

/* Lista de resultados */

.iberuna-search-results {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* Cartão */

.iberuna-part-card {
	display: grid;
	grid-template-columns: 190px minmax(0, 1fr) 190px;
	gap: 28px;
	align-items: center;
	padding: 22px;
	background: #fff;
	border: 1px solid #e4e7ec;
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.04);
	transition:
		border-color 0.2s ease,
		box-shadow 0.2s ease,
		transform 0.2s ease;
}

.iberuna-part-card:hover {
	border-color: #cfd4dc;
	box-shadow: 0 6px 18px rgba(16, 24, 40, 0.07);
	transform: translateY(-1px);
}

/* Imagem */

.iberuna-part-card__image {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 190px;
	height: 190px;
	padding: 14px;
	background: #f8f9fa;
	border-radius: 8px;
	overflow: hidden;
}

.iberuna-part-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

/* Conteúdo */

.iberuna-part-card__content {
	min-width: 0;
}

.iberuna-part-card__brand {
	margin-bottom: 7px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #667085;
}

.iberuna-part-card__title {
	margin: 0 0 16px;
	font-size: 23px;
	line-height: 1.3;
	font-weight: 700;
}

.iberuna-part-card__title a {
	color: #172b4d;
	text-decoration: none;
}

.iberuna-part-card__title a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.iberuna-part-card__references {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 20px;
	margin-top: 4px;
}

.iberuna-part-card__reference {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	font-size: 14px;
	color: #667085;
}

.iberuna-part-card__reference strong {
	color: #344054;
	font-weight: 700;
}

.iberuna-part-card__stock {
	margin-top: 12px;
	font-size: 14px;
	font-weight: 600;
}

.iberuna-part-card__stock p {
	margin: 0;
}

/* Motivo da correspondência de pesquisa */

.iberuna-part-card__match {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	max-width: 620px;
	margin-top: 15px;
	padding: 10px 12px;
	border: 1px solid #e4e7ec;
	border-radius: 8px;
	background: #f8fafc;
	font-size: 13px;
	line-height: 1.4;
}

.iberuna-part-card__match.is-verified {
	border-color: #b7dfc5;
	background: #f2fbf5;
}

.iberuna-part-card__match-icon {
	flex: 0 0 auto;
	font-size: 15px;
	font-weight: 700;
}

.iberuna-part-card__match.is-verified .iberuna-part-card__match-icon {
	color: #16794a;
}

.iberuna-part-card__match-content {
	display: flex;
	flex-direction: column;
	gap: 2px;
	color: #667085;
}

.iberuna-part-card__match-content strong {
	color: #344054;
	font-weight: 700;
}

/* Preço e ação */

.iberuna-part-card__buy {
	align-self: stretch;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: center;
	border-left: 1px solid #eaecf0;
	padding-left: 24px;
}

.iberuna-part-card__price {
	margin-bottom: 18px;
	text-align: right;
	font-size: 24px;
	line-height: 1.2;
	font-weight: 700;
	color: #172b4d;
}

.iberuna-part-card__price del {
	display: block;
	font-size: 14px;
	font-weight: 400;
	color: #98a2b3;
}

.iberuna-part-card__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 20px;
	border-radius: 7px;
	background: #172b4d;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}

.iberuna-part-card__button:hover {
	background: #243b60;
	color: #fff;
}

/* Paginação */

.iberuna-search-pagination {
	margin-top: 32px;
}

.iberuna-search-pagination .nav-links {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}

/* Sem resultados */

.iberuna-search-empty {
	padding: 36px;
	border: 1px solid #e4e7ec;
	border-radius: 12px;
	background: #fff;
}

.iberuna-search-empty h2 {
	margin-top: 0;
	color: #172b4d;
}

.iberuna-search-empty p {
	color: #667085;
}

/* Resultado não-produto, caso algum apareça */

.iberuna-search-generic-result {
	padding: 20px 24px;
	background: #fff;
	border: 1px solid #e4e7ec;
	border-radius: 10px;
}

.iberuna-search-generic-result h2 {
	margin: 0;
	font-size: 20px;
}

/* Tablet */

@media (max-width: 900px) {

	.iberuna-part-card {
		grid-template-columns: 150px minmax(0, 1fr);
	}

	.iberuna-part-card__image {
		width: 150px;
		height: 150px;
	}

	.iberuna-part-card__buy {
		grid-column: 2;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		border-left: 0;
		border-top: 1px solid #eaecf0;
		padding: 18px 0 0;
	}

	.iberuna-part-card__price {
		margin: 0;
		text-align: left;
	}
}

/* Telemóvel */

@media (max-width: 620px) {

	.iberuna-search-page {
		padding: 32px 14px 52px;
	}

	.iberuna-part-card {
		display: block;
		padding: 16px;
	}

	.iberuna-part-card__image {
		width: 100%;
		height: 220px;
		margin-bottom: 18px;
	}

	.iberuna-part-card__title {
		font-size: 20px;
	}

	.iberuna-part-card__buy {
		margin-top: 18px;
		padding-top: 18px;
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
	}

	.iberuna-part-card__price {
		text-align: left;
		font-size: 22px;
	}

	.iberuna-part-card__button {
		width: 100%;
	}
}

/* =========================================================
   IBERUNA — PÁGINA DE PRODUTO V1
   Leitura rápida, imagem controlada e visual técnico.
   ========================================================= */

.single-product div.product {
	--iberuna-product-radius: 12px;
}

/* A peça deve aparecer inteira e não dominar toda a primeira dobra. */
.single-product .woocommerce-product-gallery,
.single-product div.product div.images {
	display: flex;
	align-items: flex-start;
	justify-content: center;
}

.single-product .woocommerce-product-gallery__wrapper {
	width: 100%;
}

.single-product .woocommerce-product-gallery__image {
	display: flex !important;
	align-items: center;
	justify-content: center;
	min-height: 420px;
	max-height: 520px;
	overflow: hidden;
	background: #fff;
	border-radius: var(--iberuna-product-radius);
}

.single-product .woocommerce-product-gallery__image a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

.single-product .woocommerce-product-gallery__image img {
	display: block;
	width: auto !important;
	max-width: 100% !important;
	height: auto !important;
	max-height: 500px !important;
	margin: 0 auto;
	object-fit: contain;
}

/* Hierarquia visual do resumo comercial. */
.single-product div.product .summary .product_title {
	letter-spacing: -0.02em;
	line-height: 1.18;
}

.single-product div.product .summary .price {
	margin-top: 12px;
	margin-bottom: 26px;
}

.single-product div.product .summary .woocommerce-product-details__short-description {
	max-width: 690px;
	line-height: 1.65;
}

/* Zona de compra clara e fácil de ler. */
.single-product div.product .summary form.cart {
	margin-top: 24px;
	padding-top: 22px;
	border-top: 1px solid #e4e7ec;
}

/* Metadados técnicos mais discretos que título/preço. */
.single-product div.product .product_meta {
	margin-top: 28px;
	padding-top: 22px;
	border-top: 1px solid #e4e7ec;
	font-size: 13px;
	line-height: 1.8;
}

/* Tabs / especificações técnicas. */
.single-product .woocommerce-tabs {
	margin-top: 52px;
}

.single-product .woocommerce-tabs ul.tabs {
	border-bottom: 1px solid #e4e7ec;
}

.single-product .woocommerce-tabs ul.tabs li a {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.single-product .woocommerce-Tabs-panel--additional_information h2 {
	margin-bottom: 22px;
	font-size: 24px;
	color: #172b4d;
}

/* A tabela deve parecer catálogo técnico, não tabela genérica. */
.single-product table.woocommerce-product-attributes {
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	border: 1px solid #e4e7ec;
	border-radius: 10px;
}

.single-product table.woocommerce-product-attributes th,
.single-product table.woocommerce-product-attributes td {
	padding: 14px 16px;
	border-color: #e4e7ec;
	font-size: 14px;
	line-height: 1.4;
}

.single-product table.woocommerce-product-attributes th {
	width: 50%;
	background: #f8fafc;
	font-weight: 600;
	color: #344054;
}

.single-product table.woocommerce-product-attributes td {
	background: #fff;
	color: #172b4d;
}

@media (max-width: 999px) {
	.single-product .woocommerce-product-gallery__image {
		min-height: 340px;
		max-height: 440px;
	}

	.single-product .woocommerce-product-gallery__image img {
		max-height: 420px !important;
	}
}

@media (max-width: 620px) {
	.single-product .woocommerce-product-gallery__image {
		min-height: 280px;
		max-height: 360px;
	}

	.single-product .woocommerce-product-gallery__image img {
		max-height: 340px !important;
	}

	.single-product .woocommerce-tabs {
		margin-top: 36px;
	}

	.single-product table.woocommerce-product-attributes th,
	.single-product table.woocommerce-product-attributes td {
		padding: 12px;
		font-size: 13px;
	}
}

/* Iberuna 1.2.1 — garantir que os relacionados automáticos
   do WooCommerce não aparecem na ficha de produto. */
.single-product .related.products {
	display: none !important;
}

