/*
 * Catalogue: hero banner, product list, product page, quick view and lightbox.
 * Mobile first; min-width queries add the larger layouts. Colours were sampled
 * from the royal-child baseline.
 */

:root {
	--sm-title: #b29279;
	--sm-label: #c39788;
	--sm-soft-pink: #e09fa9;
	--sm-price: #ebc0c7;
	--sm-line: #efefef;
	--sm-tel: #e2d9d2;
	--sm-order: #f5a6b1;
	--sm-share-bg: #faf4f1;
	--sm-share-label: #de98a3;
}

/* Page frame --------------------------------------------------------------- */

.sm-container {
	width: var(--sm-container);
	margin: 0 auto;
}

.sm-catalogue-page {
	padding-bottom: 60px;
}

/* The header overlays the page like royal-child: the first content starts just under it, and on wide screens
   the result bar and the category strip slide up behind it. */
.sm-catalogue-page > .sm-filter-bar {
	margin-top: 10px;
}

/* Category strip above a product: the category icon menu block on a watercolour band ------------------- */

.sm-category-strip {
	padding: 35px 15px 106px;
	background: url(../images/catalogue/strip.png) center / cover no-repeat;
}

.sm-category-strip .sm-icon-menu__list {
	grid-template-columns: 1fr;
	gap: 15px;
}

.sm-category-strip .sm-icon-menu__inner {
	justify-content: center;
}

@media (min-width: 768px) {
	.sm-category-strip {
		padding-bottom: 133px;
	}
}

@media (min-width: 994px) {
	.sm-category-strip .sm-icon-menu__list {
		grid-template-columns: repeat(5, minmax(0, 1fr));
		gap: 10px;
	}
}

@media (min-width: 1300px) {
	.sm-category-strip {
		height: 145px;
		margin-top: calc(-1 * var(--sm-header-h));
		padding-top: 30px;
		padding-bottom: 0;
	}

	.sm-category-strip {
		overflow: hidden;
	}

	.sm-category-strip .sm-icon-menu__list {
		display: flex;
		flex-wrap: nowrap;
		justify-content: flex-start;
		gap: 10px;
	}

	.sm-category-strip .sm-icon-menu__item {
		flex: 1 1 0;
		min-width: 0;
	}

	.sm-category-strip .sm-icon-menu__inner {
		padding: 0 8px;
		white-space: normal;
	}

	/* Behind the header only the bands show, as under royal-child; labels and pictures would bleed through the menu. */
	.sm-category-strip .sm-icon-menu__inner > * {
		visibility: hidden;
	}

	.sm-catalogue-page > .sm-filter-bar {
		margin-top: calc(30px - var(--sm-header-h));
	}
}

/* Result count ------------------------------------------------------------ */

.sm-filter-bar {
	margin-bottom: 31px;
	padding: 0 15px;
	border-top: 1px solid var(--sm-pink);
	border-bottom: 1px solid var(--sm-pink);
	line-height: 62px;
	text-align: right;
}

.sm-result-count {
	margin: 0;
	font-size: 15px;
	color: var(--sm-title);
}

.sm-result-count strong {
	font-weight: 400;
	color: var(--sm-pink);
}

/* Product list ------------------------------------------------------------ */

.sm-products {
	display: grid;
	gap: 86px;
	padding: 0 15px;
}

.sm-card {
	min-width: 0;
}

.sm-card__media {
	position: relative;
	width: 300px;
	max-width: 100%;
	margin: 0 auto 24px;
}

.sm-card__image {
	position: relative;
	display: block;
	line-height: 0;
}

.sm-card__image img {
	display: block;
	width: 100%;
	height: auto;
}

.sm-card__quick {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	padding: 8px 12px;
	border: 0;
	background: rgb(255 255 255 / 0.92);
	color: var(--sm-ink);
	font: inherit;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 1px;
	cursor: pointer;
	transition: opacity var(--sm-transition);
}

/* Touch screens have no hover: keep the button visible. */
@media (hover: hover) {
	.sm-card__quick {
		opacity: 0;
	}

	.sm-card__media:hover .sm-card__quick,
	.sm-card__quick:focus-visible {
		opacity: 1;
	}
}

.sm-card__quick:focus-visible {
	outline: 2px solid var(--sm-pink);
	outline-offset: -2px;
}

.sm-card__title {
	margin: 0 0 18px;
	font-size: 22px;
	font-weight: 300;
	line-height: 1.15;
	letter-spacing: 1.8px;
	text-transform: uppercase;
	color: var(--sm-title);
}

.sm-card__title a {
	color: inherit;
	text-decoration: none;
}

.sm-card__title a:hover {
	color: var(--sm-ink);
}

