.woocommerce.archive #main {
    padding-top: 20px;
    padding-bottom: 40px;
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    column-gap: 32px;
    align-items: stretch;
	row-gap: 32px;
}

html.mg-archive-layout-loading body.woocommerce.archive #main {
    position: relative;
}

html.mg-archive-layout-loading body.woocommerce.archive #main > .product-dynamic-filters {
    position: relative;
    min-height: 389px;
}

html.mg-archive-layout-loading body.woocommerce.archive #main > .product-dynamic-filters:not(.product-dynamic-filters--loading) > * {
    visibility: hidden;
}

html.mg-archive-layout-loading body.woocommerce.archive #main > .product-dynamic-filters:not(.product-dynamic-filters--loading)::after {
    content: "";
    position: absolute;
    top: 120px;
    left: 50%;
    width: 40px;
    height: 40px;
    margin-left: -20px;
    border: 3px solid rgba(103, 30, 117, 0.18);
    border-top-color: #671e75;
    border-radius: 50%;
    animation: mgArchiveSpinner 0.8s linear infinite;
    pointer-events: none;
}

@keyframes mgArchiveSpinner {
    to {
        transform: rotate(360deg);
    }
}

.woocommerce.archive #main > .product-dynamic-filters.product-dynamic-filters--loading {
	position: relative;
	min-height: 389px;
}

.woocommerce.archive #main > .product-dynamic-filters .mg-filter-skeleton {
	display: grid;
	gap: 28px;
	width: 100%;
	padding-top: 8px;
}

.woocommerce.archive #main > .product-dynamic-filters .mg-filter-skeleton__group {
	display: grid;
	gap: 12px;
}

.woocommerce.archive #main > .product-dynamic-filters .mg-filter-skeleton__heading,
.woocommerce.archive #main > .product-dynamic-filters .mg-filter-skeleton__line {
	display: block;
	height: 14px;
	border-radius: 999px;
	background: linear-gradient(90deg, #eee8f0 25%, #f8f5f9 50%, #eee8f0 75%);
	background-size: 200% 100%;
	animation: mgFilterSkeletonPulse 1.2s ease-in-out infinite;
}

.woocommerce.archive #main > .product-dynamic-filters .mg-filter-skeleton__heading {
	width: 58%;
	height: 20px;
}

.woocommerce.archive #main > .product-dynamic-filters .mg-filter-skeleton__line {
	width: 90%;
}

.woocommerce.archive #main > .product-dynamic-filters .mg-filter-skeleton__line--short {
	width: 72%;
}

.woocommerce.archive #main > .product-dynamic-filters.product-dynamic-filters--error {
	min-height: 389px;
	padding: 20px;
	border: 1px solid #e5dce8;
	border-radius: 8px;
	background: #fff;
}

.woocommerce.archive #main > .product-dynamic-filters .mg-product-filters-error__message {
	margin: 0 0 16px;
	color: #4a5565;
	font-family: "Montserrat", sans-serif;
	font-size: 14px;
	line-height: 20px;
}

@keyframes mgFilterSkeletonPulse {
	0% {
		background-position: 200% 0;
	}

	100% {
		background-position: -200% 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.woocommerce.archive #main > .product-dynamic-filters .mg-filter-skeleton__heading,
	.woocommerce.archive #main > .product-dynamic-filters .mg-filter-skeleton__line {
		animation: none;
	}
}

.woocommerce.archive #main > nav,
.woocommerce.archive #main > header,
.woocommerce.archive #main > div,
.woocommerce.archive #main > ul {
    grid-column: 1 / -1;
}

/* Archive search bar */
.woocommerce.archive .woocommerce-products-header .mg-product-filter-bar {
    display: flex;
    width: min(100%, 900px);
    height: 42px;
    margin: auto;
    gap: 0;
}

.woocommerce.archive .woocommerce-products-header input.mg-product-filter-bar__filter {
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0 32px;
    border: 1px solid #D1D5DC;
    border-right: 0;
    border-radius: 8px 0 0 8px;
    background: #fff;
    box-shadow: none;
    color: #111;
    font-family: "Montserrat", sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    outline: 0;
    appearance: none;
}

.woocommerce.archive .woocommerce-products-header input.mg-product-filter-bar__filter::placeholder {
    color: #888;
    opacity: 1;
}

