/* ==========================================================
   Chapter Gifting — Cart / Checkout / My Account
   Light "paper" surface for pages where people type and pay.
   Brand stays dark everywhere else. Loaded only on these pages.
   ========================================================== */

body.cg-money-page {
	--ck-page: #FBF7F0;
	--ck-card: #ffffff;
	--ck-ink: #1E1914;
	--ck-muted: #5E554A;
	--ck-line: #C9B89C;
	--ck-gold: #653A1C;
	--ck-gold-deep: #4E2C14;
	--ck-ok: #1F7A45;
	--ck-radius: 14px;
}

/* ---------- The light surface, full width, without creating sideways scroll ---------- */
body.cg-money-page .wp-block-woocommerce-checkout,
body.cg-money-page .wp-block-woocommerce-cart,
body.cg-money-page .woocommerce-account .woocommerce,
body.cg-money-page.woocommerce-account .woocommerce {
	background: var(--ck-page);
	box-shadow: 0 0 0 100vmax var(--ck-page);
	clip-path: inset(0 -100vmax);
	color: var(--ck-ink);
	padding-top: 16px;
	padding-bottom: 32px;
}

body.cg-money-page .wc-block-checkout,
body.cg-money-page .wc-block-cart {
	color: var(--ck-ink);
	font-size: 16px;
	line-height: 1.45;
}

/* Page title above checkout/cart */
body.cg-money-page .entry-title,
body.cg-money-page .page-title {
	font-size: clamp(22px, 5.5vw, 30px);
	margin: 8px 0 4px;
}

/* ---------- Each checkout step becomes one white card ---------- */
body.cg-money-page .wc-block-components-checkout-step {
	background: var(--ck-card);
	border: 1px solid var(--ck-line);
	border-radius: var(--ck-radius);
	padding: 16px 16px 18px !important;
	margin: 0 0 12px !important;
}
body.cg-money-page .wc-block-components-checkout-step::after { display: none !important; } /* the long grey step line */
body.cg-money-page .wc-block-components-checkout-step__heading {
	margin: 0 0 6px !important;
	padding: 0 !important;
}
body.cg-money-page .wc-block-components-checkout-step__title,
body.cg-money-page .wc-block-components-title {
	font-size: 18px !important;
	font-weight: 700 !important;
	color: var(--ck-ink) !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	line-height: 1.3 !important;
	margin: 0 !important;
}
body.cg-money-page .wc-block-components-checkout-step__description {
	font-size: 14px !important;
	color: var(--ck-muted) !important;
	margin: 0 0 8px !important;
}
body.cg-money-page .wc-block-components-checkout-step__container,
body.cg-money-page .wc-block-components-checkout-step__content {
	padding: 0 !important;
	margin: 0 !important;
}
body.cg-money-page .wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__title::before {
	color: var(--ck-gold-deep) !important;
}

/* ---------- Text inputs: fixed geometry so the label can never sit on the typed text ---------- */
body.cg-money-page .wc-block-components-text-input {
	position: relative !important;
	margin: 12px 0 0 !important;
}
body.cg-money-page .wc-block-components-text-input input,
body.cg-money-page .wc-block-components-text-input input[type] {
	box-sizing: border-box !important;
	width: 100% !important;
	height: 54px !important;
	min-height: 54px !important;
	margin: 0 !important;
	padding: 22px 12px 6px !important;
	font-size: 16px !important; /* 16px stops iPhone from zooming in */
	line-height: 22px !important;
	color: var(--ck-ink) !important;
	background: #fff !important;
	border: 1px solid #9A8B74 !important;
	border-radius: 10px !important;
	box-shadow: none !important;
	-webkit-appearance: none;
	appearance: none;
}
body.cg-money-page .wc-block-components-text-input label {
	position: absolute !important;
	top: 0 !important;
	left: 13px !important;
	right: 12px !important;
	margin: 0 !important;
	padding: 0 !important;
	font-size: 15px !important;
	line-height: 22px !important;
	color: var(--ck-muted) !important;
	white-space: nowrap !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
	pointer-events: none !important;
	transform-origin: 0 0 !important;
	transform: translateY(16px) !important;
	transition: transform .15s ease !important;
	max-width: none !important;
}
body.cg-money-page .wc-block-components-text-input.is-active label,
body.cg-money-page .wc-block-components-text-input input:focus + label,
body.cg-money-page .wc-block-components-text-input input:-webkit-autofill + label {
	transform: translateY(5px) scale(.8) !important;
	right: -20% !important; /* scaled label gets its width back */
}
body.cg-money-page .wc-block-components-text-input input:focus {
	border-color: var(--ck-gold-deep) !important;
	outline: 2px solid color-mix(in srgb, var(--ck-gold) 45%, transparent) !important;
	outline-offset: 1px !important;
}

