/* ==========================================================================
   Mukka Sports: cart and checkout (loaded on those pages only)
   Covers the WooCommerce Cart/Checkout blocks and the classic shortcodes.
   ========================================================================== */

/* ---------- Layout: use the full container, not the reading column ---------- */
.content-area--checkout { padding-top: 28px; }
.content-area--checkout .entry-content { max-width: none; }
.content-area--checkout .alignwide,
.content-area--checkout .alignfull { margin-inline: 0; width: auto; max-width: none; }

/* ---------- Page head: title + progress steps ---------- */
.checkout-head { padding: 28px 0 24px; border-bottom: 1px solid var(--mk-line); }
.checkout-head__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.checkout-head__title { margin: 0; font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.checkout-steps { display: flex; align-items: center; gap: 0; margin: 0; padding: 0; list-style: none; }
.checkout-steps__item { display: flex; align-items: center; color: var(--mk-muted); font-weight: 600; }
.checkout-steps__item a { display: flex; align-items: center; color: inherit; text-decoration: none; }
.checkout-steps__item a:hover .checkout-steps__label { color: var(--mk-ink); text-decoration: underline; }
.checkout-steps__item + .checkout-steps__item::before {
	content: ""; width: clamp(18px, 4vw, 44px); height: 2px; margin: 0 10px;
	background: var(--mk-line);
}
.checkout-steps__item.is-done + .checkout-steps__item::before,
.checkout-steps__item.is-current::before { background: var(--mk-ink); }
.checkout-steps__num {
	display: inline-flex; align-items: center; justify-content: center;
	width: 30px; height: 30px; margin-right: 8px;
	border: 2px solid var(--mk-line); border-radius: 50%;
	font-size: .9rem; font-weight: 700; color: var(--mk-muted); background: var(--mk-white);
}
.checkout-steps__num svg { width: 16px; height: 16px; }
.checkout-steps__item.is-current { color: var(--mk-ink); }
.checkout-steps__item.is-current .checkout-steps__num { border-color: var(--mk-ink); background: var(--mk-ink); color: var(--mk-white); }
.checkout-steps__item.is-done { color: var(--mk-ink); }
.checkout-steps__item.is-done .checkout-steps__num { border-color: var(--mk-accent); background: var(--mk-accent); color: var(--mk-white); }
@media (max-width: 599px) {
	.checkout-head { padding: 20px 0 18px; }
	.checkout-head__inner { flex-direction: column; align-items: flex-start; }
	.checkout-steps__label { font-size: .9rem; }
	.checkout-steps__num { width: 26px; height: 26px; margin-right: 6px; font-size: .8rem; }
}

/* ---------- Focused checkout header ---------- */
.site-header--checkout .site-header__inner { justify-content: space-between; gap: 16px; }
.checkout-secure {
	display: inline-flex; align-items: center; gap: 8px; margin: 0;
	font-weight: 700; color: var(--mk-ink);
}
.checkout-secure svg { width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: #1f8a4c; color: var(--mk-white); }
.checkout-back { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--mk-ink); text-decoration: none; }
.checkout-back:hover { color: var(--mk-accent); }
.checkout-back__arrow svg { width: 16px; height: 16px; transform: rotate(90deg); }
@media (max-width: 599px) {
	.checkout-secure span { font-size: .9rem; }
	.checkout-back span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.checkout-back { width: 40px; height: 40px; justify-content: center; border: 1px solid var(--mk-line); border-radius: 6px; }
}

/* ---------- Free-shipping progress bar ---------- */
.ship-bar {
	margin: 0 0 28px; padding: 14px 18px 16px;
	border-radius: 10px; background: var(--mk-surface);
}
.ship-bar[hidden] { display: none; }
.ship-bar__text { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; color: var(--mk-ink); }
.ship-bar__text svg { flex: 0 0 auto; width: 20px; height: 20px; color: var(--mk-accent); }
.ship-bar__left { color: var(--mk-accent); }
.ship-bar__track { height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--mk-ink) 10%, transparent); overflow: hidden; }
.ship-bar__fill { display: block; height: 100%; border-radius: inherit; background: var(--mk-accent); transition: width .4s ease; }
.ship-bar.is-done .ship-bar__fill { background: #1f8a4c; }
.ship-bar.is-done .ship-bar__text svg { color: #1f8a4c; }

/* ---------- Trust strip ---------- */
.trust-strip {
	display: grid; gap: 18px 28px; grid-template-columns: 1fr;
	margin: 44px 0 0; padding: 26px 0 0; list-style: none;
	border-top: 1px solid var(--mk-line);
}
@media (min-width: 768px) { .trust-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.trust-strip__item { display: flex; gap: 12px; align-items: flex-start; }
.trust-strip__item svg { flex: 0 0 auto; width: 22px; height: 22px; margin-top: 2px; color: var(--mk-accent); }
.trust-strip__item strong { display: block; color: var(--mk-ink); }
.trust-strip__item span { display: block; font-size: .92rem; color: var(--mk-muted); }
.trust-strip__item a { font-weight: 600; }

/* ==========================================================================
   Blocks: shared
   ========================================================================== */
body.mukka-checkout-flow .wc-block-components-sidebar-layout { align-items: flex-start; }
body.mukka-checkout-flow .wc-block-components-sidebar-layout .wc-block-components-main { padding-right: 4%; }
body.mukka-checkout-flow .wc-block-components-sidebar {
	padding: 24px !important;
	border-radius: 12px;
	background: var(--mk-surface);
}
@media (min-width: 992px) {
	body.mukka-checkout-flow .wc-block-components-sidebar { position: sticky; top: calc(var(--mk-sticky-top) + 24px); }
	body.has-sticky-header:not(.has-checkout-header) .wc-block-components-sidebar { top: calc(var(--mk-sticky-top) + var(--mk-header-h) + 24px); }
}
body.mukka-checkout-flow .wc-block-components-totals-wrapper { border-top-color: color-mix(in srgb, var(--mk-ink) 12%, transparent); }
body.mukka-checkout-flow .wc-block-components-totals-wrapper:first-child { border-top: 0; }
body.mukka-checkout-flow .wc-block-components-totals-item__label { color: var(--mk-text); }
body.mukka-checkout-flow .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
body.mukka-checkout-flow .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	font-family: var(--mk-font-heading); font-size: 1.45rem; font-weight: 700; color: var(--mk-ink);
}
body.mukka-checkout-flow .wc-block-components-panel__button { font-weight: 600; color: var(--mk-ink); }

/* Product names, prices, descriptions */
body.mukka-checkout-flow .wc-block-components-product-name {
	font-family: var(--mk-font-heading); font-size: 1.15rem; font-weight: 600; line-height: 1.2;
	color: var(--mk-ink); text-decoration: none;
}
body.mukka-checkout-flow a.wc-block-components-product-name:hover { color: var(--mk-accent); }
body.mukka-checkout-flow .wc-block-components-product-price { font-weight: 700; color: var(--mk-ink); }
body.mukka-checkout-flow .wc-block-components-product-metadata { font-size: .88rem; color: var(--mk-muted); }

/* Primary buttons (Proceed to checkout / Place order) */
body.mukka-checkout-flow .wc-block-cart__submit-button,
body.mukka-checkout-flow .wc-block-components-checkout-place-order-button {
	min-height: 56px; width: 100%;
	border: 0; border-radius: var(--mk-radius-sm);
	background: var(--mk-accent); color: var(--mk-accent-contrast);
	font-family: var(--mk-font-heading); font-size: 1.25rem; font-weight: 700;
	text-decoration: none; box-shadow: none;
	transition: background-color .15s ease;
}
body.mukka-checkout-flow .wc-block-cart__submit-button:hover,
body.mukka-checkout-flow .wc-block-components-checkout-place-order-button:hover { background: var(--mk-accent-hover); color: var(--mk-accent-contrast); }
body.mukka-checkout-flow .wc-block-components-button__text { text-decoration: none; }

/* ==========================================================================
   Cart block
   ========================================================================== */
body.mukka-checkout-flow .wc-block-cart-items { border-bottom: 0; }
body.mukka-checkout-flow .wc-block-cart-items__header th {
	padding-bottom: 12px; border-bottom: 1px solid var(--mk-line);
	font-size: .82rem; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--mk-muted);
}
body.mukka-checkout-flow .wc-block-cart-items__row { border-bottom: 1px solid var(--mk-line); }
body.mukka-checkout-flow .wc-block-cart-items__row > td { padding-top: 20px !important; padding-bottom: 20px !important; border-top: 0 !important; }
body.mukka-checkout-flow .wc-block-cart-item__image a { display: block; padding: 6px; border-radius: 8px; background: var(--mk-surface); }
body.mukka-checkout-flow .wc-block-cart-item__image img {
	display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: contain;
	mix-blend-mode: multiply;
}
body.mukka-checkout-flow .wc-block-cart-item__prices { margin: 4px 0 2px; }
body.mukka-checkout-flow .wc-block-cart-item__total { font-weight: 700; }
body.mukka-checkout-flow .wc-block-components-quantity-selector {
	width: 112px; border-radius: var(--mk-radius-sm);
}
body.mukka-checkout-flow .wc-block-components-quantity-selector::after { border-color: color-mix(in srgb, var(--mk-ink) 22%, transparent); border-radius: var(--mk-radius-sm); }
body.mukka-checkout-flow .wc-block-components-quantity-selector__input { font-weight: 700; color: var(--mk-ink); }
body.mukka-checkout-flow .wc-block-components-quantity-selector__button { color: var(--mk-ink); opacity: 1; }
body.mukka-checkout-flow .wc-block-components-quantity-selector__button:hover { background: var(--mk-surface); }
body.mukka-checkout-flow .wc-block-cart-item__remove-link {
	font-size: .85rem !important; color: var(--mk-muted) !important; text-decoration: none !important;
}
body.mukka-checkout-flow .wc-block-cart-item__remove-link:hover { color: var(--mk-accent) !important; text-decoration: underline !important; }
body.mukka-checkout-flow .wc-block-cart__totals-title {
	font-family: var(--mk-font-heading); font-size: 1.35rem !important; font-weight: 700; color: var(--mk-ink);
	text-transform: none !important; letter-spacing: 0;
	padding: 0 0 8px !important;
}
body.mukka-checkout-flow .wc-block-cart__submit-container { padding-top: 6px; }

/* Empty cart */
body.mukka-checkout-flow .wc-block-cart__empty-cart__title { font-family: var(--mk-font-heading); }

/* ==========================================================================
   Checkout block
   ========================================================================== */
body.mukka-checkout-flow .wc-block-components-checkout-step__title {
	font-family: var(--mk-font-heading); font-size: 1.45rem; font-weight: 700; color: var(--mk-ink);
}
body.mukka-checkout-flow .wc-block-components-checkout-step__description { color: var(--mk-muted); }
body.mukka-checkout-flow .wc-block-components-checkout-step { margin-bottom: 32px; }

/* Inputs and selects */
body.mukka-checkout-flow .wc-block-components-text-input input,
body.mukka-checkout-flow .wc-block-components-text-input textarea,
body.mukka-checkout-flow .wc-blocks-components-select .wc-blocks-components-select__select,
body.mukka-checkout-flow .wc-block-components-textarea {
	border: 1px solid color-mix(in srgb, var(--mk-ink) 25%, transparent) !important;
	border-radius: var(--mk-radius-sm) !important;
	background: var(--mk-white);
	box-shadow: none;
}
body.mukka-checkout-flow .wc-block-components-text-input input:focus,
body.mukka-checkout-flow .wc-block-components-textarea:focus,
body.mukka-checkout-flow .wc-blocks-components-select .wc-blocks-components-select__select:focus {
	border-color: var(--mk-ink) !important;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--mk-ink) 12%, transparent) !important;
	outline: none;
}
body.mukka-checkout-flow .wc-block-components-text-input.has-error input { border-color: #c0392b !important; }
body.mukka-checkout-flow .wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:checked { background: var(--mk-ink); border-color: var(--mk-ink); }
body.mukka-checkout-flow .wc-block-components-checkbox .wc-block-components-checkbox__mark { fill: var(--mk-white); }
body.mukka-checkout-flow .wc-block-components-radio-control__input:checked { border-color: var(--mk-ink); }
body.mukka-checkout-flow .wc-block-components-radio-control__input:checked::before { background: var(--mk-ink); }
body.mukka-checkout-flow .wc-block-components-address-form__address_2-toggle { color: var(--mk-ink); font-weight: 600; }

/* Order summary */
body.mukka-checkout-flow .wp-block-woocommerce-checkout-order-summary-block { border: 0; }
body.mukka-checkout-flow .wc-block-components-checkout-order-summary__title,
body.mukka-checkout-flow .wc-block-components-checkout-order-summary__title-text,
body.mukka-checkout-flow .wc-block-components-order-summary .wc-block-components-panel__button,
body.mukka-checkout-flow .wc-block-checkout__sidebar .wc-block-components-title {
	font-family: var(--mk-font-heading); font-size: 1.35rem; font-weight: 700; color: var(--mk-ink);
}
body.mukka-checkout-flow .wc-block-components-order-summary-item__image { padding: 4px; border-radius: 8px; background: var(--mk-white); }
body.mukka-checkout-flow .wc-block-components-order-summary-item__image img { display: block; mix-blend-mode: multiply; }
body.mukka-checkout-flow .wc-block-components-order-summary-item__quantity {
	background: var(--mk-ink); color: var(--mk-white); border: 2px solid var(--mk-surface); box-shadow: none;
	font-weight: 700;
}
body.mukka-checkout-flow .wc-block-components-order-summary-item__description .wc-block-components-product-name { font-size: 1.02rem; }

/* Actions row: Return to cart + Place order */
body.mukka-checkout-flow .wc-block-checkout__actions_row { gap: 16px; align-items: center; }
body.mukka-checkout-flow .wc-block-components-checkout-return-to-cart-button { color: var(--mk-ink); font-weight: 600; text-decoration: none; }
body.mukka-checkout-flow .wc-block-components-checkout-return-to-cart-button:hover { color: var(--mk-accent); }
body.mukka-checkout-flow .wc-block-checkout__actions .wc-block-components-checkout-place-order-button { flex: 1 1 auto; width: auto; }
body.mukka-checkout-flow .wc-block-checkout__terms { color: var(--mk-muted); font-size: .92rem; }

/* ==========================================================================
   Classic [woocommerce_cart] and [woocommerce_checkout]
   ========================================================================== */
@media (min-width: 992px) {
	.woocommerce-cart .content-area--checkout .woocommerce {
		display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 0 48px; align-items: start;
	}
	.woocommerce-cart .content-area--checkout .woocommerce > :not(.woocommerce-cart-form):not(.cart-collaterals) { grid-column: 1 / -1; }
	.woocommerce-cart .content-area--checkout .cart-collaterals { position: sticky; top: calc(var(--mk-sticky-top) + var(--mk-header-h) + 24px); }

	.woocommerce-checkout .content-area--checkout form.checkout {
		display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 0 48px; align-items: start;
	}
	.woocommerce-checkout .content-area--checkout form.checkout > * { grid-column: 1; }
	.woocommerce-checkout .content-area--checkout #order_review_heading { grid-column: 2; grid-row: 1; margin-top: 0; }
	.woocommerce-checkout .content-area--checkout #order_review { grid-column: 2; grid-row: 2 / span 20; position: sticky; top: calc(var(--mk-sticky-top) + 24px); }
}
.content-area--checkout .cart-collaterals .cart_totals,
.content-area--checkout .woocommerce .col2-set .col-1,
.content-area--checkout .woocommerce .col2-set .col-2 { float: none; width: 100%; }
.content-area--checkout .cart-collaterals .cross-sells { display: none; }
.content-area--checkout .cart_totals,
.content-area--checkout #order_review {
	padding: 24px; border-radius: 12px; background: var(--mk-surface);
}
.content-area--checkout .cart_totals h2 { margin-top: 0; font-size: 1.35rem; }
.content-area--checkout .cart_totals table.shop_table,
.content-area--checkout #order_review table.shop_table { border: 0; background: transparent; }
.content-area--checkout .wc-proceed-to-checkout a.checkout-button,
.content-area--checkout #place_order {
	display: flex; align-items: center; justify-content: center;
	width: 100%; min-height: 56px; border-radius: var(--mk-radius-sm);
	font-family: var(--mk-font-heading); font-size: 1.25rem; font-weight: 700;
}
.content-area--checkout table.shop_table.cart td.product-thumbnail a { display: inline-block; padding: 4px; border-radius: 8px; background: var(--mk-surface); }
.content-area--checkout table.shop_table.cart td.product-thumbnail img { display: block; width: 72px; mix-blend-mode: multiply; }
.content-area--checkout table.shop_table.cart td.product-name a { color: var(--mk-ink); font-weight: 600; text-decoration: none; }
.content-area--checkout .woocommerce form .form-row .input-text,
.content-area--checkout .woocommerce form .form-row select { border-radius: var(--mk-radius-sm); }

