/* AirPouches — Cart page
 * Templates: woocommerce/cart/cart.php, cart-totals.php, cart-empty.php.
 * Same visual language as the checkout: soft full-width band, white 20px cards,
 * black pill buttons. Quantity stepper + free shipping bar base styles: cart-drawer.css.
 */

/* -------------------------------------------------------------------------
 * Page frame
 * ------------------------------------------------------------------------- */

body.woocommerce-cart #primary.site-main {
	max-width: none;
	padding: 60px var(--ap-gutter) 120px;
	background: var(--ap-bg-soft);
}

.woocommerce-cart .entry-header,
.woocommerce-cart .entry-footer {
	display: none;
}

.woocommerce-cart .entry-content > .woocommerce {
	max-width: var(--ap-container);
	margin: 0 auto;
}

.woocommerce-cart .woocommerce-notices-wrapper:empty {
	display: none;
}

.woocommerce-cart .woocommerce-message,
.woocommerce-cart .woocommerce-info,
.woocommerce-cart .woocommerce-error {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	border: 0;
	border-radius: var(--ap-radius);
	padding: 18px 24px;
	color: var(--ap-black);
}

.woocommerce-cart .woocommerce-message a,
.woocommerce-cart .woocommerce-info a {
	color: var(--ap-black);
	font-weight: 600;
	text-decoration: underline;
}

/* "Product added" notices duplicate the cart list — show only the newest one. */
.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-message ~ .woocommerce-message {
	display: none;
}

/* -------------------------------------------------------------------------
 * Header + layout
 * ------------------------------------------------------------------------- */

.ap-cart__header {
	display: flex;
	align-items: baseline;
	gap: 16px;
	margin-bottom: 30px;
}

.ap-cart__title {
	margin: 0;
	font-family: var(--font-heading);
	font-size: 40px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--ap-black);
}

.ap-cart__header .cart-items-count {
	font-family: var(--font-body);
	font-size: 16px;
	color: var(--ap-text-muted);
}

.ap-cart__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 420px;
	gap: 40px;
	align-items: start;
}

.ap-cart__items,
.ap-cart-summary {
	background: var(--ap-white);
	border-radius: var(--ap-radius);
}

.ap-cart__items {
	padding: 10px 30px 30px;
}

/* Free shipping bar sits at the top of the items card. */
.ap-cart__shipping-bar .cart-free-shipping-progress {
	margin: 20px 0 0;
	padding: 0 0 20px;
	border-bottom: 1px solid var(--ap-border-light);
}

.ap-cart__shipping-bar .cart-free-shipping-progress__fill {
	background-color: var(--ap-pink);
}

.ap-cart__shipping-bar .cart-free-shipping-success {
	margin: 0;
	color: var(--ap-pink);
}

/* -------------------------------------------------------------------------
 * Line items
 * ------------------------------------------------------------------------- */

.ap-cart-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ap-cart-item {
	display: grid;
	grid-template-columns: 100px minmax(0, 1fr) auto 110px 24px;
	grid-template-areas: "thumb main qty total remove";
	align-items: center;
	gap: 24px;
	padding: 24px 0;
	border-bottom: 1px solid var(--ap-border-light);
}

.ap-cart-item__thumb {
	grid-area: thumb;
	width: 100px;
	height: 100px;
	border-radius: 10px;
	background: var(--ap-bg-grey);
	overflow: hidden;
}

.ap-cart-item__thumb a {
	display: block;
	height: 100%;
}

.ap-cart-item__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	margin: 0;
}

