/* =====================================================================
   KMoss Art Orders: shop look (artwork pages, gallery, order form)
   Loaded only on shop pages. Selectors start with :is(#top, body) so they
   outrank Enfold's styles without piling on !important.

   To fine-tune, override these variables in Enfold > Quick CSS, e.g.
   body.kmo-shop { --k-btn-bg: #1d2b2a; }
   ===================================================================== */

body.kmo-shop,
.kmo-product-wrap,
.kmo-gallery,
.kmo-order,
.fineart-header {
	--k-font: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
	--k-bg: #ffffff;
	--k-text: #111111;
	--k-muted: #6b6b6b;
	--k-field: #f4f4f4;
	--k-field-text: #333333;
	--k-line: #e6e6e6;
	--k-btn-bg: #111111;
	--k-btn-text: #ffffff;
	--k-btn-soft: #f4f4f4;
	--k-btn-soft-hover: #c0aec8;
	--k-sold-btn-bg: #111111;
	--k-sold-btn-text: #ffffff;
	--k-tile: #ffffff;
	--k-sold-bg: #ececec;
	--k-sold-text: #7a7a7a;
	--k-dot: #eb4d55;
	--k-shadow: rgba(0, 0, 0, .28);
}
body.kmo-shop--dark,
.kmo-shop--dark .kmo-product-wrap,
.kmo-shop--dark .kmo-gallery,
.kmo-shop--dark .kmo-order,
.kmo-shop--dark .fineart-header {
	--k-bg: #181924;
	--k-text: #ffffff;
	--k-muted: #a7a9b7;
	--k-field: #242634;
	--k-field-text: #ffffff;
	--k-line: #30323f;
	--k-btn-bg: #ffffff;
	--k-btn-text: #111111;
	--k-sold-btn-bg: #ffffff;
	--k-sold-btn-text: #111111;
	--k-tile: #181924;
	--k-sold-bg: #2a2c3a;
	--k-sold-text: #a7a9b7;
	--k-shadow: rgba(0, 0, 0, .6);
}
body.kmo-shop--site-font,
.kmo-shop--site-font .kmo-product-wrap,
.kmo-shop--site-font .kmo-gallery,
.kmo-shop--site-font .kmo-order,
.kmo-shop--site-font .fineart-header {
	--k-font: inherit;
}

/* Hidden means hidden, whatever the theme says about labels/paragraphs */
.kmo-order [hidden],
.kmo-gallery [hidden],
.kmo-product [hidden] { display: none !important; }

/* ---------------------------------------------------------------------
   Page canvas: background, no sidebar, full-width content
   --------------------------------------------------------------------- */