/* ==========================================================================
   Thank-you page
   ========================================================================== */
body.mukka-checkout-flow .woocommerce-order { max-width: 900px; }
body.mukka-checkout-flow .woocommerce-thankyou-order-received {
	display: flex; align-items: center; gap: 12px;
	margin: 0 0 24px; padding: 18px 20px;
	border-radius: 12px; background: #e9f6ee; color: #145c33;
	font-family: var(--mk-font-heading); font-size: 1.3rem; font-weight: 700;
}
body.mukka-checkout-flow .woocommerce-thankyou-order-received::before {
	content: "✓"; flex: 0 0 auto;
	display: inline-flex; align-items: center; justify-content: center;
	width: 32px; height: 32px; border-radius: 50%;
	background: #1f8a4c; color: #fff; font-size: 1rem;
}
body.mukka-checkout-flow ul.woocommerce-order-overview {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px;
	margin: 0 0 36px; padding: 0; list-style: none;
}
body.mukka-checkout-flow ul.woocommerce-order-overview::before,
body.mukka-checkout-flow ul.woocommerce-order-overview::after { content: none; display: none; }
body.mukka-checkout-flow ul.woocommerce-order-overview li {
	float: none; margin: 0; padding: 14px 16px;
	border: 0; border-radius: 10px; background: var(--mk-surface);
	font-size: .78rem; font-weight: 600; text-transform: none; color: var(--mk-muted);
}
body.mukka-checkout-flow ul.woocommerce-order-overview li strong {
	display: block; margin-top: 4px; font-size: 1.05rem; color: var(--mk-ink);
}
body.mukka-checkout-flow .woocommerce-order h2 { font-size: 1.6rem; margin: 32px 0 14px; }
body.mukka-checkout-flow .woocommerce-order table.shop_table { border-radius: 10px; overflow: hidden; }
body.mukka-checkout-flow .woocommerce-order table.shop_table td.product-name a { color: var(--mk-ink); font-weight: 600; text-decoration: none; }
body.mukka-checkout-flow .woocommerce-order table.shop_table td.product-name a:hover { color: var(--mk-accent); }
body.mukka-checkout-flow .woocommerce-customer-details address { padding: 16px 18px; border: 0; border-radius: 10px; background: var(--mk-surface); }
