/**
 * HalalEco Cart Page
 * Full-width, card-based cart. Scoped to body.hpp-cart.
 */

/* ------------------------------------------------------------------ *
 * Two-column shell
 * ------------------------------------------------------------------ */

body.hpp-cart .wc-block-cart__main {
	padding-right: 34px !important;
}

body.hpp-cart .wc-block-cart__main > table {
	margin: 0;
}

/* ------------------------------------------------------------------ *
 * Line items as cards
 * ------------------------------------------------------------------ */

body.hpp-cart table.wc-block-cart-items {
	width: 100%;
	border: 0;
	border-collapse: separate !important;
	border-spacing: 0 12px;
	background: none;
}

body.hpp-cart table.wc-block-cart-items thead th {
	padding: 0 12px 4px !important;
	border: 0 !important;
	background: none !important;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .11em;
	text-transform: uppercase;
	color: var(--hpp-muted);
}

body.hpp-cart tr.wc-block-cart-items__row td {
	padding: 16px 12px !important;
	border: 0 !important;
	border-top: 1px solid var(--hpp-line) !important;
	border-bottom: 1px solid var(--hpp-line) !important;
	background: #fff;
	vertical-align: top;
}

body.hpp-cart tr.wc-block-cart-items__row td:first-child {
	border-left: 1px solid var(--hpp-line) !important;
	border-top-left-radius: 14px;
	border-bottom-left-radius: 14px;
	padding-left: 16px !important;
}

body.hpp-cart tr.wc-block-cart-items__row td:last-child {
	border-right: 1px solid var(--hpp-line) !important;
	border-top-right-radius: 14px;
	border-bottom-right-radius: 14px;
	padding-right: 16px !important;
	text-align: right;
}

body.hpp-cart .wc-block-cart-item__image {
	width: 108px;
}

body.hpp-cart .wc-block-cart-item__image img {
	width: 92px;
	height: 92px;
	max-width: none;
	object-fit: cover;
	border-radius: 12px;
	border: 1px solid var(--hpp-line);
	background: var(--hpp-surface);
}

body.hpp-cart .wc-block-cart-item__product .wc-block-components-product-name {
	display: inline-block;
	margin: 0 0 4px;
	font-size: 16.5px !important;
	font-weight: 800 !important;
	line-height: 1.3 !important;
	color: var(--hpp-ink) !important;
	text-decoration: none;
}

body.hpp-cart .wc-block-components-product-name:hover {
	color: var(--hpp-green-dark) !important;
}

body.hpp-cart .wc-block-cart-item__prices .wc-block-components-product-price__value,
body.hpp-cart .wc-block-cart-item__prices {
	font-size: 14px !important;
	font-weight: 700 !important;
	color: var(--hpp-body) !important;
}

body.hpp-cart .wc-block-components-product-metadata {
	margin: 6px 0 0;
	font-size: 13px;
	line-height: 1.55;
	color: var(--hpp-muted);
}

body.hpp-cart .wc-block-components-product-metadata__description p {
	margin: 0;
}

body.hpp-cart .wc-block-components-product-details {
	margin: 4px 0 0;
	padding: 0;
	list-style: none;
}

body.hpp-cart .wc-block-components-product-details__name {
	font-weight: 800;
	color: var(--hpp-body);
}

/* Quantity stepper */
body.hpp-cart .wc-block-cart-item__quantity {
	margin-top: 12px;
	display: flex;
	align-items: center;
	gap: 14px;
}

body.hpp-cart .wc-block-components-quantity-selector {
	width: 132px;
	min-width: 0;
	margin: 0;
	border: 1px solid var(--hpp-green-line);
	border-radius: 10px;
	background: var(--hpp-green-soft);
	overflow: hidden;
}

body.hpp-cart .wc-block-components-quantity-selector::after {
	display: none;
}

body.hpp-cart .wc-block-components-quantity-selector__input {
	min-width: 0;
	padding: 0;
	background: transparent;
	color: var(--hpp-ink);
	font-size: 15px;
	font-weight: 800;
	line-height: 40px;
	height: 40px;
}

body.hpp-cart .wc-block-components-quantity-selector__button {
	width: 40px;
	min-width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--hpp-green-dark);
	font-size: 19px;
	font-weight: 800;
	opacity: 1;
	transition: background .15s ease;
}

body.hpp-cart .wc-block-components-quantity-selector__button:hover:not(:disabled) {
	background: var(--hpp-green);
	color: #fff;
}

body.hpp-cart .wc-block-components-quantity-selector__button:disabled {
	opacity: .35;
}

/* Remove link */
body.hpp-cart .wc-block-cart-item__remove-link {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--hpp-muted);
	font-size: 12.5px;
	font-weight: 700;
	text-decoration: none;
	transition: color .15s ease;
}

body.hpp-cart .wc-block-cart-item__remove-link:hover {
	color: #c2321f;
}

/* Woo sets this cell to flex, which breaks the card's right-hand border. */
body.hpp-cart td.wc-block-cart-item__total {
	display: table-cell !important;
	text-align: right;
}

body.hpp-cart .wc-block-cart-item__total,
body.hpp-cart .wc-block-cart-item__total .wc-block-components-product-price__value {
	font-size: 17px !important;
	font-weight: 800 !important;
	color: var(--hpp-ink) !important;
}

/* ------------------------------------------------------------------ *
 * Order summary
 * ------------------------------------------------------------------ */