/* ---------- Drop-downs (State, Country, our "What is the gift for?") ---------- */
body.cg-money-page .wc-blocks-components-select {
	margin: 12px 0 0 !important;
}
body.cg-money-page .wc-blocks-components-select .wc-blocks-components-select__container {
	position: relative !important;
	height: 54px !important;
	background: #fff !important;
	border: 1px solid #9A8B74 !important;
	border-radius: 10px !important;
	box-shadow: none !important;
}
body.cg-money-page .wc-blocks-components-select .wc-blocks-components-select__select {
	height: 52px !important;
	width: 100% !important;
	padding: 20px 36px 4px 12px !important;
	font-size: 16px !important;
	line-height: 22px !important;
	color: var(--ck-ink) !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
}
body.cg-money-page .wc-blocks-components-select .wc-blocks-components-select__label {
	position: absolute !important;
	top: 6px !important;
	left: 13px !important;
	font-size: 12px !important;
	line-height: 16px !important;
	color: var(--ck-muted) !important;
	transform: none !important;
}

/* Textarea (order note) */
body.cg-money-page .wc-block-components-textarea {
	font-size: 16px !important;
	border-radius: 10px !important;
	border: 1px solid #9A8B74 !important;
	color: var(--ck-ink) !important;
	background: #fff !important;
}

/* Validation message under a field */
body.cg-money-page .wc-block-components-validation-error {
	font-size: 13px !important;
	margin-top: 4px !important;
}

/* "+ Add apartment, suite…" link */
body.cg-money-page .wc-block-components-address-form__address_2-toggle {
	display: inline-block;
	margin-top: 10px !important;
	font-size: 14px !important;
	color: var(--ck-gold-deep) !important;
}

/* Two short fields side by side on phones too: First/Last name, City/PIN */
@media (max-width: 700px) {
	body.cg-money-page .wc-block-components-address-form {
		display: flex !important;
		flex-wrap: wrap !important;
		column-gap: 10px !important;
		justify-content: space-between !important;
	}
	body.cg-money-page .wc-block-components-address-form > * {
		flex: 1 1 100% !important;
		width: 100% !important;
		max-width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}
	body.cg-money-page .wc-block-components-address-form > .wc-block-components-address-form__first_name,
	body.cg-money-page .wc-block-components-address-form > .wc-block-components-address-form__last_name,
	body.cg-money-page .wc-block-components-address-form > .wc-block-components-address-form__city,
	body.cg-money-page .wc-block-components-address-form > .wc-block-components-address-form__postcode {
		flex: 1 1 calc(50% - 5px) !important;
		width: calc(50% - 5px) !important;
		max-width: calc(50% - 5px) !important;
	}
}

