/**
 * Currently Loving Slider block styles.
 *
 * @package made-to-thrive-2026-base
 */

.mtt-currently-loving-slider {
	width: 100%;
	background-color: var(--wp--preset--color--warm-white, #f2efec);
}

.mtt-cls__inner {
	width: 100%;
}

/* -------------------------------------------------------------------------
   Header — centered title + top-right button (stack on mobile)
   ------------------------------------------------------------------------- */

.mtt-cls__header {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    padding: 0;
    text-align: center;
    max-width: 1159px;
    margin: 0 auto 20px;
    align-items: center;
}

.mtt-cls__header > .wp-block-heading {
	margin: 0;
	width: 100%;
}

.mtt-cls__header > .wp-block-button {
	position: static;
	margin: 0;
}

.mtt-cls__header .wp-block-button__link {
	border: 1px solid var(--wp--preset--color--brown, #493428);
	background: transparent;
	color: var(--wp--preset--color--brown, #493428);
	font-family: var(--wp--preset--font-family--source-sans-3, "Source Sans 3", sans-serif);
	padding: 15px!important;
	margin-top:9px!important;
}

.mtt-cls__header .wp-block-button__link:hover,
.mtt-cls__header .wp-block-button__link:focus-visible {
	background: var(--wp--preset--color--brown, #493428);
	color: var(--wp--preset--color--warm-white, #f2efec);
}

@media (min-width: 768px) {
	.mtt-cls__header {
		min-height: 4rem;
		padding-right: 0;
	}

	.mtt-cls__header > .wp-block-button {
		position: absolute;
		top: 0;
		right: 0;
	}
}

/* -------------------------------------------------------------------------
   Editor — horizontal flex row (no Swiper in dashboard)
   ------------------------------------------------------------------------- */

.mtt-currently-loving-slider.is-editor .mtt-cls__editor-track {
	display: flex;
	flex-wrap: nowrap;
	gap: 0.75rem;
	overflow-x: auto;
	padding-bottom: 0.5rem;
	scrollbar-width: thin;
}

.mtt-currently-loving-slider.is-editor .mtt-cls__editor-slide {
	flex: 0 0 calc(100% / 6.8);
	min-width: 5rem;
}

.mtt-currently-loving-slider.is-editor .mtt-cls__editor-note {
	margin: 0 0 1rem;
	font-size: 0.8125rem;
	color: #757575;
}

/* -------------------------------------------------------------------------
   Frontend Swiper
   ------------------------------------------------------------------------- */

.mtt-cls__slider-wrap {
	width: 100%;
	margin-bottom: 45px;
}

.mtt-cls__swiper {
	width: 100%;
	overflow: hidden;
}
.mtt-cls__header .mtt-highlight {
	margin-right:10px;
}

.mtt-cls__swiper:not(.swiper-initialized) .swiper-wrapper {
	display: flex;
	flex-wrap: nowrap;
	gap: 1rem;
}

.mtt-cls__swiper:not(.swiper-initialized) .swiper-slide {
	flex: 0 0 calc(100% / 6.8);
	min-width: 0;
}

.mtt-cls__swiper .swiper-slide {
	height: auto;
}

.mtt-cls__product-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	text-decoration: none;
	color: inherit;
}

.mtt-cls__product-link:focus-visible {
	outline: 2px solid var(--wp--preset--color--brown, #493428);
	outline-offset: 2px;
}

.mtt-cls__product-media {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 3 / 4;
}

.mtt-cls__product-image {
	display: block;
	width: 100%;
	height: 100%;
	max-height: 14rem;
	object-fit: contain;
	object-position: center bottom;
}

.mtt-cls__product-link:hover .mtt-cls__product-image,
.mtt-cls__product-link:focus-visible .mtt-cls__product-image {
	transform: scale(1.02);
	transition: transform 0.2s ease;
}

/* -------------------------------------------------------------------------
   Custom scrollbar
   ------------------------------------------------------------------------- */

.mtt-currently-loving-slider .mtt-cls__scrollbar,
.mtt-currently-loving-slider .swiper-horizontal > .swiper-scrollbar,
.mtt-currently-loving-slider .swiper-scrollbar.swiper-scrollbar-horizontal {
	position: relative;
	left: 0;
	right: auto;
	bottom: auto;
	width: 100%;
	max-width: 352px;
	margin: 2.625rem auto 0;
	height: 1px;
	background: var(--wp--preset--color--brown, #493428);
	border-radius: 0;
}

.mtt-cls__scrollbar.swiper-scrollbar {
	opacity: 1 !important;
}

.mtt-cls__scrollbar .swiper-scrollbar-drag {
	top: -12px;
    height: 24px;
    width: 24px !important;
    margin-top: -0.4375rem;
    background-color: #EBDAC6;
    border: 1px solid var(--wp--preset--color--brown, #493428);
    border-radius: 50%;
    cursor: grab;
    box-sizing: border-box;
}

.mtt-cls__scrollbar .swiper-scrollbar-drag::after {
	content: "";
	position: absolute;
	top: calc(100% + 11px);
	left: 50%;
	transform: translateX(-50%);
	width: 19.965px;
	height: 7.748px;
	background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2219.965%22%20height%3D%227.748%22%20viewBox%3D%220%200%2019.965%207.748%22%3E%3Cg%20id%3D%22Group_88%22%20data-name%3D%22Group%2088%22%20transform%3D%22translate%28-531.742%20-1272.126%29%22%3E%3Cg%20id%3D%22arrow-right-svgrepo-com_1_%22%20data-name%3D%22arrow-right-svgrepo-com%20%281%29%22%20transform%3D%22translate%28521.399%201248.48%29%22%3E%3Cpath%20id%3D%22Path_317%22%20data-name%3D%22Path%20317%22%20d%3D%22M44%2C31.04l3.52-3.52L44%2C24%22%20transform%3D%22translate%28-17.919%29%22%20fill%3D%22none%22%20stroke%3D%22%234d3700%22%20stroke-width%3D%221%22%2F%3E%3Cline%20id%3D%22Line_21%22%20data-name%3D%22Line%2021%22%20x1%3D%2217.276%22%20transform%3D%22translate%2812%2027.585%29%22%20fill%3D%22none%22%20stroke%3D%22%234d3700%22%20stroke-width%3D%221%22%2F%3E%3C%2Fg%3E%3Cg%20id%3D%22arrow-right-svgrepo-com_1_2%22%20data-name%3D%22arrow-right-svgrepo-com%20%281%29%22%20transform%3D%22translate%28562.051%201303.52%29%20rotate%28180%29%22%3E%3Cpath%20id%3D%22Path_317-2%22%20data-name%3D%22Path%20317%22%20d%3D%22M44%2C31.04l3.52-3.52L44%2C24%22%20transform%3D%22translate%28-17.919%29%22%20fill%3D%22none%22%20stroke%3D%22%234d3700%22%20stroke-width%3D%221%22%2F%3E%3Cline%20id%3D%22Line_21-2%22%20data-name%3D%22Line%2021%22%20x1%3D%2217.276%22%20transform%3D%22translate%2812%2027.585%29%22%20fill%3D%22none%22%20stroke%3D%22%234d3700%22%20stroke-width%3D%221%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	pointer-events: none;
}

.mtt-cls__scrollbar .swiper-scrollbar-drag:active {
	cursor: grabbing;
}

/* -------------------------------------------------------------------------
   Editor — product picker
   ------------------------------------------------------------------------- */

.mtt-cls__product-picker-label {
	margin: 0 0 0.5rem;
	font-weight: 600;
}

.mtt-cls__product-list {
	margin: 0.75rem 0 0;
	padding: 0;
	list-style: none;
}

.mtt-cls__product-list-item + .mtt-cls__product-list-item {
	margin-top: 0.5rem;
}

.mtt-cls__product-card {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.5rem;
	border: 1px solid #ddd;
	border-radius: 2px;
	background: #fff;
}

.mtt-cls__product-card-thumb {
	width: 2.5rem;
	height: 2.5rem;
	object-fit: contain;
	flex-shrink: 0;
}

.mtt-cls__product-card-thumb--empty {
	display: block;
	background: #f0f0f0;
}

.mtt-cls__product-card-body {
	flex: 1 1 auto;
	min-width: 0;
}

.mtt-cls__product-card-title {
	display: block;
	font-size: 0.8125rem;
}

.mtt-cls__product-card-meta {
	display: block;
	font-size: 0.6875rem;
	color: #757575;
}

.mtt-cls__product-card-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	flex-shrink: 0;
}

.mtt-cls__product-custom-fields {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin-top: 0.5rem;
	padding: 0.75rem;
	border: 1px solid #e0e0e0;
	border-radius: 2px;
	background: #fafafa;
}

.mtt-cls__product-picker-empty {
	margin: 0.5rem 0 0;
	font-size: 0.8125rem;
	color: #757575;
}

.mtt-cls__product-picker-actions {
	display: flex;
	gap: 0.5rem;
	margin-top: 0.5rem;
	flex-wrap: wrap;
}

/* -------------------------------------------------------------------------
   Preview image
   ------------------------------------------------------------------------- */

.mtt-cls__preview {
	margin: 0;
}

.mtt-cls__preview img {
	display: block;
	width: 100%;
	height: auto;
}

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

@media (max-width: 767px) {
	.mtt-cls__swiper:not(.swiper-initialized) .swiper-slide {
		flex: 0 0 calc(100% / 2.2);
	}

	.mtt-currently-loving-slider.is-editor .mtt-cls__editor-slide {
		flex: 0 0 calc(100% / 2.2);
	}
}

@media (min-width: 768px) and (max-width: 1023px) {
	.mtt-cls__swiper:not(.swiper-initialized) .swiper-slide {
		flex: 0 0 calc(100% / 4);
	}

	.mtt-currently-loving-slider.is-editor .mtt-cls__editor-slide {
		flex: 0 0 calc(100% / 4);
	}
}

@media (max-width: 880px) {
	.mtt-currently-loving-slider:not(.is-editor) .mtt-cls__inner {
		display: flex;
		flex-direction: column;
	}

	.mtt-currently-loving-slider:not(.is-editor) .mtt-cls__header {
		display: contents;
	}

	.mtt-currently-loving-slider:not(.is-editor) .mtt-cls__header > .wp-block-heading {
		order: 1;
	}

	.mtt-currently-loving-slider:not(.is-editor) .mtt-cls__slider-wrap {
		order: 2;
	}

	.mtt-currently-loving-slider:not(.is-editor) .mtt-cls__header > .wp-block-button {
		align-self: center;
		order: 3;
		position: static;
	}
}
