<?php
/**
 * Estilos WooCommerce — só a moldura visual.
 * Não altera carrinho, checkout nem o gateway do Mercado Pago.
 *
 * A área .payment_box / .mp-checkout-container NÃO é estilizada de propósito.
 */

body.ampc-woo-view {
	background: var(--bg-primary) !important;
	color: var(--text-main);
	font-family: var(--font-body);
}

body.ampc-woo-view h1,
body.ampc-woo-view h2,
body.ampc-woo-view h3,
body.ampc-woo-view .product_title,
body.ampc-woo-view .woocommerce-Tabs-panel h2,
body.ampc-woo-view #order_review_heading,
body.ampc-woo-view .cart_totals h2,
body.ampc-woo-view .woocommerce-billing-fields h3,
body.ampc-woo-view .woocommerce-additional-fields h3,
body.ampc-woo-view .woocommerce-order-details__title,
body.ampc-woo-view .woocommerce-column__title {
	font-family: var(--font-display);
	color: var(--text-main);
}

.ampc-woo {
	padding: 1.75rem 0 4.5rem;
	color: var(--text-main);
}

body.ampc-woo-view .woocommerce {
	color: var(--text-main);
}

body.ampc-woo-view .woocommerce a:not(.button):not(.ampc-home__btn) {
	color: var(--color-cyan);
}

body.ampc-woo-view div.product,
body.ampc-woo-view .woocommerce-cart-form,
body.ampc-woo-view .cart_totals,
body.ampc-woo-view .woocommerce-checkout #customer_details,
body.ampc-woo-view .woocommerce-checkout-review-order,
body.ampc-woo-view .woocommerce-order {
	background: var(--bg-secondary);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-card);
	padding: 1.35rem 1.3rem;
}

body.ampc-woo-view table.shop_table {
	background: var(--bg-secondary);
	color: var(--text-main);
	border: 1px solid var(--border-subtle);
	border-radius: 10px;
}

body.ampc-woo-view table.shop_table th,
body.ampc-woo-view table.shop_table td {
	background: transparent;
	color: var(--text-main);
	border-color: var(--border-subtle);
}

body.ampc-woo-view .woocommerce-tabs ul.tabs {
	padding: 0;
	margin: 0 0 1rem;
	border: 0;
	overflow: visible;
}

body.ampc-woo-view .woocommerce-tabs ul.tabs::before {
	display: none;
}

body.ampc-woo-view .woocommerce-tabs ul.tabs li {
	background: var(--bg-secondary);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-pill);
	margin: 0 0.35rem 0.35rem 0;
}

body.ampc-woo-view .woocommerce-tabs ul.tabs li a {
	color: var(--text-dim);
	font-family: var(--font-display);
}

body.ampc-woo-view .woocommerce-tabs ul.tabs li.active {
	background: var(--color-cyan);
	border-color: var(--color-cyan);
}

body.ampc-woo-view .woocommerce-tabs ul.tabs li.active a {
	color: #000c16;
}

body.ampc-woo-view form.cart .quantity input.qty,
body.ampc-woo-view form.woocommerce-cart-form input.input-text,
body.ampc-woo-view form.woocommerce-cart-form input[type="number"],
body.ampc-woo-view form.checkout .form-row input.input-text,
body.ampc-woo-view form.checkout .form-row textarea,
body.ampc-woo-view form.checkout .form-row select,
body.ampc-woo-view #customer_details input.input-text,
body.ampc-woo-view #customer_details textarea,
body.ampc-woo-view #customer_details select,
body.ampc-woo-view .woocommerce-form-coupon input.input-text,
body.ampc-woo-view .select2-container .select2-selection--single {
	background: var(--bg-secondary);
	color: var(--text-main);
	border: 1px solid var(--border-subtle);
	border-radius: 8px;
	box-shadow: none;
}

/*
 * Checkout em blocos: o rótulo flutua DENTRO do input e herdava a cor
 * clara do tema sobre fundo branco. Fundo claro + texto #000C16 = máximo
 * contraste. Só contato/endereço/cupom — não a área do Mercado Pago.
 */
body.ampc-woo-view .wc-block-checkout__contact-fields .wc-block-components-text-input input,
body.ampc-woo-view .wc-block-checkout__billing-fields .wc-block-components-text-input input,
body.ampc-woo-view .wc-block-checkout__shipping-fields .wc-block-components-text-input input,
body.ampc-woo-view .wc-block-components-order-note .wc-block-components-textarea,
body.ampc-woo-view .wc-block-components-totals-coupon .wc-block-components-text-input input,
body.ampc-woo-view .wc-block-checkout__contact-fields .wc-block-components-combobox-control input,
body.ampc-woo-view .wc-block-checkout__billing-fields .wc-block-components-combobox-control input,
body.ampc-woo-view .wc-block-checkout__shipping-fields .wc-block-components-combobox-control input,
body.ampc-woo-view .wc-block-checkout__contact-fields .wc-blocks-components-select__select,
body.ampc-woo-view .wc-block-checkout__billing-fields .wc-blocks-components-select__select,
body.ampc-woo-view .wc-block-checkout__shipping-fields .wc-blocks-components-select__select {
	background-color: #ffffff !important;
	color: #000c16 !important;
	-webkit-text-fill-color: #000c16;
	border-color: #9aa8b8 !important;
	caret-color: #000c16;
	font-weight: 500;
}