.woocommerce.archive .woocommerce-products-header input.mg-product-filter-bar__filter:focus {
    border-color: #671e75;
    box-shadow: inset 0 0 0 1px #671e75;
}

.woocommerce.archive .woocommerce-products-header .mg-product-filter-bar__submit {
    display: flex;
    width: 68px;
    align-items: center;
    justify-content: center;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 1px solid #671e75;
    border-radius: 0 8px 8px 0;
    background: #671e75;
    color: #fff;
    box-shadow: none;
}

.woocommerce.archive .woocommerce-products-header .mg-product-filter-bar__submit::before {
    font-size: 20px;
}

.woocommerce.archive .woocommerce-products-header .mg-product-filter-bar__submit:hover,
.woocommerce.archive .woocommerce-products-header .mg-product-filter-bar__submit:focus {
    background: #541760;
    border-color: #541760;
}

.woocommerce.archive #main > .product-dynamic-filters {
    grid-column: 1;
    width: 256px;
    align-self: stretch;
    height: 100%;
    min-height: 389px;
    overflow-x: hidden;
}

.woocommerce.archive #main > .product-dynamic-filters ul {
	margin-left: 0;
    padding-left: 0;
}

.woocommerce.archive #main > .product-dynamic-filters .mg-filter-group {
    margin-top: 12px;
}

.woocommerce.archive #main > .product-dynamic-filters .mg-filter-group__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: #111111;
    text-align: left;
    cursor: pointer;
}

.woocommerce.archive #main > .product-dynamic-filters .mg-filter-group__toggle p,
.woocommerce.archive #main > .product-dynamic-filters .mg-filter-group__toggle b,
.woocommerce.archive #main > .product-dynamic-filters .mg-filter-group__label {
    margin: 0;
}

.woocommerce.archive #main > .product-dynamic-filters .mg-filter-group__label {
	font-family: "Playfair Display", sans-serif;
	font-size: 18px;
	font-weight: 700;
	line-height: 28px;
	letter-spacing: 0;
	color: #111111;
}

.woocommerce.archive #main > .product-dynamic-filters .mg-filter-group__summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.woocommerce.archive #main > .product-dynamic-filters .mg-filter-chip {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f3ebf6;
    color: #671e75;
    font-family: "Montserrat", sans-serif;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.woocommerce.archive #main > .product-dynamic-filters .mg-filter-chip--count {
    background: #efecef;
    color: #4a5565;
}

.woocommerce.archive #main > .product-dynamic-filters .mg-filter-group__icon {
    position: relative;
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    margin-left: 12px;
}

.woocommerce.archive #main > .product-dynamic-filters .mg-filter-group__icon::before,
.woocommerce.archive #main > .product-dynamic-filters .mg-filter-group__icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 2px;
    background: #671e75;
    border-radius: 999px;
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.woocommerce.archive #main > .product-dynamic-filters .mg-filter-group__icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.woocommerce.archive #main > .product-dynamic-filters .mg-filter-group__toggle[aria-expanded="true"] .mg-filter-group__icon::after {
    opacity: 0;
}

.woocommerce.archive #main > .product-dynamic-filters .mg-filter-group > ul {
    margin-top: 12px;
}

.woocommerce.archive #main > .product-dynamic-filters li {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 14px;
	line-height: 20px;
	letter-spacing: 0;
	color: #111111;
	font-family: "Montserrat", sans-serif;
	margin-bottom: 8px;
}

.woocommerce.archive #main > .product-dynamic-filters .mg-filter-location-heading {
	display: block;
	margin: 16px 0 8px;
	color: #671e75;
	font-size: 14px;
	font-weight: 700;
	line-height: 20px;
}

.woocommerce.archive #main > .product-dynamic-filters .mg-filter-location-heading:first-child {
	margin-top: 0;
}

.woocommerce.archive #main > .product-dynamic-filters .mg-filter-option__text {
	display: flex;
	min-width: 0;
	flex-direction: column;
}

.woocommerce.archive #main > .product-dynamic-filters .mg-filter-option__location {
	display: none;
	color: #6f7482;
	font-size: 12px;
	font-weight: 400;
	line-height: 18px;
}

.woocommerce.archive #main > .product-dynamic-filters li:has(input:checked) .mg-filter-option__location {
	display: block;
}