:is(#top, body).kmo-shop #main,
:is(#top, body).kmo-shop #main .container_wrap.main_color,
:is(#top, body).kmo-shop #main .avia-section.main_color,
:is(#top, body).kmo-shop #main .kmo-product-wrap {
	background-color: var(--k-bg);
	border-color: var(--k-line);
}
:is(#top, body).kmo-shop #main .main_color :is(h1, h2, h3, h4, h5, h6) { color: var(--k-text); }
:is(#top, body).kmo-shop #main .main_color :is(p, li, .avia_textblock) { color: var(--k-text); }
:is(#top, body).kmo-shop .sidebar { display: none !important; }
:is(#top, body).kmo-shop #main .container .content.units {
	width: 100% !important;
	margin-left: 0;
	padding-right: 0;
	padding-left: 0;
	border: 0 !important;
}
:is(#top, body).kmo-shop #main .container_wrap.sidebar_right .container,
:is(#top, body).kmo-shop #main .container_wrap.sidebar_left .container { border: 0; }

/* ---------------------------------------------------------------------
   Product (single artwork) page
   --------------------------------------------------------------------- */
:is(#top, body) .kmo-product {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	gap: clamp(32px, 6vw, 90px);
	align-items: start;
	padding: 20px 0 80px;
	font-family: var(--k-font);
	color: var(--k-text);
	font-size: 14px;
	line-height: 1.8;
	text-align: left;
}
:is(#top, body) .kmo-product .kmo-product__info { text-align: left; }

/* Photos */
:is(#top, body) .kmo-product__media {
	position: sticky;
	top: 110px;
}
:is(#top, body) .kmo-product__main-link {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--k-tile);
	padding: 0 0 24px;
}
:is(#top, body) .kmo-product__main-link--empty { aspect-ratio: 4 / 5; background: var(--k-field); }
:is(#top, body) .kmo-product__main-img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 76vh;
	margin: 0;
	filter: drop-shadow(0 12px 16px var(--k-shadow));
	transition: opacity .25s ease;
}
:is(#top, body) .kmo-product__thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 8px;
}
:is(#top, body) .kmo-product__thumb {
	width: 92px;
	height: 92px;
	padding: 0;
	margin: 0;
	background: var(--k-field);
	border: 1px solid transparent;
	border-radius: 0;
	cursor: pointer;
	opacity: .65;
	transition: opacity .2s ease, border-color .2s ease;
	overflow: hidden;
}
:is(#top, body) .kmo-product__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
}
:is(#top, body) .kmo-product__thumb:hover,
:is(#top, body) .kmo-product__thumb.is-active { opacity: 1; }
:is(#top, body) .kmo-product__thumb.is-active { border-color: var(--k-text); }

/* Details column */
:is(#top, body) .kmo-product .kmo-product__title {
	font-family: var(--k-font);
	font-size: clamp(28px, 3vw, 36px);
	font-weight: 500;
	line-height: 1.25;
	letter-spacing: .01em;
	text-transform: uppercase;
	color: var(--k-text);
	margin: 0 0 8px;
	padding: 0;
	text-align: left;
}
:is(#top, body) .kmo-product .kmo-product__availability {
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--k-muted);
}
:is(#top, body) .kmo-product .kmo-product__sold::before {
	content: "";
	display: inline-block;
	width: .7em;
	height: .7em;
	margin-right: .5em;
	border-radius: 50%;
	background: var(--k-dot);
	vertical-align: -.05em;
}
:is(#top, body) .kmo-product .kmo-product__price {
	margin: 0 0 18px;
	font-size: 22px;
	font-weight: 400;
	line-height: 1.4;
	color: var(--k-text);
	min-height: 1.4em;
}
:is(#top, body) .kmo-product .kmo-product__description,
:is(#top, body) .kmo-product .kmo-product__description :is(p, li, span, strong, em) {
	font-family: var(--k-font);
	font-size: 14px;
	line-height: 1.8;
	color: var(--k-text);
}
:is(#top, body) .kmo-product .kmo-product__description { margin-bottom: 26px; }
:is(#top, body) .kmo-product .kmo-product__description p { margin: 0 0 12px; }
:is(#top, body) .kmo-product .kmo-product__description ul { margin: 0 0 12px 1.1em; }

/* ---------------------------------------------------------------------
   Order form
   --------------------------------------------------------------------- */
:is(#top, body) .kmo-order {
	max-width: 560px;
	margin: 0;
	font-family: var(--k-font);
	color: var(--k-text);
	font-size: 14px;
	line-height: 1.6;
}
:is(#top, body) .kmo-order .kmo-fieldset {
	border: 0;
	border-radius: 0;
	padding: 0;
	margin: 0 0 24px;
	background: none;
}
:is(#top, body) .kmo-order .kmo-fieldset legend {
	display: block;
	width: 100%;
	padding: 0;
	margin: 0 0 10px;
	font-family: var(--k-font);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--k-text);
	border: 0;
}

/* Choice rows (original / print, pickup / ship) */
:is(#top, body) .kmo-order .kmo-option {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 8px;
	padding: 12px 16px;
	background: var(--k-field);
	border: 1px solid transparent;
	border-radius: 0;
	color: var(--k-field-text);
	font-size: 14px;
	font-weight: 400;
	cursor: pointer;
	transition: border-color .2s ease;
}
:is(#top, body) .kmo-order .kmo-option:has(input:checked) { border-color: var(--k-text); }
:is(#top, body) .kmo-order .kmo-option input {
	width: auto;
	margin: 0;
	accent-color: var(--k-text);
}
:is(#top, body) .kmo-order .kmo-option__label,
:is(#top, body) .kmo-order .kmo-option__price { color: var(--k-field-text); }
:is(#top, body) .kmo-order .kmo-option__price { font-weight: 500; }
:is(#top, body) .kmo-order .kmo-option--single { cursor: default; }

/* Print chooser */
:is(#top, body) .kmo-order .kmo-builder {
	margin: 4px 0 14px;
	padding: 6px 0 0;
	border: 0;
	background: none;
}
:is(#top, body) .kmo-order .kmo-builder__row,
:is(#top, body) .kmo-order .kmo-qty,
:is(#top, body) .kmo-order .kmo-grid label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0 0 14px;
	font-size: 13px;
	font-weight: 500;
	color: var(--k-text);
}
:is(#top, body) .kmo-order .kmo-qty { flex-direction: row; align-items: center; gap: 14px; margin-top: 14px; }
:is(#top, body) .kmo-order .kmo-builder__desc,
:is(#top, body) .kmo-order .kmo-qty-note,
:is(#top, body) .kmo-order .kmo-delivery-note {
	margin: -4px 0 14px;
	font-size: 12.5px;
	line-height: 1.6;
	color: var(--k-muted);
	opacity: 1;
}
:is(#top, body) .kmo-order .kmo-builder__addons-title {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 500;
	color: var(--k-text);
}
:is(#top, body) .kmo-order .kmo-addon {
	display: flex;
	font-weight: 400;
	align-items: center;
	gap: 10px;
	margin: 0 0 6px;
	font-size: 14px;
	color: var(--k-text);
	cursor: pointer;
}
:is(#top, body) .kmo-order .kmo-addon input { width: auto; margin: 0; accent-color: var(--k-text); }

/* Fields */
:is(#top, body) .kmo-order .kmo-form :is(select, input[type="text"], input[type="email"], input[type="tel"], input[type="number"], textarea) {
	box-sizing: border-box;
	width: 100%;
	max-width: none;
	min-height: 44px;
	margin: 0;
	padding: 10px 14px;
	background-color: var(--k-field);
	border: 1px solid transparent;
	border-radius: 0;
	box-shadow: none;
	color: var(--k-field-text);
	font-family: var(--k-font);
	font-size: 14px;
	line-height: 1.4;
}
:is(#top, body) .kmo-order .kmo-form :is(select, input, textarea):focus {
	outline: none;
	border-color: var(--k-text);
}
:is(#top, body) .kmo-order .kmo-form select {
	-webkit-appearance: none;
	appearance: none;
	padding-right: 40px;
	cursor: pointer;
	background-image: linear-gradient(45deg, transparent 50%, var(--k-field-text) 50%), linear-gradient(135deg, var(--k-field-text) 50%, transparent 50%);
	background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
}
:is(#top, body) .kmo-order .kmo-form input[type="number"] { width: 90px; }
:is(#top, body) .kmo-order .kmo-grid { gap: 0 16px; }
:is(#top, body) .kmo-order .kmo-ship-fields { margin-bottom: 0; }
:is(#top, body) .kmo-order .kmo-ship-fields .kmo-grid { gap: 0 16px; }

/* Summary & button */
:is(#top, body) .kmo-order .kmo-summary {
	margin: 4px 0 18px;
	padding: 14px 0;
	background: none;
	border-top: 1px solid var(--k-line);
	border-bottom: 1px solid var(--k-line);
	border-radius: 0;
	color: var(--k-text);
}
:is(#top, body) .kmo-order .kmo-summary div { padding: 2px 0; }
:is(#top, body) .kmo-order .kmo-summary span { color: var(--k-text); }
:is(#top, body) .kmo-order .kmo-summary__total { border-top: 0; margin-top: 6px; font-size: 16px; font-weight: 600; }
:is(#top, body) .kmo-order .kmo-submit {
	display: block;
	width: 100%;
	min-height: 52px;
	margin: 0;
	padding: 14px 20px;
	background: var(--k-btn-bg);
	color: var(--k-btn-text);
	border: 0;
	border-radius: 0;
	font-family: var(--k-font);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	cursor: pointer;
	transition: opacity .2s ease;
}
:is(#top, body) .kmo-order .kmo-submit:hover { opacity: .85; }
:is(#top, body) .kmo-order .kmo-submit:disabled { opacity: .6; cursor: wait; }
:is(#top, body) .kmo-order .kmo-fineprint {
	margin: 10px 0 0;
	font-size: 12px;
	color: var(--k-muted);
	opacity: 1;
	text-align: center;
}
:is(#top, body) .kmo-order .kmo-notice {
	margin: 0 0 24px;
	padding: 14px 18px;
	border-radius: 0;
	background: var(--k-field);
	color: var(--k-field-text);
	border-left: 3px solid var(--k-text);
}
:is(#top, body) .kmo-order .kmo-notice--success { border-left-color: #3a8a3a; }
:is(#top, body) .kmo-order .kmo-notice--error { border-left-color: #c0392b; }
:is(#top, body) .kmo-order .kmo-order__unavailable { color: var(--k-muted); }

/* ---------------------------------------------------------------------
   Gallery grid ([kmo_gallery])
   --------------------------------------------------------------------- */
:is(#top, body) .fineart-header { text-align: center; font-family: var(--k-font); margin: 30px auto 50px; }
:is(#top, body) .fineart-header :is(h1, h2) {
	font-family: var(--k-font);
	font-size: clamp(34px, 5vw, 55px);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	color: var(--k-text);
	margin: 0 0 18px;
}
:is(#top, body) .fineart-header p {
	max-width: 600px;
	margin: 0 auto;
	font-size: 14px;
	line-height: 1.8;
	color: var(--k-text);
}

:is(#top, body) .kmo-gallery {
	font-family: var(--k-font);
	color: var(--k-text);
	gap: 70px 56px;
	margin: 20px 0 90px;
}
:is(#top, body) .kmo-gallery .kmo-card { align-items: center; text-align: center; }
:is(#top, body) .kmo-gallery .kmo-card__link {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	background: var(--k-tile);
}
:is(#top, body) .kmo-gallery .kmo-card__img {
	position: absolute;
	inset: 7%;
	width: 86%;
	height: 86%;
	max-width: none;
	aspect-ratio: auto;
	object-fit: contain;
	margin: 0;
	filter: drop-shadow(0 10px 12px var(--k-shadow));
	transition: transform .4s ease, filter .4s ease;
}
:is(#top, body) .kmo-gallery .kmo-card__link:hover .kmo-card__img {
	opacity: 1;
	transform: translateY(-5px);
	filter: drop-shadow(0 18px 18px var(--k-shadow));
}
:is(#top, body) .kmo-gallery .kmo-card__title {
	display: block;
	margin: 26px 0 6px;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: .02em;
	text-transform: uppercase;
	color: var(--k-text);
}
:is(#top, body) .kmo-gallery .kmo-card__meta {
	display: block;
	font-size: 16px;
	font-weight: 400;
	color: var(--k-text);
	opacity: 1;
}
:is(#top, body) .kmo-gallery .kmo-card__button,
:is(#top, body) .kmo-gallery .kmo-card__button:visited {
	align-self: center;
	display: inline-block;
	margin-top: 14px;
	padding: 10px 24px;
	background: var(--k-btn-soft);
	border: 0;
	border-radius: 0;
	color: var(--k-text);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	text-decoration: none;
	opacity: 1;
	transition: background-color .25s ease;
}
:is(#top, body) .kmo-gallery .kmo-card__button:hover,
:is(#top, body) .kmo-gallery .kmo-card__button:focus {
	background: var(--k-btn-soft-hover);
	color: var(--k-text);
	opacity: 1;
}

/* SOLD button (originals page): bold and dark; on hover it reads "Shop prints" */
:is(#top, body) .kmo-gallery .kmo-card__button--sold,
:is(#top, body) .kmo-gallery .kmo-card__button--sold:visited {
	position: relative;
	min-width: 150px;
	padding: 11px 30px;
	background: var(--k-sold-btn-bg);
	color: var(--k-sold-btn-text);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .3em;
	text-indent: .3em; /* balances the letter-spacing so the word sits centered */
	text-align: center;
}
:is(#top, body) .kmo-gallery .kmo-card__button--sold .kmo-card__button-hover {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	letter-spacing: .14em;
	text-indent: .14em;
	opacity: 0;
	transition: opacity .2s ease;
}
:is(#top, body) .kmo-gallery .kmo-card__button--sold .kmo-card__button-label { transition: opacity .2s ease; }
:is(#top, body) .kmo-gallery .kmo-card__button--sold:hover,
:is(#top, body) .kmo-gallery .kmo-card__button--sold:focus {
	background: var(--k-btn-soft-hover);
	color: var(--k-text);
}
:is(#top, body) .kmo-gallery .kmo-card__button--sold.has-hover:hover .kmo-card__button-label,
:is(#top, body) .kmo-gallery .kmo-card__button--sold.has-hover:focus .kmo-card__button-label { opacity: 0; }
:is(#top, body) .kmo-gallery .kmo-card__button--sold.has-hover:hover .kmo-card__button-hover,
:is(#top, body) .kmo-gallery .kmo-card__button--sold.has-hover:focus .kmo-card__button-hover { opacity: 1; }

/* Artwork page: "original has sold, prints available" note */
:is(#top, body) .kmo-product .kmo-product__sold-note {
	margin: 4px 0 16px;
	padding: 12px 16px;
	background: var(--k-btn-soft);
	border-left: 3px solid var(--k-btn-soft-hover);
	color: var(--k-text);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.5;
}
.kmo-shop--dark .kmo-product .kmo-product__sold-note { background: var(--k-field); }

/* Sold: grey bar on the originals page, red dot in the combined gallery */
:is(#top, body) .kmo-gallery--originals .kmo-sold {
	display: block;
	width: 100%;
	min-width: 220px;
	padding: 9px 0 8px;
	background: var(--k-sold-bg);
	color: var(--k-sold-text);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
}
:is(#top, body) .kmo-gallery--all .kmo-card:has(.kmo-sold) .kmo-card__title::before {
	content: "";
	display: inline-block;
	width: .55em;
	height: .55em;
	margin-right: .5em;
	border-radius: 50%;
	background: var(--k-dot);
	vertical-align: .08em;
}
:is(#top, body) .kmo-gallery--all .kmo-sold {
	font-size: .75em;
	letter-spacing: .12em;
	text-transform: uppercase;
	opacity: .6;
}

/* ---------------------------------------------------------------------
   Smaller screens
   --------------------------------------------------------------------- */
@media (max-width: 989px) {
	:is(#top, body) .kmo-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 50px 32px; }
}
@media (max-width: 860px) {
	:is(#top, body) .kmo-product { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 0; }
	:is(#top, body) .kmo-product__media { position: static; }
	:is(#top, body) .kmo-product__main-img { max-height: 70vh; }
	:is(#top, body) .kmo-order { max-width: none; }
}
@media (max-width: 480px) {
	:is(#top, body) .kmo-gallery { gap: 36px 16px; }
	:is(#top, body) .kmo-gallery .kmo-card__title { font-size: 12px; margin-top: 16px; }
	:is(#top, body) .kmo-gallery .kmo-card__meta { font-size: 13px; }
	:is(#top, body) .kmo-gallery--originals .kmo-sold { min-width: 0; }
	:is(#top, body) .kmo-order .kmo-grid { grid-template-columns: 1fr; }
	:is(#top, body) .kmo-product__thumb { width: 72px; height: 72px; }
}