/* ---------- Checkboxes & radio options (shipping, payment) ---------- */
body.cg-money-page .wc-block-components-checkbox {
	margin-top: 14px !important;
	font-size: 15px !important;
	color: var(--ck-ink) !important;
}
body.cg-money-page .wc-block-components-checkbox__input[type=checkbox] {
	width: 22px !important;
	height: 22px !important;
	min-width: 22px !important;
	border-radius: 5px !important;
	border: 1.5px solid #7A6D5A !important;
	background: #fff !important;
	accent-color: var(--ck-gold-deep);
}
body.cg-money-page .wc-block-components-checkbox__input[type=checkbox]:checked {
	background: var(--ck-gold) !important;
	border-color: var(--ck-gold-deep) !important;
}
body.cg-money-page .wc-block-components-radio-control__option,
body.cg-money-page .wc-block-components-radio-control-accordion-option {
	border-radius: 10px !important;
	color: var(--ck-ink) !important;
	font-size: 15px !important;
}
body.cg-money-page .wc-block-components-radio-control__input:checked {
	border-color: var(--ck-gold-deep) !important;
}
body.cg-money-page .wc-block-components-radio-control__input:checked::before {
	background: var(--ck-gold-deep) !important;
}

/* ---------- Order summary (right side on laptop, top on phone) ---------- */
body.cg-money-page .wc-block-components-sidebar .wc-block-components-panel,
body.cg-money-page .wp-block-woocommerce-checkout-order-summary-block,
body.cg-money-page .wc-block-cart .wc-block-components-sidebar {
	background: var(--ck-card) !important;
	border: 1px solid var(--ck-line) !important;
	border-radius: var(--ck-radius) !important;
	color: var(--ck-ink) !important;
}
body.cg-money-page .wp-block-woocommerce-checkout-order-summary-block,
body.cg-money-page .wc-block-cart .wc-block-components-sidebar {
	padding: 4px 14px 10px !important;
}
body.cg-money-page .wc-block-components-order-summary-item__image,
body.cg-money-page .wc-block-components-order-summary-item__image img {
	width: 56px !important;
	max-width: 56px !important;
	border-radius: 8px !important;
	background: #fff;
}
body.cg-money-page .wc-block-components-order-summary-item__description,
body.cg-money-page .wc-block-components-product-metadata {
	font-size: 14px !important;
	color: var(--ck-ink) !important;
}
body.cg-money-page .wc-block-components-totals-item {
	font-size: 15px !important;
	color: var(--ck-ink) !important;
	padding: 6px 0 !important;
}
body.cg-money-page .wc-block-components-totals-footer-item,
body.cg-money-page .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	font-size: 19px !important;
	font-weight: 800 !important;
	color: var(--ck-ink) !important;
}
body.cg-money-page .wc-block-components-totals-wrapper {
	border-color: var(--ck-line) !important;
	padding-top: 8px !important;
	padding-bottom: 8px !important;
}
body.cg-money-page .wc-block-components-formatted-money-amount,
body.cg-money-page .wc-block-components-product-price {
	color: inherit !important;
}
body.cg-money-page .wc-block-components-sale-badge {
	background: var(--ck-ok) !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 6px !important;
}

/* ---------- The main button: big, gold, impossible to miss ---------- */
body.cg-money-page .wc-block-components-checkout-place-order-button,
body.cg-money-page .wc-block-cart__submit-button {
	width: 100% !important;
	min-height: 54px !important;
	border-radius: 12px !important;
	background: var(--ck-gold) !important;
	color: #1c1a17 !important;
	border: 1px solid var(--ck-gold-deep) !important;
	font-size: 18px !important;
	font-weight: 800 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	box-shadow: 0 2px 0 var(--ck-gold-deep) !important;
}
body.cg-money-page .wc-block-components-checkout-place-order-button:hover,
body.cg-money-page .wc-block-cart__submit-button:hover {
	filter: brightness(1.05);
}
body.cg-money-page .wc-block-components-checkout-place-order-button .wc-block-components-button__text,
body.cg-money-page .wc-block-cart__submit-button .wc-block-components-button__text {
	color: #1c1a17 !important;
}
body.cg-money-page .wc-block-checkout__actions {
	background: var(--ck-card);
	border: 1px solid var(--ck-line);
	border-radius: var(--ck-radius);
	padding: 14px 16px !important;
	margin-top: 4px !important;
}
body.cg-money-page .wc-block-checkout__actions_row {
	display: flex !important;
	flex-direction: column-reverse !important;
	gap: 12px !important;
	align-items: stretch !important;
}
body.cg-money-page .wc-block-components-checkout-return-to-cart-button {
	text-align: center;
	font-size: 14px !important;
	color: var(--ck-muted) !important;
}
/* Trust lines right under "Place order" */
body.cg-money-page .wc-block-checkout__actions::after {
	content: "🔒 Secure payment by Razorpay: UPI, cards, net banking\A✅ We send you a proof on WhatsApp before we engrave\A📄 GST invoice with every order";
	white-space: pre-line;
	display: block;
	margin-top: 12px;
	font-size: 13.5px;
	line-height: 1.7;
	color: var(--ck-muted);
	text-align: left;
}
body.cg-money-page .wc-block-checkout__terms {
	font-size: 13px !important;
	color: var(--ck-muted) !important;
	margin: 10px 0 !important;
}