.woocommerce.archive #main > .product-dynamic-filters li:has(input:checked) {
	color: #671e75;
	font-weight: 600;
}

.woocommerce.archive #main > .product-dynamic-filters input[type="checkbox"] {
	accent-color: #671e75;
}

.woocommerce.archive #main > .product-dynamic-filters input[type="checkbox"]:hover,
.woocommerce.archive #main > .product-dynamic-filters input[type="checkbox"]:focus {
	accent-color: #671e75;
}

.woocommerce.archive #main > .products {
    grid-column: 2 / -1;
}

.woocommerce.archive .products,
.related.products .products {
    display: grid;
    grid-template-columns: repeat(auto-fill, 304px);
    grid-template-rows: auto;
    column-gap: 24px;
    row-gap: 24px;
    margin-bottom: auto;
}

.woocommerce.archive .products {
	max-width: 960px; 
    justify-content: start;
}

.related.products .products {
	grid-template-columns: repeat(auto-fit, 304px);
	justify-content: center;
}

.woocommerce.archive .products ul::after,
.woocommerce.archive .products ul::before,
.woocommerce.archive ul.products::after,
.woocommerce.archive ul.products::before,
.related.products ul.products::after,
.related.products ul.products::before {
    display: none;
}

.woocommerce.archive ul.products.columns-3 li.product,
.woocommerce-page.archive ul.products.columns-3 li.product {
    width: 100%;
    margin: 0;
}

.woocommerce.archive .products .product,
.elementor .elementor-loop-container .e-loop-item.product {
    display: flex;
    flex-direction: column;
}

.woocommerce.archive .products .product .mg-product-card__link,
.elementor .elementor-loop-container .e-loop-item.product .mg-product-card__link {
    display: flex;
    flex: 1;
    flex-direction: column;
    color: #000;
    text-decoration: none;
}

.woocommerce-products-header__title {
    text-align: center;
}

.products .product,
.mg-product-card {
    min-width: 304px;
}

.mg-product-card {
    display: block;
    width: 100%;
    max-width: 304px;
    min-height: 389px;
    overflow: hidden;
    border: 1px solid #e6e6e6;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 24px rgba(41, 19, 66, 0.08);
}

.mg-product-card .onsale {
    display: none;
}

.mg-product-card__media {
    position: relative;
    height: 192px;
    overflow: hidden;
}

.mg-product-card__badges {
    position: absolute;
    z-index: 1;
    top: 12px;
    right: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    pointer-events: none;
}

