/* DiaMilia storefront design. Loaded after Storefront and style.css. */

:root {
	--dm-mauve: #877077;
	--dm-olive: #63774a;
	--dm-cream: #f0ede2;
	--dm-wood: #ead7b4;
	/* The brand colours stay as surfaces (white on them passes); text uses darker shades that reach 4.5:1 on cream and white. */
	--dm-ink: #2f2a2b;         /* 12.1:1 on cream */
	--dm-muted: #5c5557;       /* 6.2:1 */
	--dm-mauve-text: #6f5c62;  /* 5.3:1 */
	--dm-olive-text: #556640;  /* 5.3:1 */
	--dm-wood-text: #4a3420;   /* 8.3:1 on wood */
	--dm-shadow: 0 1px 3px rgba(47, 42, 43, .08), 0 10px 24px -14px rgba(47, 42, 43, .28);
	--dm-radius: 12px;
	--dm-radius-sm: 10px;
	--dm-heading: "Fraunces", serif;
	/* The olive strip under the header: full bleed from inside the content column, and border-image outset never scrolls. */
	--dm-strip: conic-gradient(var(--dm-olive) 0 0) fill 0 / / 0 100vmax;
}

body, button, input, select, textarea {
	font-family: "Nunito Sans", sans-serif;
}
body {
	color: var(--dm-ink);
	font-size: 16px;
	line-height: 1.6;
}
.site-content :is(p, li, td, th, dd, dt) { color: var(--dm-ink); }
.woocommerce-breadcrumb, .woocommerce-breadcrumb a { color: var(--dm-muted); font-size: 14px; }

h1, h2, h3, .product_title {
	font-family: var(--dm-heading);
	font-weight: 700;
	color: var(--dm-olive-text);
	letter-spacing: -0.02em;
	line-height: 1.15;
	text-wrap: balance;
}
h1, .product_title { font-size: 36px; }
h2 { font-size: 24px; }

