/* =============================================
   Cart & My Account
   Restyles WooCommerce's own native markup to match the theme.
   Checkout page styling removed — checkout is disabled for now,
   replaced by the WhatsApp order-confirmation flow on the cart page.
   ============================================= */

.woocommerce-page-wrap {
	padding: 40px 0 64px;
}

.woocommerce-page-wrap h1,
.woocommerce-page-wrap h2 {
	margin-bottom: 24px;
}

/* =============================================
   Cart page — real-time layout
   ============================================= */

.cart-layout {
	display: grid;
	grid-template-columns: 1fr 360px;
	gap: 32px;
	align-items: start;
}

.cart-table-wrap {
	min-width: 0;
}

/* Dim only the editable cart table while an AJAX request is in flight */
.cart-live-wrap.is-loading .cart-table-wrap {
	opacity: 0.55;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

/* Fade a row out the instant Remove is clicked, before the response lands */
.cart-row.is-removing {
	opacity: 0.25;
	transition: opacity 0.2s ease;
}

table.shop_table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 24px;
}

table.shop_table th {
	text-align: left;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--color-text-muted);
	padding: 12px 10px;
	border-bottom: 1px solid var(--color-border);
}

table.shop_table td {
	padding: 16px 10px;
	border-bottom: 1px solid var(--color-border);
	vertical-align: middle;
}

table.shop_table .product-thumbnail img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: var(--radius-sm);
}

table.shop_table .product-name a {
	color: var(--color-text);
	font-weight: 500;
	text-decoration: none;
}

table.shop_table .product-name a:hover {
	color: var(--color-accent);
}

table.shop_table .product-price,
table.shop_table .product-subtotal {
	font-weight: 600;
	color: var(--color-accent);
}

/* Quantity stepper: − [number] + */
.qty-stepper {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	overflow: hidden;
}