.mg-product-card__badge {
    display: inline-block;
    box-sizing: border-box;
    max-width: 100%;
    padding: 5px 10px;
    border-radius: 999px;
    background-color: var(--mg-product-card-badge-background-color, #671e75);
    color: var(--mg-product-card-badge-text-color, #ffffff);
    font-family: "Montserrat", sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 16px;
    overflow-wrap: anywhere;
    text-align: center;
    pointer-events: none;
}

.elementor .mg-product-card a img,
.woocommerce.archive ul.products li.product a img {
    display: block;
    margin: 0;
    width: 100%;
    height: 192px;
    object-fit: cover;
}

.mg-product-card__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-between;
    min-height: 197px;
    padding: 16px;
}

.woocommerce ul.products li.product .mg-product-card__title,
.woocommerce-page ul.products li.product .mg-product-card__title,
.elementor .elementor-loop-container .e-loop-item.product .mg-product-card__title {
    padding: 0;
    margin: 0;
    font-family: "Montserrat", sans-serif;
    font-size: 18px;
    font-weight: 500;
    line-height: 28px;
    letter-spacing: 0;
    text-align: left;
    color: #111111;
}

.mg-product-card__footer {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: flex-end;
    gap: 12px;
}

.mg-product-card__price {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.mg-product-card__starting-price {
	display: flex;
	flex-direction: column;
	gap: 2px;
	text-align: left;
}

.mg-product-card__starting-price-row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px;
	color: #e88e21;
	font-family: "Montserrat", sans-serif;
	font-weight: 700;
	line-height: 1.3;
}

.mg-product-card__starting-price-label {
	font-size: 16px;
}

.mg-product-card__starting-price-value {
	font-size: 20px;
}

.mg-product-card__starting-price-notice {
	margin: 0;
	color: #4a5565;
	font-family: "Montserrat", sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 24px;
	letter-spacing: 0;
}

.mg-product-card__price-notice {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.mg-product-card__price-notice-line {
    margin: 0;
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 24px;
    letter-spacing: 0;
    color: #4a5565;
}

.mg-product-card__price-notice-line--secondary {
    color: #6f7482;
}

.mg-product-card__price-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px;
    line-height: 1.3;
}

.mg-product-card__price-row--member-empty {
    min-height: 28px;
}

.mg-product-card__price-label {
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 24px;
    letter-spacing: 0;
    color: #4A5565;
}

.mg-product-card__price-value {
    font-family: "Montserrat", sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    letter-spacing: 0;
    color: #4A5565;
}

.mg-product-card__price-value--strikethrough {
    font-size: 14px;
    font-weight: 400;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
    opacity: 0.8;
}

.mg-product-card__price-label--member {
    color: #671e75;
    font-weight: 600;
}

.mg-product-card__member-price-value {
    font-family: "Montserrat", sans-serif;
    color: #ff8c00;
    font-size: 24px;
    font-weight: 700;
    line-height: 32px;
    letter-spacing: 0;
}

.mg-product-card__sale-price-value {
    font-family: "Montserrat", sans-serif;
    color: #4A5565;
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    letter-spacing: 0;
}

.mg-product-card__cta {
	font-family: "Montserrat", sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 8px 18px;
    border-radius: 8px;
    background: #671e75;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.elementor .elementor-loop-container .e-loop-item.product {
    width: 100%;
}

/* Elementor loop carousel uses Swiper layout, so it needs its own container rules. */
.elementor-widget-loop-carousel .elementor-loop-container {
    max-width: none;
}

.elementor-widget-loop-carousel .swiper-wrapper {
    display: flex;
    align-items: stretch;
}

.elementor-widget-loop-carousel .e-loop-item.product {
    width: 304px !important;
    min-width: 304px;
    max-width: 304px;
    flex: 0 0 304px;
    display: flex;
    height: auto;
}

.elementor-widget-loop-carousel .e-loop-item.product > section,
.elementor-widget-loop-carousel .e-loop-item.product > section > .elementor-container,
.elementor-widget-loop-carousel .e-loop-item.product > section > .elementor-container > .elementor-column,
.elementor-widget-loop-carousel .e-loop-item.product > section > .elementor-container > .elementor-column > .elementor-widget-wrap,
.elementor-widget-loop-carousel .e-loop-item.product .elementor-widget-shortcode,
.elementor-widget-loop-carousel .e-loop-item.product .elementor-widget-container,
.elementor-widget-loop-carousel .e-loop-item.product .elementor-shortcode {
    display: flex;
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    min-width: 0;
    height: 100%;
}

.elementor-widget-loop-carousel .e-loop-item.product .elementor-container {
    padding: 0;
}

.elementor-widget-loop-carousel .e-loop-item.product .mg-product-card {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    max-width: none;
}

.elementor-widget-loop-carousel .e-loop-item.product .mg-product-card__link {
    flex: 1 1 auto;
    height: 100%;
}

.elementor-widget-loop-carousel .e-loop-item.product .mg-product-card__content {
    flex: 1 1 auto;
}

@media only screen and (max-width: 1379px) {
    .woocommerce.archive #main > header {
        grid-column: 1 / -1;
        justify-self: center;
        width: 100%;
    }

    .woocommerce.archive #main {
        grid-template-columns: 256px auto;
        justify-content: center;
        justify-items: start;
        align-items: start;
    }

    .woocommerce.archive #main > .product-dynamic-filters {
        grid-column: 1;
        width: min(256px, 100%);
        justify-self: center;
    }

    .woocommerce.archive #main > .products {
        grid-column: 2;
    }

    .woocommerce.archive ul.products.columns-3,
    .woocommerce.archive .products {
        grid-template-columns: repeat(2, 304px);
        justify-content: center;
    }
}

@media only screen and (max-width: 991px) {
	.woocommerce.archive #main > .products {
		grid-template-columns: repeat(1, 304px);
	}
}

@media only screen and (max-width: 660px) {
	.woocommerce.archive #main > .products {
		grid-column: 1;
	}
}
