/* ==========================================================================
   Hale by Pencilino — commerce (Bag and Checkout)
   --------------------------------------------------------------------------
   The full-page bag, the checkout form and the order confirmation. Button
   skins (.hale-btn-checkout, .hale-btn-order) live in components.css because
   the cart drawer uses them too.
   ========================================================================== */

/* ---------- Shared totals block ---------- */
.hale-trows { border-top: 1px dashed var(--hale-line); padding-top: 14px; margin-top: 6px; }

.hale-trow {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-size: 14.5px;
	color: var(--hale-body);
	margin-bottom: 9px;
}

.hale-trow--total {
	font-size: 1.2rem;
	font-weight: 800;
	color: var(--hale-forest);
	border-top: 1px solid var(--hale-line);
	margin-top: 12px;
	padding-top: 12px;
	margin-bottom: 0;
}

/* ---------- Bag page ---------- */
.hale-cart-page { padding-bottom: 90px; }

.hale-cart-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr);
	gap: 40px;
	align-items: start;
}

@media (max-width: 900px) { .hale-cart-layout { grid-template-columns: 1fr; gap: 28px; } }

.hale-cart-lines__head {
	display: grid;
	grid-template-columns: 1fr auto auto;
	gap: 18px;
	padding: 0 0 12px 96px;
	border-bottom: 2px solid var(--hale-forest);
	font-family: var(--hale-cond);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--hale-body-light);
}

.hale-cart-lines__head span:nth-child(2),
.hale-cart-lines__head span:nth-child(3) { text-align: right; }

.hale-bag-list { list-style: none; }

.hale-bag-row {
	display: grid;
	grid-template-columns: 78px minmax(0, 1fr) auto auto;
	gap: 18px;
	align-items: center;
	padding: 20px 0;
	border-bottom: 1px solid var(--hale-line-subtle);
}

.hale-bag-row.is-filtered-out { display: none; }

.hale-bag-row__thumb {
	width: 78px;
	height: 78px;
	border-radius: var(--hale-radius-md);
	background: var(--hale-warm-white);
	border: 1px solid var(--hale-line);
	display: grid;
	place-items: center;
	overflow: hidden;
	padding: 6px;
}

.hale-bag-row__thumb img { width: 100%; height: 100%; object-fit: contain; }

.hale-bag-row__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.hale-bag-row__body b {
	font-family: var(--hale-display);
	font-size: 1.1rem;
	font-weight: 400;
	color: var(--hale-forest);
}

.hale-bag-row__meta { font-size: 12.5px; color: var(--hale-body-light); }

.hale-bag-row__remove {
	align-self: flex-start;
	font-size: 12px;
	color: var(--hale-body);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.hale-bag-row__remove:hover { color: var(--hale-berry); }

.hale-bag-row__qty {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--hale-warm-white);
	border: 1px solid var(--hale-line);
	border-radius: var(--hale-radius-pill);
	padding: 4px 8px;
}

.hale-bag-row__qty button {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--hale-paper);
	color: var(--hale-forest);
	font-size: 15px;
	line-height: 1;
	transition: background 0.2s ease, color 0.2s ease;
}

.hale-bag-row__qty button:hover { background: var(--hale-forest); color: var(--hale-lime); }

.hale-bag-row__qty span { min-width: 20px; text-align: center; font-weight: 800; font-size: 14px; }

.hale-bag-row__price {
	font-size: 1.05rem;
	font-weight: 800;
	color: var(--hale-forest);
	text-align: right;
	min-width: 96px;
}

@media (max-width: 640px) {
	.hale-cart-lines__head { display: none; }
	.hale-bag-row { grid-template-columns: 64px minmax(0, 1fr); grid-template-areas: 'thumb body' 'qty price'; row-gap: 12px; }
	.hale-bag-row__thumb { grid-area: thumb; width: 64px; height: 64px; }
	.hale-bag-row__body { grid-area: body; }
	.hale-bag-row__qty { grid-area: qty; justify-self: start; }
	.hale-bag-row__price { grid-area: price; }
}

