/**
 * Listings family: product card, product grids and Load More,
 * the Women's Clothing filter page, search results, and the WooCommerce
 * product archives.
 *
 * Values are the computed results of the old Elementor cascade (loop item
 * #6636, the Loop Grid widget, WPCode snippet #6739, the WooLentor archive
 * template), reproduced as plain rules. Quick Add has its own stylesheet,
 * quick-add.css. Breakpoints are Elementor's: tablet
 * up to 1024px, mobile up to 767px.
 */

/* Product card (loop item #6636) --------------------------------------- */

.ms-product-card {
	position: relative;
	animation: ms-card-in 0.4s ease both;
	/* The photo's height; Quick Add (quick-add.css) lines up with it. */
	--ms-card-image-height: 40vh;
}

/* Elementor put a <style> before every card, so snippet #6739's nth-child
   delays only ever reached the first two cards. */
.ms-product-card:nth-child(1) { animation-delay: 0.08s; }
.ms-product-card:nth-child(2) { animation-delay: 0.16s; }

@keyframes ms-card-in {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: translateY(0); }
}

.ms-product-card * {
	word-break: break-word;
}

.ms-product-card__link {
	display: flex;
	flex-direction: column;
	gap: 20px;
	position: relative;
	border-radius: 8px;
	overflow: hidden;
	color: #000;
	text-decoration: none;
	transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.ms-product-card__link:hover,
.ms-product-card__link:focus {
	color: #000;
}

.ms-product-card__media {
	display: flex;
	flex-direction: column;
	position: relative;
}

.ms-product-card__image {
	position: relative;
	min-width: 0;
	max-width: 100%;
	overflow: hidden;
	border-radius: 8px 8px 0 0;
	text-align: center;
}

.ms-product-card__image img {
	display: inline-block;
	vertical-align: middle;
	width: 100%;
	max-width: 100%;
	height: var(--ms-card-image-height);
	object-fit: cover;
	object-position: center center;
	border: none;
	border-radius: 0;
	box-shadow: none;
	transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	will-change: transform;
}

.ms-product-card__badge {
	position: absolute;
	top: 15px;
	right: 15px;
	z-index: 1;
	max-width: 100%;
	padding: 4px 8px;
	border-radius: 99px;
	background-color: #274485;
	box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.08);
	text-align: center;
}

.ms-product-card__badge p {
	margin: 0;
	padding: 0;
	font-family: "Roboto", Sans-serif;
	font-size: 13px;
	font-weight: 400;
	line-height: 14px;
	color: #fff;
}

.ms-product-card__body {
	display: flex;
	flex-direction: column;
	gap: 20px;
	position: relative;
	padding: 10px;
}

.ms-product-card__title {
	align-self: flex-start;
	margin: 5px 0 0;
	padding: 0;
	font-family: "Times New Roman", Sans-serif;
	font-size: 18px;
	font-weight: 500;
	line-height: 1;
	color: #000;
	transition: color 0.3s ease;
}

.ms-product-card__price {
	margin: 0;
	padding: 0;
	font-family: "Roboto", Sans-serif;
	font-size: 16px;
	font-weight: 300;
	line-height: 1;
	color: #D3AF37;
}

.ms-product-card__link:hover .ms-product-card__image img {
	transform: scale(1.04);
}

.ms-product-card__link:hover .ms-product-card__title {
	color: #87BFCF;
}

/* Quick Add's panel sits beside the link, over the photo: hovering it keeps
   the card's hover look. (Separate rules, so browsers without :has() keep the
   ones above.) */
.ms-product-card:has(> .ms-qa .ms-qa__panel:hover) .ms-product-card__image img {
	transform: scale(1.04);
}

.ms-product-card:has(> .ms-qa .ms-qa__panel:hover) .ms-product-card__title {
	color: #87BFCF;
}

@media (max-width: 1024px) {
	.ms-product-card__link:hover .ms-product-card__image img {
		transform: none;
	}

	.ms-product-card:has(> .ms-qa .ms-qa__panel:hover) .ms-product-card__image img {
		transform: none;
	}
}

@media (max-width: 767px) {
	.ms-product-card {
		animation: none;
	}

	.ms-product-card__title {
		font-size: 20px;
	}
}

/* Product grid (Loop Grid widget) and Load More ------------------------- */

.ms-product-grid {
	position: relative;
	display: flow-root;
	width: 100%;
	--ms-grid-columns: 4;
	--ms-grid-column-gap: 30px;
	--ms-more-spacing: 30px;
}

.ms-product-grid__items {
	display: grid;
	grid-template-columns: repeat(var(--ms-grid-columns), minmax(0, 1fr));
	gap: 30px var(--ms-grid-column-gap);
	align-items: stretch;
}

.ms-product-grid--cols-3 { --ms-grid-columns: 3; }
.ms-product-grid--cols-4 { --ms-grid-columns: 4; }
.ms-product-grid--cols-6 { --ms-grid-columns: 6; }
.ms-product-grid--gap-15 { --ms-grid-column-gap: 15px; }

