/* ==========================================================================
   LikeInk cart + checkout — design tokens.

   Values taken from the approved mockup (likeink-mockup-styles.css :root),
   so both pages share one palette with the design source.
   ========================================================================== */

.likeink-cart-wrap,
.likeink-checkout-wrap {
	--likeink-bg: #ffffff;          /* page background */
	--likeink-tint: #f5f2ec;        /* subtle fill for hovers / placeholders */
	--likeink-ink: #141311;         /* --ink    */
	--likeink-muted: #8c887f;       /* --muted  */
	--likeink-border: #e7e2d8;      /* --line   */
	--likeink-border-strong: #d8d2c4; /* --line-strong */
	--likeink-card: #ffffff;
	--likeink-accent: #d8342a;      /* --flash: focus rings, errors */
	--likeink-step: #00516a;        /* progress: stepper + free shipping */
	--likeink-accent-dark: #a32319; /* --flash-dark */
	--likeink-highlight: #f3e6dc;   /* --skin   */
	--likeink-success: #2f6b4f;     /* --green  */
	--likeink-success-bg: #e7f1ec;  /* --green-bg */
	--likeink-radius-lg: 14px;      /* --radius    */
	--likeink-radius-md: 8px;       /* --radius-sm */
	--likeink-radius-pill: 999px;

	background: var(--likeink-bg);
	color: var(--likeink-ink);
}

/* Full-bleed page background — the wrappers are centered content columns,
   so on wide viewports the paper tone needs to sit on <body> as well. */
body.woocommerce-cart,
body.woocommerce-checkout {
	background: #fff;
}

/* ---------- Shared: drip progress ----------
   The signature element from the design: an ink-drop shape (a circle with
   one square corner, rotated 45°) rather than a plain dot. */

.likeink-stepper {
	display: flex;
	align-items: center;
	justify-content: center;
	list-style: none;
	margin: 4px 0 34px;
	padding: 0;
}

.likeink-stepper li {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.likeink-stepper__dot {
	width: 14px;
	height: 14px;
	border-radius: 50% 50% 50% 0;
	transform: rotate(45deg);
	background: var(--likeink-border-strong);
	flex-shrink: 0;
}

.likeink-stepper li.is-done .likeink-stepper__dot,
.likeink-stepper li.is-active .likeink-stepper__dot {
	background: var(--likeink-step);
}

.likeink-stepper li:not(:last-child)::after {
	content: '';
	width: 64px;
	height: 2px;
	background: var(--likeink-border-strong);
	margin: 0 2px;
	flex-shrink: 0;
}

.likeink-stepper li.is-done:not(:last-child)::after {
	background: var(--likeink-step);
}

/* Each step is a link now that the pill switcher is gone. */
.likeink-stepper li a {
	display: flex;
	align-items: center;
	gap: 8px;
	color: inherit;
	text-decoration: none;
}

.likeink-stepper li a:hover {
	color: var(--likeink-ink);
	text-decoration: underline;
}

/* Label sits between the drop and the track. */
.likeink-stepper li {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--likeink-muted);
	gap: 8px;
	white-space: nowrap;
}

.likeink-stepper li.is-active,
.likeink-stepper li.is-done {
	color: var(--likeink-ink);
}

@media (max-width: 860px) {
	.likeink-stepper li:not(:last-child)::after {
		width: 32px;
	}
}

/* ---------- Shared: buttons ---------- */

.likeink-btn {
	display: inline-block;
	padding: 10px 18px;
	border-radius: var(--likeink-radius-pill);
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	border: 1px solid var(--likeink-border-strong);
	background: var(--likeink-card);
	color: var(--likeink-ink);
}

.likeink-btn-outline:hover {
	border-color: var(--likeink-ink);
}

/* ---------- Shared: trust badges ---------- */

.likeink-trust-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	margin-top: 20px;
	justify-content: center;
}

.likeink-trust-badges span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	font-weight: 600;
	color: var(--likeink-muted);
}

