/* WooCommerce — block Checkout, Cart, Account, and classic fallbacks.
 * Only overrides look-and-feel (type, colour, border, radius) so WooCommerce
 * keeps ownership of the layout grid and floating-label spacing.
 */

.woocommerce,
.wc-block-checkout,
.wp-block-woocommerce-checkout,
.wp-block-woocommerce-cart {
	font-family: var(--font-primary);
	color: var(--color-text-dark);
}

/* ---------- Section headings ---------- */

.wc-block-components-checkout-step__title,
.wc-block-components-title,
.wc-block-cart__totals-title,
.wp-block-woocommerce-cart-order-summary-heading-block {
	font-family: var(--font-primary);
	font-size: var(--fs-h3);
	font-weight: var(--fw-medium);
	letter-spacing: -0.03em;
	line-height: 1.2;
	color: var(--color-text-dark);
	text-transform: none;
}

.wc-block-components-checkout-step__description {
	color: var(--color-text-muted);
	font-size: var(--fs-small);
	line-height: 1.5;
}

.wc-block-components-checkout-step {
	padding-bottom: var(--space-lg);
}

/* ---------- Inputs ---------- */

.wc-block-components-text-input input[type='text'],
.wc-block-components-text-input input[type='email'],
.wc-block-components-text-input input[type='tel'],
.wc-block-components-text-input input[type='number'],
.wc-block-components-textarea,
.wc-block-components-select__select,
.wc-block-components-combobox-control input.components-combobox-control__input {
	border: 1px solid rgba(17, 17, 17, 0.14);
	border-radius: var(--radius-md);
	background-color: var(--color-bg-light);
	color: var(--color-text-dark);
	font-family: var(--font-primary);
	font-size: var(--fs-body);
	box-shadow: none;
	transition:
		border-color var(--transition-fast),
		box-shadow var(--transition-fast);
}

.wc-block-components-text-input input:focus,
.wc-block-components-textarea:focus,
.wc-block-components-select__select:focus,
.wc-block-components-combobox-control input.components-combobox-control__input:focus {
	border-color: var(--color-text-dark);
	box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
	outline: none;
}

.wc-block-components-text-input label,
.wc-block-components-select__label,
.wc-block-components-combobox-control label {
	color: var(--color-text-muted);
	font-family: var(--font-primary);
	font-size: var(--fs-small);
}

.wc-block-components-text-input.has-error input,
.wc-block-components-combobox-control.has-error input {
	border-color: #e57373;
}

.wc-block-components-validation-error {
	color: #c94f4f;
	font-size: 0.75rem;
	line-height: 1.4;
}

/* ---------- Checkbox / radio accents ---------- */

.wc-block-components-checkbox input[type='checkbox'],
.wc-block-components-radio-control__input {
	accent-color: var(--color-bg-dark);
	border-radius: var(--radius-sm);
}

.wc-block-components-checkbox__label,
.wc-block-components-radio-control__label {
	font-size: var(--fs-small);
	line-height: 1.5;
}

.wc-block-components-radio-control-accordion-option,
.wc-block-components-radio-control__option {
	border-radius: var(--radius-md);
}

/* ---------- Order summary card ---------- */

.wc-block-components-sidebar .wc-block-components-totals-wrapper,
.wc-block-checkout__sidebar,
.wp-block-woocommerce-checkout-order-summary-block {
	border-radius: var(--radius-md);
}

.wp-block-woocommerce-checkout-order-summary-block,
.wp-block-woocommerce-cart-order-summary-block {
	padding: var(--space-lg);
	border: 1px solid rgba(17, 17, 17, 0.1);
	border-radius: var(--radius-md);
	background-color: var(--color-bg-gray);
}

.wc-block-components-order-summary-item__description .wc-block-components-product-name,
.wc-block-components-product-name {
	font-size: var(--fs-body);
	font-weight: var(--fw-medium);
	letter-spacing: -0.01em;
	color: var(--color-text-dark);
	text-decoration: none;
}

.wc-block-components-order-summary-item__image img {
	border-radius: var(--radius-sm);
	background-color: var(--color-bg-light);
}

.wc-block-components-order-summary-item__quantity {
	border-color: rgba(17, 17, 17, 0.2);
	background-color: var(--color-bg-dark);
	color: var(--color-text-light);
	font-weight: var(--fw-medium);
}

