/*
 * "Finalizare": one-page checkout, confirmation and retry payment (templates in woocommerce/checkout/).
 * Loaded only on the checkout page (inc/checkout.php), where WooCommerce's general/layout styles and select2 are switched off.
 */

/* The bottom space comes from the page rhythm in theme.css (.ap-main). */
.ap-checkout-page .woocommerce { margin-top: 0; }
.ap-checkout-page .woocommerce :where(h1, h2, h3, h4, p, ul, ol, dl, dd, address, fieldset, figure) { margin-block: 0; }
.ap-checkout-page .woocommerce dd { margin-inline: 0; }
.ap-checkout-page .screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.ap-checkout-page .woocommerce a { text-underline-offset: 4px; }
.ap-checkout-page .woocommerce :focus-visible { outline: 2px solid var(--ap-moss); outline-offset: 4px; }
.ap-checkout-page [hidden] { display: none !important; }

.ap-co-svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ---------- Top line: back link + steps ---------- */

.ap-co-topline { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding-top: 1.2rem; font-size: 0.69rem; }
.ap-co-topline > a { color: var(--ap-muted); text-decoration: none; }
.ap-co-topline > a:hover { color: var(--ap-forest); text-decoration: underline; }
.ap-co-steps ol { display: flex; align-items: center; gap: 1.45rem; margin: 0; padding: 0; list-style: none; }
.ap-co-steps li { display: flex; align-items: center; gap: 0.6rem; font-size: 0.72rem; color: var(--ap-muted); }
.ap-co-steps li + li::before { content: ""; width: 2rem; height: 1px; margin-right: 0.85rem; background: var(--ap-line); }
.ap-co-steps__number { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #e9ecdf; font-size: 0.55rem; font-weight: 600; color: var(--ap-forest); }
.ap-co-steps [aria-current] { font-weight: 650; color: var(--ap-forest); }
.ap-co-steps [aria-current] .ap-co-steps__number { background: var(--ap-forest); color: var(--ap-paper); }

/* ---------- Heading ---------- */

.ap-co-head { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 2.3rem 0 1.7rem; }
.ap-co-head .is-style-eyebrow { font-size: 0.625rem; letter-spacing: 0.2em; }
.ap-co-head h1 { margin-top: 1.1rem !important; font-size: clamp(2.75rem, 4.6vw, 3.5rem); line-height: 1.1; letter-spacing: -0.035em; }
.ap-co-head__note { display: flex; align-items: center; gap: 1.25rem; }
.ap-co-head__note img { width: 74px; flex-shrink: 0; }
.ap-co-head__note p { font-size: var(--wp--preset--font-size--xx-small); line-height: 1.9; color: var(--ap-muted); }

/* ---------- Login ---------- */

.ap-co-login { margin-bottom: 1.45rem; border: 1px solid var(--ap-line); border-radius: var(--ap-radius-card); background: #ebefdf; }
.ap-co-login > summary { padding: 0.9rem 1.4rem; font-size: var(--wp--preset--font-size--xx-small); cursor: pointer; }
.ap-co-login > summary > span { margin-left: 0.75rem; font-weight: 650; }
.ap-co-login form { max-width: 850px; padding: 0.4rem 1.55rem 1.45rem; }
.ap-co-login .ap-co-hint { margin: 0 0 1rem; }
.ap-co-login__bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.4rem; }
.ap-co-login__bottom > a { font-size: 0.72rem; color: var(--ap-ink); text-decoration: underline; }
.ap-co-login__bottom .button { margin-left: auto; }

/* ---------- Layout ---------- */

.ap-co-layout { display: grid; grid-template-columns: minmax(0, 1fr) 395px; align-items: start; gap: 2.2rem; padding-bottom: 4rem; }
.ap-co-layout > .woocommerce-NoticeGroup { grid-column: 1 / -1; margin-bottom: -0.9rem; }
.ap-co-layout > .woocommerce-NoticeGroup :is(.woocommerce-error, .woocommerce-message, .woocommerce-info, .wc-block-components-notice-banner) { margin-bottom: 0; }
/* Errors from "Plasează comanda" show in the message under the header (checkout.js) */
.ap-co-toast-errors .ap-co-layout > .woocommerce-NoticeGroup-checkout { display: none; }
/* "Reîncearcă plata": the notices after a reload show in the same message (checkout.js); hidden until then, shown if it is missing */
.woocommerce-js .woocommerce-notices-wrapper:has(+ form#order_review):not(.is-shown) { display: none; }
.ap-co-main { min-width: 0; }

.ap-co-section { margin-bottom: 1.25rem; padding: 1.7rem 1.9rem; border: 1px solid var(--ap-line); border-radius: var(--ap-radius-card); background: var(--ap-paper); }
.ap-co-section__head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.6rem; }
.ap-co-section__head > span { display: grid; place-items: center; flex-shrink: 0; width: 37px; height: 37px; border-radius: 50%; background: #e5ecd8; font-size: 0.625rem; color: var(--ap-forest); }
.ap-co-section__head h2 { font-size: 1.8rem; line-height: 1.2; letter-spacing: -0.025em; }
.ap-co-section__head p { margin-top: 0.25rem !important; font-size: 0.69rem; color: var(--ap-muted); }
.ap-co-subtitle { margin: 0.3rem 0 1.3rem !important; font-size: 1.6rem; font-weight: 400; letter-spacing: -0.02em; }
.ap-co-hint { font-size: 0.69rem; line-height: 1.7; color: var(--ap-muted); }

.ap-co-link { display: inline-block; padding: 0.3rem 0; border-bottom: 1px solid currentColor; font-size: 0.69rem; font-weight: 600; color: var(--ap-ink); text-decoration: none; }
.ap-co-link:hover { color: var(--ap-moss); }

.ap-checkout-page .button { border-radius: var(--ap-radius-control); cursor: pointer; text-decoration: none; }
.ap-co-button.button { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: space-between; gap: 1.9rem; min-height: 50px; padding: 0.85rem 1.45rem; font-size: var(--wp--preset--font-size--xx-small); }
.ap-co-button .ap-co-svg { width: 20px; height: 20px; stroke-width: 1.8; }

/* ---------- 01 · Products ---------- */

.ap-co-cart .ap-co-section__head { margin-bottom: 0.2rem; }
.ap-co-cart__notice { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.9rem; margin: 1rem 0 0; padding: 0.8rem 1.1rem; border: 1px solid #cedbbb; background: #e5eddc; font-size: var(--wp--preset--font-size--xx-small); }
.ap-co-cart__notice:focus { outline: 0; }
.ap-co-cart__notice a { font-weight: 650; color: var(--ap-forest); }
.ap-co-cart__notice.is-error { border-color: #e5b9aa; background: #fff1e8; color: #853627; }

.ap-co-items { transition: opacity 0.2s; }
.ap-co-item { display: grid; grid-template-columns: 68px minmax(0, 1fr) 114px 86px; align-items: center; gap: 1.05rem; padding: 1.45rem 0; border-bottom: 1px solid var(--ap-line); }
.ap-co-item.is-updating { opacity: 0.55; }
.ap-co-item__image { display: block; padding: 7px; border-radius: var(--ap-radius-image); background: #f0f2e8; }
.ap-co-item__image img { display: block; width: 54px; height: 85px; object-fit: contain; mix-blend-mode: multiply; }
.ap-co-item__info { min-width: 0; }
.ap-co-item__collection { font-size: 0.5rem; font-weight: 650; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ap-forest); }
.ap-co-item__name { margin: 0.45rem 0 !important; font-size: 1.5rem; font-weight: 400; line-height: 1.2; letter-spacing: -0.025em; }
.ap-co-item__name a { color: var(--ap-ink); text-decoration: none; }
.ap-co-item__name a:hover { color: var(--ap-moss); }
.ap-co-item__info .variation { display: flex; flex-wrap: wrap; gap: 0.2rem 0.5rem; margin: 0 0 0.3rem; font-size: 0.69rem; color: var(--ap-muted); }
.ap-co-item__info .variation :is(dt, dd, p) { margin: 0; }
.ap-co-item__price { font-size: 0.69rem; color: var(--ap-muted); }
.ap-co-item__remove { min-height: 30px; margin-top: 0.1rem; padding: 0; border: 0; background: none; font: inherit; font-size: 0.69rem; color: var(--ap-muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ap-co-item__remove:hover { color: #934c37; }
.ap-co-item__total { font-size: var(--wp--preset--font-size--x-small); font-weight: 650; text-align: right; white-space: nowrap; }

.ap-co-qty { display: flex; align-items: center; width: 114px; overflow: hidden; border: 1px solid #cfd8c4; border-radius: var(--ap-radius-control); background: var(--ap-paper); }
.ap-co-qty button { flex-shrink: 0; width: 35px; height: 40px; padding: 0; border: 0; background: transparent; font: inherit; font-size: 1.2rem; line-height: 1; color: var(--ap-forest); cursor: pointer; }
.ap-co-qty button:hover:not(:disabled) { background: #e8eedc; }
.ap-co-qty button:disabled { opacity: 0.3; cursor: default; }
.ap-co-qty input { width: 42px; min-width: 0; height: 38px; padding: 0; border: 0; background: transparent; font: inherit; font-size: var(--wp--preset--font-size--x-small); text-align: center; color: var(--ap-forest); appearance: textfield; -moz-appearance: textfield; }
.ap-co-qty input::-webkit-inner-spin-button,
.ap-co-qty input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }

.ap-co-cart__bottom { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1.1rem; }
.ap-co-cart__bottom > span { font-size: 0.625rem; color: var(--ap-muted); }

/* ---------- Fields (WooCommerce markup: p.form-row > label + span.woocommerce-input-wrapper > input) ---------- */

/* Six columns: halves (form-row-first / -last) span 3, thirds (country, county, city / street, apartment, postcode) span 2 */
.ap-co-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: 1.25rem; }
.ap-co-grid > * { grid-column: 1 / -1; }
.ap-co-grid > .form-row-first { grid-column: 1 / span 3; }
.ap-co-grid > .form-row-last { grid-column: 4 / span 3; }
.ap-co-grid > .ap-co-third { grid-column: span 2; }
/* Thirds share label / input / error tracks with their row, so a label on two lines doesn't push its input lower */
@supports (grid-template-rows: subgrid) {
	.ap-co-grid > .ap-co-third { display: grid; grid-row: span 3; grid-template-rows: subgrid; }
	.ap-co-grid > .ap-co-third > label { align-self: end; }
}

.ap-checkout-page .form-row { min-width: 0; margin: 0 0 1.25rem; padding: 0; }
.ap-checkout-page .form-row label:not(.checkbox, .woocommerce-form__label-for-checkbox) { display: block; margin-bottom: 0.45rem; font-size: var(--wp--preset--font-size--xx-small); font-weight: 600; line-height: 1.4; color: var(--ap-ink); }
.ap-checkout-page .form-row :is(.required, abbr.required) { border: 0; text-decoration: none; color: inherit; }
.ap-checkout-page .form-row .optional { font-size: 0.69rem; font-weight: 400; color: var(--ap-muted); }
.ap-checkout-page .woocommerce-input-wrapper { display: block; }
.ap-checkout-page .form-row :is(input.input-text, select, textarea) {
	box-sizing: border-box;
	display: block;
	width: 100%;
	min-width: 0;
	height: 48px;
	margin: 0;
	padding: 0.7rem 0.8rem;
	border: 1px solid #d5ddcb;
	border-radius: var(--ap-radius-control);
	background: #fcfcf7;
	font: inherit;
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--ap-ink);
}
.ap-checkout-page .form-row select {
	padding-right: 2.4rem;
	appearance: none;
	background: #fcfcf7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23203f32' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.85rem center / 16px;
}
.ap-checkout-page .form-row textarea { height: auto; min-height: 100px; resize: vertical; }
.ap-checkout-page .form-row :is(input.input-text, select, textarea):focus { outline: 2px solid var(--ap-moss); outline-offset: 2px; background-color: #fff; }
.ap-checkout-page .form-row.woocommerce-invalid :is(input.input-text, select) { border-color: #a44634; }
.ap-checkout-page .checkout-inline-error-message { margin-top: 0.4rem !important; font-size: 0.72rem; color: #973b29; }
.ap-checkout-page .form-row .description { margin-top: 0.4rem; font-size: 0.69rem; color: var(--ap-muted); }

/* Checkboxes: create account, other delivery address, consents (CusRev, newsletter), remember me */
.ap-checkout-page :is(label.checkbox, .woocommerce-form__label-for-checkbox) { display: flex; align-items: flex-start; gap: 0.6rem; margin: 0; font-size: 0.72rem; font-weight: 400; line-height: 1.7; color: var(--ap-ink); cursor: pointer; }
.ap-checkout-page :is(label.checkbox, .woocommerce-form__label-for-checkbox) input[type="checkbox"] { flex-shrink: 0; width: 16px; height: 16px; margin: 0.15rem 0 0; accent-color: var(--ap-forest); }
.ap-co-contact .form-row { margin-bottom: 1.1rem; }
.ap-co-contact .create-account.form-row { margin: 0; }
.ap-co-contact div.create-account { margin: 0.5rem 0 0 1.6rem; }
.ap-co-contact div.create-account .form-row { margin: 0.8rem 0 0; }

/* 03 · end of the section: other delivery address, order note */
.ap-co-ship-toggle { margin-top: 0.2rem; padding: 1.3rem 0; border-top: 1px solid var(--ap-line); }
.ap-co-ship-toggle .ap-co-hint { margin: 0.35rem 0 0 1.6rem !important; }
.ap-checkout-page .shipping_address { padding-top: 1.4rem; border-top: 1px solid var(--ap-line); }
.ap-co-notes { padding-top: 1.25rem; border-top: 1px solid var(--ap-line); }
.ap-co-notes > summary { font-size: 0.72rem; cursor: pointer; }
.ap-co-notes > summary span { font-size: 0.69rem; color: var(--ap-muted); }
.ap-co-notes .form-row { margin: 0.9rem 0 0; }

/* ---------- Summary ---------- */

.ap-co-summary { position: sticky; top: calc(var(--ap-header-compact, 76px) + 1.25rem); min-width: 0; }
.ap-co-card { padding: 1.75rem 1.6rem; border: 1px solid #cbd8bd; border-top: 4px solid var(--ap-forest); border-radius: var(--ap-radius-panel); background: #f9fbf2; }
.ap-co-card__head { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.ap-co-card__head .is-style-eyebrow { margin-bottom: 0.5rem !important; font-size: 0.5rem; letter-spacing: 0.19em; }
.ap-co-card__head h2 { font-size: 1.75rem; letter-spacing: -0.025em; }
.ap-co-card__mark { flex-shrink: 0; opacity: 0.6; }
.ap-co-card__count { margin-top: 0.75rem !important; font-size: 0.69rem; color: var(--ap-muted); }

.ap-co-coupon { margin: 0.75rem 0 1.3rem; padding: 0.95rem 0; border-block: 1px solid var(--ap-line); }
.ap-co-coupon > summary { display: flex; align-items: center; justify-content: space-between; font-size: 0.72rem; list-style: none; cursor: pointer; }
.ap-co-coupon > summary::-webkit-details-marker { display: none; }
.ap-co-coupon > summary > span { font-size: 1.2rem; line-height: 1; color: var(--ap-moss); transition: transform 0.2s; }
.ap-co-coupon[open] > summary > span { transform: rotate(45deg); }
.ap-co-coupon__body { padding-top: 0.9rem; }
.ap-co-coupon__body > label { display: block; margin-bottom: 0.4rem; font-size: 0.69rem; }
.ap-co-coupon__body > div { display: flex; gap: 0.5rem; }
.ap-co-coupon__body input { box-sizing: border-box; width: 100%; min-width: 0; height: 42px; padding: 0 0.75rem; border: 1px solid var(--ap-line); border-radius: var(--ap-radius-control); background: #fcfcf7; font: inherit; font-size: var(--wp--preset--font-size--x-small); text-transform: uppercase; }
.ap-co-coupon__body input[aria-invalid] { border-color: #a44634; }
.ap-co-coupon__body button { flex-shrink: 0; padding: 0.55rem 0.95rem; border: 1px solid var(--ap-forest); border-radius: var(--ap-radius-control); background: var(--ap-forest); font: inherit; font-size: 0.72rem; font-weight: 600; color: var(--ap-paper); cursor: pointer; }
.ap-co-coupon__body button:disabled { opacity: 0.5; cursor: wait; }
.ap-co-coupon__status { margin-top: 0.6rem !important; font-size: 0.69rem; line-height: 1.6; color: var(--ap-forest); }
.ap-co-coupon__status.is-error { color: #973b29; }

.ap-co-delivery { display: flex; align-items: flex-start; gap: 0.75rem; }
.ap-co-delivery + .ap-co-delivery { margin-top: 0.9rem; }
.ap-co-delivery > .ap-co-svg { margin-top: 0.1rem; }
.ap-co-delivery strong { font-size: 0.72rem; font-weight: 600; }
.ap-co-delivery p { margin-top: 0.2rem !important; font-size: 0.625rem; line-height: 1.6; color: var(--ap-muted); }
.ap-co-rates { display: grid; gap: 0.35rem; margin: 0.6rem 0 0 !important; padding: 0; list-style: none; }
.ap-co-rates li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 0.72rem; }
.ap-co-rates input { margin: 0; accent-color: var(--ap-forest); }
.ap-co-rates label span { color: var(--ap-muted); }

.ap-co-totals { margin: 0.8rem 0 0 !important; font-size: 0.75rem; }
.ap-co-totals > div { display: flex; justify-content: space-between; gap: 1.25rem; padding: 0.6rem 0; }
.ap-co-totals dt { color: var(--ap-muted); }
.ap-co-totals dd { margin: 0; font-weight: 550; text-align: right; }
.ap-co-totals__discount dd { color: var(--ap-moss); }
.ap-co-totals .woocommerce-remove-coupon { display: block; font-size: 0.625rem; font-weight: 400; color: var(--ap-muted); }
.ap-co-totals__total { align-items: baseline; margin-top: 0.75rem; padding-top: 1.25rem !important; border-top: 1px solid var(--ap-line); }
.ap-co-totals__total dt { font-family: var(--ap-serif); font-size: 1.375rem; color: var(--ap-forest); }
.ap-co-totals__total dd { font-size: 1.5rem; font-weight: 500; letter-spacing: -0.03em; }
.ap-co-totals__total dd small { display: block; font-size: 0.625rem; letter-spacing: 0; color: var(--ap-muted); }

/* 04 · Payment */
.ap-co-payment { min-width: 0; margin: 2rem 0 1.25rem; padding: 1.05rem 0 0; border: 0; border-top: 1px solid var(--ap-line); }
.ap-co-payment legend { padding-right: 0.9rem; font-family: var(--ap-serif); font-size: 1.5rem; color: var(--ap-forest); }
.ap-co-payment legend > span { margin-right: 0.35rem; font-family: var(--ap-sans); font-size: 0.56rem; color: var(--ap-moss); vertical-align: middle; }
.ap-co-payment ul { display: grid; gap: 0.55rem; margin: 0.4rem 0 0 !important; padding: 0; list-style: none; }
.ap-co-payment .wc_payment_method { position: relative; padding: 0.85rem 0.8rem; border: 1px solid var(--ap-line); border-radius: var(--ap-radius-control); background: #fcfcf7; }
.ap-co-payment .wc_payment_method:has(> input:checked) { border-color: #789363; background: #edf2e5; }
.ap-co-payment .wc_payment_method > input { position: absolute; top: 1.15rem; left: 0.8rem; width: 15px; height: 15px; margin: 0; accent-color: var(--ap-forest); }
.ap-co-payment .wc_payment_method > label { display: flex; align-items: center; gap: 0.6rem; padding-left: 1.55rem; font-size: 0.72rem; cursor: pointer; }
.ap-co-payment .wc_payment_method > label .ap-co-svg { width: 20px; height: 20px; }
.ap-co-payment .payment_box { margin: 0.6rem 0 0 1.55rem; font-size: 0.69rem; line-height: 1.8; color: var(--ap-muted); }
.ap-co-payment .payment_box p { margin: 0; }
.ap-co-payment .payment_box :is(input, select) { max-width: 100%; }

.ap-checkout-page .woocommerce-terms-and-conditions-wrapper { display: grid; gap: 0.9rem; margin-bottom: 1rem; }
.ap-checkout-page .woocommerce-terms-and-conditions-wrapper:empty { display: none; }
.ap-checkout-page .place-order :is(p, .form-row) { margin: 0 0 1rem; }
.ap-checkout-page .place-order :is(label.checkbox, .woocommerce-form__label-for-checkbox) { font-size: 0.69rem; color: var(--ap-muted); }
.ap-checkout-page .woocommerce-privacy-policy-text { font-size: 0.69rem; line-height: 1.8; color: var(--ap-muted); }
.ap-co-policy { font-size: 0.69rem; line-height: 1.8; color: var(--ap-muted); }
.ap-co-policy a,
.ap-checkout-page .woocommerce-privacy-policy-text a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

.ap-checkout-page #place_order {
	box-sizing: border-box;
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	min-height: 54px;
	padding: 0.9rem 3.4rem 0.9rem 1.2rem;
	font-size: var(--wp--preset--font-size--xx-small);
	text-align: left;
}
.ap-checkout-page #place_order::after {
	content: "";
	position: absolute;
	right: 1.2rem;
	top: 50%;
	width: 20px;
	height: 20px;
	margin-top: -10px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h16m-6-6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h16m-6-6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ap-checkout-page .place-order { margin: 0; padding: 0; }

.ap-co-support { display: flex; align-items: flex-start; gap: 0.95rem; margin-top: 1.5rem; padding: 0 0.55rem; }
.ap-co-support > .ap-co-svg { width: 22px; margin-top: 0.2rem; }
.ap-co-support p { font-size: 0.625rem; color: var(--ap-muted); }
.ap-co-support a { display: block; width: fit-content; margin: 0.25rem 0; font-size: 1.06rem; font-weight: 600; color: var(--ap-ink); text-decoration: none; }
.ap-co-support span { display: block; font-size: 0.56rem; color: var(--ap-muted); }

/* ---------- Notices (styled for every page in theme.css) ---------- */

.ap-checkout-page .ap-co-payment__none :is(.wc-block-components-notice-banner, .woocommerce-info) { margin: 0; font-size: 0.72rem; }

/* ---------- Empty cart ---------- */

.ap-co-empty { margin: 0 0 3.75rem; padding: 2.7rem 1.25rem 3.1rem; border: 1px solid var(--ap-line); border-radius: var(--ap-radius-panel); background: var(--ap-paper); text-align: center; }
.ap-co-empty__art { position: relative; display: inline-block; margin-bottom: 1.25rem; }
.ap-co-empty__art img { display: block; width: 108px; }
.ap-co-empty__art span { position: absolute; right: -17px; bottom: 0; display: grid; place-items: center; width: 46px; height: 46px; border: 4px solid var(--ap-paper); border-radius: 50%; background: #e3ead6; color: var(--ap-forest); }
.ap-co-empty__art .ap-co-svg { width: 20px; height: 20px; }
.ap-co-empty .is-style-eyebrow { font-size: 0.625rem; letter-spacing: 0.2em; }
.ap-co-empty h2 { margin: 0.95rem 0 1.25rem !important; font-size: clamp(2.1rem, 4vw, 2.625rem); line-height: 1.15; letter-spacing: -0.03em; }
.ap-co-empty > p:not(.is-style-eyebrow) { margin-bottom: 1.6rem !important; font-size: var(--wp--preset--font-size--xx-small); line-height: 1.8; color: var(--ap-muted); }

/* ---------- Confirmation ---------- */

.ap-conf-hero { display: grid; grid-template-columns: 1fr 310px; align-items: center; gap: 3rem; padding: 2.75rem 0 2.4rem; }
.ap-conf-hero--simple { grid-template-columns: 1fr; padding-bottom: 3.5rem; }
.ap-conf-status { display: flex; align-items: center; gap: 0.7rem; font-size: 0.56rem; font-weight: 650; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ap-forest); }
.ap-conf-status__symbol { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 50%; background: #e0ebd3; font-size: 1.05rem; letter-spacing: 0; color: #49653c; }
.ap-conf-hero h1 { margin: 1.2rem 0 1.4rem !important; font-size: clamp(2.7rem, 5vw, 3.75rem); line-height: 1.08; letter-spacing: -0.035em; }
.ap-conf-hero__text { max-width: 550px; font-size: var(--wp--preset--font-size--x-small); line-height: 1.9; color: var(--ap-muted); }
.ap-conf-reference { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 0.9rem; margin-top: 1.4rem !important; }
.ap-conf-reference > span { font-size: 0.5rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--ap-muted); }
.ap-conf-reference strong { font-size: 1rem; font-weight: 600; }
.ap-conf-reference small { width: 100%; font-size: 0.625rem; color: var(--ap-muted); }
.ap-conf-extra { margin-top: 1.1rem; font-size: 0.72rem; color: var(--ap-muted); }
.ap-conf-hero__art { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.05rem; justify-self: center; width: 265px; height: 270px; border-radius: 125px 125px 6px 6px; background: #e9efdf; }
.ap-conf-hero__art > img:first-child { width: 158px; height: 158px; }
.ap-conf-hero__art > span { font-size: 0.5rem; letter-spacing: 0.16em; text-transform: uppercase; }
.ap-conf-hero__clover { position: absolute; right: -13px; bottom: 18px; width: 35px; opacity: 0.65; transform: rotate(15deg); }

.ap-conf-overview { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 2rem !important; padding: 1.45rem 0; border-block: 1px solid var(--ap-line); }
.ap-conf-overview > div { padding: 0 1.5rem; border-right: 1px solid var(--ap-line); }
.ap-conf-overview > div:first-child { padding-left: 0; }
.ap-conf-overview > div:last-child { padding-right: 0; border-right: 0; }
.ap-conf-overview dt { margin-bottom: 0.45rem; font-size: 0.625rem; color: var(--ap-muted); }
.ap-conf-overview dd { font-size: var(--wp--preset--font-size--x-small); font-weight: 600; }
.ap-conf-pill { display: inline-block; padding: 0.3rem 0.65rem; border-radius: 20px; background: #e6edd9; font-size: 0.625rem; color: #426137; }

.ap-conf-layout { display: grid; grid-template-columns: minmax(0, 1fr) 390px; align-items: start; gap: 2.25rem; }
.ap-conf-main { min-width: 0; }
.ap-conf-card { padding: 1.8rem 2rem; border: 1px solid var(--ap-line); border-radius: var(--ap-radius-card); background: var(--ap-paper); }
.ap-conf-card__head { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.ap-conf-card__head h2 { font-size: 1.95rem; letter-spacing: -0.025em; }
.ap-conf-card__head > span { font-size: 0.625rem; color: var(--ap-muted); white-space: nowrap; }

.ap-conf-items { margin: 1.1rem 0 0 !important; padding: 0; list-style: none; }
.ap-conf-item { display: flex; align-items: center; gap: 1.25rem; padding: 1.2rem 0; border-bottom: 1px solid var(--ap-line); }
.ap-conf-item > img { flex-shrink: 0; width: 55px; height: 83px; object-fit: contain; mix-blend-mode: multiply; }
.ap-conf-item > div { min-width: 0; }
.ap-conf-item h3 { font-size: 1.45rem; font-weight: 400; line-height: 1.2; letter-spacing: -0.02em; }
.ap-conf-item p { margin-top: 0.3rem !important; font-size: 0.625rem; color: var(--ap-muted); }
.ap-conf-item .wc-item-meta { margin: 0.3rem 0 0; padding: 0; list-style: none; font-size: 0.625rem; color: var(--ap-muted); }
.ap-conf-item .wc-item-meta p { display: inline; }
.ap-conf-item > strong { margin-left: auto; font-size: var(--wp--preset--font-size--x-small); white-space: nowrap; }
.ap-conf-item > .ap-co-item__remove { margin-left: auto; }
.ap-co-cart--errors .ap-co-cart__bottom { margin-top: 0.5rem; }
.ap-conf-card .ap-co-totals { max-width: 390px; margin: 1.25rem 0 0 auto !important; }
.ap-conf-card .ap-co-totals__total dd { font-size: 1.56rem; }
.ap-conf-amount { margin-top: 1.2rem !important; padding: 0.75rem 0.95rem; border-radius: var(--ap-radius-control); background: #eaf0e0; font-size: 0.72rem; text-align: right; }
.ap-conf-amount strong { margin-left: 0.4rem; }

.ap-conf-addresses { display: grid; grid-template-columns: 1fr 1fr; margin-top: 1.25rem; border: 1px solid var(--ap-line); border-radius: var(--ap-radius-card); background: #f5f5ec; }
.ap-conf-addresses section { padding: 1.5rem 1.8rem; }
.ap-conf-addresses section + section { border-left: 1px solid var(--ap-line); }
.ap-conf-addresses .is-style-eyebrow { margin-bottom: 0.75rem !important; font-size: 0.5rem; color: var(--ap-muted); }
.ap-conf-addresses h2 { margin-bottom: 0.9rem !important; font-size: 1.45rem; letter-spacing: -0.02em; }
.ap-conf-addresses address { font-size: var(--wp--preset--font-size--xx-small); font-style: normal; line-height: 1.9; color: var(--ap-muted); overflow-wrap: anywhere; }
.ap-conf-addresses__note { margin-top: 0.75rem !important; font-size: 0.625rem; color: var(--ap-muted); }

.ap-conf-next { padding: 1.8rem; border: 1px solid #d4dfc6; border-radius: var(--ap-radius-panel); background: #e9efdf; }
.ap-conf-next > .is-style-eyebrow { font-size: 0.5rem; letter-spacing: 0.19em; }
.ap-conf-next > h2 { margin-top: 0.6rem !important; font-size: 1.875rem; line-height: 1.2; letter-spacing: -0.025em; }
.ap-conf-steps { margin: 1.6rem 0 !important; padding: 0; list-style: none; }
.ap-conf-steps li { position: relative; display: flex; align-items: flex-start; gap: 0.9rem; padding-bottom: 1.55rem; }
.ap-conf-steps li:last-child { padding-bottom: 0; }
.ap-conf-steps li > span { position: relative; z-index: 1; display: grid; place-items: center; flex-shrink: 0; width: 30px; height: 30px; border: 1px solid #c6d5b9; border-radius: 50%; background: #f5f7ee; font-size: 0.5rem; }
.ap-conf-steps li:first-child > span { border-color: var(--ap-forest); background: var(--ap-forest); color: var(--ap-paper); }
.ap-conf-steps li + li::before { content: ""; position: absolute; top: -1.55rem; left: 15px; width: 1px; height: 1.55rem; background: #c6d5b9; }
.ap-conf-steps h3 { margin: 0.25rem 0 0.45rem !important; font-family: var(--ap-sans); font-size: 0.75rem; font-weight: 650; line-height: 1.5; letter-spacing: 0; }
.ap-conf-steps p { font-size: 0.69rem; line-height: 1.8; color: var(--ap-muted); }
.ap-conf-payment-help { margin-top: 1.55rem; }
.ap-conf-payment-help h3 { margin-bottom: 0.9rem !important; font-size: 1.56rem; font-weight: 400; line-height: 1.2; }
.ap-conf-payment-help p { font-size: 0.75rem; line-height: 1.9; color: var(--ap-muted); }
.ap-conf-payment-help .button { width: 100%; margin-top: 1.25rem; }
.ap-conf-help { position: relative; margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid #cfdbc2; }
.ap-conf-help > img { position: absolute; top: 1.5rem; right: 0; opacity: 0.6; }
.ap-conf-help p { margin-bottom: 0.7rem !important; padding-right: 2.5rem; font-size: 0.69rem; line-height: 1.8; color: var(--ap-muted); }
.ap-conf-help a:not(.ap-co-link) { display: block; margin: 0.3rem 0; font-size: var(--wp--preset--font-size--x-small); font-weight: 600; color: var(--ap-ink); text-decoration: none; }
.ap-conf-help .ap-conf-help__phone { font-size: 1.2rem; }
.ap-conf-help small { display: block; margin: 0.55rem 0 0.9rem; font-size: 0.56rem; color: var(--ap-muted); }

.ap-conf-bottom { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 2.7rem 0 3rem; }
.ap-conf-bottom .is-style-eyebrow { margin-bottom: 0.75rem !important; font-size: 0.5rem; letter-spacing: 0.19em; }
.ap-conf-bottom h2 { font-size: 2rem; line-height: 1.18; letter-spacing: -0.025em; }

.ap-confirmation[data-state="pending"] :is(.ap-conf-status__symbol, .ap-conf-pill) { background: #f1e5cc; color: #796132; }
.ap-confirmation[data-state="failed"] :is(.ap-conf-status__symbol, .ap-conf-pill) { background: #f3dfd7; color: #934c37; }
.ap-confirmation[data-state="pending"] .ap-conf-amount { background: #f2ecd9; }
.ap-confirmation[data-state="failed"] .ap-conf-amount { background: #f5e8df; }
.ap-confirmation:is([data-state="pending"], [data-state="failed"]) .ap-conf-next { background: #f0eee2; }

/* Guest email verification before showing an order (WooCommerce's form after order-received.php) */
.ap-checkout-page form.woocommerce-verify-email { max-width: 560px; margin-bottom: 3.5rem; padding: 1.7rem 1.9rem; border: 1px solid var(--ap-line); border-radius: var(--ap-radius-card); background: var(--ap-paper); }
.ap-checkout-page form.woocommerce-verify-email p { margin-bottom: 1rem; font-size: var(--wp--preset--font-size--xx-small); }

/* ---------- Retry payment ---------- */

.ap-pay .ap-co-totals { max-width: 420px; margin-left: auto !important; }
.ap-pay .ap-co-payment { margin-top: 0; padding-top: 0; border-top: 0; }

/* ---------- Responsive ---------- */

@media (max-width: 1150px) {
	.ap-co-layout { grid-template-columns: minmax(0, 1fr) 345px; gap: 1.55rem; }
	.ap-co-section { padding: 1.5rem; }
	.ap-co-item { grid-template-columns: 62px minmax(0, 1fr) 96px 75px; gap: 0.65rem; }
	.ap-co-qty { width: 96px; }
	.ap-co-qty button { width: 29px; }
	.ap-co-qty input { width: 36px; }
	.ap-co-item__name { font-size: 1.3rem; }
	.ap-co-card { padding: 1.55rem 1.4rem; }
	.ap-co-card__head h2 { font-size: 1.56rem; }
	.ap-co-cart__bottom { flex-direction: column; align-items: flex-start; gap: 0.55rem; }
	.ap-conf-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 1.7rem; }
	.ap-conf-card,
	.ap-conf-next { padding: 1.55rem; }
	.ap-conf-overview > div { padding: 0 1.1rem; }
	.ap-conf-addresses section { padding: 1.45rem; }
}

@media (max-width: 950px) {
	.ap-co-layout { grid-template-columns: 1fr; gap: 0.25rem; }
	.ap-co-summary { position: static; }
	.ap-co-item { grid-template-columns: 68px minmax(0, 1fr) 114px 90px; gap: 1.1rem; }
	.ap-co-qty { width: 106px; }
	.ap-co-qty button { width: 33px; }
	.ap-co-qty input { width: 40px; }
	.ap-co-item__name { font-size: 1.5rem; }
	.ap-co-cart__bottom { flex-direction: row; align-items: center; }
	.ap-co-head__note { max-width: 270px; gap: 0.9rem; }
	.ap-co-head__note img { width: 60px; }
	.ap-co-steps ol,
	.ap-co-steps li { gap: 0.75rem; }
	.ap-co-steps li + li::before { width: 1.1rem; margin-right: 0; }
	.ap-co-login form { max-width: none; }

	.ap-conf-hero { grid-template-columns: 1fr 210px; gap: 1.55rem; }
	.ap-conf-hero__art { width: 190px; height: 220px; }
	.ap-conf-hero__art > img:first-child { width: 125px; height: 125px; }
	.ap-conf-layout { grid-template-columns: 1fr; }
	.ap-conf-overview { grid-template-columns: 1fr 1fr; gap: 1.2rem 0; }
	.ap-conf-overview > div { padding: 0 1.4rem !important; }
	.ap-conf-overview > div:nth-child(odd) { padding-left: 0 !important; }
	.ap-conf-overview > div:nth-child(even) { border-right: 0; }
	.ap-conf-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.55rem; }
	.ap-conf-steps li { flex-direction: column; gap: 0.6rem; padding-bottom: 0; }
	.ap-conf-steps li + li::before { display: none; }
}

@media (max-width: 600px) {
	.ap-co-topline { flex-direction: column; align-items: flex-start; gap: 1.5rem; padding-top: 0.6rem; }
	.ap-co-steps { width: 100%; }
	.ap-co-steps ol { justify-content: space-between; gap: 0.4rem; }
	.ap-co-steps li { gap: 0.5rem; font-size: 0.69rem; }
	.ap-co-steps li + li::before { flex: 1; min-width: 0.7rem; }
	.ap-co-steps li + li { flex: 1; justify-content: flex-end; }
	.ap-co-steps__number { width: 22px; height: 22px; }

	.ap-co-head { display: block; padding: 1.9rem 0 1.45rem; }
	.ap-co-head h1 { font-size: 2.75rem; letter-spacing: -0.037em; }
	.ap-co-head__note { max-width: none; margin-top: 1.2rem; gap: 0.95rem; }
	.ap-co-head__note img { width: 44px; }

	.ap-co-login > summary { padding: 0.8rem 1rem; }
	.ap-co-login > summary > span { margin-left: 0.3rem; }
	.ap-co-login form { padding: 0.3rem 1rem 1.25rem; }
	.ap-co-login__bottom .button { width: 100%; margin: 0; }

	.ap-co-layout { padding-bottom: 2.5rem; }
	.ap-co-section { margin-bottom: 1.05rem; padding: 1.45rem 1.2rem; }
	.ap-co-section__head { gap: 0.75rem; margin-bottom: 1.5rem; }
	.ap-co-section__head > span { width: 30px; height: 30px; font-size: 0.56rem; }
	.ap-co-section__head h2 { font-size: 1.625rem; }

	.ap-co-item { grid-template-columns: 59px minmax(0, 1fr) auto; gap: 0.7rem; padding: 1.25rem 0; }
	.ap-co-item__image { grid-row: 1 / 3; grid-column: 1; align-self: start; padding: 4px; }
	.ap-co-item__image img { width: 51px; height: 90px; }
	.ap-co-item__info { grid-column: 2 / -1; grid-row: 1; }
	.ap-co-item__name { font-size: 1.375rem; }
	.ap-co-qty { grid-column: 2; grid-row: 2; width: 104px; }
	.ap-co-qty button { width: 32px; height: 40px; }
	.ap-co-qty input { width: 38px; font-size: 1rem; }
	.ap-co-item__total { grid-column: 3; grid-row: 2; }
	.ap-co-cart__bottom { flex-direction: column; align-items: flex-start; gap: 0.7rem; }

	.ap-co-grid { grid-template-columns: 1fr; }
	.ap-co-grid > :is(.form-row-first, .form-row-last, .ap-co-third) { display: block; grid-column: 1; grid-row: auto; }
	.ap-checkout-page .form-row :is(input.input-text, select, textarea),
	.ap-co-coupon__body input { font-size: 1rem; }
	.ap-checkout-page .form-row :is(input.input-text, select),
	.ap-co-coupon__body input { height: 44px; padding-block: 0.4rem; }
	.ap-checkout-page .form-row label:not(.checkbox, .woocommerce-form__label-for-checkbox) { font-size: 0.8125rem; }
	.ap-checkout-page :is(label.checkbox, .woocommerce-form__label-for-checkbox),
	.ap-co-payment .wc_payment_method > label { font-size: 0.8125rem; }
	.ap-co-hint,
	.ap-co-policy,
	.ap-co-payment .payment_box { font-size: 0.75rem; }

	.ap-co-card { padding: 1.55rem 1.3rem; }
	.ap-co-card__head h2 { font-size: 1.75rem; }

	.ap-co-empty { margin-bottom: 2.25rem; padding: 2rem 1.1rem 2.4rem; border-radius: var(--ap-radius-panel); }

	.ap-conf-hero { display: block; padding: 1.75rem 0; }
	.ap-conf-hero__art { display: none; }
	.ap-conf-hero h1 { margin: 1.1rem 0 !important; font-size: 2.7rem; }
	.ap-conf-overview { margin-bottom: 1.45rem !important; padding: 1.25rem 0; }
	.ap-conf-overview > div { padding: 0 0.8rem !important; }
	.ap-conf-overview dd { font-size: 0.75rem; }
	.ap-conf-layout { gap: 1.25rem; }
	.ap-conf-card { padding: 1.45rem 1.25rem; }
	.ap-conf-card__head h2 { font-size: 1.7rem; }
	.ap-conf-item { gap: 0.75rem; }
	.ap-conf-item > img { width: 40px; height: 68px; }
	.ap-conf-item h3 { font-size: 1.25rem; }
	.ap-conf-amount { text-align: left; }
	.ap-conf-addresses { grid-template-columns: 1fr; }
	.ap-conf-addresses section { padding: 1.45rem 1.25rem; }
	.ap-conf-addresses section + section { border-top: 1px solid var(--ap-line); border-left: 0; }
	.ap-conf-next { padding: 1.55rem 1.45rem; }
	.ap-conf-steps { display: block; }
	.ap-conf-steps li { flex-direction: row; gap: 0.95rem; padding-bottom: 1.55rem; }
	.ap-conf-steps li + li::before { display: block; }
	.ap-conf-bottom { display: block; padding: 2rem 0 2.4rem; }
	.ap-conf-bottom h2 { font-size: 1.875rem; }
	.ap-conf-bottom .button { margin-top: 1.45rem; }
}