.qty-stepper .qty-btn {
	width: 32px;
	border: none;
	background: var(--color-bg-alt);
	color: var(--color-text);
	font-size: 1.1rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.qty-stepper .qty-btn:hover {
	background: var(--color-border);
}

.qty-stepper input.qty {
	width: 44px;
	border: none;
	border-left: 1px solid var(--color-border);
	border-right: 1px solid var(--color-border);
	text-align: center;
	padding: 8px 4px;
	font-family: inherit;
	-moz-appearance: textfield;
}

.qty-stepper input.qty::-webkit-outer-spin-button,
.qty-stepper input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Remove button — real <button>, not a link, so no navigation/reload */
table.shop_table .product-remove button.remove {
	background: none;
	border: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	color: var(--color-error);
	text-decoration: none;
	font-size: 1.1rem;
	line-height: 1;
	cursor: pointer;
}

table.shop_table .product-remove button.remove:hover {
	background: #fbeaea;
}

/* Coupon input row */
.cart .coupon {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.cart .coupon input.coupon-code-input {
	padding: 10px 14px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	font-family: inherit;
}

.cart .coupon .button,
input.button,
button.button {
	background: var(--color-accent);
	color: #fff;
	border: none;
	padding: 10px 22px;
	border-radius: var(--radius-md);
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
}

.cart .coupon .button:hover,
input.button:hover,
button.button:hover {
	background: var(--color-accent-dark);
}

/* Applied coupon chips */
.applied-coupons {
	list-style: none;
	margin: 16px 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.applied-coupon {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--color-bg-alt);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	padding: 6px 10px;
	font-size: 0.85rem;
}

.applied-coupon .remove-coupon {
	background: none;
	border: none;
	color: var(--color-error);
	cursor: pointer;
	font-size: 1rem;
	line-height: 1;
	padding: 0;
}

/* Totals box — sticky on desktop */
.cart_totals {
	background: var(--color-bg-alt);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	padding: 24px;
	max-width: 420px;
	margin-left: auto;
	position: sticky;
	top: 24px;
}

.cart_totals h2 {
	font-size: 1.15rem;
	margin-bottom: 16px;
}

.cart_totals table {
	width: 100%;
}

.cart_totals table th,
.cart_totals table td {
	padding: 10px 0;
	border-bottom: 1px solid var(--color-border);
}

.cart_totals .order-total .amount {
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--color-accent);
}

.wc-proceed-to-checkout {
	margin-top: 18px;
	display: flex;
	justify-content: flex-start;
}

.wc-proceed-to-checkout a.checkout-button {
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: auto;
	max-width: 100%;
	text-align: center;
	background: linear-gradient(135deg, #128c7e 0%, #25d366 100%);
	color: #fff;
	padding: 10px 16px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	font-weight: 600;
	font-size: 0.86rem;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	box-sizing: border-box;
	box-shadow: 0 10px 22px rgba(18, 140, 126, 0.18);
	transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.wc-proceed-to-checkout a.checkout-button::before {
	content: '';
	width: 15px;
	height: 15px;
	flex-shrink: 0;
	display: inline-block;
	background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M17.5 14.4c-.3-.1-1.7-.8-1.9-.9-.3-.1-.4-.1-.6.1-.2.3-.7.9-.8 1-.2.2-.3.2-.5.1-1.5-.7-2.5-1.3-3.5-3-.3-.5.3-.4.8-1.4.1-.2 0-.3 0-.5C11 9.6 10.6 8.5 10.4 8c-.2-.5-.3-.4-.5-.4h-.5c-.2 0-.5.1-.7.3-.3.3-1 1-1 2.4 0 1.4 1 2.8 1.2 3 .1.2 2 3 4.8 4.3.7.3 1.2.5 1.6.6.7.2 1.3.2 1.8.1.5-.1 1.7-.7 1.9-1.4.2-.7.2-1.3.2-1.4-.1-.1-.3-.2-.5-.3zM12 2a10 10 0 0 0-8.6 15L2 22l5.2-1.4A10 10 0 1 0 12 2zm0 18.2c-1.6 0-3.2-.4-4.5-1.2l-.3-.2-3.1.8.8-3-.2-.3a8.2 8.2 0 1 1 7.3 3.9z'/%3E%3C/svg%3E");
}

.wc-proceed-to-checkout a.checkout-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 14px 28px rgba(18, 140, 126, 0.24);
	filter: brightness(1.02);
}

.wc-proceed-to-checkout a.checkout-button:active {
	transform: translateY(0);
	box-shadow: 0 8px 16px rgba(18, 140, 126, 0.18);
}

/* WhatsApp order-confirmation button — replaces checkout on the cart page */
.wc-proceed-to-checkout a.whatsapp-confirm-button {
	background: linear-gradient(135deg, #1f9d8a 0%, #25d366 100%);
}

.wc-proceed-to-checkout a.whatsapp-confirm-button:hover {
	box-shadow: 0 14px 28px rgba(31, 157, 138, 0.22);
}

@media (max-width: 640px) {
	.wc-proceed-to-checkout {
		justify-content: stretch;
	}

	.wc-proceed-to-checkout a.checkout-button {
		width: 100%;
		justify-content: center;
		padding: 12px 18px;
	}
}

/* Empty cart state */
.cart-empty {
	font-size: 1rem;
	color: var(--color-text-muted);
	margin-bottom: 20px;
}

.return-to-shop .button {
	display: inline-block;
}

/* =============================================
   My Account
   ============================================= */

.woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0 0 24px;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	border-bottom: 1px solid var(--color-border);
	padding-bottom: 16px;
}

.woocommerce-MyAccount-navigation li a {
	display: inline-block;
	padding: 8px 14px;
	border-radius: var(--radius-md);
	color: var(--color-text-muted);
	text-decoration: none;
	font-size: 0.9rem;
}

.woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-MyAccount-navigation li a:hover {
	background: var(--color-bg-alt);
	color: var(--color-accent);
}

.woocommerce-MyAccount-content table.shop_table {
	margin-top: 16px;
}

/* =============================================
   Notices (added to cart, errors, etc.)
   ============================================= */

.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
	list-style: none;
	background: var(--color-bg-alt);
	border-left: 4px solid var(--color-accent);
	border-radius: var(--radius-sm);
	padding: 14px 18px;
	margin-bottom: 24px;
	font-size: 0.9rem;
}

.woocommerce-error {
	border-left-color: var(--color-error);
}

/* =============================================
   Responsive
   ============================================= */

@media (max-width: 880px) {
	.cart-layout {
		grid-template-columns: 1fr;
	}

	.cart_totals {
		position: static;
		max-width: 100%;
	}
}

@media (max-width: 640px) {
	table.shop_table thead {
		display: none;
	}

	table.shop_table tr {
		display: block;
		padding: 12px 0;
		border-bottom: 1px solid var(--color-border);
	}

	table.shop_table td {
		display: flex;
		justify-content: space-between;
		align-items: center;
		border-bottom: none;
		padding: 6px 0;
	}

	table.shop_table td.product-thumbnail {
		justify-content: flex-start;
	}

	.woocommerce-MyAccount-navigation ul {
		gap: 6px;
	}
}
