/*
 * ZODIAC – koszyk, zamówienie, moje konto (bloki i shortcody WooCommerce na stronach Hello Elementor).
 * Jasne tło jak w katalogu (formularze czytelniej), ciemny zostaje nagłówek i stopka.
 */

body.woocommerce-cart .site-main,
body.woocommerce-checkout .site-main,
body.woocommerce-account .site-main {
	box-sizing: border-box;
	max-width: none;
	margin: 0;
	padding: 40px max(24px, calc((100% - 1392px) / 2)) 80px;
	background: var(--z-paper);
	color: var(--z-ink);
}

body.woocommerce-cart .page-header,
body.woocommerce-checkout .page-header,
body.woocommerce-account .page-header {
	max-width: none;
	margin: 0 0 24px;
	padding: 0;
}

body.woocommerce-cart .entry-title,
body.woocommerce-checkout .entry-title,
body.woocommerce-account .entry-title {
	margin: 0;
	font-family: var(--z-font-display);
	font-weight: 900;
	font-size: clamp(48px, 6vw, 80px);
	line-height: 0.9;
	text-transform: uppercase;
	color: var(--z-ink);
}

body.woocommerce-cart .page-content,
body.woocommerce-checkout .page-content,
body.woocommerce-account .page-content {
	max-width: none;
	padding: 0;
}

/* Hello Elementor wyciąga .alignwide poza kolumnę (ujemny margines) – w naszym układzie bez tego. */
body.woocommerce-cart .page-content > .alignwide,
body.woocommerce-checkout .page-content > .alignwide {
	margin-left: 0;
	margin-right: 0;
	max-width: none;
	width: auto;
}

/* ---------- Wspólne dla bloków ---------- */

.wc-block-cart,
.wc-block-checkout,
.woocommerce-account .woocommerce {
	font-family: var(--z-font-body);
	color: var(--z-ink);
}

.wc-block-cart a,
.wc-block-checkout a,
.wp-block-woocommerce-empty-cart-block a,
.woocommerce-account .woocommerce a {
	color: var(--z-ink);
	text-underline-offset: 3px;
}

.wc-block-cart a:hover,
.wc-block-checkout a:hover,
.woocommerce-account .woocommerce a:hover {
	color: var(--z-red);
}

/* Karta podsumowania i listy pozycji */
.wc-block-cart .wc-block-cart__main,
.wc-block-cart .wc-block-cart__sidebar,
.wc-block-checkout .wc-block-checkout__main,
.wc-block-checkout .wc-block-checkout__sidebar {
	box-sizing: border-box;
}

.wc-block-cart .wc-block-cart__sidebar .wc-block-components-sidebar-layout__sidebar,
.wc-block-cart__sidebar,
.wc-block-checkout__sidebar {
	padding: 24px;
	border: 1px solid #E6DFD3;
	border-radius: 8px;
	background: var(--z-card);
}

.wc-block-components-product-name {
	font-weight: 600;
	text-decoration: none;
}

.wc-block-components-product-metadata,
.wc-block-components-product-details {
	font-size: 13px;
	color: var(--z-muted);
}

.wc-block-cart-item__image img,
.wc-block-components-order-summary-item__image img {
	border-radius: var(--z-radius-sm);
	background: var(--z-image-bg);
}

.wc-block-components-totals-item__label,
.wc-block-components-totals-item__value {
	color: var(--z-ink);
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__value,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
	font-weight: 700;
	font-size: 18px;
}

/* Rabat za zestaw w podsumowaniu */
.wc-block-components-totals-fees .wc-block-components-totals-item__value {
	color: var(--z-red);
}

/* Przyciski główne: „Przejdź do płatności”, „Kupuję i płacę” */
.wc-block-components-button.contained,
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button,
.woocommerce-account .woocommerce .button,
.woocommerce-account .woocommerce button[type="submit"] {
	min-height: 56px;
	border: 0;
	border-radius: var(--z-radius-sm);
	background: var(--z-red) !important;
	color: #FFFFFF !important;
	font-family: var(--z-font-body);
	font-weight: 600;
	font-size: 17px;
	text-decoration: none !important;
	cursor: pointer;
}

.wc-block-components-button.contained:hover,
.wc-block-cart__submit-button:hover,
.wc-block-components-checkout-place-order-button:hover,
.woocommerce-account .woocommerce .button:hover {
	background: #9A1F18 !important;
	color: #FFFFFF !important;
}

.wc-block-components-button.outlined,
.wc-block-components-button.text {
	color: var(--z-ink);
}

/* Pola formularzy */
.wc-block-components-text-input input,
.wc-block-components-textarea,
.wc-blocks-components-select__select,
.wc-block-components-combobox .wc-block-components-combobox-control input,
.woocommerce-account .woocommerce input.input-text,
.woocommerce-account .woocommerce select {
	border: 1px solid var(--z-border) !important;
	border-radius: var(--z-radius-sm) !important;
	background: var(--z-card) !important;
	color: var(--z-ink) !important;
	font-family: var(--z-font-body);
}

.wc-block-components-text-input.is-active input,
.wc-block-components-text-input input:focus,
.woocommerce-account .woocommerce input.input-text:focus {
	border-color: var(--z-ink) !important;
	box-shadow: 0 0 0 1px var(--z-ink);
}

.wc-block-components-text-input label,
.wc-block-components-checkbox__label {
	color: var(--z-muted);
}

.wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"]:checked {
	background: var(--z-ink);
	border-color: var(--z-ink);
}

.wc-block-components-radio-control__input:checked {
	border-color: var(--z-red);
}

.wc-block-components-radio-control__input:checked::before {
	background: var(--z-red);
}

/* Ilość */
.wc-block-components-quantity-selector {
	border-radius: var(--z-radius-sm);
	border-color: var(--z-border);
}

/* Nagłówki kroków w zamówieniu */
.wc-block-components-checkout-step__title,
.wc-block-components-title,
.wc-block-cart__totals-title {
	font-family: var(--z-font-display) !important;
	font-weight: 900 !important;
	font-size: 26px !important;
	text-transform: uppercase;
	color: var(--z-ink);
}

/* Komunikaty */
.wc-block-components-notice-banner {
	border-radius: var(--z-radius-sm);
}

/* Pusty koszyk */
.wp-block-woocommerce-empty-cart-block {
	text-align: center;
}

.wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__title {
	font-family: var(--z-font-display);
	font-weight: 900;
	text-transform: uppercase;
}

/* ---------- Moje konto (shortcode) ---------- */

.woocommerce-account .woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--z-border);
}

.woocommerce-account .woocommerce-MyAccount-navigation li {
	border-bottom: 1px solid var(--z-border);
}

.woocommerce-account .woocommerce-MyAccount-navigation a {
	display: flex;
	align-items: center;
	min-height: 48px;
	text-decoration: none;
	font-weight: 500;
}

.woocommerce-account .woocommerce-MyAccount-navigation .is-active a {
	font-weight: 700;
	box-shadow: inset 3px 0 0 var(--z-red);
	padding-left: 12px;
}

.woocommerce-account .woocommerce form.login,
.woocommerce-account .woocommerce form.register {
	padding: 24px;
	border: 1px solid #E6DFD3;
	border-radius: 8px;
	background: var(--z-card);
}

@media (max-width: 767px) {
	body.woocommerce-cart .site-main,
	body.woocommerce-checkout .site-main,
	body.woocommerce-account .site-main {
		padding: 24px 16px 56px;
	}

	.wc-block-cart__sidebar,
	.wc-block-checkout__sidebar {
		padding: 16px;
	}
}
