/*
  CERAMICS DENTAL LAB SHOP, in the site's own design.
  Loaded on the shop page only; every rule starts with .cdl-shop (the pop-ups with
  .cdl-shop__modal). Colours, type and buttons come from the theme (its --c-* tokens,
  Plus Jakarta Sans, .btn); the fallbacks after each var() are the same values.
*/
.cdl-shop { --ink: var(--c-ink, #0E2229); --muted: var(--c-muted, #3A4B52); --line: var(--c-line, #D5E3E7); --tint: var(--c-tint, #E8F5F8); --brand: var(--c-primary, #06768F); --brand-ink: var(--c-primary-dark, #046381); color: var(--ink); }
.cdl-shop *, .cdl-shop__modal * { box-sizing: border-box; }
.cdl-shop img { max-width: 100%; height: auto; display: block; }
.cdl-shop [hidden], .cdl-shop__modal[hidden], .cdl-shop__modal [hidden] { display: none !important; }
.cdl-shop p.cdl-shop__sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cdl-shop a[href^="tel:"] { white-space: nowrap; }

/* the line under the page title: where you are, and the cart */
.cdl-shop__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 2rem; min-height: 44px; }
@media (max-width: 860px) { .cdl-shop__bar { margin-bottom: 1rem; } }
.cdl-shop__crumbs { font-size: .9375rem; font-weight: 650; color: var(--muted); }
.cdl-shop__crumbs a { color: var(--brand-ink); display: inline-flex; min-height: 44px; align-items: center; }
.cdl-shop__cartlink { margin-left: auto; display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; min-width: 44px; padding: 0 1.1rem; border-radius: 999px; border: 2px solid var(--brand); color: var(--brand-ink); font-weight: 700; text-decoration: none; }
.cdl-shop__count { min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--brand); color: #fff; font-size: .8125rem; display: inline-flex; align-items: center; justify-content: center; }

/* the kits */
/* three across, a short last row in the middle (5 kits: 3 + 2) */
.cdl-shop__grid { --g: clamp(1rem, 2.5vw, 1.75rem); display: flex; flex-wrap: wrap; justify-content: center; gap: var(--g); }
.cdl-shop__grid > .cdl-shop__card { flex: 0 1 calc((100% - 2 * var(--g)) / 3); min-width: 0; }
@media (max-width: 760px) { .cdl-shop__grid > .cdl-shop__card { flex-basis: calc((100% - var(--g)) / 2); } }
@media (max-width: 480px) { .cdl-shop__grid > .cdl-shop__card { flex-basis: 100%; } }
.cdl-shop__card { display: grid; grid-template-rows: auto auto 1fr auto; gap: .45rem; padding: 0 0 1.3rem; border-radius: 18px; overflow: hidden; background: #fff; text-decoration: none; color: var(--ink); box-shadow: 0 2px 4px rgba(4, 73, 90, .05), 0 16px 40px rgba(4, 73, 90, .09); transition: transform 300ms cubic-bezier(.23, 1, .32, 1), box-shadow 300ms cubic-bezier(.23, 1, .32, 1); }
.cdl-shop__thumb { display: block; aspect-ratio: 1; background: var(--tint); overflow: hidden; margin-bottom: .6rem; }
.cdl-shop__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms cubic-bezier(.23, 1, .32, 1); }
.cdl-shop__name, .cdl-shop__blurb, .cdl-shop__card .cdl-shop__price { padding: 0 1.25rem; }
.cdl-shop__name { font-size: 1.125rem; font-weight: 750; line-height: 1.3; }
.cdl-shop__blurb { color: var(--muted); line-height: 1.55; }
.cdl-shop__price { font-size: 1.25rem; font-weight: 800; color: var(--brand-ink); }
.cdl-shop__price--ask { font-size: .9375rem; }

/* one kit */
.cdl-shop__product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.cdl-shop__main { aspect-ratio: 1; border-radius: 20px; overflow: hidden; background: var(--tint); }
.cdl-shop__main img { width: 100%; height: 100%; object-fit: cover; }
.cdl-shop__thumbs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .6rem; margin-top: .75rem; }
.cdl-shop__pick { aspect-ratio: 1; padding: 0; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; cursor: pointer; }
.cdl-shop__pick img { width: 100%; height: 100%; object-fit: cover; }
.cdl-shop__pick.is-active { border-color: var(--brand); }
.cdl-shop__sku { margin: 0 0 .5rem; font-size: .9375rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-ink); }
.cdl-shop__info .cdl-shop__price { margin: 0 0 1.2rem; font-size: 1.75rem; }
.cdl-shop__lede { margin: 0 0 1.4rem; font-size: 1.0625rem; line-height: 1.7; color: var(--muted); }
.cdl-shop__specs { list-style: none; margin: 0 0 1.6rem; padding: 0; }
.cdl-shop__specs li { position: relative; padding: .6rem 0 .6rem 1.4rem; border-bottom: 1px solid var(--line); }
.cdl-shop__specs li::before { content: ""; position: absolute; left: 0; top: 1.05rem; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.cdl-shop__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem; }
.cdl-shop__note { margin: 1rem 0 0; color: var(--muted); line-height: 1.6; }
.cdl-shop__note a { color: var(--brand-ink); font-weight: 700; }
@media (max-width: 860px) { .cdl-shop__product { grid-template-columns: minmax(0, 1fr); } .cdl-shop__thumbs { gap: .4rem; } .cdl-shop__main { aspect-ratio: 4 / 3; } }   /* phones: one row of thumbnails, a shorter photo, the order button sooner */

