/* Dentmed Catalogue & Quotes - base styles (work with any theme; the Dentmed theme overrides the variables). */
:root {
	--dm-blue: #1471b8;
	--dm-blue-dark: #0e5a94;
	--dm-red: #e6212a;
	--dm-ink: #14283c;
	--dm-muted: #5a6b7c;
	--dm-line: #dbe3ea;
	--dm-soft: #f3f7fb;
	--dm-radius: 10px;
}

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px;
	overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal;
}

/* ---------- buttons ---------- */
.dm-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .4em;
	padding: .7em 1.2em; border: 2px solid transparent; border-radius: 8px;
	font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
	transition: background-color .15s, color .15s, border-color .15s, transform .05s;
}
.dm-btn:active { transform: translateY(1px); }
.dm-btn:focus-visible { outline: 3px solid #f5b400; outline-offset: 2px; }
.dm-btn--primary { background: var(--dm-blue); color: #fff; }
.dm-btn--primary:hover { background: var(--dm-blue-dark); color: #fff; }
.dm-btn--ghost { background: transparent; color: var(--dm-blue); border-color: var(--dm-blue); }
.dm-btn--ghost:hover { background: var(--dm-blue); color: #fff; }
.dm-btn--sm { padding: .5em .85em; font-size: .9rem; }

/* ---------- product grid + cards ---------- */
.dm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 20px; margin: 1.5rem 0; }
.dm-card {
	display: flex; flex-direction: column; background: #fff; border: 1px solid var(--dm-line);
	border-radius: var(--dm-radius); overflow: hidden; transition: box-shadow .2s, transform .2s;
}
.dm-card:hover { box-shadow: 0 8px 24px rgba(20, 40, 60, .12); transform: translateY(-2px); }
.dm-card__media {
	display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1;
	background: #fff; padding: 14px; border-bottom: 1px solid var(--dm-line);
}
.dm-card__media img { width: 100%; height: 100%; object-fit: contain; }
.dm-card__noimg { color: var(--dm-muted); font-size: .85rem; text-align: center; }
.dm-card__body { display: flex; flex-direction: column; gap: 6px; padding: 14px; flex: 1; }
.dm-card__title { margin: 0; font-size: 1rem; line-height: 1.3; }
.dm-card__title a { color: var(--dm-ink); text-decoration: none; }
.dm-card__title a:hover { color: var(--dm-blue); }
.dm-card__price { margin: 0; font-weight: 700; color: var(--dm-ink); }
.dm-card__poa { font-weight: 500; color: var(--dm-muted); }
.dm-card__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }
.dm-muted { color: var(--dm-muted); }

/* ---------- quantity input ---------- */
.dm-qty__input { width: 4.5em; padding: .6em .5em; border: 1px solid var(--dm-line); border-radius: 8px; font: inherit; }

/* ---------- forms ---------- */
.dm-form { max-width: 760px; }
.dm-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .dm-form__row { grid-template-columns: 1fr; gap: 0; } }
.dm-field { margin: 0 0 16px; }
.dm-field label { display: block; margin-bottom: 4px; font-weight: 600; color: var(--dm-ink); }
.dm-field input[type="text"], .dm-field input[type="email"], .dm-field input[type="tel"],
.dm-field select, .dm-field textarea {
	width: 100%; padding: .7em .8em; border: 1px solid #b9c6d2; border-radius: 8px;
	background: #fff; font: inherit; color: var(--dm-ink); box-sizing: border-box;
}
.dm-field input:focus, .dm-field select:focus, .dm-field textarea:focus { outline: 3px solid rgba(20, 113, 184, .3); border-color: var(--dm-blue); }
.dm-field--check label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.dm-field--check input { margin-top: .3em; flex: none; }
.dm-req { color: var(--dm-red); }
.dm-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.dm-form__sub { margin: 0 0 .5rem; font-size: 1.1rem; }

.dm-notice { padding: 14px 16px; border-radius: 8px; margin: 0 0 18px; border: 1px solid; }
.dm-notice--ok { background: #eaf7ee; border-color: #8fd0a1; color: #14532d; }
.dm-notice--err { background: #fdecec; border-color: #f1a3a3; color: #7f1d1d; }

/* ---------- quote list ---------- */
.dm-quote-box { background: var(--dm-soft); border: 1px solid var(--dm-line); border-radius: var(--dm-radius); padding: 16px; margin-bottom: 22px; }
.dm-quote-list { list-style: none; margin: 0; padding: 0; }
.dm-quote-list__row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--dm-line); }
.dm-quote-list__row:last-child { border-bottom: 0; }
.dm-quote-list__name { color: var(--dm-ink); font-weight: 600; text-decoration: none; }
.dm-quote-list__name:hover { color: var(--dm-blue); text-decoration: underline; }
.dm-quote-list__qty { width: 4.5em; padding: .45em .4em; border: 1px solid #b9c6d2; border-radius: 6px; font: inherit; }
.dm-quote-list__remove { background: none; border: 0; color: var(--dm-red); font: inherit; cursor: pointer; text-decoration: underline; padding: .3em; }

/* ---------- toast ---------- */
.dm-toast {
	position: fixed; z-index: 99999; left: 50%; bottom: 24px; transform: translate(-50%, 24px); opacity: 0;
	background: var(--dm-ink); color: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
	transition: opacity .2s, transform .2s; pointer-events: none; max-width: calc(100% - 32px);
}
.dm-toast.is-visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.dm-toast a { color: #8fd0ff; font-weight: 700; margin-left: .4em; }

/* ---------- header quote link + misc ---------- */
.dm-quote-link__count {
	display: inline-block; min-width: 1.5em; padding: 0 .4em; border-radius: 999px; background: var(--dm-red);
	color: #fff; font-size: .8em; line-height: 1.5em; text-align: center; font-weight: 700;
}
.dm-quote-link__count[hidden] { display: none; }
.dm-two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; }
@media (max-width: 800px) { .dm-two-col { grid-template-columns: 1fr; gap: 10px; } }
.dm-map iframe { width: 100%; height: 380px; border: 0; border-radius: var(--dm-radius); }
.dm-contact-details h3 { margin: 1.2em 0 .2em; font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; color: var(--dm-muted); }
.dm-contact-details h3:first-child { margin-top: 0; }
.dm-contact-details p { margin: 0 0 .6em; }
.dm-extra-image { margin: 1rem 0; }
.dm-extra-image img { max-width: 100%; height: auto; border-radius: 8px; }

@media (prefers-reduced-motion: reduce) {
	.dm-btn, .dm-card, .dm-toast { transition: none; }
}