body.ampc-woo-view .wc-block-checkout__contact-fields .wc-blocks-components-select__container,
body.ampc-woo-view .wc-block-checkout__billing-fields .wc-blocks-components-select__container,
body.ampc-woo-view .wc-block-checkout__shipping-fields .wc-blocks-components-select__container {
	background-color: #ffffff !important;
	color: #000c16 !important;
}

body.ampc-woo-view .wc-block-checkout__contact-fields .wc-block-components-text-input label,
body.ampc-woo-view .wc-block-checkout__billing-fields .wc-block-components-text-input label,
body.ampc-woo-view .wc-block-checkout__shipping-fields .wc-block-components-text-input label,
body.ampc-woo-view .wc-block-checkout__contact-fields .wc-block-components-combobox-control label,
body.ampc-woo-view .wc-block-checkout__billing-fields .wc-block-components-combobox-control label,
body.ampc-woo-view .wc-block-checkout__shipping-fields .wc-block-components-combobox-control label,
body.ampc-woo-view .wc-block-checkout__contact-fields .wc-blocks-components-select label,
body.ampc-woo-view .wc-block-checkout__billing-fields .wc-blocks-components-select label,
body.ampc-woo-view .wc-block-checkout__shipping-fields .wc-blocks-components-select label,
body.ampc-woo-view .wc-block-components-totals-coupon .wc-block-components-text-input label {
	color: #000c16 !important;
	-webkit-text-fill-color: #000c16;
	opacity: 1 !important;
	font-weight: 600;
}

body.ampc-woo-view .wc-block-checkout__contact-fields .wc-block-components-text-input input::placeholder,
body.ampc-woo-view .wc-block-checkout__billing-fields .wc-block-components-text-input input::placeholder,
body.ampc-woo-view .wc-block-checkout__shipping-fields .wc-block-components-text-input input::placeholder,
body.ampc-woo-view .wc-block-components-order-note .wc-block-components-textarea::placeholder,
body.ampc-woo-view .wc-block-components-totals-coupon .wc-block-components-text-input input::placeholder {
	color: #000c16 !important;
	-webkit-text-fill-color: #000c16;
	opacity: 1;
}

body.ampc-woo-view .wc-block-checkout__contact-fields .wc-block-components-text-input input:-webkit-autofill,
body.ampc-woo-view .wc-block-checkout__billing-fields .wc-block-components-text-input input:-webkit-autofill,
body.ampc-woo-view .wc-block-checkout__shipping-fields .wc-block-components-text-input input:-webkit-autofill {
	-webkit-box-shadow: 0 0 0 1000px #ffffff inset;
	-webkit-text-fill-color: #000c16;
}

body.ampc-woo-view .wc-block-checkout__contact-fields .components-combobox-control__input,
body.ampc-woo-view .wc-block-checkout__billing-fields .components-combobox-control__input,
body.ampc-woo-view .wc-block-checkout__shipping-fields .components-combobox-control__input {
	background-color: #ffffff !important;
	color: #000c16 !important;
	-webkit-text-fill-color: #000c16;
}

body.ampc-woo-view .wc-block-checkout__contact-fields .components-base-control__label,
body.ampc-woo-view .wc-block-checkout__billing-fields .components-base-control__label,
body.ampc-woo-view .wc-block-checkout__shipping-fields .components-base-control__label {
	color: #000c16 !important;
	font-weight: 600;
}

body.ampc-woo-view .wc-block-checkout__contact-fields .wc-block-components-text-input input:focus,
body.ampc-woo-view .wc-block-checkout__billing-fields .wc-block-components-text-input input:focus,
body.ampc-woo-view .wc-block-checkout__shipping-fields .wc-block-components-text-input input:focus,
body.ampc-woo-view .wc-block-checkout__contact-fields .wc-blocks-components-select__select:focus,
body.ampc-woo-view .wc-block-checkout__billing-fields .wc-blocks-components-select__select:focus,
body.ampc-woo-view .wc-block-checkout__shipping-fields .wc-blocks-components-select__select:focus {
	border-color: rgba(0, 210, 255, 0.7) !important;
	box-shadow: 0 0 0 1px rgba(0, 210, 255, 0.28);
	outline: none;
}