/* buttons are the site's .btn; a few shop sizes */
.cdl-shop .btn, .cdl-shop__modal .btn { min-height: 48px; }
.cdl-shop .cdl-shop__wide { display: flex; width: 100%; margin: 0 0 .6rem; }
.cdl-shop button.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* quantity */
.cdl-shop__qty { display: inline-flex; align-items: center; height: 48px; border: 2px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.cdl-shop__qty button { width: 44px; height: 100%; border: 0; background: #fff; color: var(--ink); font-size: 1.25rem; cursor: pointer; }
.cdl-shop__qty button[disabled] { color: #a9b8bd; cursor: default; }
.cdl-shop__qty input { width: 52px; height: 100%; border: 0; text-align: center; font: inherit; font-weight: 750; color: var(--ink); -moz-appearance: textfield; }
.cdl-shop__qty input::-webkit-outer-spin-button, .cdl-shop__qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cdl-shop__qty:focus-within { border-color: var(--brand); }
.cdl-shop__qty button:focus-visible { outline: 0; background: var(--brand); color: #fff; }
.cdl-shop__qty input:focus-visible { outline: 0; }

/* cart */
.cdl-shop__cart, .cdl-shop__panel { padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.cdl-shop__row { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto 140px; grid-template-areas: "img name qty line" "img remove qty line"; column-gap: 1.2rem; align-items: center; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.cdl-shop__rowimg { grid-area: img; } .cdl-shop__rowimg img { width: 88px; height: 88px; object-fit: cover; border-radius: 12px; background: var(--tint); }
.cdl-shop__rowname { grid-area: name; align-self: end; } .cdl-shop__rowname a { font-weight: 750; color: var(--ink); text-decoration: none; }
.cdl-shop__rowname span { display: block; color: var(--muted); font-size: .9375rem; }
.cdl-shop__row .cdl-shop__qty { grid-area: qty; }
.cdl-shop__rowline { grid-area: line; text-align: right; font-weight: 800; }
.cdl-shop__remove { grid-area: remove; justify-self: start; min-height: 44px; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: .9375rem; text-decoration: underline; cursor: pointer; }
@media (max-width: 760px) {
  .cdl-shop__row { grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "img name remove" "img qty line"; row-gap: .6rem; align-items: start; }
  .cdl-shop__rowimg img { width: 64px; height: 64px; }
  .cdl-shop__remove { justify-self: end; }
}
.cdl-shop__notice { margin: 1rem 0 0; padding: .7rem 1rem; border-radius: 12px; background: var(--tint); }
.cdl-shop__totals { max-width: 440px; margin: 0 0 0 auto; padding-top: 1.2rem; }
.cdl-shop__trow { display: flex; justify-content: space-between; gap: 1.5rem; padding: .4rem 0; }
.cdl-shop__trow.cdl-shop__total { margin-top: .4rem; padding-top: .8rem; border-top: 1px solid var(--line); font-size: 1.25rem; font-weight: 800; }
.cdl-shop__cartactions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .75rem; margin-top: 1.2rem; }
.cdl-shop__empty { padding: 2.5rem 0; text-align: center; } .cdl-shop__empty p { margin: 0 0 1.4rem; }

/* the delivery estimate */
.cdl-shop__eta { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .5rem; margin: 1.2rem 0 0; padding: .6rem .6rem .6rem 1rem; border-radius: 14px; background: var(--tint); line-height: 1.5; }
.cdl-shop__eta::before { content: ""; width: 18px; height: 18px; flex: none; background: var(--brand); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2'%3E%3Cpath d='M12 21s-7-6.2-7-11.5a7 7 0 0 1 14 0C19 14.8 12 21 12 21z'/%3E%3Ccircle cx='12' cy='9.5' r='2.5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2'%3E%3Cpath d='M12 21s-7-6.2-7-11.5a7 7 0 0 1 14 0C19 14.8 12 21 12 21z'/%3E%3Ccircle cx='12' cy='9.5' r='2.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.cdl-shop__eta > span { flex: 1 1 16rem; min-width: 0; }
.cdl-shop__grid ~ .cdl-shop__eta, .cdl-shop--grid .cdl-shop__eta { margin: 0 0 1.5rem; }
.cdl-shop__etabtn { min-height: 44px; padding: 0 .4rem; border: 0; background: none; font: inherit; font-weight: 750; color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* checkout */
.cdl-shop__checkout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 2rem; align-items: start; }
.cdl-shop__checkout--single { grid-template-columns: minmax(0, 640px); justify-content: center; }
@media (max-width: 960px) { .cdl-shop__checkout { grid-template-columns: minmax(0, 1fr); } }
.cdl-shop__panel h3 { margin: 0 0 1.2rem; font-size: 1.5rem; }
.cdl-shop__sumhead { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 0 0 1rem; }
.cdl-shop__sumhead h3 { margin: 0; } .cdl-shop__sumhead a { color: var(--brand-ink); font-weight: 700; }
.cdl-shop__sumrow { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.cdl-shop__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.cdl-shop__field { margin: 0 0 1rem; } .cdl-shop__field--full { grid-column: 1 / -1; }
.cdl-shop__field label { display: block; margin-bottom: .35rem; font-size: .9375rem; font-weight: 650; }
.cdl-shop__field input { width: 100%; padding: .8rem .9rem; border: 1px solid #b9cbd1; border-radius: 12px; font: inherit; font-size: 16px; }
.cdl-shop__field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(6, 118, 143, .14); }
@media (max-width: 480px) { .cdl-shop__fields { grid-template-columns: minmax(0, 1fr); } }
.cdl-shop__paynow, .cdl-shop__order-now { margin-top: 1.5rem; padding-top: 1.3rem; border-top: 1px solid var(--line); }
.cdl-shop__order-now h4 { margin: 0 0 .4rem; font-size: 1.25rem; }
.cdl-shop__paynote { margin: .8rem 0 0; color: var(--muted); line-height: 1.6; }
.cdl-shop__payerror { margin: 0 0 .9rem; padding: .7rem 1rem; border-radius: 12px; background: #fde8ea; color: #8a1020; }
.cdl-shop__testmode { margin: 0 0 .9rem; padding: .5rem .8rem; border-radius: 10px; background: #fff4d6; color: #5c4400; font-weight: 750; text-align: center; }
.cdl-shop__pro { display: flex; align-items: flex-start; gap: .6rem; margin: .3rem 0 1rem; min-height: 44px; cursor: pointer; }
.cdl-shop__pro input { width: 22px; height: 22px; margin-top: .1rem; accent-color: var(--brand); }

/* the page Stripe sends the buyer back to */
.cdl-shop__thanks { max-width: 640px; margin: 0 auto; text-align: center; }
.cdl-shop__ref strong { display: block; font-size: 1.5rem; letter-spacing: .08em; }
.cdl-shop__thanks-order { margin-top: 1.4rem; border-top: 1px solid var(--line); text-align: left; }
.cdl-shop__thanks-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 1.4rem; }

/* pop-ups: added to cart, and where to deliver */
.cdl-shop__modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 1rem; font-family: inherit; }
.cdl-shop__shade { position: absolute; inset: 0; background: rgba(2, 20, 26, .62); animation: cdl-fade 220ms ease; }
.cdl-shop__dialog { position: relative; width: 100%; max-width: 480px; max-height: calc(100dvh - 2rem); overflow-y: auto; padding: 2.2rem 1.8rem 1.6rem; border-radius: 22px; background: #fff; color: var(--c-ink, #0E2229); text-align: center; box-shadow: 0 30px 80px rgba(2, 30, 38, .3); animation: cdl-rise 320ms cubic-bezier(.23, 1, .32, 1); }
.cdl-shop__tick { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 1rem; border-radius: 50%; background: var(--c-primary, #06768F); color: #fff; font-size: 1.6rem; }
.cdl-shop__dialog h3 { margin: 0 0 .5rem; font-size: 1.6rem; }
.cdl-shop__dialog p { margin: 0 0 1.2rem; color: var(--c-muted, #3A4B52); line-height: 1.6; }
.cdl-shop__modal-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
.cdl-shop__close { position: absolute; top: .5rem; right: .5rem; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; font: inherit; color: var(--c-muted, #3A4B52); font-size: 1.8rem; cursor: pointer; }
.cdl-shop__locmsg:empty { display: none; }
.cdl-shop__dialog .cdl-shop__locmsg { font-weight: 650; color: var(--c-primary-dark, #046381); }
.cdl-shop__zip { display: flex; flex-wrap: wrap; align-items: end; justify-content: center; gap: .6rem; margin-top: 1rem; }
.cdl-shop__zip label { width: 100%; font-weight: 650; }
.cdl-shop__zip input { width: 9rem; min-height: 48px; padding: 0 .9rem; border: 1px solid #b9cbd1; border-radius: 12px; font: inherit; font-size: 1.125rem; text-align: center; letter-spacing: .12em; }
.cdl-shop__later { margin-top: .6rem; min-height: 44px; padding: 0 1rem; border: 0; background: none; font: inherit; color: var(--c-muted, #3A4B52); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (max-width: 480px) { .cdl-shop__modal-actions { flex-direction: column; } .cdl-shop__modal-actions .btn { width: 100%; } }
@keyframes cdl-fade { from { opacity: 0; } }
@keyframes cdl-rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }

/* scripts off: no buttons that cannot work; the page says to call instead */
html:not(.js) .cdl-shop__actions, html:not(.js) .cdl-shop__eta { display: none; }

/* focus, hover, motion */
.cdl-shop a:focus-visible, .cdl-shop button:focus-visible, .cdl-shop input:focus-visible, .cdl-shop__modal a:focus-visible, .cdl-shop__modal button:focus-visible, .cdl-shop__modal input:focus-visible { outline: 2px solid var(--c-primary, #06768F); outline-offset: 3px; }
@media (hover: hover) {
  .cdl-shop__card:hover { transform: translateY(-5px); box-shadow: 0 2px 4px rgba(4, 73, 90, .05), 0 26px 54px rgba(4, 73, 90, .16); }
  .cdl-shop__card:hover .cdl-shop__thumb img { transform: scale(1.05); }
  .cdl-shop__qty button:not([disabled]):hover { background: var(--tint); }
  .cdl-shop__cartlink:hover { background: var(--tint); }
}
@media (prefers-reduced-motion: reduce) { .cdl-shop *, .cdl-shop__modal * { animation: none !important; transition: none !important; } }