@media (min-width: 992px) {
	.sm-products {
		gap: 66px;
		padding: 0 63px 0 59px;
	}

	.sm-card {
		display: grid;
		grid-template-columns: 300px minmax(0, 1fr);
		column-gap: 75px;
		align-items: start;
	}

	.sm-card__media {
		margin: 0;
	}

	.sm-card__title {
		margin-top: 0;
	}

	/* Grid layout, 3 per row: swap `sm-products--list` for `sm-products--grid` in archive-product.php. */
	.sm-products--grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 40px 30px;
		padding: 0;
	}

	.sm-products--grid .sm-card {
		display: block;
	}

	.sm-products--grid .sm-card__media {
		margin: 0 auto 20px;
	}
}

/* Summary: the editors' description with its price table ------------------- */

.sm-summary {
	font-size: 14px;
	line-height: 1.7;
}

.sm-summary p {
	margin: 0 0 8px;
}

.sm-summary p:last-child {
	margin-bottom: 24px;
}

@media (min-width: 992px) {
	.sm-summary p:last-child {
		margin-bottom: 0;
	}
}

.sm-summary #detail-pro {
	margin-bottom: 16px;
	font-size: 16px;
	line-height: 33px;
	color: var(--sm-soft-pink);
}

.sm-summary #detail-pro::before {
	content: "";
	display: inline-block;
	width: 26px;
	height: 26px;
	margin-right: 4px;
	vertical-align: -7px;
	background: url(../images/catalogue/icon_o.png) center / contain no-repeat;
}

.sm-summary table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
}

.sm-summary td {
	padding: 8px;
	border-top: 1px solid var(--sm-line);
	text-align: center;
	font-size: 13px;
	font-weight: 700;
	line-height: 20px;
	color: var(--sm-price);
}

.sm-summary td:first-child {
	color: var(--sm-label);
}

.sm-summary tr:hover td {
	background: #fceff1;
	color: var(--sm-label);
}

.sm-summary img {
	vertical-align: middle;
}

/* Order buttons ----------------------------------------------------------- */

.sm-order {
	margin: 0;
}

/* royal-child lifted the buttons over the end of the price table; same gap without hiding the last row. */
.sm-summary + .sm-order {
	margin-top: -10px;
}

.sm-order__button {
	display: block;
	margin-bottom: 1px;
	padding: 5px 5px 5px 0;
	color: #f8f8f8;
	font-size: 18px;
	font-weight: 300;
	line-height: 33px;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	transition: filter var(--sm-transition);
}

.sm-order__button:hover {
	filter: brightness(0.96);
	color: #fff;
}

.sm-order__button::before {
	content: "";
	display: inline-block;
	height: 24px;
	margin-right: 10px;
	vertical-align: -6px;
	background: center / contain no-repeat;
}

.sm-order__button--tel {
	background: var(--sm-tel);
}

.sm-order__button--tel::before {
	width: 10px;
	background-image: url(../images/catalogue/icon_call_white.png);
}

.sm-order__button--line {
	background: var(--sm-order);
}

.sm-order__button--line::before {
	width: 24px;
	background-image: url(../images/catalogue/icon_linechat.png);
}

.sm-order__button:focus-visible {
	outline: 2px solid var(--sm-ink);
	outline-offset: 2px;
}

/* Badges ------------------------------------------------------------------ */

.sm-badge {
	position: absolute;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	line-height: 1;
	text-transform: uppercase;
	pointer-events: none;
}

.sm-badge--sale,
.sm-badge--new {
	top: 10px;
	left: 10px;
	width: 48px;
	height: 48px;
	background: var(--sm-pink);
	color: #fff;
	font-size: 11px;
	font-weight: 500;
}

.sm-badge--sale + .sm-badge--new {
	top: 64px;
}

.sm-badge--out-of-stock {
	top: 50%;
	left: 50%;
	width: 88px;
	height: 88px;
	margin: -44px 0 0 -44px;
	background: rgb(255 255 255 / 0.9);
	color: #000;
}

.sm-badge__big {
	padding: 2px 6px;
	border-top: 1px solid currentcolor;
	border-bottom: 1px solid currentcolor;
	font-size: 22px;
	line-height: 1.1;
	font-weight: 400;
}

.sm-badge__small {
	margin-top: 4px;
	font-size: 12px;
}

/* Product page ------------------------------------------------------------ */

.sm-ribbon {
	position: relative;
	margin: 0;
	padding: 3px 0 24px;
	text-align: center;
}

.sm-ribbon::before {
	content: "";
	position: absolute;
	top: 50%;
	right: 0;
	left: 0;
	border-top: 1px dashed #ddd;
}

