/**
 * Loja e categorias (Hello theme) - estilo vitrine Capricho.
 */

/* Container geral das listagens */
.woocommerce-shop .site-main,
.woocommerce-archive .site-main {
	max-width: 1320px;
	margin-left: auto;
	margin-right: auto;
}

/* ==========================================================
   Cabeçalho da página/categoria
   ========================================================== */
.woocommerce .woocommerce-products-header {
	margin-bottom: 32px;
}

.woocommerce .woocommerce-products-header h1,
.woocommerce-page h1.page-title,
.woocommerce .woocommerce-products-header .page-title {
	font-family: Georgia, 'Times New Roman', Times, serif;
	font-size: 34px;
	font-weight: 400;
	letter-spacing: 0.01em;
	text-transform: none;
	color: #1c1c1c;
	margin: 0 0 10px;
}

.woocommerce .woocommerce-products-header .term-description,
.woocommerce .term-description {
	font-size: 14px;
	line-height: 1.8;
	color: #888;
	max-width: 720px;
}

.woocommerce .woocommerce-products-header .term-description p {
	margin: 0;
}

@media (max-width: 768px) {
	.woocommerce .woocommerce-products-header h1,
	.woocommerce-page h1.page-title {
		font-size: 26px;
	}
}

/* Linha de contagem + ordenação */
.woocommerce .woocommerce-products-header {
	display: none;
}

.woocommerce nav.woocommerce-breadcrumb {
	display: none;
}

.woocommerce .woocommerce-result-count {
	font-size: 13px;
	color: #999;
	margin: 0 0 20px;
}

.woocommerce .woocommerce-ordering {
	float: none;
	margin: 0 0 20px auto;
	max-width: 260px;
}

.woocommerce .woocommerce-ordering select {
	width: 100%;
	height: auto;
	min-height: 0;
	padding: 8px 14px;
	border: 1px solid #dcdcdc;
	border-radius: 0;
	background: #fff;
	font-size: 13px;
	color: #555;
	appearance: auto;
	-webkit-appearance: menulist;
}

/* ==========================================================
   Grade de produtos (estilo vitrine)
   ========================================================== */
.woocommerce ul.products,
.woocommerce-page ul.products {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 32px 15px;
	margin: 0;
	padding: 0;
	clear: both;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
	display: none;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
	float: none;
	width: auto !important;
	margin: 0;
	padding: 0;
	text-align: center;
	position: relative;
}

/* Link principal vira o card */
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link,
.woocommerce ul.products li.product > a {
	display: block;
	position: relative;
	text-decoration: none;
}

/* Badge "Destaque Capricho" */
.woocommerce ul.products li.product .capricho-vit-badge {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 3;
	display: inline-flex !important;
	align-items: center;
	background: #1c1c1c;
	color: #fff;
	font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.1em;
	line-height: 1;
	text-transform: uppercase;
	padding: 6px 10px;
	pointer-events: none;
	overflow: hidden;
	white-space: nowrap;
	max-width: 100%;
}

.woocommerce ul.products li.product .capricho-vit-badge-track {
	display: inline-flex;
	align-items: center;
	animation: capricho-vit-badge-slide 12s linear infinite;
}

.woocommerce ul.products li.product .capricho-vit-badge-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding-right: 6px;
	white-space: nowrap;
	flex-shrink: 0;
}

.woocommerce ul.products li.product .capricho-vit-badge-star {
	font-size: 11px;
	line-height: 1;
}

@keyframes capricho-vit-badge-slide {
	0% {
		transform: translateX(-50%);
	}
	100% {
		transform: translateX(0);
	}
}

/* Imagem principal: retrato 3/4 */
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link img,
.woocommerce ul.products li.product > a img.attachment-woocommerce_thumbnail,
.woocommerce ul.products li.product > a img.wp-post-image {
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	display: block;
	margin: 0 0 14px;
	background: #f4f1ec;
}

/* Hover: vídeo ou foto secundária cobre a foto */
.woocommerce ul.products li.product .capricho-shop-video,
.woocommerce ul.products li.product .capricho-shop-alt {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	opacity: 0;
	transition: opacity 0.35s ease;
	pointer-events: none;
}

.woocommerce ul.products li.product:hover .capricho-shop-video,
.woocommerce ul.products li.product:hover .capricho-shop-alt {
	opacity: 1;
}

/* Sequência automática: vídeo do card em exibição (sem hover). */
.woocommerce ul.products li.product.capricho-autoplay-on .capricho-shop-video {
	opacity: 1;
}

/* Nome: maiúsculo centralizado */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h2,
.woocommerce ul.products li.product h3 {
	font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	letter-spacing: 0.08em;
	line-height: 1.4;
	text-transform: uppercase;
	color: #555;
	padding: 0;
	margin: 0 0 6px;
}

/* Preço centralizado em cinza */
.woocommerce ul.products li.product .price {
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0.04em;
	color: #999;
	margin: 0;
	display: block;
}

.woocommerce ul.products li.product .price del {
	opacity: 0.7;
}

.woocommerce ul.products li.product .price .capricho-preco-atacado {
	display: block;
	font-size: 10px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #8a5ec7;
}