.hale-bag-empty {
	text-align: center;
	padding: 60px 24px;
	background: var(--hale-warm-white);
	border: 1px dashed var(--hale-line);
	border-radius: var(--hale-radius-lg);
}

.hale-bag-empty h2 {
	font-family: var(--hale-display);
	font-size: 1.7rem;
	font-weight: 400;
	color: var(--hale-forest);
	margin-bottom: 8px;
}

.hale-bag-empty .pencil-richtext,
.hale-bag-empty p { color: var(--hale-body); margin-bottom: 20px; }

.hale-bag-empty .hale-btn-primary { display: inline-flex; }

/* ---------- Bag / checkout summary rail ---------- */
.hale-summary,
.hale-sumcard {
	background: var(--hale-warm-white);
	border: 1px solid var(--hale-line);
	border-radius: var(--hale-radius-lg);
	padding: 30px 28px;
	box-shadow: var(--hale-shadow-soft);
	position: sticky;
	top: calc(96px + var(--hale-adminbar, 0px));
}

@media (max-width: 900px) {
	.hale-summary,
	.hale-sumcard { position: static; }
}

.hale-summary__title,
.hale-sumcard__title {
	font-family: var(--hale-display);
	font-size: 1.45rem;
	font-weight: 400;
	color: var(--hale-forest);
	margin-bottom: 6px;
}

.hale-summary__sub,
.hale-sumcard .hale-summary__sub {
	font-size: 13px;
	color: var(--hale-body-light);
	margin-bottom: 20px;
}

.hale-summary__sub p { margin: 0; }

.hale-field-label {
	display: block;
	font-family: var(--hale-cond);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--hale-forest);
	margin-bottom: 7px;
}

.hale-summary select,
.hale-summary input,
.hale-sumcard select,
.hale-sumcard input {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--hale-line);
	border-radius: var(--hale-radius-sm);
	background: var(--hale-cream);
	font-size: 14px;
	color: var(--hale-forest);
}

.hale-summary__eta {
	font-size: 12.5px;
	color: var(--hale-leaf);
	font-weight: 700;
	margin: 10px 0 18px;
	min-height: 1em;
}

.hale-progress { margin-bottom: 20px; }

.hale-progress p { font-size: 13px; font-weight: 700; color: var(--hale-forest); margin-bottom: 8px; }

.hale-progress__bar {
	height: 8px;
	border-radius: var(--hale-radius-pill);
	background: var(--hale-paper);
	border: 1px solid var(--hale-line);
	overflow: hidden;
}

.hale-progress__bar i {
	display: block;
	height: 100%;
	width: 0;
	border-radius: var(--hale-radius-pill);
	background: linear-gradient(90deg, var(--hale-leaf), var(--hale-lime));
	transition: width 0.5s var(--hale-ease);
}

.hale-summary .hale-btn-checkout { margin-top: 20px; }

.hale-summary__keep {
	display: block;
	text-align: center;
	margin-top: 14px;
	font-size: 13.5px;
	font-weight: 700;
	color: var(--hale-leaf);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.is-disabled { opacity: 0.45; pointer-events: none; }

/* ---------- Checkout ---------- */
.hale-co { padding-bottom: 90px; }

.hale-steps {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	font-family: var(--hale-cond);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--hale-body-light);
	margin-bottom: 34px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--hale-line);
}

.hale-steps b { color: var(--hale-forest); }

.hale-steps__dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--hale-lime);
	flex: none;
}

.hale-co__layout {
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr);
	gap: 40px;
	align-items: start;
}

@media (max-width: 900px) { .hale-co__layout { grid-template-columns: 1fr; gap: 28px; } }

.hale-co__form { display: flex; flex-direction: column; gap: 22px; }

.hale-panel {
	background: var(--hale-warm-white);
	border: 1px solid var(--hale-line);
	border-radius: var(--hale-radius-lg);
	padding: 28px 28px 30px;
}

.hale-panel__title {
	font-family: var(--hale-display);
	font-size: 1.3rem;
	font-weight: 400;
	color: var(--hale-forest);
	margin-bottom: 6px;
}

