/* [cazrom_templates] : design template categories , designs , and the pop-up that picks a product.
 * Everything is scoped under .czt so a theme's own link , list and button styles stay out.
 * Same tokens as the products catalog. The phone layout is in cazrom_templates_mobile.css. */

:root:not(#cz) .czt {
    --czt-ink: #16181d; --czt-muted: #5d6470; --czt-line: #dcdfe4; --czt-soft: #f3f4f6;
    --czp-primary: var(--e-global-color-primary, #16181d); --czp-on-primary: #fff;
    box-sizing: border-box; width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 24px 64px;
    color: var(--czt-ink); font-family: inherit; font-size: 15px; line-height: 1.4; text-align: left;
}
:root:not(#cz) .czt *, :root:not(#cz) .czt *::before, :root:not(#cz) .czt *::after { box-sizing: border-box; }
:root:not(#cz) .czt [hidden] { display: none !important; }
:root:not(#cz) .czt ul, :root:not(#cz) .czt ol, :root:not(#cz) .czt li, :root:not(#cz) .czt p, :root:not(#cz) .czt h1, :root:not(#cz) .czt h2 { margin: 0; padding: 0; list-style: none; }
:root:not(#cz) .czt a { color: inherit; }

/* ----- breadcrumbs , title ----- */
:root:not(#cz) .czt .czt-breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; padding: 16px 0 10px; font-size: 13px; }
:root:not(#cz) .czt .czt-breadcrumbs li { display: flex; align-items: center; gap: 6px; }
:root:not(#cz) .czt .czt-breadcrumbs li + li::before { content: "›"; color: var(--czt-muted); }
:root:not(#cz) .czt .czt-breadcrumbs a { text-decoration: underline; text-underline-offset: 2px; }
:root:not(#cz) .czt .czt-breadcrumbs [aria-current] { font-weight: 700; }
:root:not(#cz) .czt-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 22px; }
:root:not(#cz) .czt .czt-title { font-size: clamp(22px, 2.6vw, 34px); line-height: 1.15; font-weight: 800; letter-spacing: -.01em; text-wrap: balance; color: var(--czt-ink); }
:root:not(#cz) .czt .czt-count, :root:not(#cz) .czt .czt-note { font-size: 14px; color: var(--czt-muted); }
:root:not(#cz) .czt .czt-all { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
:root:not(#cz) .czt .czt-all svg { width: 16px; height: 16px; }

/* ----- the grids ----- */
:root:not(#cz) .czt .czt-grid { display: grid; gap: 20px; }
:root:not(#cz) .czt .czt-grid-categories { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
:root:not(#cz) .czt .czt-grid-designs { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }

/* a category : its first design , its name under it */
:root:not(#cz) .czt .czt-tile { display: flex; flex-direction: column; gap: 12px; height: 100%; padding: 10px 10px 14px; border: 1px solid var(--czt-line); border-radius: 16px; background: #fff; text-decoration: none; transition: box-shadow .18s ease, border-color .18s ease; }
:root:not(#cz) .czt .czt-tile:hover, :root:not(#cz) .czt .czt-tile:focus-visible { border-color: #c3c8d0; box-shadow: 0 8px 26px rgba(15, 17, 22, .13); }
:root:not(#cz) .czt .czt-tile-media { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; padding: 18px; border-radius: 10px; background: var(--czt-soft); overflow: hidden; }
:root:not(#cz) .czt .czt-tile-media img { display: block; width: 100%; height: 100%; object-fit: contain; }
:root:not(#cz) .czt .czt-tile-name { padding: 0 4px; text-align: center; font-size: 16px; font-weight: 700; line-height: 1.25; color: var(--czt-ink); }
/* no underline on the name , whatever the theme does to links */
:root:not(#cz) .czt .czt-tile:hover, :root:not(#cz) .czt .czt-tile:focus, :root:not(#cz) .czt .czt-tile:hover .czt-tile-name { text-decoration: none; }

/* a design : the picture alone */
:root:not(#cz) .czt .czt-design, :root:not(#cz) .czt .czt-design:hover, :root:not(#cz) .czt .czt-design:focus, :root:not(#cz) .czt .czt-design:active {
    display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1 / 1; margin: 0; padding: 18px;
    border: 1px solid var(--czt-line); border-radius: 16px; background: #fff; color: inherit; box-shadow: none; cursor: pointer;
    transition: box-shadow .18s ease, border-color .18s ease;
}
:root:not(#cz) .czt .czt-design:hover, :root:not(#cz) .czt .czt-design:focus-visible { border-color: #c3c8d0; box-shadow: 0 8px 26px rgba(15, 17, 22, .13); }
:root:not(#cz) .czt .czt-design img { display: block; width: 100%; height: 100%; object-fit: contain; }
:root:not(#cz) .czt a:focus-visible, :root:not(#cz) .czt button:focus-visible, :root:not(#cz) .czt input:focus-visible { outline: 2px solid var(--czt-ink); outline-offset: 2px; }

/* ----- the pop-up : which product the design goes on ----- */
html:not(#cz).czt-locked { overflow: hidden; }
:root:not(#cz) .czt.czt-pop-holder { max-width: none; margin: 0; padding: 0; }
:root:not(#cz) .czt .czt-pop { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 24px; }
:root:not(#cz) .czt .czt-pop-backdrop { position: absolute; inset: 0; background: rgba(15, 17, 22, .55); }
:root:not(#cz) .czt .czt-dialog {
    position: relative; display: flex; flex-direction: column; width: 100%; max-width: 720px; max-height: min(820px, calc(100vh - 48px));
    background: #fff; border-radius: 20px; box-shadow: 0 24px 70px rgba(15, 17, 22, .3); outline: none; overflow: hidden;
}
:root:not(#cz) .czt .czt-dialog-head { flex: none; display: flex; align-items: center; gap: 14px; padding: 16px 16px 16px 20px; border-bottom: 1px solid var(--czt-line); }
:root:not(#cz) .czt .czt-chosen { flex: none; width: 60px; height: 60px; padding: 5px; object-fit: contain; border: 1px solid var(--czt-line); border-radius: 10px; background: #fff; }
:root:not(#cz) .czt .czt-dialog-titles { flex: 1 1 auto; min-width: 0; }
:root:not(#cz) .czt .czt-dialog-title { font-size: 20px; font-weight: 800; line-height: 1.2; color: var(--czt-ink); }
:root:not(#cz) .czt .czt-dialog-sub { margin-top: 2px; font-size: 13px; color: var(--czt-muted); }
:root:not(#cz) .czt .czt-icon-button, :root:not(#cz) .czt .czt-icon-button:hover, :root:not(#cz) .czt .czt-icon-button:focus, :root:not(#cz) .czt .czt-icon-button:active {
    flex: none; display: grid; place-items: center; width: 38px; height: 38px; margin: 0; padding: 0; border: 0; border-radius: 50%;
    background: none; color: var(--czt-ink); box-shadow: none; cursor: pointer;
}
:root:not(#cz) .czt .czt-icon-button:hover { background: var(--czt-soft); }
:root:not(#cz) .czt .czt-dialog-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; overscroll-behavior: contain; padding: 20px 24px 24px; }
:root:not(#cz) .czt .czt-dialog-body > * { flex: none; }
:root:not(#cz) .czt .czt-search { width: 100%; height: 44px; min-height: 44px; margin: 0; padding: 0 12px; border: 1px solid #c3c8d0; border-radius: 10px; background: #fff; color: var(--czt-ink); font: inherit; font-size: 15px; box-shadow: none; }
:root:not(#cz) .czt .czt-search:focus { border-color: var(--czt-ink); outline: none; }
:root:not(#cz) .czt .czt-cats { flex: none; display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
:root:not(#cz) .czt .czt-cats::-webkit-scrollbar { display: none; }
:root:not(#cz) .czt .czt-pill, :root:not(#cz) .czt .czt-pill:hover, :root:not(#cz) .czt .czt-pill:focus, :root:not(#cz) .czt .czt-pill:active {
    flex: none; margin: 0; padding: 9px 16px; border: 1px solid #c3c8d0; border-radius: 100px; background: #fff; color: var(--czt-ink);
    font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; white-space: nowrap; text-transform: none; letter-spacing: 0; box-shadow: none; cursor: pointer;
}
:root:not(#cz) .czt .czt-pill:hover { border-color: var(--czt-ink); }
:root:not(#cz) .czt .czt-pill.is-selected, :root:not(#cz) .czt .czt-pill.is-selected:hover, :root:not(#cz) .czt .czt-pill.is-selected:focus { background: var(--czt-ink); border-color: var(--czt-ink); color: #fff; }
:root:not(#cz) .czt .czt-subcats .czt-pill { padding: 6px 12px; font-size: 13px; }
:root:not(#cz) .czt .czt-pop-note { font-size: 14px; color: var(--czt-muted); }
:root:not(#cz) .czt .czt-products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
:root:not(#cz) .czt .czt-product { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 10px; border: 1px solid var(--czt-line); border-radius: 14px; background: #fff; text-decoration: none; overflow: hidden; transition: box-shadow .15s ease, border-color .15s ease; }
:root:not(#cz) .czt .czt-product:hover, :root:not(#cz) .czt .czt-product:focus-visible { border-color: #c3c8d0; box-shadow: 0 6px 20px rgba(15, 17, 22, .12); }
:root:not(#cz) .czt .czt-product img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; border-radius: 10px; background: #fff; margin-bottom: 4px; }
:root:not(#cz) .czt .czt-product-brand { font-size: 11px; font-weight: 600; color: var(--czt-muted); text-transform: uppercase; letter-spacing: .04em; overflow-wrap: anywhere; }
:root:not(#cz) .czt .czt-product-name { font-size: 14px; font-weight: 700; line-height: 1.25; color: var(--czt-ink); overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
    :root:not(#cz) .czt * { transition: none !important; }
}