.ap-cart-item__main {
	grid-area: main;
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.ap-cart-item__name {
	color: var(--ap-black);
	text-decoration: none;
}

.ap-cart-item__name:hover .mini-cart-item-title {
	color: var(--ap-pink);
}

.ap-cart-item .mini-cart-item-title {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-family: var(--font-heading);
	font-size: 18px;
	font-weight: 500;
	line-height: 1.3;
	color: var(--ap-black);
	transition: color 0.2s ease;
}

.ap-cart-item .mini-cart-variation-badge {
	display: inline-flex;
	align-items: center;
	height: 24px;
	padding: 0 10px;
	border-radius: var(--ap-radius-pill);
	background: var(--ap-pink-light);
	font-family: var(--font-body);
	font-size: 13px;
	font-weight: 500;
	color: var(--ap-black);
}

.ap-cart-item .variation {
	margin: 0;
	font-size: 13px;
	color: var(--ap-text-muted);
}

.ap-cart-item__unit {
	font-family: var(--font-body);
	font-size: 14px;
	color: var(--ap-text-muted);
}

.ap-cart-item__unit del {
	margin-right: 4px;
	color: var(--ap-text-light);
}

.ap-cart-item__unit ins {
	text-decoration: none;
}

.ap-cart-item__qty {
	grid-area: qty;
}

.ap-cart-item .mini-cart-qty {
	margin-top: 0;
	height: 44px;
	border-color: var(--ap-border);
	border-radius: var(--ap-radius-pill);
}

.ap-cart-item .qty-btn {
	width: 40px;
	height: 42px;
	background: transparent;
}

.ap-cart-item .qty-btn:hover {
	background: var(--ap-bg-grey);
}

.ap-cart-item .qty-val {
	width: 36px;
	height: 42px;
	border: 0;
	font-size: 16px;
	color: var(--ap-black);
}

.ap-cart-item__qty-fixed {
	font-family: var(--font-heading);
	font-size: 16px;
	font-weight: 500;
	color: var(--ap-black);
}

.ap-cart-item__total {
	grid-area: total;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
	text-align: right;
}

.ap-cart-item__price-current {
	font-family: var(--font-heading);
	font-size: 18px;
	font-weight: 600;
	color: var(--ap-black);
}

.ap-cart-item__price-old {
	font-family: var(--font-body);
	font-size: 14px;
	color: var(--ap-grey);
	text-decoration: line-through;
}

.ap-cart-item__remove {
	grid-area: remove;
	display: flex;
	justify-content: center;
}

.ap-cart-item__remove .remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	line-height: 0;
	text-decoration: none;
	opacity: 0.6;
	transition: opacity 0.2s ease, background-color 0.2s ease;
}

.ap-cart-item__remove .remove:hover {
	opacity: 1;
	background: var(--ap-bg-grey);
}

/* -------------------------------------------------------------------------
 * Coupon row
 * ------------------------------------------------------------------------- */

.ap-cart__actions {
	padding-top: 24px;
}

.ap-cart-coupon {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	max-width: 520px;
}

.ap-cart-coupon__input.input-text {
	flex: 1 1 0;
	min-width: 0;
	height: 50px;
	padding: 0 22px;
	border: 1px solid var(--ap-border);
	border-radius: var(--ap-radius-pill);
	background: var(--ap-white);
	font-family: var(--font-body);
	font-size: 14px;
	color: var(--ap-black);
}

.ap-cart-coupon__input.input-text:focus {
	outline: none;
	border-color: var(--ap-black);
}

.ap-cart-coupon__btn.button {
	flex: 0 0 auto;
	height: 50px;
	padding: 0 30px;
	border: 0;
	border-radius: var(--ap-radius-pill);
	background: var(--ap-black);
	font-family: var(--font-heading);
	font-size: 16px;
	font-weight: 500;
	color: var(--ap-white);
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.ap-cart-coupon__btn.button:hover {
	background: var(--ap-pink);
}

.ap-cart-coupon .coupon-error-notice {
	flex-basis: 100%;
	margin: 4px 0 0 22px;
	font-size: 13px;
	color: var(--color-error);
}

/* -------------------------------------------------------------------------
 * Summary card (cart-totals.php)
 * ------------------------------------------------------------------------- */

.ap-cart__summary {
	position: sticky;
	top: 24px;
}

body.admin-bar .ap-cart__summary {
	top: 56px;
}

.ap-cart-summary {
	padding: 30px;
}

.ap-cart-summary__title {
	margin: 0 0 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--ap-border-light);
	font-family: var(--font-heading);
	font-size: 22px;
	font-weight: 600;
	color: var(--ap-black);
}

.ap-cart-summary__totals table {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
}

.ap-cart-summary__totals th,
.ap-cart-summary__totals td {
	padding: 10px 0;
	border: 0;
	background: none;
	font-family: var(--font-body);
	font-size: 15px;
	font-weight: 400;
	color: var(--ap-text);
	vertical-align: top;
}

.ap-cart-summary__totals th {
	text-align: left;
}

.ap-cart-summary__totals td {
	text-align: right;
	color: var(--ap-black);
}

.ap-cart-summary__totals .cart-discount td,
.ap-cart-summary__totals .cart-discount td .amount {
	color: var(--ap-pink);
}

.ap-cart-summary__totals .woocommerce-remove-coupon {
	margin-left: 6px;
	font-size: 13px;
	color: var(--ap-text-muted);
}

.ap-cart-summary__totals .order-total th,
.ap-cart-summary__totals .order-total td {
	padding-top: 18px;
	border-top: 1px solid var(--ap-border-light);
	font-family: var(--font-heading);
	font-size: 20px;
	font-weight: 600;
	color: var(--ap-black);
}

