/* Free-shipping products: cart page, checkout summary and quick cart (MD-454). */

.mdfsp-badge,
.mdfsp-recs,
.mdfsp-one-more,
.mdfsp-qualified,
.mdfsp-qc-shipping {
	--mdfsp-navy: #1f3566;
	--mdfsp-blue: #3150c8;
	--mdfsp-tint: #eef3fd;
	--mdfsp-line: #c8d4f0;
	--mdfsp-green: #1d6b3d;
	--mdfsp-green-tint: #e7f5ed;
	--mdfsp-green-line: #a8d8bb;
}

.mdfsp-icon {
	flex: 0 0 auto;
}

/* Line badge */
.mdfsp-badge {
	display: inline-block;
	margin: 4px 0;
	padding: 2px 7px;
	border-radius: 2px;
	background: var(--mdfsp-blue);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
}

/* One more unit */
.mdfsp-one-more {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 16px;
	border: 1px dashed var(--mdfsp-line);
	border-radius: 2px;
	background: var(--mdfsp-tint);
	color: var(--mdfsp-navy);
	font-size: 14px;
	line-height: 1.35;
}

.mdfsp-one-more strong,
.mdfsp-recs__title strong {
	color: var(--mdfsp-blue);
	font-weight: 700;
}

.mdfsp-one-more .mdfsp-icon {
	color: var(--mdfsp-blue);
}

.mdfsp-one-more-row > td {
	padding: 0 10px 16px !important;
	border-top: 0 !important;
}

.mdfsp-one-more--checkout {
	justify-content: space-between;
	margin: 8px 0 0;
	padding: 8px 8px 8px 12px;
}

.mdfsp-one-more--quick {
	width: 100%;
	margin-top: 10px;
	padding: 9px 12px;
	font-size: 13px;
}

/* Buttons */
.mdfsp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	min-height: 40px;
	padding: 0 16px;
	border: 0;
	border-radius: 0;
	background: var(--mdfsp-navy);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	cursor: pointer;
}

.mdfsp-btn:hover,
.mdfsp-btn:focus-visible {
	background: var(--mdfsp-blue);
	color: #fff;
}

.mdfsp-btn--icon {
	width: 44px;
	min-height: 44px;
	padding: 0;
	font-size: 20px;
	font-weight: 400;
}

.mdfsp-btn.is-loading {
	opacity: 0.6;
	cursor: progress;
}

/* Recommendations block */
.mdfsp-recs {
	padding: 20px;
	border: 1px solid var(--mdfsp-line);
	border-radius: 3px;
	background: #f7f9fe;
	color: var(--mdfsp-navy);
}

.mdfsp-recs__head {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 8px;
}

.mdfsp-recs__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 34px;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--mdfsp-navy);
	color: #fff;
}

.mdfsp-recs__title {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
}

.mdfsp-recs__subtitle {
	margin: 2px 0 0;
	font-size: 13px;
	color: #4a5a7a;
}

.mdfsp-recs__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mdfsp-recs__item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px 0;
	border-top: 1px solid #e3e8f3;
}

.mdfsp-recs__thumb {
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	overflow: hidden;
	border: 1px solid #e3e8f3;
	background: #fff;
}

.mdfsp-recs__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.mdfsp-recs__info {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
}

.mdfsp-recs__name {
	color: var(--mdfsp-navy);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.25;
	text-decoration: none;
}

.mdfsp-recs__price {
	font-size: 14px;
	font-weight: 700;
}

.mdfsp-recs__price del {
	display: none;
}

.mdfsp-see-more {
	display: inline-block;
	margin-top: 12px;
	padding: 12px 20px;
	border: 2px solid var(--mdfsp-navy);
	color: var(--mdfsp-navy);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
}

.mdfsp-see-more:hover,
.mdfsp-see-more:focus-visible {
	background: var(--mdfsp-navy);
	color: #fff;
}

/* Checkout: attached under the "$X away from FREE Shipping" box */
.mdfsp-recs--checkout {
	margin: -1px 0 16px;
	padding: 14px 12px 12px;
	border-top: 0;
	background: #fff;
}