.likeink-trust-badges span::before {
	content: '';
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--likeink-success);
	flex-shrink: 0;
}

/* ==========================================================================
   Cart page
   ========================================================================== */

.likeink-cart-wrap {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 28px 40px 80px;
}

.likeink-cart-columns {
	display: grid;
	grid-template-columns: 1fr 360px;
	gap: 40px;
	align-items: start;
}

@media (max-width: 860px) {
	.likeink-cart-wrap {
		padding: 20px 16px 100px;
	}

	.likeink-cart-columns {
		grid-template-columns: 1fr;
	}
}

/* ---------- Cart header ---------- */

.likeink-cart-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 18px;
	gap: 16px;
}

.likeink-cart-header h1 {
	font-size: 30px;
	margin: 0;
}

.likeink-cart-header__count {
	color: var(--likeink-muted);
	font-size: 14px;
}

/* ---------- Empty state ---------- */

.likeink-cart-empty {
	padding: 48px 24px;
	text-align: center;
	border: 1px solid var(--likeink-border);
	border-radius: var(--likeink-radius-lg);
	background: var(--likeink-card);
}

/* ---------- Items ----------
   Rows separated by rules, not individual cards. */

.likeink-cart-items {
	display: block;
}

.likeink-cart-row {
	display: grid;
	grid-template-columns: 76px 1fr auto;
	gap: 16px;
	align-items: center;
	padding: 18px 0;
	border-bottom: 1px solid var(--likeink-border);
	transition: opacity 0.15s ease;
}

.likeink-cart-row:first-of-type {
	border-top: 1px solid var(--likeink-border);
}

.likeink-cart-row.likeink-row--updating {
	opacity: 0.5;
	pointer-events: none;
}

.likeink-cart-row__image img {
	width: 76px;
	height: 76px;
	object-fit: cover;
	border-radius: var(--likeink-radius-md);
	display: block;
}

.likeink-cart-row__details {
	min-width: 0;
}

.likeink-cart-row__name {
	font-weight: 600;
	font-size: 15px;
	margin-bottom: 4px;
	line-height: 1.35;
}

.likeink-cart-row__name a {
	text-decoration: none;
	color: inherit;
}

.likeink-cart-row__meta,
.likeink-cart-row__meta p {
	font-size: 13px;
	color: var(--likeink-muted);
	margin: 0 0 10px;
}

.likeink-cart-row__error {
	color: var(--likeink-accent-dark);
	font-size: 13px;
	margin: 4px 0 0;
}

.likeink-qty-stepper {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--likeink-border-strong);
	border-radius: var(--likeink-radius-pill);
	overflow: hidden;
}

.likeink-qty-step {
	width: 28px;
	height: 28px;
	border: 0;
	background: none;
	cursor: pointer;
	font-size: 15px;
	line-height: 1;
	color: var(--likeink-ink);
}

.likeink-qty-step:hover {
	background: var(--likeink-tint);
}

.likeink-qty-input {
	width: 26px;
	height: 28px;
	border: 0;
	background: transparent;
	text-align: center;
	font-size: 13px;
	font-weight: 600;
	-moz-appearance: textfield;
}

.likeink-qty-input::-webkit-outer-spin-button,
.likeink-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.likeink-qty-fixed {
	font-weight: 600;
	font-size: 13px;
}

/* Price + remove stack on the right of the row. */
.likeink-cart-row__right {
	text-align: right;
}

.likeink-cart-row__subtotal {
	font-weight: 700;
	font-size: 15px;
	white-space: nowrap;
}

.likeink-remove-item {
	background: none;
	border: 0;
	color: var(--likeink-muted);
	text-decoration: underline;
	cursor: pointer;
	font-size: 12px;
	padding: 6px 0 0;
}

.likeink-remove-item:hover {
	color: var(--likeink-accent-dark);
}