.ap-cart-summary__totals .order-total td small,
.ap-cart-summary__totals .includes_tax {
	display: block;
	font-family: var(--font-body);
	font-size: 12px;
	font-weight: 400;
	color: var(--ap-text-muted);
}

.ap-cart-summary__note {
	margin: 6px 0 0;
	font-family: var(--font-body);
	font-size: 13px;
	color: var(--ap-text-muted);
}

.ap-cart-summary__actions {
	margin-top: 24px;
	padding: 0;
}

.ap-cart-summary__actions .checkout-button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	height: 56px;
	margin: 0;
	border: 0;
	border-radius: var(--ap-radius-pill);
	background: var(--ap-black);
	font-family: var(--font-heading);
	font-size: 16px;
	font-weight: 500;
	color: var(--ap-white);
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.ap-cart-summary__actions .checkout-button::before {
	content: '';
	width: 16px;
	height: 16px;
	background: url('../images/lock-white.svg') no-repeat center / contain;
}

.ap-cart-summary__actions .checkout-button:hover {
	background: var(--ap-pink);
	color: var(--ap-white);
}

.ap-cart-summary__payments {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin-top: 20px;
}

.ap-cart-summary__payments .payment-logo-item {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 1 38px;
	min-width: 0;
	height: 26px;
}

.ap-cart-summary__payments img {
	max-width: 100%;
	max-height: 100%;
}

/* Cross-sells (rendered after the layout) */
.woocommerce-cart .cross-sells {
	margin-top: 60px;
}

.woocommerce-cart .cross-sells > h2 {
	margin: 0 0 24px;
	font-family: var(--font-heading);
	font-size: 28px;
	font-weight: 600;
	color: var(--ap-black);
}

/* -------------------------------------------------------------------------
 * Empty cart (cart-empty.php)
 * ------------------------------------------------------------------------- */

.ap-cart-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 640px;
	margin: 0 auto;
	padding: 70px 30px;
	border-radius: var(--ap-radius);
	background: var(--ap-white);
	text-align: center;
}

.ap-cart-empty__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 90px;
	height: 90px;
	margin-bottom: 24px;
	border-radius: 50%;
	background: var(--ap-pink-light);
	color: var(--ap-pink);
}

.ap-cart-empty__icon .ap-icon {
	width: 36px;
	height: 36px;
}

.ap-cart-empty__title {
	margin: 0 0 12px;
	font-family: var(--font-heading);
	font-size: 32px;
	font-weight: 600;
	color: var(--ap-black);
}

.ap-cart-empty__text {
	margin: 0 0 30px;
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	color: var(--ap-text);
}

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

@media (max-width: 1199px) {
	.ap-cart__layout {
		grid-template-columns: minmax(0, 1fr) 360px;
		gap: 24px;
	}
}

@media (max-width: 991px) {
	.ap-cart__layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.ap-cart__summary {
		position: static;
	}
}

@media (max-width: 767px) {
	body.woocommerce-cart #primary.site-main {
		padding-top: 30px;
		padding-bottom: 70px;
	}

	.ap-cart__header {
		margin-bottom: 20px;
	}

	.ap-cart__title {
		font-size: 28px;
	}

	.ap-cart__header .cart-items-count {
		font-size: 14px;
	}

	.ap-cart__items {
		padding: 0 16px 20px;
	}

	.ap-cart-summary {
		padding: 24px 16px;
	}

	.ap-cart-item {
		grid-template-columns: 72px minmax(0, 1fr) auto;
		grid-template-areas:
			"thumb main remove"
			"thumb qty total";
		column-gap: 14px;
		row-gap: 12px;
		padding: 18px 0;
	}

	.ap-cart-item__thumb {
		width: 72px;
		height: 72px;
		align-self: start;
	}

	.ap-cart-item .mini-cart-item-title {
		font-size: 16px;
	}

	.ap-cart-item__remove {
		align-self: start;
	}

	.ap-cart-item__qty {
		justify-self: start;
	}

	.ap-cart-item .mini-cart-qty {
		height: 38px;
	}

	.ap-cart-item .qty-btn,
	.ap-cart-item .qty-val {
		height: 36px;
	}

	.ap-cart-item .qty-btn {
		width: 34px;
	}

	.ap-cart-item__price-current {
		font-size: 16px;
	}

	.ap-cart-coupon__btn.button {
		padding: 0 22px;
	}

	.ap-cart-empty {
		padding: 50px 20px;
	}

	.ap-cart-empty__title {
		font-size: 26px;
	}
}
