/*
 * Mini cart — "Card Stack".
 *
 * SPECIFICITY NOTE — read before editing.
 *
 * The panel inherits three sets of rules that fight this design, and the theme's own
 * legacy mini cart CSS uses !important throughout, so plain .ks-mc__* rules lose
 * silently — they look right in the file and are overridden at runtime:
 *
 *   .header-right-wrap .same-style button/a ....... styles every button and anchor in
 *                                                   the header as a 36px icon
 *   .woocommerce ul.cart_list li img ............... width:30% !important, float:left
 *   .woocommerce.widget_shopping_cart …a.remove .... absolutely positioned green circle
 *   .woocommerce ul.cart_list li a ................. font-size:15px !important
 *   .woocommerce-mini-cart.cart_list.product_list_widget … max-height/overflow
 *
 * Those legacy rules still apply to the cart widget elsewhere, so they are not removed.
 * Instead every rule below is scoped ".woocommerce .widget_shopping_cart_content .ks-mc"
 * — enough weight to win — and !important is used ONLY on the properties the legacy
 * rules force. Keep that scope on anything added later.
 */

/* ==========================================================================
   Panel chrome — guarantee band, shipping band, and pinning the footer down
   ==========================================================================

   .minicart-wrapper carries 25px side padding, so the two full-width bands are
   pulled out with matching negative margins rather than by removing that padding
   (which the close button and heading rely on).

   Pinning the footer needs an unbroken flex chain from the panel down to .ks-mc:
   wrapper > .shopping-cart-content > aside.widget > .widget_shopping_cart_content
   > .ks-mc > .ks-mc__list. Every level needs min-height:0 or the list refuses to
   shrink and the footer is pushed off the bottom. */

.minicart-wrapper .shopping-cart-content {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 0;
	text-align: left;
}

.minicart-wrapper .shopping-cart-content > aside.widget,
.minicart-wrapper .widget_shopping_cart_content {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	margin: 0;
	padding: 0;
}

.minicart-wrapper .ks-mc-guarantee {
	margin: 12px -25px 0;
	padding: 11px 25px;
	background: #233a23;
	color: #ffffff;
	text-align: center;
	font-family: 'Montserrat', Arial, sans-serif;
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: .5px;
	text-transform: uppercase;
	line-height: 1.4;
}

.minicart-wrapper .ks-mc-ship {
	margin: 0 -25px 14px;
	padding: 12px 25px 14px;
	background: #f1f5ea;
	border-bottom: 1px solid #e6e4dc;
}

.minicart-wrapper .ks-mc-ship .mincart_freeshipping {
	margin: 0 0 8px;
	padding: 0;
	font-family: 'Montserrat', Arial, sans-serif;
	font-size: 12.5px;
	font-weight: 700;
	line-height: 1.4;
	color: #233a23;
	text-align: left;
	background: none;
}

.minicart-wrapper .ks-mc-ship .free-shipping-bar {
	margin: 0;
	height: 7px;
	border-radius: 6px;
	background: #dcdad0;
	overflow: hidden;
}

.minicart-wrapper .ks-mc-ship .free-shipping-progress {
	height: 100%;
	border-radius: 6px;
	background: #4a6230;
}

.woocommerce .widget_shopping_cart_content .ks-mc {
	--ks-deep: #233a23;
	--ks-green: #4a6230;
	--ks-tint: #f1f5ea;
	--ks-cream: #fdf6e7;
	--ks-line: #e6e4dc;
	--ks-ink: #1f1f1f;
	--ks-muted: #6b7166;

	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	text-align: left;
	font-family: 'Montserrat', Arial, sans-serif;
}

/* Undo the header's icon sizing for every control in the panel. */
.woocommerce .widget_shopping_cart_content .ks-mc a,
.woocommerce .widget_shopping_cart_content .ks-mc button,
.woocommerce .widget_shopping_cart_content .ks-mc select,
.woocommerce .widget_shopping_cart_content .ks-mc input {
	font-size: 13px;
	line-height: 1.4;
	letter-spacing: normal;
	text-transform: none;
	font-family: 'Montserrat', Arial, sans-serif;
}

/* ---------------------------------------------------------------- banner */

.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__banner {
	background: var(--ks-deep);
	color: #ffffff;
	text-align: center;
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: .5px;
	text-transform: uppercase;
	padding: 9px 12px;
	margin: 4px 0 14px;
	border-radius: 8px;
}

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

/* !important: beats .woocommerce-mini-cart.cart_list.product_list_widget, which sets
   its own scroll box and negative margins. The panel already scrolls. */
/* The list is the only part that scrolls, so the footer can sit at the bottom. */
.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__list {
	list-style: none;
	flex: 1 1 auto;
	min-height: 0;
	margin: 0 0 14px !important;
	padding: 0 !important;
	max-height: none !important;
	overflow-y: auto !important;
}