.sm-ribbon__title {
	position: relative;
	display: inline-block;
	min-width: 260px;
	padding: 14px 40px;
	background: url(../images/catalogue/ribbon.png) center / contain no-repeat;
	font-size: 17px;
	font-weight: 300;
	line-height: 1.3;
	color: var(--sm-soft-pink);
}

.sm-ribbon__title strong {
	font-weight: 400;
	color: #bf8f7f;
}

.sm-product-prev {
	display: none;
	height: 0;
	margin: 0 0 0 20px;
}

.sm-product-prev::before {
	content: "";
	display: block;
	width: 105px;
	height: 21px;
	background: url(../images/catalogue/arrow_left.png) left center / contain no-repeat;
}

@media (min-width: 768px) {
	.sm-product-prev {
		display: block;
	}
}

@media (min-width: 992px) {
	.sm-product-prev {
		height: 21px;
		margin-bottom: 38px;
	}
}

.sm-product-prev:focus-visible {
	outline: 2px solid var(--sm-pink);
	outline-offset: 4px;
}

.sm-product {
	display: grid;
	gap: 40px;
	align-items: start;
	margin-top: 6px;
	margin-bottom: 0;
}

@media (min-width: 768px) {
	.sm-product {
		margin-top: 16px;
	}
}

.sm-product__media {
	order: -1;
	min-width: 0;
}

.sm-product__info {
	min-width: 0;
}

.sm-product__title {
	margin: 0 0 28px;
	font-size: 30px;
	font-weight: 300;
	line-height: 1.3;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--sm-title);
}

@media (min-width: 992px) {
	.sm-product {
		margin-top: 20px;
		margin-bottom: 20px;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		column-gap: 30px;
	}

	.sm-ribbon__title {
		font-size: 25px;
	}

	.sm-product__media {
		order: 0;
		/* Image column sits to the right of the text, like royal-child. */
		grid-column: 2;
		grid-row: 1;
		padding-left: 10px;
	}

	.sm-product__info {
		grid-column: 1;
		grid-row: 1;
		padding-right: 15px;
	}

	.sm-product__title {
		margin-bottom: 18px;
	}
}

.sm-product__info .sm-summary + .sm-order {
	margin-top: -5px;
}

@media (min-width: 992px) {
	.sm-product__info .sm-summary + .sm-order {
		margin-top: 15px;
	}
}

/* Share ------------------------------------------------------------------- */

@media (min-width: 992px) {
	.sm-share {
		margin-top: 11px;
	}
}

.sm-share {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 25px;
	padding: 10px;
	background: var(--sm-share-bg);
}

.sm-share__label {
	font-size: 18px;
	color: var(--sm-share-label);
}

.sm-share__list {
	display: flex;
	gap: 14px;
	margin: 0;
	padding: 0 20px 0 0;
	list-style: none;
}

.sm-share__link {
	display: block;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #fff center / 14px no-repeat;
	opacity: 0.75;
	transition: background-color var(--sm-transition);
}

.sm-share__link:hover {
	background-color: var(--sm-icon-fill);
}

.sm-share__link:focus-visible {
	outline: 2px solid var(--sm-pink);
	outline-offset: 2px;
}

.sm-share__link--facebook {
	background-image: url(../images/header/icons/facebook.svg);
}

.sm-share__link--instagram {
	background-image: url(../images/header/icons/instagram.svg);
}

.sm-share__link--pinterest {
	background-image: url(../images/catalogue/pinterest.svg);
}

.sm-share__link--email {
	background-image: url(../images/header/icons/email.svg);
}

/* Pagination -------------------------------------------------------------- */

.sm-pagination {
	margin-top: 60px;
}