.wc-block-components-totals-item {
	font-size: var(--fs-small);
	color: var(--color-text-muted);
}

.wc-block-components-totals-item__value {
	color: var(--color-text-dark);
	font-weight: var(--fw-medium);
}

.wc-block-components-totals-footer-item {
	border-top: 1px solid rgba(17, 17, 17, 0.12);
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	font-size: var(--fs-h3);
	font-weight: var(--fw-bold);
	letter-spacing: -0.03em;
	color: var(--color-text-dark);
}

/* ---------- Collapsible panels (coupons, order notes) ---------- */

.wc-block-components-panel__button {
	font-size: var(--fs-small);
	font-weight: var(--fw-medium);
	color: var(--color-text-dark);
}

.wc-block-components-totals-coupon__form .wc-block-components-text-input input {
	background-color: var(--color-bg-light);
}

/* ---------- Buttons ---------- */

.wc-block-components-button:not(.is-link),
.wc-block-components-checkout-place-order-button,
.wp-block-woocommerce-checkout-actions-block .wc-block-components-button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	min-height: 3rem;
	padding: 0.7rem 1.6rem;
	border: 0;
	border-radius: var(--radius-full);
	background-color: var(--color-bg-dark);
	color: var(--color-text-light);
	font-family: var(--font-primary);
	font-size: var(--fs-small);
	font-weight: var(--fw-medium);
	letter-spacing: 0;
	line-height: 1.2;
	text-decoration: none;
	box-shadow: none;
	transition: opacity var(--transition-fast);
}

.wc-block-components-button:not(.is-link):hover,
.wc-block-components-checkout-place-order-button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover {
	background-color: var(--color-bg-dark);
	color: var(--color-text-light);
	opacity: 0.88;
}

.wc-block-components-button:not(.is-link):focus-visible,
.woocommerce .button:focus-visible {
	outline: 2px solid var(--color-text-dark);
	outline-offset: 3px;
}

.wc-block-components-button.is-link,
.woocommerce-privacy-policy-link {
	color: var(--color-text-dark);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/* ---------- Notices ---------- */

.wc-block-components-notice-banner {
	border-radius: var(--radius-md);
	font-size: var(--fs-small);
	line-height: 1.5;
}

.wc-block-components-notice-banner.is-error {
	border-color: rgba(229, 115, 115, 0.5);
	background-color: rgba(229, 115, 115, 0.1);
	color: #a83b3b;
}

.wc-block-components-notice-banner.is-success {
	border-color: rgba(215, 227, 107, 0.6);
	background-color: rgba(215, 227, 107, 0.16);
	color: #4d5510;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	border-top-color: var(--color-bg-dark);
	border-radius: var(--radius-md);
	background-color: var(--color-bg-gray);
	color: var(--color-text-dark);
	font-size: var(--fs-small);
}

/* ---------- Classic cart / account fallbacks ---------- */

.woocommerce table.shop_table {
	border: 1px solid rgba(17, 17, 17, 0.1);
	border-radius: var(--radius-md);
	border-collapse: separate;
	font-size: var(--fs-small);
}

.woocommerce table.shop_table th {
	font-weight: var(--fw-medium);
	color: var(--color-text-muted);
}

.woocommerce-MyAccount-navigation ul {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-sm);
	list-style: none;
}

.woocommerce-MyAccount-navigation ul li a {
	display: inline-flex;
	padding: 0.4rem 0.9rem;
	border-radius: var(--radius-full);
	background-color: var(--color-bg-gray);
	font-size: var(--fs-small);
	font-weight: var(--fw-medium);
}

.woocommerce-MyAccount-navigation ul li.is-active a {
	background-color: var(--color-bg-dark);
	color: var(--color-text-light);
}

.woocommerce .price,
.wc-block-components-product-price {
	color: var(--color-text-dark);
	font-weight: var(--fw-medium);
}

.woocommerce del,
.wc-block-components-product-price del {
	opacity: 0.5;
	font-weight: var(--fw-regular);
}

@media (min-width: 1024px) {
	.wp-block-woocommerce-checkout-order-summary-block,
	.wp-block-woocommerce-cart-order-summary-block {
		padding: var(--space-xl);
	}
}