/* The whole sidebar is the summary card, not just the totals block. */
body.hpp-cart .wc-block-cart__sidebar {
	position: sticky;
	top: 24px;
	align-self: flex-start;
	box-sizing: border-box;
	padding: 22px;
	border: 1px solid var(--hpp-line);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 10px 30px rgba(20, 23, 15, .06);
}

body.hpp-cart .wp-block-woocommerce-cart-order-summary-block {
	position: static;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
}

body.hpp-cart .wc-block-cart__totals-title {
	display: block;
	margin: 0 0 6px !important;
	padding: 0;
	font-size: 11.5px !important;
	font-weight: 800 !important;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--hpp-muted) !important;
	text-align: left;
}

body.hpp-cart .wc-block-components-totals-wrapper {
	padding: 14px 0;
	border-top: 1px solid var(--hpp-line);
}

body.hpp-cart .wc-block-components-totals-wrapper::after {
	display: none !important;
}

body.hpp-cart .wc-block-components-totals-item__label {
	font-size: 14.5px;
	font-weight: 600;
	color: var(--hpp-body);
}

body.hpp-cart .wc-block-components-totals-item__value {
	font-size: 14.5px;
	font-weight: 800;
	color: var(--hpp-ink);
}

body.hpp-cart .wc-block-components-totals-item__description,
body.hpp-cart .wc-block-components-totals-shipping__via {
	font-size: 12.5px;
	color: var(--hpp-muted);
}

body.hpp-cart .wc-block-components-totals-footer-item {
	margin: 0;
	padding: 4px 0 0;
}

body.hpp-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
	font-size: 17px;
	font-weight: 800;
	color: var(--hpp-ink);
}

body.hpp-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	font-size: 25px;
	font-weight: 800;
	letter-spacing: -.015em;
	color: var(--hpp-green-dark);
}

/* Coupon panel */
body.hpp-cart .wc-block-components-totals-coupon .wc-block-components-panel__button {
	padding: 2px 0 !important;
	font-size: 13.5px;
	font-weight: 800;
	color: var(--hpp-green-dark) !important;
}

body.hpp-cart .wc-block-components-totals-coupon__form .wc-block-components-text-input input {
	border: 1px solid var(--hpp-line);
	border-radius: 9px;
	background: #fff;
}

body.hpp-cart .wc-block-components-totals-coupon__button {
	border-radius: 9px !important;
	background: var(--hpp-ink) !important;
	color: #fff !important;
}

/* Checkout button */
body.hpp-cart .wp-block-woocommerce-proceed-to-checkout-block {
	padding-top: 16px;
}

body.hpp-cart .wc-block-cart__submit-button,
body.hpp-cart .wc-block-cart__submit-container a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 54px;
	margin: 0;
	padding: 0 20px;
	border: 0;
	border-radius: 12px;
	background: var(--hpp-green) !important;
	color: #fff !important;
	font-size: 16px;
	font-weight: 800;
	letter-spacing: .01em;
	text-decoration: none;
	box-shadow: 0 8px 20px rgba(93, 162, 43, .26);
	transition: background .15s ease, transform .12s ease, box-shadow .15s ease;
}

body.hpp-cart .wc-block-cart__submit-button:hover,
body.hpp-cart .wc-block-cart__submit-container a:hover {
	background: var(--hpp-green-dark) !important;
	transform: translateY(-1px);
	box-shadow: 0 10px 26px rgba(93, 162, 43, .32);
}

/* Express payment */
body.hpp-cart .wc-block-cart__payment-options,
body.hpp-cart .wp-block-woocommerce-cart-express-payment-block {
	padding-top: 16px;
}

body.hpp-cart .wc-block-components-express-payment__event-buttons > li {
	margin-bottom: 10px;
	border-radius: 12px;
	overflow: hidden;
}

body.hpp-cart .wc-block-components-express-payment-continue-rule {
	margin: 14px 0 4px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--hpp-muted);
}

body.hpp-cart .wc-block-components-express-payment-continue-rule::before,
body.hpp-cart .wc-block-components-express-payment-continue-rule::after {
	background: var(--hpp-line);
}

body.hpp-cart .wc-block-components-express-payment__title {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--hpp-muted);
}

/* ------------------------------------------------------------------ *
 * Empty cart
 * ------------------------------------------------------------------ */

body.hpp-cart .wp-block-woocommerce-empty-cart-block {
	max-width: 620px;
	margin: 0 auto;
	padding: 44px 28px;
	border: 1px dashed var(--hpp-line);
	border-radius: 20px;
	background: var(--hpp-surface);
	text-align: center;
}

body.hpp-cart .wp-block-woocommerce-empty-cart-block h2 {
	font-size: 22px;
	font-weight: 800;
	color: var(--hpp-ink);
}

body.hpp-cart .wp-block-woocommerce-empty-cart-block .wp-block-button__link,
body.hpp-cart .wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__title + p a {
	display: inline-flex;
	align-items: center;
	min-height: 50px;
	padding: 0 26px;
	border-radius: 12px;
	background: var(--hpp-green);
	color: #fff;
	font-weight: 800;
	text-decoration: none;
}

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

@media (max-width: 900px) {
	body.hpp-cart .wc-block-cart__sidebar {
		position: static;
		padding: 18px;
	}

	body.hpp-cart .wc-block-cart__main {
		padding-right: 0 !important;
	}
}

@media (max-width: 600px) {
	body.hpp-cart .wc-block-cart-item__image img {
		width: 68px;
		height: 68px;
	}

	body.hpp-cart tr.wc-block-cart-items__row td {
		padding: 12px 10px !important;
	}
}