@media (max-width: 1024px) {
	.ms-product-grid--tablet-1 { --ms-grid-columns: 1; }
	.ms-product-grid--tablet-2 { --ms-grid-columns: 2; }
}

@media (max-width: 767px) {
	.ms-product-grid--mobile-1 { --ms-grid-columns: 1; }
	.ms-product-grid--mobile-2 { --ms-grid-columns: 2; }
}

.ms-product-grid__empty {
	padding: 30px 0;
}

.ms-product-grid__more {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	margin-top: calc(var(--ms-more-spacing) + 10px);
	text-align: center;
}

.ms-product-grid__status {
	margin: 0;
	color: #595d63;
	font-family: "Roboto", sans-serif;
	font-size: 14px;
	font-variant-numeric: tabular-nums;
}

.ms-product-grid__bar {
	width: 200px;
	height: 2px;
	overflow: hidden;
	background: #e2e2e2;
}

.ms-product-grid__bar span {
	display: block;
	height: 100%;
	background: #274485;
	transition: width 0.4s ease-out;
}

.ms-product-grid .ms-product-grid__button {
	display: inline-flex;
	position: relative;
	align-items: center;
	justify-content: center;
	min-width: 220px;
	min-height: 50px;
	margin-top: 6px;
	padding: 0 32px;
	border: 1px solid #274485;
	border-radius: 0;
	background-color: #fff;
	font-family: "Roboto", sans-serif;
	font-size: 15px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 0.02em;
	color: #274485;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease-out, color 0.2s ease-out;
}

.ms-product-grid .ms-product-grid__button:hover,
.ms-product-grid .ms-product-grid__button:focus-visible {
	background-color: #274485;
	color: #fff;
}

.ms-product-grid .ms-product-grid__button:focus-visible {
	outline: 3px solid #d3af37;
	outline-offset: 2px;
}

.ms-product-grid__button-text {
	display: block;
}

.ms-product-grid__spinner {
	display: flex;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

.ms-product-grid__spinner i {
	display: none;
	margin: 0 auto;
	font-size: 15px;
}

.ms-product-grid.is-loading .ms-product-grid__button {
	cursor: default;
}

.ms-product-grid.is-loading .ms-product-grid__button-text {
	visibility: hidden;
}

.ms-product-grid.is-loading .ms-product-grid__spinner i {
	display: flex;
	animation: ms-grid-spin 1s infinite linear;
}

@keyframes ms-grid-spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(359deg); }
}

/* At the end the count stays ("Showing 162 of 162 products"); the button goes. */
.ms-product-grid.is-end .ms-product-grid__button {
	display: none;
}

.ms-product-grid.has-error .ms-product-grid__button-text::after {
	content: " (try again)";
}

/* Placeholder cards while a page that was not fetched ahead arrives. */
.ms-product-card.is-skeleton {
	pointer-events: none;
}