/* ---------- Cart page ---------- */
body.cg-money-page .wc-block-cart-items {
	background: var(--ck-card) !important;
	border: 1px solid var(--ck-line) !important;
	border-radius: var(--ck-radius) !important;
	border-collapse: separate !important;
	overflow: hidden;
}
body.cg-money-page .wc-block-cart-items th {
	font-size: 13px !important;
	color: var(--ck-muted) !important;
	padding: 10px 14px !important;
}
body.cg-money-page .wc-block-cart-items td {
	padding: 14px !important;
	border-color: var(--ck-line) !important;
}
body.cg-money-page .wc-block-cart-item__image img {
	border-radius: 8px !important;
	background: #fff;
}
body.cg-money-page .wc-block-components-product-name {
	font-size: 15.5px !important;
	font-weight: 700 !important;
	color: var(--ck-ink) !important;
	line-height: 1.3 !important;
}
body.cg-money-page .wc-block-cart-item__remove-link {
	font-size: 13px !important;
	color: #a23b2a !important;
}
body.cg-money-page .wc-block-components-quantity-selector {
	border: 1px solid #9A8B74 !important;
	border-radius: 10px !important;
	background: #fff !important;
	width: 118px !important;
}
body.cg-money-page .wc-block-components-quantity-selector input {
	font-size: 16px !important;
	color: var(--ck-ink) !important;
	background: transparent !important;
	border: 0 !important;
	min-height: 40px !important;
}
body.cg-money-page .wc-block-components-quantity-selector__button {
	min-width: 38px !important;
	min-height: 40px !important;
	color: var(--ck-ink) !important;
	background: transparent !important;
	border: 0 !important;
	font-size: 18px !important;
}
/* Phone: WooCommerce's own sticky "Proceed to checkout" bar */
body.cg-money-page .wc-block-cart__submit-container--sticky {
	background: var(--ck-card) !important;
	border-top: 1px solid var(--ck-line) !important;
	padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
}

/* Coupon box: shrink it, most people don't have one */
body.cg-money-page .wc-block-components-totals-coupon-link,
body.cg-money-page .wc-block-components-panel__button {
	font-size: 14px !important;
	color: var(--ck-gold-deep) !important;
}

/* ---------- Notices ---------- */
body.cg-money-page .wc-block-components-notice-banner {
	border-radius: 10px !important;
	font-size: 14.5px !important;
}

/* ---------- Links inside the surface ---------- */
body.cg-money-page .wc-block-checkout a,
body.cg-money-page .wc-block-cart a {
	color: var(--ck-gold-deep);
}
body.cg-money-page .wc-block-checkout a.wc-block-components-button,
body.cg-money-page .wc-block-cart a.wc-block-components-button {
	color: #1c1a17 !important;
}