.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__card {
	list-style: none;
	margin: 0 0 11px;
	padding: 13px !important;
	border: 1px solid var(--ks-line);
	border-radius: 12px;
}

.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__card::after,
.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__card::before {
	content: none;
}

/* Subscription lines are tinted so recurring items read at a glance. */
.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__card.is-sub {
	background: var(--ks-cream);
	border-color: #e8dcc0;
}

.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__row {
	display: flex;
	gap: 12px;
	align-items: flex-start;
}

.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__thumb {
	flex: 0 0 60px;
	width: 60px;
}

.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__thumb a {
	display: block;
	line-height: 0;
}

/* !important: beats .woocommerce ul.cart_list li img (width:30%, float:left). */
.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__card .ks-mc__thumb img {
	width: 60px !important;
	max-width: 60px !important;
	height: 60px !important;
	float: none !important;
	margin: 0 !important;
	padding: 0;
	object-fit: contain;
	border-radius: 10px;
	background: var(--ks-tint);
	display: block;
	box-shadow: none;
}

.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__main {
	flex: 1;
	min-width: 0;
}

.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
}

/* !important: beats .woocommerce ul.cart_list li a (Bree Serif 15px). */
.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__card a.ks-mc__name {
	font-family: 'Montserrat', Arial, sans-serif !important;
	font-size: 13px !important;
	line-height: 1.35 !important;
	font-weight: 700 !important;
	text-align: left !important;
	color: var(--ks-ink);
	text-decoration: none;
	display: block;
	padding: 0;
}

.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__card a.ks-mc__name:hover {
	color: var(--ks-green);
}

/*
 * Remove control.
 * !important: beats .woocommerce.widget_shopping_cart .cart_list li a.remove, which
 * pins it absolutely (left:75px; bottom:15px) as a filled green circle — that rule is
 * what put a floating × in the middle of each card.
 */
.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__card a.remove.ks-mc__remove {
	position: static !important;
	left: auto !important;
	right: auto !important;
	top: auto !important;
	bottom: auto !important;
	float: none !important;
	width: 22px !important;
	height: 22px !important;
	margin: 0 !important;
	padding: 0 !important;
	line-height: 20px !important;
	font-size: 17px !important;
	font-weight: 400 !important;
	color: #b3b0a6 !important;
	background: none !important;
	background-color: transparent !important;
	flex: 0 0 auto;
	text-align: center;
	border-radius: 50%;
	text-decoration: none;
	box-shadow: none;
}

.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__card a.remove.ks-mc__remove:hover {
	color: #ffffff !important;
	background-color: #c0392b !important;
}

.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__meta {
	display: block;
	margin-top: 3px;
	font-size: 11.5px;
	font-weight: 600;
	color: var(--ks-muted);
	line-height: 1.45;
}

.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__meta p,
.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__meta dl,
.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__meta dt,
.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__meta dd {
	display: inline;
	margin: 0;
	padding: 0;
	font-size: inherit;
	font-weight: inherit;
	color: inherit;
	float: none !important;
}

.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: 11px;
}

/* quantity stepper */
.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__qty {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--ks-line);
	border-radius: 20px;
	overflow: hidden;
	background: #ffffff;
	float: none !important;
}

.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__qty.is-busy {
	opacity: .5;
	pointer-events: none;
}

.woocommerce .widget_shopping_cart_content .ks-mc button.ks-mc__q {
	width: 28px;
	height: 28px;
	min-width: 0;
	border: 0;
	background: #ffffff;
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
	color: var(--ks-deep);
	padding: 0;
	margin: 0;
	display: block;
	border-radius: 0;
}

.woocommerce .widget_shopping_cart_content .ks-mc button.ks-mc__q:hover {
	background: var(--ks-tint);
}

.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__qn {
	min-width: 26px;
	text-align: center;
	font-size: 13px;
	font-weight: 800;
	color: var(--ks-ink);
}

.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__price {
	font-size: 14.5px;
	font-weight: 800;
	color: var(--ks-ink);
	text-align: right;
	white-space: nowrap;
}

.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__price del {
	font-size: 12px;
	color: #a2a09a;
	font-weight: 600;
	margin-right: 4px;
}

.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__price .amount,
.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__price .woocommerce-Price-currencySymbol {
	font-size: inherit;
	font-weight: inherit;
	color: inherit;
}

/* --------------------------------------------------------------- footer */

.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__foot-panel {
	border-top: 1px solid var(--ks-line);
	padding-top: 14px;
	margin-top: auto;
}

.woocommerce .widget_shopping_cart_content .ks-mc form.ks-mc__code {
	display: flex;
	gap: 8px;
	margin: 0 0 12px;
	padding: 0;
	border: 0;
	background: none;
}