.mdfsp-recs--checkout .mdfsp-recs__title,
.mdfsp-recs--quick_cart .mdfsp-recs__title {
	font-size: 15px;
}

.mdfsp-recs--checkout .mdfsp-recs__name,
.mdfsp-recs--quick_cart .mdfsp-recs__name {
	font-size: 13px;
}

.mdfsp-recs--checkout .mdfsp-see-more,
.mdfsp-recs--quick_cart .mdfsp-see-more {
	display: block;
}

/* Quick cart */
.mdfsp-recs--quick_cart {
	margin: 12px 0;
	padding: 14px;
	background: #fff;
}

.mdfsp-qc-shipping {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 6px;
}

/* Same look as the theme's SUBTOTAL label */
.mdfsp-qc-shipping__label {
	font-size: 13px;
	font-weight: 700;
	line-height: 20px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--qc-muted, #5b6b8c);
}

.mdfsp-qc-shipping .mdfsp-free {
	font-size: 18px;
	letter-spacing: 0;
}

/* Qualified */
.mdfsp-qualified {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 16px;
	border: 1px solid var(--mdfsp-green-line);
	border-radius: 3px;
	background: var(--mdfsp-green-tint);
	color: var(--mdfsp-green);
	font-size: 15px;
	font-weight: 600;
}

.mdfsp-qualified--checkout {
	margin: 0 0 16px;
	font-size: 14px;
}

.mdfsp-qualified--quick_cart {
	margin: 12px 0;
	font-size: 13px;
}

/* FREE shipping line */
.mdfsp-free {
	color: var(--mdfsp-green, #1d6b3d);
	font-weight: 700;
}

.mdfsp-offer {
	display: block;
	color: #3150c8;
	font-size: 12px;
	font-weight: 400;
}

/*
 * Cart page slot. The theme's totals take half of the row above 1200px and the whole row
 * below: the slot fills the space left of them on desktop and sits above them, full width,
 * on tablets and phones.
 */
.mdfsp-cart-slot:empty {
	display: none;
}

.mdfsp-cart-slot {
	margin-bottom: 24px;
}

@media (min-width: 768px) {
	.cart-row-right:has(> .mdfsp-cart-slot) {
		flex-wrap: wrap;
	}

	.cart-row-right > .mdfsp-cart-slot {
		flex: 1 1 100%;
		min-width: 0;
	}
}

@media (min-width: 1201px) {
	.cart-row-right > .mdfsp-cart-slot {
		flex: 1 1 0;
		align-self: flex-start;
		padding-right: 32px;
	}
}

/* Messages under a checkout summary item (flex row) or quick cart item (grid) span the item */
.mdpt-summary__item:has(> .mdfsp-one-more) {
	flex-wrap: wrap;
}

.mdpt-summary__item:has(> .mdfsp-one-more) > .mdpt-summary__item-info {
	flex-basis: 0;
}

.mdpt-summary__item > .mdfsp-one-more {
	flex: 0 0 100%;
}

.mdpt-qc__item > .mdfsp-one-more {
	grid-column: 1 / -1;
}

/* Badges sit on their own line under the name / quantity */
.mdpt-summary__item-info .mdfsp-badge,
.mdpt-qc__body .mdfsp-badge {
	display: block;
	width: fit-content;
	align-self: flex-start;
}

.mdfsp-qc-slot {
	list-style: none;
}

/* Product card tag (MD-457): the theme's tag shape, in the badge's blue. The shape and the
   corner it sits in are repeated from the theme's style.css: a page that loads a trimmed
   stylesheet instead (the homepage) has neither, and the tag would be plain text in the flow. */
.product-card-tags {
	position: absolute;
	top: 0;
	right: 10px;
	z-index: 9;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
	margin-top: 10px;
}

span.product-outlet-tag.mdfsp-card-tag {
	padding: 5px 10px;
	border-radius: 8px;
	background: #3150c8;
	color: #fff !important;
	font-size: 12px;
}

/* In the sliders the theme writes the tag in sentence case; the product grids keep capitals. */
.rec-products span.product-outlet-tag.mdfsp-card-tag {
	text-transform: none;
}

/* The same tag in the header search dropdown (FiboSearch), under the price */
.mdfsp-search-tag {
	display: block;
	width: fit-content;
	margin-top: 4px;
	padding: 3px 8px;
	border-radius: 8px;
	background: #3150c8;
	color: #fff;
	font-size: 11px;
	font-weight: 400;
	line-height: 1.3;
	white-space: nowrap;
}

/* FiboSearch right-aligns the price in a box as wide as its content. The tag is wider than
   the price, so the price moved right, away from the product name it sits under. */
.dgwt-wcas-sp:has(.mdfsp-search-tag) {
	text-align: left;
}

/*
 * Landing page (MD-458): the text under the products. The theme gives this block its editorial
 * typography on category and brand pages only; on a tag page it would inherit the product
 * grid's small capitals.
 */
.mdfsp-landing-text {
	clear: both;
	width: 100%;
	margin-top: 32px;
	text-transform: none;
}

/* The grid's heading size is !important in the theme, as are its category overrides. */
.mdfsp-landing-text h2 {
	margin: 24px 0 12px;
	font-size: 1.75rem !important;
	font-weight: 700;
	line-height: 1.4 !important;
}

.mdfsp-landing-text p,
.mdfsp-landing-text li {
	font-size: 16px;
	line-height: 1.5;
}

.mdfsp-landing-text p,
.mdfsp-landing-text ul {
	margin: 0 0 12px;
}

.mdfsp-landing-text ul {
	padding-left: 20px;
}

.mdfsp-landing-text blockquote {
	margin: 16px 0;
	padding: 2px 0 2px 16px;
	border-left: 3px solid #22396a;
}

.mdfsp-landing-text blockquote p {
	margin: 0;
	font-weight: 700;
}

/*
 * Homepage section (MD-459), mockups 5a and 5b: the offer panel and three product cards in
 * one row on desktop; on smaller screens the panel on top and the cards in a row that
 * scrolls sideways on phones.
 */
.mdfsp-home__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
}