body.ampc-woo-view form.cart .quantity input.qty:focus,
body.ampc-woo-view form.woocommerce-cart-form input.input-text:focus,
body.ampc-woo-view form.checkout .form-row input.input-text:focus,
body.ampc-woo-view form.checkout .form-row textarea:focus,
body.ampc-woo-view form.checkout .form-row select:focus,
body.ampc-woo-view #customer_details input.input-text:focus,
body.ampc-woo-view #customer_details textarea:focus,
body.ampc-woo-view #customer_details select:focus,
body.ampc-woo-view .woocommerce-form-coupon input.input-text:focus {
	border-color: rgba(0, 210, 255, 0.55);
	outline: none;
	box-shadow: 0 0 0 1px rgba(0, 210, 255, 0.25);
}

body.ampc-woo-view .woocommerce a.button,
body.ampc-woo-view .woocommerce button.button,
body.ampc-woo-view .woocommerce input.button,
body.ampc-woo-view .woocommerce #respond input#submit,
body.ampc-woo-view .woocommerce .single_add_to_cart_button,
body.ampc-woo-view .woocommerce .checkout-button,
body.ampc-woo-view .woocommerce #place_order {
	background: linear-gradient(135deg, var(--color-cyan), #0090c4);
	color: #000c16;
	border: 0;
	border-radius: 8px;
	font-family: var(--font-display);
	font-weight: 600;
	box-shadow: 0 0 24px rgba(0, 210, 255, 0.28);
	text-shadow: none;
}

body.ampc-woo-view .woocommerce a.button:hover,
body.ampc-woo-view .woocommerce button.button:hover,
body.ampc-woo-view .woocommerce .single_add_to_cart_button:hover,
body.ampc-woo-view .woocommerce .checkout-button:hover,
body.ampc-woo-view .woocommerce #place_order:hover {
	color: #000c16;
	filter: brightness(1.06);
}

body.ampc-woo-view .woocommerce-message,
body.ampc-woo-view .woocommerce-info,
body.ampc-woo-view .woocommerce-error {
	background: var(--bg-secondary);
	color: var(--text-main);
	border-top-color: var(--color-cyan);
}

body.ampc-woo-view .woocommerce-error {
	border-top-color: var(--color-orange);
}

body.ampc-woo-view .product_meta,
body.ampc-woo-view .posted_in,
body.ampc-woo-view .tagged_as,
body.ampc-woo-view .wp-block-woocommerce-product-meta,
body.ampc-woo-view .wp-block-post-terms {
	display: none !important;
}

body.ampc-woo-view .ampc-empty-cart,
body.ampc-woo-view .wc-empty-cart-message,
body.ampc-woo-view .wp-block-woocommerce-empty-cart-block,
body.ampc-woo-view .wc-block-cart__empty-cart {
	background: var(--bg-secondary);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-card);
	padding: 2rem 1.4rem;
	text-align: center;
	color: var(--text-main);
}

body.ampc-woo-view .ampc-empty-cart__message,
body.ampc-woo-view .cart-empty,
body.ampc-woo-view .wc-block-cart__empty-cart__title,
body.ampc-woo-view .wp-block-woocommerce-empty-cart-block p,
body.ampc-woo-view .wc-empty-cart-message .cart-empty {
	color: var(--text-main) !important;
	font-family: var(--font-display);
	font-size: 1.25rem;
	margin: 0 0 1.1rem;
	background: transparent;
	border: 0;
}

body.ampc-woo-view .ampc-empty-cart__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.65rem;
	margin: 0;
}

body.ampc-woo-view .price,
body.ampc-woo-view .woocommerce-Price-amount {
	color: var(--text-main);
}

body.ampc-woo-view ul.wc_payment_methods {
	background: transparent;
	border: 1px solid var(--border-subtle);
	border-radius: 10px;
	padding: 0.35rem 0.85rem;
}

body.ampc-woo-view ul.wc_payment_methods > li {
	color: var(--text-main);
}

/* Mercado Pago: não forçar cor/fundo nos widgets internos. */
body.ampc-woo-view #payment .payment_box,
body.ampc-woo-view .mp-checkout-container,
body.ampc-woo-view [class*="mp-checkout"] {
	color: inherit;
}

@media (max-width: 768px) {
	body.ampc-woo-view div.product,
	body.ampc-woo-view .woocommerce-cart-form,
	body.ampc-woo-view .cart_totals,
	body.ampc-woo-view .woocommerce-checkout #customer_details,
	body.ampc-woo-view .woocommerce-checkout-review-order,
	body.ampc-woo-view .woocommerce-order {
		padding: 1.1rem 1rem;
	}
}