@media (max-width: 560px) {
	.likeink-cart-row {
		grid-template-columns: 60px 1fr;
	}

	.likeink-cart-row__image img {
		width: 60px;
		height: 60px;
	}

	.likeink-cart-row__right {
		grid-column: 2;
		text-align: left;
	}
}

/* ---------- Free shipping progress ----------
   Markup comes from the child theme (likeink_free_shipping_notice), pulled
   into our column by the cart/checkout templates. Styled to match the dashed
   tier note below so the two "nudge" blocks read as one family. */

.likeink-cart-wrap .likeink-free-shipping-notice,
.likeink-checkout-wrap .likeink-free-shipping-notice {
	border: 1px dashed var(--likeink-border-strong);
	border-radius: var(--likeink-radius-md);
	background: none;
	padding: 14px 16px;
	margin: 0 0 22px;
}

.likeink-cart-wrap .likeink-free-shipping-inner,
.likeink-checkout-wrap .likeink-free-shipping-inner {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.likeink-cart-wrap .likeink-free-shipping-icon,
.likeink-checkout-wrap .likeink-free-shipping-icon {
	font-size: 18px;
	line-height: 1.2;
	flex-shrink: 0;
}

.likeink-cart-wrap .likeink-free-shipping-content,
.likeink-checkout-wrap .likeink-free-shipping-content {
	flex: 1;
	min-width: 0;
}

.likeink-cart-wrap .likeink-free-shipping-message,
.likeink-checkout-wrap .likeink-free-shipping-message {
	font-size: 13px;
	color: var(--likeink-ink);
	margin: 0 0 8px;
	order: 1;
	flex: 1 1 auto;
	min-width: 0;
}

.likeink-cart-wrap .likeink-free-shipping-message .amount,
.likeink-checkout-wrap .likeink-free-shipping-message .amount {
	color: var(--likeink-ink);
	font-weight: 600;
}

/* Message and running total share the top line; the bar spans underneath. */
.likeink-cart-wrap .likeink-free-shipping-content,
.likeink-checkout-wrap .likeink-free-shipping-content {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	column-gap: 12px;
}

.likeink-cart-wrap .likeink-free-shipping-bar,
.likeink-checkout-wrap .likeink-free-shipping-bar {
	height: 6px;
	background: rgba(0, 0, 0, 0.08);
	border-radius: var(--likeink-radius-pill);
	overflow: hidden;
	order: 3;
	flex: 0 0 100%;
}

.likeink-cart-wrap .likeink-free-shipping-bar span,
.likeink-checkout-wrap .likeink-free-shipping-bar span {
	display: block;
	height: 100%;
	background: var(--likeink-step);
	border-radius: var(--likeink-radius-pill);
}

.likeink-cart-wrap .likeink-free-shipping-amount,
.likeink-checkout-wrap .likeink-free-shipping-amount {
	display: flex;
	justify-content: flex-end;
	gap: 4px;
	margin: 0 0 8px auto;
	font-size: 12px;
	color: var(--likeink-ink);
	order: 2;
	flex: 0 0 auto;
	white-space: nowrap;
}

/* ---------- Tier / upsell note ---------- */

.likeink-cart-tier-notice {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	background: var(--likeink-bg);
	border: 1px dashed var(--likeink-border-strong);
	border-radius: var(--likeink-radius-md);
	padding: 12px 14px;
	margin-top: 18px;
	font-size: 13px;
	color: var(--likeink-muted);
}

.likeink-cart-tier-notice b {
	color: var(--likeink-ink);
}

.likeink-cart-tier-notice::before {
	content: '';
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--likeink-success);
	margin-top: 5px;
	flex-shrink: 0;
}

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

.likeink-cart-summary {
	position: sticky;
	top: 20px;
	border: 1px solid var(--likeink-border);
	border-radius: var(--likeink-radius-lg);
	padding: 22px;
	background: var(--likeink-card);
}

@media (max-width: 860px) {
	.likeink-cart-summary {
		position: static;
	}
}