.site-footer, .site-footer * { color: #fff; }
.site-footer :is(h1, h2, h3, .widget-title, .gamma) { color: #fff; font-size: 18px; }

.price { color: var(--dm-mauve-text); font-variant-numeric: tabular-nums; }

/* Header */
.site-header { padding: 0; border-bottom: 0; }
.dm-header { display: flex; align-items: center; gap: 2em; padding-top: 1em; padding-bottom: 1em; }
.dm-header::before, .dm-header::after { display: none; }
.dm-header a { text-decoration: none; }
.dm-header__logo { flex: none; }
.site-header .dm-header__logo img { display: block; width: 210px; height: auto; }
.dm-header__tools { display: flex; align-items: center; gap: 1.2em; flex: none; margin-left: auto; }
.dm-header .woocommerce-product-search { position: relative; margin: 0; }
.dm-header .woocommerce-product-search .search-field {
	width: 170px; min-height: 44px; padding: .55em 1em; border: 0; border-radius: 99px;
	background: rgba(255, 255, 255, .92);
	font-size: 16px; /* below 16px iOS zooms in on focus */
}
.dm-header .woocommerce-product-search button[type="submit"] {
	position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); padding: 0; border: 0;
}
.dm-header__cart .cart-contents {
	display: flex; align-items: center; gap: .5em; min-height: 44px;
	color: #fff; font-weight: 600; white-space: nowrap;
}
.dm-header__cart .cart-contents::before { content: "Kurv"; }
.dm-header__cart .count {
	display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; padding: 0 .35em; border-radius: 99px;
	background: #fff; color: var(--dm-mauve-text); font-size: 12px;
}
.dm-header__cart .woocommerce-Price-amount { opacity: .85; font-weight: 400; }
.dm-header__cart--phone { display: none; }

.dm-strip { border-image: var(--dm-strip); }

/* Pills: shelf links on the front page, category chips on category pages. Mauve text on cream. */
.dm-pills { display: flex; flex-wrap: wrap; gap: .45em; }
.dm-pill {
	display: inline-flex; align-items: center; min-height: 40px; padding: 0 1.1em;
	border: 1.5px solid var(--dm-mauve); border-radius: 99px;
	color: var(--dm-mauve-text); font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.dm-pill:is(:hover, [aria-current]) { background: var(--dm-mauve); color: #fff; }

/* Product card: photo, name, then the price on a wooden gift tag and what can be engraved. */
.dm-card { position: relative; display: block; color: var(--dm-ink); text-decoration: none; container-type: inline-size; }
.dm-card__img { display: block; overflow: hidden; border-radius: var(--dm-radius); background: #fff; box-shadow: var(--dm-shadow); }
.dm-card__img img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .4s; }
.dm-card:hover .dm-card__img img { transform: scale(1.04); }
.dm-card__name { display: block; margin-top: .7em; font-size: 16px; font-weight: 700; line-height: 1.3; }
.dm-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4em .6em; margin-top: .45em; font-size: 15px; }
.dm-card__price {
	position: relative; margin-right: 4px; padding: .3em .75em .3em 1.5em;
	background: var(--dm-wood); border-radius: 4px 6px 6px 4px; box-shadow: inset 0 -2px 0 rgba(74, 52, 32, .15);
	clip-path: polygon(12px 0, 100% 0, 100% 100%, 12px 100%, 0 50%);
	font-weight: 800; font-variant-numeric: tabular-nums;
	transform: rotate(3deg); transition: transform .3s ease-out;
}
.dm-card__price, .dm-card__price * { color: var(--dm-wood-text); }
.dm-card__price del { opacity: .6; font-weight: 400; }
.dm-card__price::before { /* the punched hole */
	content: ""; position: absolute; left: 9px; top: 50%; width: 6px; height: 6px; margin-top: -3px;
	border-radius: 50%; background: var(--dm-cream);
}
.dm-card:is(:hover, :focus-visible) .dm-card__price { transform: rotate(-2deg); }
.dm-card__personal { display: inline-flex; align-items: center; gap: .3em; color: var(--dm-olive-text); font-size: 13px; white-space: nowrap; }

/* Front page */
.dm-intro {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2em;
	margin-bottom: 1.5em; padding: .55em 0; border-image: var(--dm-strip);
}
.dm-intro__headline {
	margin: 0; color: #fff; text-align: right;
	/* Body-size text, so the body font; the wooden name tag carries the personality. */
	font-family: "Nunito Sans", sans-serif; font-size: 16px; font-weight: 700; letter-spacing: 0; line-height: 1.2;
}
.dm-intro__shelves { order: -1; flex-wrap: nowrap; gap: .5em; }
.dm-intro .dm-pill { border: 2px solid rgba(255, 255, 255, .75); color: #fff; }
.dm-intro .dm-pill:is(:hover, [aria-current]) { background: #fff; border-color: #fff; color: var(--dm-olive-text); }

.dm-name__tag {
	display: inline-grid; vertical-align: baseline; text-align: center;
	padding: .02em .4em .06em; border-radius: .28em;
	background: var(--dm-wood); box-shadow: inset 0 -2px 0 rgba(74, 52, 32, .15);
}
.dm-name__item {
	grid-area: 1 / 1; color: var(--dm-wood-text); white-space: nowrap;
	opacity: 0; transform: translateY(.18em); transition: opacity .22s ease-out, transform .22s ease-out;
}
.dm-name__item.is-active { opacity: 1; transform: none; }

.dm-shelf { margin: 3em 0 1em; scroll-margin-top: 1em; }
.dm-shelf__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: .8em; }
.dm-shelf__head h2 { margin: 0; }
.dm-shelf__head a { color: var(--dm-mauve-text); font-weight: 600; text-decoration: none; }
.dm-shelf__track { position: relative; }
/* The padding gives card shadows and hover room inside the scroll box; the negative margin cancels it in the layout. */
.dm-shelf__scroll { overflow-x: auto; margin: -1.2em -1.2em 0; padding: 1.2em; scroll-behavior: smooth; scrollbar-width: none; }
.dm-shelf__scroll::-webkit-scrollbar { display: none; }
.dm-shelf__row { display: flex; align-items: start; gap: 1.6em; width: max-content; min-width: 100%; margin: 0; padding: 0; list-style: none; }
.dm-shelf__row li { flex: none; width: 200px; }
.dm-shelf__arrow {
	position: absolute; top: 50%; z-index: 2; width: 46px; height: 46px; padding: 0;
	border: 3px solid var(--dm-cream); border-radius: 50%; background: var(--dm-mauve); color: #fff;
	box-shadow: 0 6px 16px rgba(59, 53, 54, .3); font-size: 1.3em; line-height: 1;
	transform: translateY(-50%); cursor: pointer; transition: background .2s;
}
.dm-shelf__arrow:hover { background: var(--dm-olive); }
.dm-shelf__arrow[hidden] { display: none; }
.dm-shelf__arrow--prev { left: -23px; }
.dm-shelf__arrow--next { right: -23px; }

/* Category page */
.dm-cat-head { margin-bottom: 2em; }
.dm-cat-head__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2em 1em; padding: .75em 0; }
.dm-cat-head__title h1 { margin: 0; color: #fff; font-size: 22px; }
.site-content .dm-cat-head__count { margin: 0; color: #fff; opacity: .92; font-size: 15px; }
.dm-cat-head__chips { margin-top: 1.4em; }

.dm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.2em 1.6em; margin: 0 0 4em; padding: 0; list-style: none; }
.dm-grid li { position: relative; }
.dm-grid__feature { grid-column: span 2; grid-row: span 2; }
.dm-grid__new {
	position: absolute; z-index: 1; top: 12px; left: 12px; padding: .3em .7em; border-radius: 6px;
	background: var(--dm-olive); color: #fff; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
}

/* Product page */
@media (min-width: 768px) {
	.storefront-full-width-content.single-product div.product .woocommerce-product-gallery { width: 54%; margin-right: 5%; }
	.storefront-full-width-content.single-product div.product .summary { width: 41%; }
}
.single-product div.product .woocommerce-product-gallery img { width: 100%; height: auto; border-radius: 14px; }
.single-product div.product p.price { margin-bottom: 1em; color: var(--dm-mauve-text); font-size: 24px; font-weight: 600; }
.single-product div.product form.cart .quantity { display: none; }

.dm-p-card { overflow: hidden; padding: 1.3em 1.5em 1.5em; border-radius: var(--dm-radius); background: #fff; box-shadow: var(--dm-shadow); }
.site-content .dm-p-kicker {
	margin: -1.3rem -1.5rem 1.3rem; padding: .95rem 1.5rem; background: var(--dm-mauve);
	color: #fff; font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
}

.wpcpo-options { counter-reset: dm-field; }
.wpcpo-option { margin-bottom: 1.3em; }
.wpcpo-option-name { margin-bottom: .45em; }
.wpcpo-option-name strong { color: var(--dm-ink); font-size: 16px; font-weight: 700; }
.wpcpo-option-name > span { color: var(--dm-mauve); }
.wpcpo-option-name strong::before {
	counter-increment: dm-field; content: counter(dm-field);
	display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; margin-right: .55em;
	border-radius: 50%; background: var(--dm-mauve); color: #fff; font-size: .85em;
}
.wpcpo-option:only-child .wpcpo-option-name strong::before { display: none; }
.wpcpo-option-form .form-row { margin: 0; padding: 0; }
/* WPC marks empty required fields as errors before anything is typed, so the error border is overridden; the disabled button already says something is missing. */
.wpcpo-option .wpcpo-option-field:is(input[type="text"], textarea) {
	width: 100%; min-height: 48px; padding: .75em .95em;
	border: 2px solid color-mix(in srgb, var(--dm-olive) 30%, #fff); border-radius: var(--dm-radius-sm);
	background: #fff; box-shadow: none; color: var(--dm-ink); font-size: 16px;
}
.wpcpo-option .wpcpo-option-field:is(input[type="text"], textarea):focus {
	border-color: var(--dm-olive); outline: 3px solid color-mix(in srgb, var(--dm-olive) 12%, var(--dm-cream));
}
.wpcpo-chars-remaining { color: var(--dm-muted); font-size: 13px; }
.wpcpo-option.wpcpo-option-image-radio .form-row { gap: .7em; margin: 0; }
.wpcpo-option.wpcpo-option-image-radio .form-row label {
	display: flex; flex-direction: column; align-items: center; width: 116px; margin: 0; padding: .45em;
	border: 2px solid transparent; border-radius: var(--dm-radius); background: #fff;
	box-shadow: 0 4px 10px -6px rgba(59, 53, 54, .35); cursor: pointer; transition: border-color .2s;
}
.wpcpo-option.wpcpo-option-image-radio .form-row label img { width: 100%; height: auto; border-radius: 8px; }
.wpcpo-option-image-radio .label-name { margin-top: .35em; font-size: .9em; }
.wpcpo-option.wpcpo-option-image-radio .form-row input[type="radio"]:checked + label { border-color: var(--dm-olive); }
.wpcpo-option-image-radio input:checked + label .label-name::before { content: "✓ "; color: var(--dm-olive); }

.single-product div.product form.cart .single_add_to_cart_button {
	width: 100%; min-height: 52px; padding: 1em;
	border-color: var(--dm-olive); background: var(--dm-olive); color: #fff;
	border-radius: var(--dm-radius-sm) !important; /* style.css rounds every button to 7px with !important */
	font-size: 17px; font-weight: 800;
}
.single-product div.product form.cart .single_add_to_cart_button:hover { border-color: var(--dm-mauve); background: var(--dm-mauve); }

.dm-p-note { margin: 1em 0 0; padding: 0; list-style: none; font-size: 15px; }
.dm-p-note li { display: flex; align-items: flex-start; gap: .6em; padding: .25em 0; }
.dm-p-note .dm-icon { flex: none; margin-top: .2em; color: var(--dm-olive); }

.dm-p-about { clear: both; max-width: 44em; padding: 3em 0 1em; }
.dm-p-desc { max-width: 65ch; line-height: 1.7; }
.dm-p-desc ul { margin-left: 1.2em; }
.dm-p-desc li { margin-bottom: .2em; }
.dm-p-details table { margin-top: 1em; }

:is(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid var(--dm-olive-text); outline-offset: 2px; }
.site-header :is(a, button, input):focus-visible { outline-color: #fff; }

@media (max-width: 768px) {
	h1, .product_title { font-size: 28px; }
	h2 { font-size: 22px; }

	.dm-header { flex-wrap: wrap; gap: 1em; padding-top: .8em; padding-bottom: .8em; }
	.dm-header__tools { display: none; }
	.dm-header__cart--phone { display: block; margin-left: auto; }
	.dm-header__cart--phone .woocommerce-Price-amount { display: none; }

	.dm-pills { gap: .4em; }
	.dm-pill { min-height: 44px; padding: 0 .75em; font-size: 14px; }
	.dm-card__price { font-size: 14px; }

	/* No room for pills and headline on one line: the headline keeps the strip, the pills move to cream below. */
	.dm-intro { display: block; padding: 0; border-image: none; }
	.dm-intro__headline { padding: .6em 0; border-image: var(--dm-strip); text-align: left; font-size: 17px; }
	.dm-intro__shelves { margin-top: 1em; }
	.dm-intro .dm-pill { border-color: var(--dm-mauve); color: var(--dm-mauve-text); }
	.dm-intro .dm-pill:is(:hover, [aria-current]) { background: var(--dm-mauve); color: #fff; }

	.dm-shelf__scroll { overflow: visible; margin: 0; padding: 0; }
	.dm-shelf__arrow { display: none; }
	.dm-shelf__row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4em 1em; width: auto; }
	.dm-shelf__row li { width: auto; }

	.dm-cat-head__title { padding: .6em 0; }
	.dm-cat-head__title h1 { font-size: 19px; }
	.dm-cat-head__chips { margin-top: 1em; }
	.dm-grid { grid-template-columns: repeat(2, 1fr); gap: 1.6em 1em; }
	.dm-grid__feature { grid-row: auto; }

	.dm-p-card { padding: 1em 1.1em 1.2em; }
	.site-content .dm-p-kicker { margin: -1rem -1.1rem 1.2rem; padding: .9rem 1.1rem; }
	.wpcpo-option.wpcpo-option-image-radio .form-row label { width: calc(50% - .35em); }
}
@media (max-width: 350px) {
	.dm-intro__shelves { flex-wrap: wrap; }
}

/* Narrow cards: smaller tag first; price and label stack only when there is no room for both. */
@container (max-width: 250px) {
	.dm-card__meta { gap: .5em; }
	.dm-card__price { margin-right: 0; }
}
@container (max-width: 140px) {
	.dm-card__meta { flex-direction: column; align-items: flex-start; gap: .4em; }
}
@container (max-width: 200px) {
	.dm-card__meta { gap: .4em .45em; }
	.dm-card__price { padding: .28em .55em .28em 1.35em; font-size: 13px; }
	.dm-card__personal { gap: .2em; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