/* Remove o botão "adicionar"/"ver opções" padrão do card (clique abre o modal) */
.woocommerce ul.products li.product .add_to_cart_button,
.woocommerce ul.products li.product .added_to_cart,
.woocommerce ul.products li.product a.button.product_type_variable,
.woocommerce ul.products li.product a.button.product_type_grouped,
.woocommerce ul.products li.product a.button.product_type_external {
	display: none !important;
}

/* Preço estilo vitrine (atacado + varejo para atacadista/admin) */
.woocommerce ul.products li.product .capricho-archive-price .capricho-vit-price {
	display: block;
	margin-top: 6px;
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0.04em;
	color: #999;
}

.woocommerce ul.products li.product .capricho-archive-price .capricho-vit-price-atacado {
	color: #333;
	font-weight: 600;
}

/* Selo de promoção discreto */
.woocommerce ul.products li.product .onsale {
	top: 10px;
	left: 10px;
	right: auto;
	margin: 0;
	border-radius: 0;
	background: #111;
	color: #fff;
	font-size: 10px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	padding: 5px 10px;
	line-height: 1;
	min-height: 0;
}

/* Avaliações ocultas na listagem para limpeza visual */
.woocommerce ul.products li.product .star-rating {
	display: none;
}

@media (max-width: 1024px) {
	.woocommerce ul.products,
	.woocommerce-page ul.products {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 768px) {
	.woocommerce ul.products,
	.woocommerce-page ul.products {
		grid-template-columns: repeat(2, 1fr);
		gap: 24px 12px;
	}

	.woocommerce .woocommerce-ordering {
		margin: 0 0 20px;
		max-width: none;
	}
}

/* ==========================================================
   Paginação
   ========================================================== */
/* Paginação oculta: a navegação é feita pelo botão "Carregar mais".
   O markup permanece no DOM porque o JS usa o link "próximo" para
   buscar a próxima página. */
.woocommerce nav.woocommerce-pagination {
	display: none;
}

.woocommerce nav.woocommerce-pagination {
	margin-top: 48px;
}

.woocommerce nav.woocommerce-pagination ul {
	border: none;
	display: flex;
	justify-content: center;
	gap: 8px;
	margin: 0;
}

.woocommerce nav.woocommerce-pagination ul li {
	border: none;
	float: none;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 12px;
	border: 1px solid #ddd;
	font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-size: 13px;
	color: #555;
	background: #fff;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.woocommerce nav.woocommerce-pagination ul li a:hover {
	border-color: #111;
	color: #111;
}

.woocommerce nav.woocommerce-pagination ul li span.current {
	background: #111;
	border-color: #111;
	color: #fff;
}

/* Widgets de filtro (atributos, preço, etc.) */
.woocommerce .widget-area .widget_title,
.woocommerce .widget-area .widget-title,
.woocommerce .widget .widget-title {
	font-family: Georgia, 'Times New Roman', Times, serif;
	font-size: 18px;
	font-weight: 400;
	color: #1c1c1c;
	margin: 0 0 14px;
}

.woocommerce .widget-area ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.woocommerce .widget-area ul li {
	font-size: 14px;
	padding: 6px 0;
	border-bottom: 1px solid #f0f0f0;
}

.woocommerce .widget-area ul li a {
	color: #555;
	text-decoration: none;
}

.woocommerce .widget-area ul li a:hover {
	color: #111;
}

/* ==========================================================
   Barra de filtros (cor / categoria)
   ========================================================== */
.capricho-shop-filters {
	margin: 0 0 22px;
	padding: 20px 0 4px;
	border-bottom: 1px solid #ececec;
}

.capricho-shop-filter-row {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	margin-bottom: 12px;
}

.capricho-shop-filter-label {
	flex-shrink: 0;
	min-width: 76px;
	font-family: Georgia, 'Times New Roman', Times, serif;
	font-size: 13px;
	letter-spacing: 0.6px;
	text-transform: uppercase;
	color: #1c1c1c;
	padding-top: 6px;
}

.capricho-shop-filter-options {
	display: grid;
	gap: 8px;
	width: 100%;
}

/* Chips de categoria: retângulos com padding, até 2 linhas */
a.capricho-shop-chip {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 14px 10px;
	border: 1px solid #dcdcdc;
	border-radius: 0;
	font-size: 11px;
	letter-spacing: 1px;
	text-transform: uppercase;
	text-align: center;
	color: #555;
	text-decoration: none;
	background: #fff;
	transition: all 0.2s ease;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

a.capricho-shop-chip:hover {
	border-color: #1c1c1c;
	color: #1c1c1c;
}

a.capricho-shop-chip.ativo {
	background: #1c1c1c;
	border-color: #1c1c1c;
	color: #fff;
}

/* Amostras de cor */
a.capricho-shop-swatch {
	display: inline-block;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: 1px solid rgba( 0, 0, 0, 0.12 );
	box-shadow: inset 0 0 0 2px #fff;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.capricho-shop-swatch:hover {
	transform: scale( 1.15 );
}

a.capricho-shop-swatch.ativo {
	box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px #1c1c1c;
}

/* Limpar filtros */
a.capricho-shop-clear {
	flex-shrink: 0;
	font-size: 12px;
	color: #b32d2e;
	text-decoration: none;
	padding-top: 10px;
}

a.capricho-shop-clear:hover {
	text-decoration: underline;
}

/* Fileira única: limpar + cores + ordenação, todos alinhados à esquerda */
.capricho-shop-filter-toolbar {
	display: flex;
	align-items: flex-start;
	gap: 16px;
}

.capricho-shop-filter-toolbar .capricho-shop-color-dd {
	flex-shrink: 0;
}

.capricho-shop-ordering-wrap {
	width: 100%;
	max-width: 260px;
}

.capricho-shop-ordering-wrap .woocommerce-ordering {
	margin: 0;
	max-width: none;
}

@media ( max-width: 600px ) {
	.capricho-shop-filter-row {
		flex-direction: column;
		gap: 8px;
	}

	.capricho-shop-filter-label {
		padding-top: 0;
	}

	/* Categorias em 2 colunas no mobile (sobrescreve o inline) */
	.capricho-shop-filter-cats .capricho-shop-filter-options {
		grid-template-columns: repeat( 2, 1fr ) !important;
	}

	/* Ordering ocupa a largura toda no mobile */
	.capricho-shop-ordering-wrap {
		max-width: none;
		margin-left: 0;
	}

	/* Dropdown de cores e botão Modo Revenda em largura total */
	.capricho-shop-filter-toolbar {
		flex-wrap: wrap;
	}

	.capricho-shop-filter-toolbar .capricho-shop-color-dd {
		flex: 1 1 100%;
		width: 100%;
	}

	.capricho-shop-filter-toolbar .capricho-shop-color-toggle {
		width: 100%;
		max-width: none;
		min-height: 46px;
		justify-content: space-between;
	}

	.capricho-shop-filter-toolbar a.capricho-shop-resale {
		flex: 1 1 100%;
		width: 100%;
		min-height: 46px;
		padding: 12px 18px;
		box-sizing: border-box;
	}

	/* Painel do seletor de cores (e seu input de busca) em largura total */
	.capricho-shop-filter-toolbar .capricho-shop-color-panel {
		width: 100%;
		box-sizing: border-box;
	}
}

/* Botão Modo Revenda (acesso ao painel do atacadista) */
a.capricho-shop-resale {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 18px;
	border: 1px solid #1c1c1c;
	background: #1c1c1c;
	color: #fff;
	font-size: 13px;
	line-height: 1.4;
	text-decoration: none;
	white-space: nowrap;
	transition: opacity 0.2s ease;
}

a.capricho-shop-resale:hover {
	color: #fff;
	opacity: 0.85;
}

/* ==========================================================
   Dropdown de cores do filtro
   ========================================================== */
.capricho-shop-color-dd {
	position: relative;
	min-width: 220px;
}

.capricho-shop-color-toggle {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	max-width: 280px;
	padding: 8px 14px;
	border: 1px solid #dcdcdc;
	border-radius: 0;
	background: #fff;
	font-size: 13px;
	color: #1c1c1c;
	cursor: pointer;
	text-align: left;
	transition: border-color 0.2s ease;
}

.capricho-shop-color-toggle:hover {
	border-color: #1c1c1c;
}

.capricho-shop-color-caret {
	margin-left: auto;
	width: 7px;
	height: 7px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate( 45deg ) translateY( -2px );
	transition: transform 0.2s ease;
}

.capricho-shop-color-toggle[aria-expanded='true'] .capricho-shop-color-caret {
	transform: rotate( -135deg ) translateY( -1px );
}

.capricho-shop-swatch.mini {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 1px solid rgba( 0, 0, 0, 0.12 );
	box-shadow: inset 0 0 0 1px #fff;
	display: inline-block;
	flex-shrink: 0;
}

.capricho-shop-swatch.mini.all {
	background: #f5f5f5;
	color: #888;
	font-size: 11px;
	line-height: 16px;
	text-align: center;
}

.capricho-shop-color-panel {
	position: absolute;
	top: calc( 100% + 6px );
	left: 0;
	width: min( 300px, 90vw );
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	box-shadow: 0 14px 34px rgba( 0, 0, 0, 0.14 );
	padding: 10px;
	z-index: 100;
}

.capricho-shop-color-panel[hidden] {
	display: none;
}

.capricho-shop-color-search {
	width: 100%;
	box-sizing: border-box;
	padding: 8px 12px;
	border: 1px solid #dcdcdc;
	border-radius: 6px;
	font-size: 13px;
	margin-bottom: 8px;
	outline: none;
}

.capricho-shop-color-search:focus {
	border-color: #1c1c1c;
}

.capricho-shop-color-list {
	max-height: 260px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
}

a.capricho-shop-color-option {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 7px 8px;
	border-radius: 6px;
	font-size: 13px;
	color: #333;
	text-decoration: none;
	transition: background 0.15s ease;
}

a.capricho-shop-color-option:hover {
	background: #f6f6f6;
}

a.capricho-shop-color-option.ativo {
	background: #1c1c1c;
	color: #fff;
}