.woocommerce .widget_shopping_cart_content .ks-mc input.ks-mc__code-input {
	flex: 1;
	min-width: 0;
	width: auto;
	border: 1px solid var(--ks-line);
	border-radius: 9px;
	padding: 10px 12px;
	font-size: 12.5px;
	line-height: 1.4;
	background: #ffffff;
	margin: 0;
	height: auto;
}

.woocommerce .widget_shopping_cart_content .ks-mc button.ks-mc__code-btn {
	flex: 0 0 auto;
	width: auto;
	min-width: 0;
	border: 0;
	background: var(--ks-tint);
	color: var(--ks-deep);
	font-size: 12px;
	font-weight: 800;
	line-height: 1.4;
	padding: 0 16px;
	margin: 0;
	border-radius: 9px;
	cursor: pointer;
	display: block;
}

.woocommerce .widget_shopping_cart_content .ks-mc button.ks-mc__code-btn:hover {
	background: #e3ead6;
}

.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 12px;
}

.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__total span {
	font-size: 13px;
	font-weight: 700;
	color: var(--ks-muted);
}

.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__total b {
	font-family: 'Bree Serif', Georgia, serif;
	font-size: 21px;
	line-height: 1.2;
	color: var(--ks-deep);
	font-weight: 400;
}

/* Applied coupon rows, shown under the subtotal. */
.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__discount {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	margin: -6px 0 12px;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--ks-green);
}

.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__discount b {
	font-weight: 800;
	white-space: nowrap;
}

.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__discount .amount,
.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__discount .woocommerce-Price-currencySymbol {
	font-size: inherit;
	color: inherit;
	font-weight: inherit;
}

.woocommerce .widget_shopping_cart_content .ks-mc button.ks-mc__coupon-remove {
	width: 16px;
	height: 16px;
	min-width: 0;
	margin-left: 4px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--ks-muted);
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	vertical-align: baseline;
}

.woocommerce .widget_shopping_cart_content .ks-mc button.ks-mc__coupon-remove:hover {
	color: #c0392b;
}

.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__total b .amount,
.woocommerce .widget_shopping_cart_content .ks-mc .ks-mc__total b .woocommerce-Price-currencySymbol {
	font-size: inherit;
	color: inherit;
	font-weight: inherit;
}

/* Buttons */
.woocommerce .widget_shopping_cart_content .ks-mc a.ks-mc__btn,
.woocommerce .widget_shopping_cart_content .ks-mc button.ks-mc__btn {
	display: block !important;
	width: 100%;
	border: 0;
	border-radius: 26px;
	padding: 14px !important;
	font-size: 13px !important;
	font-weight: 800;
	line-height: 1.3;
	letter-spacing: .5px;
	text-transform: uppercase;
	text-align: center;
	cursor: pointer;
	text-decoration: none;
	white-space: nowrap;
	margin: 0 0 9px;
	transition: background-color .15s ease;
}

.woocommerce .widget_shopping_cart_content .ks-mc a.ks-mc__btn--go {
	background-color: var(--ks-deep) !important;
	color: #ffffff !important;
}

.woocommerce .widget_shopping_cart_content .ks-mc a.ks-mc__btn--go:hover {
	background-color: #35492d !important;
	color: #ffffff !important;
}

.woocommerce .widget_shopping_cart_content .ks-mc a.ks-mc__btn--go span {
	font-size: inherit;
	font-weight: inherit;
	color: inherit;
}

.woocommerce .widget_shopping_cart_content .ks-mc a.ks-mc__btn--ghost {
	background-color: #ffffff !important;
	color: var(--ks-deep) !important;
	border: 2px solid var(--ks-deep);
	padding: 12px !important;
	margin-bottom: 0;
}

.woocommerce .widget_shopping_cart_content .ks-mc a.ks-mc__btn--ghost:hover {
	background-color: var(--ks-tint) !important;
	color: var(--ks-deep) !important;
}

.woocommerce .widget_shopping_cart_content .ks-mc button.ks-mc__cont {
	display: block;
	width: 100%;
	margin: 11px 0 0;
	padding: 0;
	border: 0;
	background: none;
	font-size: 12.5px;
	font-weight: 600;
	color: #233a23;
	text-decoration: underline;
	cursor: pointer;
}

/* ---------------------------------------------------------------- empty */

.woocommerce .widget_shopping_cart_content .ks-mc--empty {
	text-align: center;
	padding: 24px 0 8px;
}

.woocommerce .widget_shopping_cart_content .ks-mc--empty p {
	font-size: 14px;
	color: var(--ks-muted);
	margin-bottom: 16px;
}

/* ------------------------------------------- panel chrome (header.php) */

.minicart-wrapper .ks-mc-count {
	display: inline-block;
	background: #233a23;
	color: #ffffff;
	font-size: 11px;
	font-weight: 800;
	line-height: 1.6;
	border-radius: 20px;
	padding: 1px 9px;
	margin-left: 6px;
	vertical-align: 3px;
}