.mdfsp-home__panel {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 28px 24px;
	background: #22396a;
	color: #fff;
}

.mdfsp-home__head {
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.mdfsp-home__icon {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border: 1px solid rgba(255, 255, 255, 0.55);
	border-radius: 50%;
}

.mdfsp-home .mdfsp-home__title {
	margin: 0;
	color: #fff;
	font-size: 20px;
	font-weight: 300;
	line-height: 1.35;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.mdfsp-home .mdfsp-home__text {
	margin: 18px 0 24px;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
}

.mdfsp-home .mdfsp-home__more {
	display: block;
	box-sizing: border-box;
	width: 100%;
	padding: 12px 16px;
	border: 1px solid rgba(255, 255, 255, 0.7);
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: 0.06em;
	text-decoration: none;
	text-transform: uppercase;
}

.mdfsp-home .mdfsp-home__more:hover,
.mdfsp-home .mdfsp-home__more:focus-visible {
	background: #fff;
	color: #22396a;
}

/* On desktop the cards are grid items next to the panel */
.mdfsp-home__products {
	display: contents;
}

.mdfsp-home__card {
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	min-width: 0;
	padding: 14px 12px 18px;
	border: 1px solid #e6e9f0;
	background: #fff;
}

.mdfsp-home__card-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	min-height: 24px;
	margin-bottom: 8px;
}

/* On a phone's narrow card "Free shipping eligible" takes two lines; the heart keeps its place. */
.mdfsp-home__card-top .mdfsp-badge {
	min-width: 0;
	margin: 0;
	white-space: normal;
}

.mdfsp-home__card-top .yith-add-to-wishlist-button-block {
	position: static;
	flex: 0 0 auto;
	margin: 0;
	line-height: 0;
}

/* !important: the theme sets the heart's height that way on phones */
.mdfsp-home .mdfsp-home__card-top .yith-add-to-wishlist-button-block svg {
	width: 18px;
	height: 18px !important;
}

.mdfsp-home__image {
	display: block;
	height: 170px;
}

.mdfsp-home__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.mdfsp-home .mdfsp-home__name {
	display: -webkit-box;
	overflow: hidden;
	min-height: 2.7em;
	margin-top: 12px;
	color: #1f3566;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.35;
	text-decoration: none;
	text-transform: uppercase;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.mdfsp-home__price {
	min-height: 1.4em;
	margin: 10px 0;
	color: #1f3566;
	font-size: 17px;
	line-height: 1.4;
}

/*
 * The theme sizes its loop buttons for the stepper row (57.5% wide, 245px at most, 15px
 * padding, all !important); here the button spans the card.
 */
.mdfsp-home .mdfsp-home__buy a.button {
	display: block;
	box-sizing: border-box;
	width: 100% !important;
	min-width: 0;
	max-width: none !important;
	height: auto;
	margin: 0;
	padding: 11px 8px !important;
	border: 0;
	border-radius: 0;
	background: #22396a;
	color: #fff;
	font-family: inherit;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.3;
	text-align: center;
	text-transform: uppercase;
	white-space: nowrap;
}

/* The theme's loop action also prints a "View product" link; the card's name is that link */
.mdfsp-home .mdfsp-home__buy a.view-pdt,
.mdfsp-home .mdfsp-home__buy a.added_to_cart {
	display: none;
}

@media (max-width: 991px) {
	.mdfsp-home__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
	}

	.mdfsp-home__panel {
		padding: 20px;
	}

	.mdfsp-home__head {
		flex-direction: row;
		align-items: flex-start;
		gap: 12px;
	}

	.mdfsp-home__icon {
		width: auto;
		height: auto;
		margin-top: 5px;
		border: 0;
		border-radius: 0;
	}

	.mdfsp-home .mdfsp-home__text {
		margin: 10px 0 18px;
	}

	.mdfsp-home .mdfsp-home__more {
		display: inline-block;
		width: auto;
	}

	.mdfsp-home__products {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 10px;
	}
}

/*
 * Up to 768px the theme sets every .section-padding to 0 and gives its own homepage sections
 * 40px back one by one. Without this the panel touches the banner above and the cards touch
 * the grey section below.
 */
@media (max-width: 768px) {
	section.mdfsp-home.section-padding {
		padding: 40px 0 !important;
	}
}

/* Phones: two cards in view, the rest by scrolling sideways */
@media (max-width: 639px) {
	.mdfsp-home__products {
		display: flex;
		overflow-x: auto;
		padding-bottom: 6px;
		scroll-snap-type: x proximity;
		-webkit-overflow-scrolling: touch;
	}

	.mdfsp-home__card {
		flex: 0 0 calc(50% - 5px);
		scroll-snap-align: start;
	}

	.mdfsp-home__image {
		height: 120px;
	}
}

/* Info icon with the rule in one sentence (MD-512). The text is placed against the block the
   icon sits in, not against the icon, so it never runs past the block in the quick cart and
   on phones; in a wide block it stays a tooltip's width. Colours are written out: the product
   page callout doesn't have the variables. */
button.mdfsp-tip {
	display: inline-flex;
	min-width: 0;
	margin: 0 0 0 5px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	box-shadow: none;
	color: #3150c8;
	font: inherit;
	line-height: 1;
	vertical-align: -3px;
	cursor: help;
}

button.mdfsp-tip:hover,
button.mdfsp-tip:focus {
	background: none;
	color: #1f3566;
}

.mdfsp-tip__bubble {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 20;
	box-sizing: border-box;
	width: 100%;
	max-width: 360px;
	display: none;
	padding: 10px 12px;
	border-radius: 4px;
	background: #1f3566;
	color: #fff;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.45;
	letter-spacing: normal;
	text-align: left;
	text-transform: none;
	white-space: normal;
	cursor: default;
}

.mdfsp-tip.is-open .mdfsp-tip__bubble,
.mdfsp-tip:focus-visible .mdfsp-tip__bubble {
	display: block;
}

@media (hover: hover) {
	.mdfsp-tip:hover .mdfsp-tip__bubble {
		display: block;
	}
}

.mdfsp-one-more,
.mdfsp-recs__head {
	position: relative;
}

/* Checkout: the message is the last thing in the summary's item list, which scrolls and
   would cut off anything under it. */
.mdfsp-one-more--checkout .mdfsp-tip__bubble {
	top: auto;
	bottom: calc(100% + 6px);
}
