/* Plate designer — see plate-designer.js. Styleguide: system-ui, rectangular action buttons, rounded cards. */

.dn-pl-layout { margin-top: 0; margin-bottom: 0; }
.dn-pl-product #container-content-single-product { overflow: visible !important; }
.dn-pl-band {
    background: #f5f6f8;
    box-shadow: 0 0 0 100vmax #f5f6f8;
    clip-path: inset(0 -100vmax);
    margin: 1.5rem 0 1rem;
    padding: 2rem 0 1.75rem;
}
.dn-pl { max-width: 760px; margin: 0 auto 1rem; }
.dn-pl__heading { font-size: 1.5rem; margin: 0 0 1.25rem; text-align: center; }
.dn-pl-step { margin: 0 0 1.25rem; }
.dn-pl-step__label { font-weight: 600; margin: 0 0 .5rem; }
.dn-pl-step__value { font-weight: 400; color: #555; }

/* ---- patterns: chosen one + one row of others + "all" */
.dn-pl-patterns { display: flex; gap: .75rem; align-items: stretch; }
.dn-pl-picked { flex: 0 0 auto; width: 148px; text-align: center; }
.dn-pl-picked__frame { border: 2px solid #8b4513; border-radius: 8px; background: #fff; padding: 4px; }
.dn-pl-picked__img { display: block; width: 100%; height: 120px; object-fit: contain; }
.dn-pl-picked__name { font-size: .85rem; font-weight: 600; margin-top: .3rem; }
.dn-pl-strip { flex: 1 1 auto; min-width: 0; display: flex; gap: 8px; overflow: hidden; align-items: flex-start; }
.dn-pl-strip.is-2rows { flex-wrap: wrap; row-gap: 10px; align-content: flex-start; }
.dn-pl-strip.is-scroll { overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding-bottom: 4px; }
.dn-pl-strip.is-scroll .dn-pl-tile { scroll-snap-align: start; }
.dn-pl-picked[hidden] { display: none; }
.dn-pl-tile {
    flex: 0 0 104px; width: 104px; border: 0; background: none; padding: 0; cursor: pointer; text-align: center; color: inherit;
}
.dn-pl-tile__frame { display: block; border: 1px solid #d8d8d4; border-radius: 8px; background: #fff; padding: 3px; transition: border-color .15s, box-shadow .15s; }
.dn-pl-tile:hover .dn-pl-tile__frame, .dn-pl-tile:focus-visible .dn-pl-tile__frame { border-color: #8b4513; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.dn-pl-tile[aria-checked="true"] .dn-pl-tile__frame { border: 2px solid #8b4513; padding: 2px; }
.dn-pl-tile__img { display: block; width: 100%; height: 76px; object-fit: contain; }
.dn-pl-tile__name { display: block; font-size: .78rem; line-height: 1.2; margin-top: .25rem; }
.dn-pl-allbtn {
    flex: 0 0 auto; width: 96px; border: 1px solid #8b4513; border-radius: 4px; background: #fff; color: #8b4513;
    font-size: .8rem; font-weight: 600; line-height: 1.2; padding: .5rem; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem;
}
.dn-pl-allbtn:hover { background: #8b4513; color: #fff; }
.dn-pl-allbtn__grid {
    width: 22px; height: 22px;
    background:
        linear-gradient(currentColor, currentColor) 0 0 / 9px 9px no-repeat,
        linear-gradient(currentColor, currentColor) 13px 0 / 9px 9px no-repeat,
        linear-gradient(currentColor, currentColor) 0 13px / 9px 9px no-repeat,
        linear-gradient(currentColor, currentColor) 13px 13px / 9px 9px no-repeat;
}
@media (max-width: 575px) {
    .dn-pl-picked { width: 112px; }
    .dn-pl-picked__img { height: 92px; }
    .dn-pl-tile { flex-basis: 84px; width: 84px; }
    .dn-pl-tile__img { height: 62px; }
    .dn-pl-allbtn { width: 76px; font-size: .74rem; }
}
/* the product's fixed set on a phone: the set takes the full width, three in a row, "all" under it */
@media (max-width: 575px) {
    .dn-pl-patterns.is-fixed { flex-wrap: wrap; }
    .dn-pl-patterns.is-fixed .dn-pl-strip.is-2rows { flex: 1 1 100%; }
    .dn-pl-patterns.is-fixed .dn-pl-strip.is-2rows .dn-pl-tile { flex: 0 0 calc((100% - 16px) / 3); width: calc((100% - 16px) / 3); }
    .dn-pl-patterns.is-fixed .dn-pl-strip.is-2rows .dn-pl-tile__img { height: 76px; }
    .dn-pl-patterns.is-fixed .dn-pl-allbtn { flex: 1 1 100%; width: auto; flex-direction: row; padding: .6rem; font-size: .85rem; }
}

/* ---- modal */
.dn-pl-noscroll { overflow: hidden; }
.dn-pl-modal { position: fixed; inset: 0; z-index: 100000; background: rgba(20, 20, 20, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.dn-pl-modal[hidden] { display: none; }
.dn-pl-modal__box { background: #fff; border-radius: 10px; width: min(960px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; padding: 1rem 1.25rem 1.25rem; }
.dn-pl-modal__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .75rem; }
.dn-pl-modal__head h3 { font-size: 1.25rem; margin: 0; }
.dn-pl-modal__close { border: 0; background: none; font-size: 2rem; line-height: 1; width: 44px; height: 44px; cursor: pointer; color: #333; }
.dn-pl-modal__search { margin-bottom: .6rem; }
.dn-pl-modal__tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .75rem; }
.dn-pl-tab { border: 1px solid #ccc; background: #fff; border-radius: 999px; padding: .25rem .8rem; font-size: .85rem; cursor: pointer; }
.dn-pl-tab[aria-selected="true"] { background: #8b4513; border-color: #8b4513; color: #fff; }
.dn-pl-modal__grid { overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; padding: 2px; }
.dn-pl-modal__grid .dn-pl-tile { width: auto; }
.dn-pl-modal__grid .dn-pl-tile__img { height: 110px; }
.dn-pl-modal__none { grid-column: 1 / -1; color: #666; }

/* ---- sizes */
.dn-pl-sizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.dn-pl-size {
    border: 1px solid #cfcfcb; border-radius: 8px; background: #fff; padding: .55rem .5rem; cursor: pointer; text-align: center; color: inherit;
    display: flex; flex-direction: column; gap: .1rem;
}
.dn-pl-size[aria-checked="true"] { border: 2px solid #8b4513; padding: calc(.55rem - 1px) calc(.5rem - 1px); }
.dn-pl-size__key { font-weight: 700; font-size: 1.1rem; }
.dn-pl-size__sub { font-size: .78rem; color: #555; line-height: 1.25; }

/* ---- materials: painted steel | corten | inox (first step; colours only for painted) */
.dn-pl-materials { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.dn-pl-mat {
    display: flex; align-items: center; gap: .55rem; text-align: left; color: inherit; cursor: pointer;
    border: 1px solid #cfcfcb; border-radius: 8px; background: #fff; padding: .5rem .55rem;
}
.dn-pl-mat[aria-checked="true"] { border: 2px solid #8b4513; padding: calc(.5rem - 1px) calc(.55rem - 1px); }
.dn-pl-mat__img { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 2px; border: 1px solid rgba(0,0,0,.15); padding: 1px; background: var(--sw) content-box; overflow: hidden; }
.dn-pl-mat__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dn-pl-mat__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.dn-pl-mat__label { font-weight: 600; font-size: .9rem; }
.dn-pl-mat__price { font-size: .8rem; color: #555; margin-top: .15rem; }
@media (max-width: 575px) {
    .dn-pl-mat { flex-direction: column; text-align: center; gap: .3rem; }
    .dn-pl-mat__label { font-size: .8rem; }
}

/* ---- colours: the shop's squares (pa_kolor swatch images, like woo-variation-swatches "squared") */
.dn-pl-step--colour[hidden] { display: none; }
.dn-pl-colours { display: block; }
.dn-pl-swatches { display: flex; flex-wrap: wrap; gap: .4rem; }
.dn-pl-swatch {
    width: 40px; height: 40px; border-radius: 2px; border: 1px solid rgba(0,0,0,.15); padding: 2px; cursor: pointer;
    background: var(--sw) content-box; overflow: hidden; display: inline-flex;
}
.dn-pl-swatch img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dn-pl-swatch:hover { border-color: #8b4513; }
.dn-pl-swatch[aria-checked="true"] { outline: 2px solid #8b4513; outline-offset: 1px; border-color: #8b4513; }

/* ---- prices: S/M/L under a pattern tile, on the size cards, the price above the buttons */
.dn-pl-sp { display: flex; justify-content: center; gap: 2px; margin-top: .2rem; font-size: .7rem; line-height: 1.15; color: #555; }
.dn-pl-sp__cell { display: flex; flex-direction: column; align-items: center; flex: 1 1 0; min-width: 0; padding: 1px 0; border-radius: 3px; }
.dn-pl-sp__key { font-size: .62rem; color: #888; }
.dn-pl-sp__val { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dn-pl-sp__cell.is-on { background: #f1e7dc; color: #222; font-weight: 700; }
.dn-pl-sp__cell.is-on .dn-pl-sp__key { color: #8b4513; }
.dn-pl-picked .dn-pl-sp { font-size: .78rem; }
.dn-pl-size__price { font-weight: 700; font-size: .95rem; margin-top: .2rem; color: #222; }
.dn-pl-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .6rem; margin: .25rem 0 .9rem; }
.dn-pl-price[hidden] { display: none; }
.dn-pl-price__label { font-size: .95rem; color: #555; }
.dn-pl-price__value { font-size: 2rem; font-weight: 700; color: #222; line-height: 1.1; font-variant-numeric: tabular-nums; }
.dn-pl-price__note { flex-basis: 100%; font-size: .8rem; color: #666; }
.dn-pl-from { white-space: nowrap; }

/* ---- the plate's own product page (template with .dn-plp): one grid, preview left (sticky), steps right */
.dn-plp-head { text-align: center; max-width: 820px; margin: 0 auto 1rem; }
.dn-plp-head .product-title { margin-bottom: .5rem; }
.dn-plp-head .product-short-description { color: #444; }
.dn-plp .dn-pl-band--page { margin-top: .5rem; }
.dn-pl--page { max-width: 1240px; }
.dn-pl--page .dn-pl-buy { display: flex; flex-wrap: wrap; gap: .5rem; align-items: stretch; }
.dn-pl--page .dn-pl-buy .quantity { flex: 0 0 auto; }
.dn-pl--page .dn-pl-buy button[type="submit"], .dn-pl--page .dn-pl-buy .single_add_to_cart_button { flex: 1 1 auto; }
.dn-pl--page .dn-pay { margin-top: 1rem; }
@media (min-width: 992px) {
    .dn-pl--page { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); column-gap: 2.5rem; align-items: start; }
    .dn-pl--page > * { grid-column: 2; }
    .dn-pl--page > .dn-pl__heading { grid-column: 1 / -1; }
    .dn-pl--page > .dn-pl__stage { grid-column: 1; grid-row: 2 / span 30; position: sticky; top: 96px; align-self: start; margin: 0; }
    .dn-pl--page .dn-pl-picked { width: 132px; }
}

/* ---- preview *//* ---- preview */
.dn-pl__stage { position: relative; border-radius: 6px; overflow: hidden; background: #d9d5cc; box-shadow: 0 1px 3px rgba(0,0,0,.08); margin: 0 0 1.25rem; min-height: 120px; }
.dn-pl__canvas { display: block; width: 100%; height: auto; }
.dn-pl__loading {
    position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem;
    background: rgba(244,244,242,.55); color: #5b5b55; font-size: .9rem; opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s .2s;
}
.dn-pl__stage.is-loading .dn-pl__loading { opacity: 1; visibility: visible; transition-delay: .15s, 0s; }
.dn-pl__spinner { width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 3px solid rgba(0,0,0,.12); border-top-color: #6b7c5c; animation: dn-pl-spin .8s linear infinite; }
@keyframes dn-pl-spin { to { transform: rotate(360deg); } }

/* ---- editor */
.dn-pl-field { border: 1px solid #dcdcd8; border-radius: 8px; background: #fff; padding: .6rem .9rem .8rem; margin: 0 0 .75rem; transition: border-color .15s, box-shadow .15s; }
.dn-pl-field.is-focus { border-color: #e89e00; box-shadow: 0 0 0 3px rgba(255, 196, 40, .25); }
.dn-pl-field__legend { float: none; width: auto; font-size: 1rem; font-weight: 600; padding: 0 .3rem; margin: 0 0 .2rem -.3rem; }
.dn-pl-line + .dn-pl-line { margin-top: .7rem; padding-top: .7rem; border-top: 1px dashed #e4e4e0; }
.dn-pl-line__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .25rem; }
.dn-pl-line__label { font-size: .9rem; margin: 0; }
.dn-pl-line__count { font-size: .78rem; color: #777; white-space: nowrap; }
.dn-pl-line__input { font-size: 1.1rem; }
.dn-pl-line__tools { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; margin-top: .45rem; }

.dn-pl-font { position: relative; }
.dn-pl-font__btn {
    min-width: 150px; height: 40px; display: inline-flex; align-items: center; justify-content: space-between; gap: .6rem;
    border: 1px solid #ced4da; border-radius: 4px; background: #fff; padding: 0 .7rem; cursor: pointer; font-size: 1.05rem; color: #222;
}
.dn-pl-font__caret { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid #555; }
.dn-pl-font__list {
    position: absolute; z-index: 50; left: 0; top: calc(100% + 4px); min-width: 100%; max-height: 320px; overflow-y: auto;
    list-style: none; margin: 0; padding: .3rem 0; background: #fff; border: 1px solid #ccc; border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.15);
}
.dn-pl-font__list:focus { outline: none; }
.dn-pl-font__list li { padding: .45rem .9rem; font-size: 1.15rem; cursor: pointer; white-space: nowrap; }
.dn-pl-font__list li:hover, .dn-pl-font__list li.is-hi { background: #f3ede7; }
.dn-pl-font__list li[aria-selected="true"] { color: #8b4513; font-weight: 600; }

.dn-pl-align { display: inline-flex; border: 1px solid #ced4da; border-radius: 4px; overflow: hidden; }
.dn-pl-align__btn { border: 0; background: #fff; color: #444; width: 40px; height: 38px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.dn-pl-align__btn + .dn-pl-align__btn { border-left: 1px solid #ced4da; }
.dn-pl-align__btn[aria-pressed="true"] { background: #8b4513; color: #fff; }

.dn-pl-line__size { display: inline-flex; align-items: center; gap: .5rem; margin: 0; font-size: .85rem; flex: 1 1 200px; }
.dn-pl-line__pct { min-width: 3.2em; text-align: right; font-variant-numeric: tabular-nums; }
.dn-pl-range { flex: 1 1 auto; accent-color: #8b4513; min-width: 90px; }

.dn-pl-syms { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .6rem; }
.dn-pl-sym { width: 34px; height: 34px; border: 1px solid #ced4da; border-radius: 4px; background: #fff; color: #333; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }

.dn-pl-margin { display: flex; align-items: center; gap: .75rem; font-size: .9rem; }
.dn-pl-margin label { margin: 0; white-space: nowrap; }

.dn-pl__msg { margin: .5rem 0 0; font-size: .9rem; min-height: 1.2em; }
.dn-pl__msg.is-warn { color: #8a5a00; }
.dn-pl__msg.is-info { color: #1d4f7a; font-weight: 600; }
.dn-pl__empty { text-align: center; color: #666; }

/* Row 3: the buttons under the designer (the form holds rows 1-3 now, so it is not the theme's flex row). */
.dn-pl-layout form.cart { display: block; margin-top: 0; }
.dn-pl-row3 { max-width: 560px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .5rem; }
.dn-pl-row3 .quantity { display: flex; align-items: center; gap: .6rem; }
.dn-pl-layout .product-cta-helper { text-align: center; }
@media (max-width: 575.98px) {
    .dn-pl-band { margin: 1rem 0 .75rem; padding: 1.25rem 0; }
    .dn-pl-font__btn { min-width: 128px; }
}
.dn-pl-product .product-ask-dimension { display: none !important; }

/* ---- mounting */
.dn-pl-mount { display: grid; gap: .45rem; }
.dn-pl-mountopt {
    display: flex; align-items: flex-start; gap: .65rem; text-align: left; width: 100%;
    border: 1px solid #cfcfcb; border-radius: 8px; background: #fff; padding: .6rem .8rem; cursor: pointer; color: inherit;
}
.dn-pl-mountopt[aria-checked="true"] { border: 2px solid #8b4513; padding: calc(.6rem - 1px) calc(.8rem - 1px); }
.dn-pl-mountopt__dot { flex: 0 0 18px; height: 18px; margin-top: .1rem; border-radius: 50%; border: 2px solid #999; }
.dn-pl-mountopt[aria-checked="true"] .dn-pl-mountopt__dot { border-color: #8b4513; box-shadow: inset 0 0 0 3px #fff; background: #8b4513; }
.dn-pl-mountopt__text { display: flex; flex-direction: column; gap: .1rem; }
.dn-pl-mountopt__label { font-weight: 600; }
.dn-pl-mountopt__note { font-size: .82rem; font-style: italic; color: #666; }
.dn-pl-syms { align-items: center; }
.dn-pl-syms__label { font-size: .82rem; color: #666; margin-right: .2rem; }
.dn-pl-sym { width: 38px; height: 38px; }
.dn-pl-sym:hover { border-color: #8b4513; color: #8b4513; }

/* pattern managers: a pattern with production issues (islands, thin strips) — "!" with the list in the tooltip */
.dn-pl-tile { position: relative; }
.dn-pl-tile__warn { position: absolute; top: 4px; right: 4px; z-index: 2; width: 22px; height: 22px; border-radius: 50%;
  background: #c0392b; color: #fff; font: 700 15px/22px system-ui, sans-serif; text-align: center; cursor: help;
  box-shadow: 0 0 0 2px #fff; }