.sm-pagination ul {
	display: flex;
	justify-content: flex-end;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sm-pagination .page-numbers {
	display: block;
	min-width: 34px;
	height: 28px;
	padding: 0 8px;
	border-left: 1px solid #ddd;
	color: var(--sm-text);
	font-size: 14px;
	line-height: 28px;
	text-align: center;
	text-decoration: none;
}

.sm-pagination .page-numbers.current {
	background: var(--sm-order);
	color: #fff;
}

.sm-pagination a.page-numbers:hover {
	background: var(--sm-share-bg);
}

.sm-pagination a.page-numbers:focus-visible {
	outline: 2px solid var(--sm-pink);
	outline-offset: -2px;
}

.sm-no-products {
	padding: 40px 15px;
	text-align: center;
}

/* Gallery ----------------------------------------------------------------- */

.sm-gallery {
	max-width: 300px;
	margin: 0 auto;
}

@media (min-width: 600px) {
	.sm-gallery {
		max-width: 500px;
	}
}

.sm-gallery__viewport {
	position: relative;
}

.sm-gallery__track {
	display: flex;
	margin: 0;
	padding: 0;
	overflow-x: auto;
	list-style: none;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.sm-gallery__track::-webkit-scrollbar {
	display: none;
}

.sm-gallery__slide {
	flex: 0 0 100%;
	scroll-snap-align: start;
}

.sm-gallery__slide a {
	display: block;
	line-height: 0;
}

.sm-gallery__slide img {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
}

.sm-gallery__zoom {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 3;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background: #fff;
	cursor: pointer;
}

.sm-gallery__zoom::before,
.sm-gallery__zoom::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	background: #c1b497;
}

.sm-gallery__zoom::before {
	width: 24px;
	height: 1px;
	margin: 0 0 0 -12px;
}

.sm-gallery__zoom::after {
	width: 1px;
	height: 24px;
	margin: -12px 0 0;
}

.sm-gallery__zoom:focus-visible,
.sm-gallery__nav:focus-visible,
.sm-gallery__thumbs button:focus-visible,
.sm-dialog-close:focus-visible {
	outline: 2px solid var(--sm-pink);
	outline-offset: 2px;
}

.sm-gallery__nav {
	position: absolute;
	top: 50%;
	z-index: 3;
	width: 40px;
	height: 40px;
	margin-top: -20px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.sm-gallery__nav::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 12px;
	height: 12px;
	margin: -6px 0 0 -3px;
	border-bottom: 1px solid #333;
	border-left: 1px solid #333;
	transform: rotate(45deg);
}

.sm-gallery__nav--prev {
	left: 0;
}

.sm-gallery__nav--next {
	right: 0;
}

.sm-gallery__nav--next::before {
	margin-left: -9px;
	transform: rotate(-135deg);
}

.sm-gallery__thumbs {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}

.sm-gallery__thumbs button {
	display: block;
	width: 12px;
	height: 12px;
	padding: 0;
	border: 1px solid #ddd;
	border-radius: 50%;
	background: #fff;
	cursor: pointer;
}

.sm-gallery__thumbs button[aria-current="true"] {
	border-color: var(--sm-order);
	background: var(--sm-order);
}

/* Dialogs: quick view and lightbox ---------------------------------------- */

.sm-quickview,
.sm-lightbox {
	padding: 0;
	border: 0;
	color: var(--sm-text);
}

.sm-quickview::backdrop,
.sm-lightbox::backdrop {
	background: rgb(58 46 42 / 0.6);
}

.sm-quickview {
	width: min(900px, calc(100% - 32px));
	max-height: calc(100% - 32px);
	background: var(--sm-surface);
	box-shadow: var(--sm-shadow);
}

.sm-quickview__body {
	padding: 24px;
}

.sm-quickview__content {
	display: grid;
	gap: 20px;
}

.sm-quickview__media {
	position: relative;
	line-height: 0;
}

.sm-quickview__media img {
	display: block;
	width: 100%;
	max-width: 400px;
	margin: 0 auto;
}

.sm-quickview__title {
	margin: 0 0 16px;
	padding-right: 36px;
	font-size: 22px;
	font-weight: 300;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--sm-title);
}

.sm-quickview__more {
	display: inline-block;
	margin-top: 16px;
	color: var(--sm-ink);
}

.sm-quickview__loading {
	margin: 0;
	padding: 40px 0;
	text-align: center;
}

@media (min-width: 768px) {
	.sm-quickview__content {
		grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
		gap: 30px;
	}
}

.sm-dialog-close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 4;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.sm-dialog-close::before,
.sm-dialog-close::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 2px;
	margin: -1px 0 0 -10px;
	background: var(--sm-pink);
	transform: rotate(45deg);
}

.sm-dialog-close::after {
	transform: rotate(-45deg);
}

.sm-lightbox {
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	background: transparent;
}

.sm-lightbox[open] {
	display: flex;
	align-items: center;
	justify-content: center;
}

.sm-lightbox__image {
	max-width: calc(100% - 32px);
	max-height: calc(100% - 32px);
	background: #fff;
}

.sm-lightbox .sm-gallery__nav {
	position: fixed;
	background: rgb(255 255 255 / 0.85);
	border-radius: 50%;
}

.sm-lightbox .sm-gallery__nav--prev {
	left: 16px;
}

.sm-lightbox .sm-gallery__nav--next {
	right: 16px;
}

.sm-lightbox .sm-dialog-close {
	background: rgb(255 255 255 / 0.85);
	border-radius: 50%;
}

@media (prefers-reduced-motion: no-preference) {
	.sm-gallery__track {
		scroll-behavior: smooth;
	}
}