.ms-skel {
	background: linear-gradient(90deg, #efefef 0%, #f7f7f7 40%, #efefef 80%) 0 0 / 300% 100%;
	animation: ms-skel 1.4s ease-in-out infinite;
}

.ms-skel--image {
	height: var(--ms-card-image-height, 400px);
	border-radius: 8px 8px 0 0;
}

.ms-skel--line {
	width: 80%;
	height: 14px;
	margin: 16px auto 0;
}

.ms-skel--short {
	width: 35%;
	margin-top: 10px;
}

@keyframes ms-skel {
	from { background-position: 100% 0; }
	to { background-position: 0 0; }
}

/* New cards fade in rather than popping into place. */
.ms-product-card.is-new {
	animation: ms-card-in 0.35s ease-out both;
}

@keyframes ms-card-in {
	from { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.ms-skel,
	.ms-product-card.is-new,
	.ms-product-grid__bar span {
		animation: none;
		transition: none;
	}
}

/* Product grid section (Home, New In, Women's Accessories) ------------- */

.ms-product-grid-section__inner {
	display: flex;
	flex-wrap: wrap;
	align-content: flex-start;
	justify-content: center;
	padding: 10px;
}

.ms-product-grid-section__button {
	margin-top: 20px;
	text-align: center;
}

.ms-product-grid-section .ms-listing-button {
	display: inline-block;
	padding: 12px 24px;
	border: 0 solid #97A6D1;
	border-radius: 0;
	background-color: #274485;
	font-family: "Times New Roman", Sans-serif;
	font-size: 15px;
	font-weight: 500;
	line-height: 1;
	color: #fff;
	text-align: center;
	text-decoration: none;
	transition: all 0.3s;
}

.ms-product-grid-section .ms-listing-button:hover,
.ms-product-grid-section .ms-listing-button:focus {
	color: #fff;
}

/* Home: a boxed section with space below; the button turns gold. */
.ms-product-grid-section--centred {
	padding-bottom: 40px;
	background-color: #fff;
}

.ms-product-grid-section--centred .ms-product-grid-section__inner {
	max-width: 1140px;
	margin: 0 auto;
}

.ms-product-grid-section--centred .ms-listing-button:hover,
.ms-product-grid-section--centred .ms-listing-button:focus {
	background-color: #D3AF37;
}

/* New In: full width with space around; the button turns bright blue. */
.ms-product-grid-section--wide {
	margin: 40px 0 18px;
	padding: 10px;
}

.ms-product-grid-section--wide .ms-listing-button:hover,
.ms-product-grid-section--wide .ms-listing-button:focus {
	background-color: #3E63CF;
}

/* Women's Accessories: full width, narrower gaps between products. */
.ms-product-grid-section--wide_flush .ms-product-grid {
	--ms-grid-column-gap: 15px;
}

@media (max-width: 1024px) {
	.ms-product-grid-section--centred .ms-product-grid-section__inner { max-width: 1024px; }
}

@media (max-width: 767px) {
	.ms-product-grid-section--centred .ms-product-grid-section__inner { max-width: 767px; }
}

/* WooLentor's stylesheet (loaded on every page) padded every boxed Elementor row by 15px up to 1200px. */
@media (max-width: 1200px) {
	.ms-product-grid-section--centred .ms-product-grid-section__inner { padding: 10px 25px; }
}

/* Thin navy line ---------------------------------------------------------- */

.ms-navy-line {
	max-width: 1140px;
	margin: 0 auto;
	padding: 10px;
}

.ms-navy-line__rule {
	height: 1px;
	background-color: #274485;
}

@media (max-width: 1024px) {
	.ms-navy-line { max-width: 1024px; }
}

@media (max-width: 767px) {
	.ms-navy-line { max-width: 767px; }
}

/* Both of the line's boxed Elementor rows had WooLentor's 15px padding up to 1200px. */
@media (max-width: 1200px) {
	.ms-navy-line { padding: 10px 25px; }
	.ms-navy-line__rule { margin: 0 15px; }
}

/* Product archives: category, tag, brand, colour, size (WooLentor "Gabriel") */

.ms-archive__row {
	position: relative;
	margin: 30px 0;
}

.ms-archive__column {
	display: flex;
	flex-wrap: wrap;
	align-content: flex-start;
	justify-content: center;
	max-width: 1140px;
	margin: 0 auto;
	padding: 10px;
}

.ms-archive__products {
	width: 100%;
}

@media (max-width: 1200px) {
	.ms-archive__column { padding: 10px 25px; }
}

@media (max-width: 1024px) {
	.ms-archive__column { max-width: 1024px; }
}

@media (max-width: 767px) {
	.ms-archive__column { max-width: 767px; }
}

.ms-archive__products ul.products {
	display: flex !important;
	flex-flow: wrap;
	justify-content: start;
	column-gap: 0;
}

/* !important, as WooLentor had it, over WooCommerce's column widths (.woocommerce ul.products.columns-3 li.product). */
.ms-archive__products ul.products li.product {
	float: left;
	clear: none !important;
	width: calc(33.33% - 30px) !important;
	margin-right: 30px !important;
	margin-left: 0 !important;
}

.ms-archive__products ul.products li.product:nth-child(3n) {
	margin-right: 0 !important;
}

/* WooLentor's tablet rule: two across, though every third product keeps no right margin, as before. */
@media (min-width: 768px) and (max-width: 991px) {
	.ms-archive__products ul.products li.product {
		width: calc(50% - 15px) !important;
		margin-right: 15px !important;
	}
}

@media (max-width: 767px) {
	.ms-archive__products ul.products li.product {
		width: 100% !important;
		margin-right: 0 !important;
	}
}

.ms-archive__products ul.products li.product .woocommerce-loop-product__title {
	font-family: "Calmius Regular", Sans-serif;
	font-size: 24px;
	color: #000;
}

.ms-archive__products ul.products li.product .price,
.ms-archive__products ul.products li.product .price .amount {
	font-size: 18px;
	color: #000;
}

/* WooLentor set the sale badge flush with the photo's corner. */
.ms-archive__products ul.products li.product .onsale {
	margin: 0;
}

/* Shop and product search: Hello Elementor's page width for WooCommerce's <main> */

.post-type-archive-product .site-main {
	width: 100%;
	margin-right: auto;
	margin-left: auto;
}

@media (max-width: 575px) {
	.post-type-archive-product .site-main { padding-right: 10px; padding-left: 10px; }
}

@media (min-width: 576px) {
	.post-type-archive-product .site-main { max-width: 500px; }
}

@media (min-width: 768px) {
	.post-type-archive-product .site-main { max-width: 600px; }
}

@media (min-width: 992px) {
	.post-type-archive-product .site-main { max-width: 800px; }
}

@media (min-width: 1200px) {
	.post-type-archive-product .site-main { max-width: 1140px; }
}