/* ---------- Laptop: summary sticks while the form scrolls ---------- */
@media (min-width: 901px) {
	body.cg-money-page .wc-block-checkout .wc-block-components-sidebar {
		position: sticky;
		top: 90px;
		align-self: flex-start;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.cg-money-page .wc-block-components-text-input label { transition: none !important; }
}


/* ==========================================================
   v3 — cart rows that fit a phone (24 Sep 2026)
   The old 14px padding on every cell pushed the price column
   ~50px past the right edge of a 390px screen.
   ========================================================== */
body.cg-money-page .wc-block-cart-items{width:100%!important;table-layout:fixed}
body.cg-money-page .wc-block-components-product-name{text-decoration:none!important;word-break:normal!important;overflow-wrap:break-word!important;hyphens:auto}
body.cg-money-page .wc-block-cart-items .wc-block-components-product-metadata__description,
body.cg-money-page .wc-block-components-order-summary-item .wc-block-components-product-metadata__description{display:none!important}
@media (max-width:700px){
  body.cg-money-page .wc-block-cart-items,
  body.cg-money-page .wc-block-cart-items tbody{display:block!important}
  body.cg-money-page .wc-block-cart-items thead{display:none!important}
  body.cg-money-page .wc-block-cart-items tr.wc-block-cart-items__row{display:grid!important;grid-template-columns:76px minmax(0,1fr)!important;column-gap:12px!important;row-gap:4px!important;padding:14px!important;border-bottom:1px solid var(--ck-line)!important;width:auto!important}
  body.cg-money-page .wc-block-cart-items tr.wc-block-cart-items__row:last-child{border-bottom:0!important}
  body.cg-money-page .wc-block-cart-items td{display:block!important;padding:0!important;border:0!important;width:auto!important;min-width:0!important}
  body.cg-money-page .wc-block-cart-items td.wc-block-cart-item__image{grid-column:1!important;grid-row:1 / span 2!important}
  body.cg-money-page .wc-block-cart-items td.wc-block-cart-item__image img{width:76px!important;height:76px!important;object-fit:contain!important}
  body.cg-money-page .wc-block-cart-items td.wc-block-cart-item__product{grid-column:2!important;grid-row:1!important}
  body.cg-money-page .wc-block-cart-items td.wc-block-cart-item__total{grid-column:2!important;grid-row:2!important;text-align:left!important}
  body.cg-money-page .wc-block-cart-item__total-price-and-sale-badge-wrapper{display:flex!important;flex-direction:row!important;align-items:center!important;gap:8px!important;justify-content:flex-start!important}
  body.cg-money-page .wc-block-cart-item__total .wc-block-components-product-price{font-weight:800!important;font-size:16px!important}
}

/* Main buttons: white words on the brown button — they were dark on dark. */
body.cg-money-page .wc-block-cart__submit-button,
body.cg-money-page .wc-block-components-checkout-place-order-button,
body.cg-money-page .wc-block-cart__submit-button .wc-block-components-button__text,
body.cg-money-page .wc-block-components-checkout-place-order-button .wc-block-components-button__text{color:#fff!important;font-weight:800!important;letter-spacing:.2px}
body.cg-money-page .wc-block-cart__submit-button,
body.cg-money-page .wc-block-components-checkout-place-order-button{background:#653A1C!important;border:0!important;box-shadow:0 8px 20px rgba(101,58,28,.28)!important;min-height:56px!important;border-radius:14px!important}
body.cg-money-page .wc-block-cart__submit-button:hover,
body.cg-money-page .wc-block-components-checkout-place-order-button:hover{background:#4E2C14!important}

/* Coupon link row: plain and tappable, not a squeezed pill */
body.cg-money-page .wc-block-components-totals-coupon .wc-block-components-panel__button{border:0!important;padding:10px 0!important;min-height:44px;font-weight:700!important;color:#653A1C!important;background:none!important}

/* Checkout summary: names in the plain font, no sale badge crowding the price */
body.cg-money-page .wc-block-components-order-summary-item .wc-block-components-product-name{font-family:'Manrope',system-ui,sans-serif!important;font-size:14px!important;font-weight:700!important}
body.cg-money-page .wc-block-components-order-summary-item .wc-block-components-sale-badge{display:none!important}
body.cg-money-page .wc-block-components-order-summary-item__total-price{white-space:nowrap}
body.cg-money-page .wc-block-components-totals-coupon .wc-block-components-panel,body.cg-money-page .wc-block-components-totals-coupon{border:0!important;box-shadow:none!important;background:none!important}