.likeink-cart-summary__title {
	margin: 0 0 14px;
	font-size: 18px;
}

.likeink-coupon-form {
	display: flex;
	gap: 8px;
	margin: 14px 0;
}

.likeink-coupon-form input[type='text'] {
	flex: 1;
	min-width: 0;
	padding: 10px 12px;
	border: 1px solid var(--likeink-border-strong);
	border-radius: var(--likeink-radius-md);
	font-size: 13px;
}

.likeink-coupon-form button {
	border: 1px solid var(--likeink-ink);
	background: none;
	border-radius: var(--likeink-radius-md);
	padding: 0 14px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.likeink-applied-coupon {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: var(--likeink-success-bg);
	border-radius: var(--likeink-radius-md);
	padding: 6px 10px;
	margin-bottom: 8px;
	font-size: 13px;
}

.likeink-remove-coupon {
	background: none;
	border: 0;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	color: var(--likeink-muted);
}

.likeink-coupon-message {
	font-size: 12px;
	margin-bottom: 8px;
}

.likeink-coupon-message.likeink-error {
	color: var(--likeink-accent-dark);
}

.likeink-coupon-message.likeink-success {
	color: var(--likeink-success);
}

.likeink-totals-table {
	width: 100%;
	border-collapse: collapse;
}

.likeink-totals-table tr th,
.likeink-totals-table tr td {
	padding: 7px 0;
	text-align: left;
	font-weight: 400;
	border: 0;
	font-size: 14px;
}

.likeink-totals-table tr td {
	text-align: right;
}

.likeink-totals-shipping th,
.likeink-totals-shipping td {
	color: var(--likeink-muted);
}

.likeink-totals-total th,
.likeink-totals-total td {
	font-weight: 700;
	font-size: 17px;
	border-top: 1px solid var(--likeink-border) !important;
	padding-top: 14px !important;
}

.likeink-cart-summary__actions .checkout-button {
	display: block;
	width: 100%;
	text-align: center;
	padding: 16px;
	border-radius: var(--likeink-radius-pill);
	background: var(--likeink-ink);
	color: var(--likeink-bg);
	text-decoration: none;
	font-weight: 700;
	font-size: 15px;
	margin-top: 16px;
	border: 0;
}

.likeink-cart-summary__actions .checkout-button:hover {
	background: var(--likeink-accent-dark);
}

.likeink-cart-summary__secondary {
	display: block;
	width: 100%;
	text-align: center;
	padding: 13px;
	border-radius: var(--likeink-radius-pill);
	border: 1px solid var(--likeink-border-strong);
	background: none;
	color: var(--likeink-ink);
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	margin-top: 10px;
}

.likeink-cart-summary__payment-icons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 16px;
	justify-content: center;
}

.likeink-cart-summary__payment-icons span {
	border: 1px solid var(--likeink-border);
	border-radius: 6px;
	padding: 5px 9px;
	font-size: 10px;
	font-weight: 700;
	color: var(--likeink-muted);
}

/* ---------- Sticky mobile bar ----------
   Keeps the total and the primary action reachable on small screens, where
   the summary card is pushed far below the item list. */

.likeink-sticky-mobile {
	display: none;
}

@media (max-width: 860px) {
	.likeink-sticky-mobile {
		display: flex;
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		background: #fff;
		border-top: 1px solid var(--likeink-border);
		padding: 12px 16px;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		z-index: 5;
	}

	.likeink-sticky-mobile__total {
		font-size: 15px;
		font-weight: 700;
	}

	.likeink-sticky-mobile__total small {
		display: block;
		font-size: 11px;
		color: var(--likeink-muted);
		font-weight: 400;
	}

	.likeink-sticky-mobile__btn {
		background: var(--likeink-ink);
		color: #fff;
		border: 0;
		border-radius: var(--likeink-radius-pill);
		padding: 13px 26px;
		font-size: 14px;
		font-weight: 700;
		text-decoration: none;
		white-space: nowrap;
	}
}