.hale-panel__hint {
	font-size: 13px;
	color: var(--hale-body-light);
	margin-bottom: 22px;
}

.hale-panel__hint p { margin: 0; }

.hale-pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

@media (max-width: 560px) { .hale-pick-grid { grid-template-columns: 1fr; } }

.hale-pick { display: block; cursor: pointer; }

.hale-pick input { position: absolute; opacity: 0; pointer-events: none; }

.hale-pick__box {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 14px 16px;
	border: 1.5px solid var(--hale-line);
	border-radius: var(--hale-radius-md);
	background: var(--hale-cream);
	transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.hale-pick__box b { font-size: 14px; color: var(--hale-forest); }
.hale-pick__box small { font-size: 12.5px; color: var(--hale-body-light); }

.hale-pick:hover .hale-pick__box { transform: translateY(-2px); }

.hale-pick input:checked + .hale-pick__box {
	border-color: var(--hale-leaf);
	background: var(--hale-lime-soft);
}

.hale-pick input:focus-visible + .hale-pick__box { outline: 2px solid var(--hale-leaf); outline-offset: 2px; }

.hale-bank-box {
	margin-top: 18px;
	padding: 18px 20px;
	background: var(--hale-cream);
	border: 1.5px dashed var(--hale-leaf);
	border-radius: var(--hale-radius-md);
	font-size: 13.5px;
	line-height: 1.6;
	color: var(--hale-body);
}

.hale-bank-box b { color: var(--hale-forest); }
.hale-bank-box p { margin: 8px 0 0; font-size: 12.5px; }

.hale-sumcard__items { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }

.hale-sumrow {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: 10px;
	align-items: baseline;
	font-size: 14px;
	color: var(--hale-body);
}

.hale-sumrow__qty { font-weight: 800; color: var(--hale-leaf); }
.hale-sumrow__price { font-weight: 800; color: var(--hale-forest); white-space: nowrap; }

.hale-sumcard .hale-btn-order {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	width: 100%;
	margin-top: 20px;
}

.hale-secure {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	margin-top: 16px;
	font-size: 12px;
	color: var(--hale-body-light);
	text-align: center;
}

.hale-co__empty {
	margin-top: 18px;
	font-size: 13.5px;
	color: var(--hale-body);
	text-align: center;
}

.hale-co__empty a { color: var(--hale-citrus); font-weight: 700; text-decoration: underline; }

/* ---------- Confirmation ---------- */
.hale-confirm {
	max-width: 640px;
	margin: 0 auto;
	background: var(--hale-warm-white);
	border: 1px solid var(--hale-line);
	border-radius: var(--hale-radius-lg);
	padding: 46px 40px;
	text-align: center;
	box-shadow: var(--hale-shadow-soft);
}

@media (max-width: 560px) { .hale-confirm { padding: 32px 22px; } }

.hale-confirm__seal {
	width: 66px;
	height: 66px;
	margin: 0 auto 20px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: var(--hale-lime);
	color: var(--hale-forest);
}

.hale-confirm__seal svg { width: 30px; height: 30px; }

.hale-confirm__title {
	font-family: var(--hale-display);
	font-size: clamp(1.9rem, 4vw, 2.6rem);
	font-weight: 400;
	line-height: 1.1;
	color: var(--hale-forest);
	margin-bottom: 14px;
}

.hale-confirm__text { color: var(--hale-body); margin-bottom: 28px; }
.hale-confirm__text p { margin: 0; }

.hale-confirm__card {
	text-align: left;
	border: 1px solid var(--hale-line);
	border-radius: var(--hale-radius-md);
	overflow: hidden;
	margin-bottom: 28px;
}

.hale-confirm__row {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 13px 18px;
	font-size: 14px;
	border-bottom: 1px solid var(--hale-line-subtle);
}

.hale-confirm__row:last-child { border-bottom: 0; }
.hale-confirm__row span:first-child { color: var(--hale-body-light); }
.hale-confirm__row span:last-child { color: var(--hale-forest); font-weight: 700; text-align: right; }

.hale-confirm__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
