/* SM Plant Sales: basket (slide-out and page) and shop notices, in the site's lean style.
   Navy #003768, amber #f9b101 with dark text, 1px #dfe3e8 lines, 8px corners, 40 to 44px buttons. */

/* Shared buttons: Checkout is the one amber button; View basket is secondary */
.woocommerce-mini-cart__buttons .button,
.woocommerce-cart .wc-proceed-to-checkout .checkout-button {
	display: flex !important; align-items: center; justify-content: center; min-height: 44px; margin: 0 !important; padding: 0 16px !important;
	border-radius: 6px !important; font-size: 15px !important; font-weight: 600 !important; letter-spacing: 0 !important; text-transform: none !important; line-height: 1.2 !important;
}
.woocommerce-mini-cart__buttons .button.checkout,
.woocommerce-cart .wc-proceed-to-checkout .checkout-button { background: #f9b101 !important; border: 0 !important; color: #1a1a1a !important; }
.woocommerce-mini-cart__buttons .button.checkout:hover, .woocommerce-mini-cart__buttons .button.checkout:focus-visible,
.woocommerce-cart .wc-proceed-to-checkout .checkout-button:hover, .woocommerce-cart .wc-proceed-to-checkout .checkout-button:focus-visible { background: #ffc229 !important; color: #1a1a1a !important; }
.woocommerce-mini-cart__buttons .button:not(.checkout) { background: #fff !important; border: 1px solid #003768 !important; color: #003768 !important; }
.woocommerce-mini-cart__buttons .button:not(.checkout):hover, .woocommerce-mini-cart__buttons .button:not(.checkout):focus-visible { background: #f4f6f9 !important; }

/* Slide-out basket */
.astra-cart-drawer { box-shadow: -20px 0 50px rgba(0, 25, 48, 0.18) !important; }
.astra-cart-drawer .astra-cart-drawer-header { padding: 16px 20px !important; border-bottom: 1px solid #dfe3e8 !important; }
.astra-cart-drawer .astra-cart-drawer-title { padding: 0 !important; color: #003768 !important; font-size: 17px !important; font-weight: 700 !important; text-transform: none !important; letter-spacing: 0 !important; }
.astra-cart-drawer .astra-cart-drawer-content .woocommerce-mini-cart { padding: 4px 20px !important; }
.astra-cart-drawer .woocommerce-mini-cart-item {
	position: relative; display: grid !important; grid-template-columns: 64px minmax(0, 1fr) auto; column-gap: 12px; row-gap: 8px; align-items: center;
	padding: 16px 0 !important; border-bottom: 1px solid #e6e9ee !important; margin: 0 !important;
}
/* WooCommerce's float-clearing pseudo elements would take grid cells */
.astra-cart-drawer .woocommerce-mini-cart-item::before, .astra-cart-drawer .woocommerce-mini-cart-item::after,
.astra-cart-drawer .woocommerce-mini-cart__buttons::before, .astra-cart-drawer .woocommerce-mini-cart__buttons::after { display: none !important; content: none !important; }
.astra-cart-drawer .woocommerce-mini-cart-item .ast-product-image { grid-column: 2 / 4; grid-row: 1; padding-right: 32px; }
.astra-cart-drawer .woocommerce-mini-cart-item .ast-product-name { color: #003768; font-size: 14px; font-weight: 600; line-height: 1.35; }
.astra-cart-drawer .woocommerce-mini-cart-item .ast-mini-cart-price-wrap { grid-column: 3; grid-row: 2; float: none !important; margin: 0 !important; max-width: none !important; color: #1a1a1a; font-size: 15px; font-weight: 700; text-align: right; }
.astra-cart-drawer .woocommerce-mini-cart-item > a:not(.remove) {
	display: contents !important; color: #003768 !important; font-size: 14px !important; font-weight: 600 !important; line-height: 1.35 !important; text-decoration: none !important;
}
.astra-cart-drawer .woocommerce-mini-cart-item img {
	grid-column: 1; grid-row: 1 / span 2; width: 64px !important; height: 64px !important; max-width: none !important; margin: 0 !important; padding: 4px;
	object-fit: contain; border: 1px solid #dfe3e8; border-radius: 6px; background: #fff; float: none !important; position: static !important;
}
.astra-cart-drawer .woocommerce-mini-cart-item .quantity { grid-column: 2; grid-row: 2; display: inline-flex !important; width: max-content; margin: 0 !important; }
.astra-cart-drawer .woocommerce-mini-cart-item .quantity .qty, .astra-cart-drawer .woocommerce-mini-cart-item .quantity .ast-qty-placeholder {
	height: 32px !important; min-height: 32px !important; line-height: 30px !important;
}
.astra-cart-drawer .woocommerce-mini-cart-item a.remove {
	position: absolute !important; top: 14px !important; right: 0 !important; left: auto !important; display: inline-flex !important; align-items: center; justify-content: center;
	width: 24px !important; height: 24px !important; border: 0 !important; border-radius: 50% !important; background: #f4f6f9 !important; color: #545d68 !important; font-size: 16px !important; line-height: 1 !important;
}
.astra-cart-drawer .woocommerce-mini-cart-item a.remove:hover, .astra-cart-drawer .woocommerce-mini-cart-item a.remove:focus-visible { background: #fde8e6 !important; color: #a3261d !important; }
.astra-cart-drawer .woocommerce-mini-cart__total {
	display: flex !important; justify-content: space-between; align-items: baseline; margin: 0 !important; padding: 16px 20px 4px !important;
	border-top: 1px solid #dfe3e8 !important; color: #1a1a1a; font-size: 15px;
}
.astra-cart-drawer .woocommerce-mini-cart__total strong { font-weight: 600; }
.astra-cart-drawer .woocommerce-mini-cart__total .woocommerce-Price-amount { font-size: 17px; font-weight: 700; }
.smp-mini-note { margin: 0 !important; padding: 0 20px 12px; color: #545d68; font-size: 13px; }
.astra-cart-drawer .woocommerce-mini-cart__buttons {
	display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 !important; padding: 0 20px 20px !important;
}
.astra-cart-drawer .woocommerce-mini-cart__empty-message { padding: 24px 20px; color: #545d68; text-align: left; }

/* Basket page */
.woocommerce-cart .entry-title { color: #003768; font-weight: 700; }
.woocommerce-cart table.shop_table.cart {
	border: 1px solid #dfe3e8 !important; border-radius: 10px !important; border-collapse: separate !important; border-spacing: 0; overflow: hidden; background: #fff;
}
.woocommerce-cart table.shop_table.cart thead th {
	background: #fff !important; padding: 12px 16px !important; border-bottom: 1px solid #dfe3e8 !important;
	color: #545d68 !important; font-size: 13px !important; font-weight: 600 !important; text-transform: none !important; letter-spacing: 0 !important;
}
.woocommerce-cart table.shop_table.cart td { padding: 16px !important; border-top: 0 !important; border-bottom: 1px solid #e6e9ee !important; vertical-align: middle; font-size: 15px; }
.woocommerce-cart table.shop_table.cart tr:last-child td { border-bottom: 0 !important; }
.woocommerce-cart table.shop_table.cart td.product-thumbnail img {
	width: 72px !important; height: 72px !important; max-width: none !important; padding: 4px; object-fit: contain; border: 1px solid #dfe3e8; border-radius: 6px; background: #fff;
}
.woocommerce-cart table.shop_table.cart td.product-name a { color: #003768 !important; font-weight: 600; text-decoration: none; }
.woocommerce-cart table.shop_table.cart td.product-name a:hover { text-decoration: underline; }
.woocommerce-cart table.shop_table.cart td.product-subtotal { font-weight: 700; }
.woocommerce-cart table.shop_table.cart a.remove {
	display: inline-flex !important; align-items: center; justify-content: center; width: 28px !important; height: 28px !important;
	border: 0 !important; border-radius: 50% !important; background: #f4f6f9 !important; color: #545d68 !important; font-size: 18px !important; line-height: 1 !important;
}
.woocommerce-cart table.shop_table.cart a.remove:hover, .woocommerce-cart table.shop_table.cart a.remove:focus-visible { background: #fde8e6 !important; color: #a3261d !important; }
.woocommerce-cart .cart-collaterals .cart_totals {
	padding: 20px !important; border: 1px solid #dfe3e8 !important; border-radius: 10px !important; background: #fff !important;
}
.woocommerce-cart .cart_totals > h2 {
	margin: 0 0 8px !important; padding: 0 !important; border: 0 !important; background: none !important;
	color: #003768 !important; font-size: 18px !important; font-weight: 700 !important; text-transform: none !important; letter-spacing: 0 !important;
}
.woocommerce-cart .cart_totals table.shop_table { border: 0 !important; margin: 0 0 8px !important; }
.woocommerce-cart .cart_totals p#ast-coupon-trigger, .woocommerce-cart .cart_totals #ast-coupon-trigger { margin: 0 0 14px !important; padding: 0 !important; color: #003768; font-size: 14px; font-weight: 600; }
.woocommerce-cart .cart_totals table.shop_table th, .woocommerce-cart .cart_totals table.shop_table td {
	padding: 10px 0 !important; border: 0 !important; border-bottom: 1px solid #e6e9ee !important; background: none !important; font-size: 15px;
}
.woocommerce-cart .cart_totals table.shop_table th { color: #545d68; font-weight: 500 !important; }
.woocommerce-cart .cart_totals table.shop_table tr.order-total th, .woocommerce-cart .cart_totals table.shop_table tr.order-total td { border-bottom: 0 !important; color: #1a1a1a; font-size: 17px; font-weight: 700 !important; }
.woocommerce-cart .wc-proceed-to-checkout { padding: 0 !important; display: grid; gap: 8px; }
.woocommerce-cart .cart_totals .woocommerce-shipping-calculator a, .woocommerce-cart .ast-cart-coupon a, .woocommerce-cart .coupon label { color: #003768; font-weight: 600; }

/* Notices ("added to your basket" and others): white card, coloured edge, small button */
.woocommerce-notices-wrapper .woocommerce-message, .woocommerce-notices-wrapper .woocommerce-info, .woocommerce-notices-wrapper .woocommerce-error,
.woocommerce-message, .woocommerce-info {
	display: flex !important; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 16px !important;
	border: 1px solid #dfe3e8 !important; border-left: 4px solid #1d6b35 !important; border-radius: 8px !important; background: #fff !important;
	color: #1a1a1a !important; font-size: 15px !important; line-height: 1.4;
}
.woocommerce-info { border-left-color: #003768 !important; }
.woocommerce-error { border-left-color: #a3261d !important; }
.woocommerce-message::before, .woocommerce-info::before { position: static !important; margin: 0 !important; }
.woocommerce-message .button, .woocommerce-info .button {
	order: 2; margin: 0 0 0 auto !important; min-height: 36px; padding: 8px 14px !important; float: none !important;
	border: 1px solid #003768 !important; border-radius: 6px !important; background: #fff !important; color: #003768 !important;
	font-size: 14px !important; font-weight: 600 !important; line-height: 1.2 !important;
}
.woocommerce-message .button:hover, .woocommerce-info .button:hover { background: #f4f6f9 !important; }

@media (max-width: 599px) {
	.astra-cart-drawer .woocommerce-mini-cart { padding: 4px 16px !important; }
	.astra-cart-drawer .woocommerce-mini-cart__total, .smp-mini-note { padding-left: 16px !important; padding-right: 16px !important; }
	.astra-cart-drawer .woocommerce-mini-cart__buttons { padding: 0 16px 16px !important; }
	/* Basket page on phones: each line is a card row; Woo labels each value */
	.woocommerce-cart table.shop_table.cart td { padding: 10px 14px !important; font-size: 15px; }
	.woocommerce-cart table.shop_table_responsive.cart tr td::before { color: #545d68; font-weight: 500; }
	.woocommerce-cart .cart-collaterals .cart_totals { padding: 16px !important; }
	.woocommerce-message .button, .woocommerce-info .button { margin-left: 0 !important; }
}

/* Basket page on phones: one lean row per line, about 80px: photo left; name with the remove button
   in the corner; quantity and line total underneath. The unit price is left out on phones. */
@media (max-width: 768px) {
	.woocommerce-cart table.shop_table_responsive.cart tr.cart_item {
		display: grid !important; grid-template-columns: 56px minmax(0, 1fr) auto; column-gap: 12px; row-gap: 8px; align-items: center;
		padding: 12px 14px !important; border-bottom: 1px solid #e6e9ee;
	}
	.woocommerce-cart table.shop_table_responsive.cart tr.cart_item td {
		display: block !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; text-align: left !important; background: none !important; line-height: 1.3 !important;
	}
	.woocommerce-cart table.shop_table_responsive.cart tr.cart_item td::before { display: none !important; content: none !important; }
	.woocommerce-cart table.shop_table_responsive.cart tr.cart_item td.product-thumbnail { display: block !important; grid-column: 1; grid-row: 1 / span 2; align-self: start; }
	.woocommerce-cart table.shop_table_responsive.cart tr.cart_item td.product-thumbnail img { width: 56px !important; height: 56px !important; padding: 3px; }
	.woocommerce-cart table.shop_table_responsive.cart tr.cart_item td.product-name {
		grid-column: 2; grid-row: 1; align-self: start; font-size: 14px; line-height: 1.3;
		display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
	}
	.woocommerce-cart table.shop_table_responsive.cart tr.cart_item td.product-price { display: none !important; }
	.woocommerce-cart table.shop_table_responsive.cart tr.cart_item td.product-remove { grid-column: 3; grid-row: 1; align-self: start; justify-self: end; }
	.woocommerce-cart table.shop_table_responsive.cart tr.cart_item td.product-remove a.remove { width: 24px !important; height: 24px !important; font-size: 16px !important; }
	.woocommerce-cart table.shop_table_responsive.cart tr.cart_item td.product-quantity { grid-column: 2; grid-row: 2; }
	.woocommerce-cart table.shop_table_responsive.cart tr.cart_item td.product-quantity .quantity { display: inline-flex !important; margin: 0 !important; }
	.woocommerce-cart table.shop_table_responsive.cart tr.cart_item td.product-quantity .qty { width: 40px !important; height: 32px !important; min-height: 32px !important; padding: 0 !important; font-size: 14px !important; }
	.woocommerce-cart table.shop_table_responsive.cart tr.cart_item td.product-quantity .minus,
	.woocommerce-cart table.shop_table_responsive.cart tr.cart_item td.product-quantity .plus { display: inline-flex !important; align-items: center; justify-content: center; width: 30px !important; height: 32px !important; min-height: 32px !important; padding: 0 !important; line-height: 1 !important; }
	.woocommerce-cart table.shop_table_responsive.cart tr.cart_item td.product-subtotal { grid-column: 3; grid-row: 2; font-size: 15px; text-align: right !important; }
	.woocommerce-cart table.shop_table.cart thead { display: none; }
}

/* Basket totals, leaner: tighter rows, the delivery row as a quiet note, logos at the foot */
.woocommerce-cart .cart_totals table.shop_table th, .woocommerce-cart .cart_totals table.shop_table td { padding: 7px 0 !important; font-size: 14px; }
.woocommerce-cart .cart_totals table.shop_table tr.order-total th, .woocommerce-cart .cart_totals table.shop_table tr.order-total td { padding-top: 10px !important; font-size: 17px; }
.woocommerce-cart .cart_totals tr.woocommerce-shipping-totals td, .woocommerce-cart .cart_totals tr.shipping td, .woocommerce-cart .cart_totals tr.smp-delivery td { color: #545d68; font-size: 14px; }
.woocommerce-cart .cart_totals tr.woocommerce-shipping-totals td p { margin: 0; }
.woocommerce-cart .cart_totals table.shop_table td { text-align: right !important; }
.smp-pay-logos { display: flex; flex-wrap: nowrap; justify-content: center; gap: 6px; margin: 14px 0 0 !important; padding: 0 !important; list-style: none; }
.smp-pay-logos li { display: flex; margin: 0 !important; padding: 0; }
.smp-pay-logos img { display: block; width: 38px; height: 24px; max-width: none; object-fit: contain; }
/* Klarna and Link come as a square and a wordmark: shown in badges that match the card logos */
.smp-pay-logos .smp-pay-klarna, .smp-pay-logos .smp-pay-link {
	align-items: center; justify-content: center; width: 38px; height: 24px; border: 1px solid #f3f3f3; border-radius: 4px; overflow: hidden; background: #fff;
}
.smp-pay-logos .smp-pay-klarna { background: #ffa8cd; border-color: #ffa8cd; }
.smp-pay-logos .smp-pay-klarna img { width: 22px; height: 22px; }
.smp-pay-logos .smp-pay-link img { width: 30px; height: 12px; }

/* Phones: the totals panel sits pinned to the bottom of the screen while the basket lines scroll
   above it; at the end of the list it settles in place. */
@media (max-width: 768px) {
	.woocommerce-cart .cart-collaterals { position: sticky; bottom: 0; z-index: 30; margin: 12px -20px 0 !important; width: auto !important; }
	.woocommerce-cart .cart-collaterals .cart_totals {
		width: 100% !important; margin: 0 !important; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)) !important;
		border: 0 !important; border-top: 1px solid #dfe3e8 !important; border-radius: 14px 14px 0 0 !important;
		box-shadow: 0 -10px 30px rgba(0, 25, 48, 0.12); background: #fff !important;
	}
	.woocommerce-cart .cart_totals > h2 { display: none !important; }
	.woocommerce-cart .cart_totals table.shop_table { margin: 0 0 8px !important; }
	.woocommerce-cart .cart_totals table.shop_table tr { display: flex !important; justify-content: space-between; align-items: baseline; }
	.woocommerce-cart .cart_totals table.shop_table th { display: block !important; }
	.woocommerce-cart .cart_totals table.shop_table th, .woocommerce-cart .cart_totals table.shop_table td { padding: 3px 0 !important; border: 0 !important; font-size: 14px; }
	.woocommerce-cart .cart_totals table.shop_table td::before { display: none !important; }
	.woocommerce-cart .cart_totals table.shop_table tr.order-total { margin-top: 4px; padding-top: 6px; border-top: 1px solid #e6e9ee; }
	.woocommerce-cart .cart_totals table.shop_table tr.order-total th, .woocommerce-cart .cart_totals table.shop_table tr.order-total td { padding: 0 !important; font-size: 17px; }
	.woocommerce-cart .wc-proceed-to-checkout { gap: 6px; }
	.smp-pay-logos { margin-top: 10px !important; gap: 4px; }
	.smp-pay-logos img, .smp-pay-logos .smp-pay-klarna, .smp-pay-logos .smp-pay-link { width: 34px; height: 22px; }
	.smp-pay-logos .smp-pay-klarna img { width: 20px; height: 20px; }
	.smp-pay-logos .smp-pay-link img { width: 26px; height: 11px; }
}

/* Apple Pay and Google Pay on one row in the basket (Stripe stacks them full width) */
.woocommerce-cart #wc-stripe-express-checkout-element { flex-wrap: nowrap !important; gap: 8px !important; margin: 4px 0 8px !important; }
.woocommerce-cart #wc-stripe-express-checkout-element > .StripeElement { min-width: 0 !important; flex: 1 1 0 !important; }

@media (max-width: 768px) {
	/* With the phone menu open, the totals panel goes back into the page so it never covers the menu */
	body.ast-main-header-nav-open.woocommerce-cart .cart-collaterals { position: static !important; }
	/* The floating WhatsApp bubble sat on top of the pinned totals: not shown on the basket page on
	   phones (the call button stays in the header) */
	.woocommerce-cart .chaty, .woocommerce-cart [id^="chaty-widget"] { display: none !important; }
}

/* Slide-out basket, round 2 */
/* The theme moves basket photos up by half their height (made for an older layout): undo it */
.astra-cart-drawer .woocommerce-mini-cart-item img { transform: none !important; top: auto !important; align-self: start; }
/* Close button: no dotted box when the panel opens; a ring only for keyboard users */
.astra-cart-drawer .astra-cart-drawer-close:focus { outline: none !important; }
.astra-cart-drawer .astra-cart-drawer-close:focus-visible { outline: 2px solid #003768 !important; outline-offset: -4px; border-radius: 8px; }
/* Remove: a plain grey cross (the theme draws a ring round it with ::before) */
.astra-cart-drawer .woocommerce-mini-cart-item a.remove::before, .woocommerce-cart table.shop_table.cart a.remove::before { display: none !important; content: none !important; }
.astra-cart-drawer .woocommerce-mini-cart-item a.remove { background: none !important; color: #8a939e !important; }
.astra-cart-drawer .woocommerce-mini-cart-item a.remove svg { width: 18px; height: 18px; }
.astra-cart-drawer .woocommerce-mini-cart-item a.remove:hover, .astra-cart-drawer .woocommerce-mini-cart-item a.remove:focus-visible { background: #fde8e6 !important; color: #a3261d !important; }
.woocommerce-cart table.shop_table.cart a.remove { background: none !important; color: #8a939e !important; }
.woocommerce-cart table.shop_table.cart a.remove svg { width: 18px; height: 18px; }
/* Subtotal: "Subtotal ex VAT" with the amount; the note sits under it without a second rule */
.astra-cart-drawer .woocommerce-mini-cart__total { border-bottom: 0 !important; padding-bottom: 2px !important; font-size: 15px !important; }
.astra-cart-drawer .woocommerce-mini-cart__total strong { font-weight: 600 !important; color: #1a1a1a; }
.astra-cart-drawer .woocommerce-mini-cart__total strong small { margin-left: 4px; color: #545d68; font-size: 12px; font-weight: 500; }
.astra-cart-drawer .smp-mini-note { padding-top: 0 !important; }

/* Quantity steppers everywhere: one bordered control (minus | number | plus), not three boxes */
.quantity.buttons_added {
	display: inline-flex !important; align-items: stretch; width: max-content !important; justify-self: start; border: 1px solid #b9c1ca; border-radius: 6px; overflow: hidden; background: #fff;
}
.quantity.buttons_added .minus, .quantity.buttons_added .plus {
	display: inline-flex !important; align-items: center; justify-content: center; width: 34px !important; min-width: 34px; margin: 0 !important; padding: 0 !important;
	border: 0 !important; border-radius: 0 !important; background: #fff !important; color: #003768 !important; font-size: 18px !important; font-weight: 500; line-height: 1 !important; text-decoration: none !important;
}
.quantity.buttons_added .minus:hover, .quantity.buttons_added .plus:hover { background: #f4f6f9 !important; }
.quantity.buttons_added .qty {
	width: 40px !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-left: 1px solid #e6e9ee !important; border-right: 1px solid #e6e9ee !important;
	border-radius: 0 !important; background: #fff !important; color: #1a1a1a; font-size: 15px !important; text-align: center; box-shadow: none !important; -moz-appearance: textfield;
}
.quantity.buttons_added .qty::-webkit-outer-spin-button, .quantity.buttons_added .qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.astra-cart-drawer .quantity.buttons_added .minus, .astra-cart-drawer .quantity.buttons_added .plus,
.astra-cart-drawer .quantity.buttons_added .qty { height: 30px !important; min-height: 30px !important; }

/* "Added to your basket" notice on phones: tick left, message, button underneath */
@media (max-width: 599px) {
	.woocommerce-notices-wrapper .woocommerce-message, .woocommerce-message {
		display: grid !important; grid-template-columns: 20px minmax(0, 1fr); column-gap: 10px; row-gap: 10px; align-items: start;
	}
	.woocommerce-message::before { grid-column: 1; grid-row: 1 / span 2; }
	.woocommerce-message .button { grid-column: 2; grid-row: 2; justify-self: start; margin: 0 !important; }
}
/* Product page: the stepper (with its 1px frame) stays 44px tall, level with "Add to basket" */
.smp-cart form.cart .quantity.buttons_added .minus, .smp-cart form.cart .quantity.buttons_added .plus,
.smp-cart form.cart .quantity.buttons_added .qty { height: 42px !important; min-height: 42px !important; }
