/* [cazrom_search] : the search bar ( .czs ) and the pop-up every bar on a page shares ( .czs-pop ).
 * Rules are written for both roots at once , and for every state of a control , so a theme's own input
 * and button styles stay out. The phone layout is in cazrom_search_mobile.css. */

:is(.czs, .czs-pop) {
    --czs-ink: #16181d; --czs-muted: #5d6470; --czs-line: #dcdfe4; --czs-soft: #f3f4f6;
    --czp-primary: var(--e-global-color-primary, #16181d); --czp-on-primary: #fff;
    color: var(--czs-ink); font-family: inherit; text-align: left;
}
:is(.czs, .czs-pop) *, :is(.czs, .czs-pop) *::before, :is(.czs, .czs-pop) *::after { box-sizing: border-box; }
.czs-pop[hidden], .czs-pop [hidden] { display: none !important; }
html.czs-locked { overflow: hidden; }

/* ---------- the bar ---------- */
.czs { display: block; width: 100%; max-width: 640px; }
:is(.czs, .czs-pop) .czs-bar {
    display: flex; align-items: center; gap: 4px; width: 100%; height: 50px; margin: 0; padding: 0 5px 0 20px;
    border: 1.5px solid #c9ced6; border-radius: 100px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
:is(.czs, .czs-pop) .czs-bar:hover { border-color: #8f96a1; }
:is(.czs, .czs-pop) .czs-bar:focus-within { border-color: var(--czs-ink); box-shadow: 0 0 0 3px rgba(22, 24, 29, .08); }
:is(.czs, .czs-pop) .czs-input, :is(.czs, .czs-pop) .czs-input:hover, :is(.czs, .czs-pop) .czs-input:focus {
    flex: 1 1 auto; min-width: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; outline: none;
    color: var(--czs-ink); font: inherit; font-size: 16px; font-weight: 500; line-height: 1.2; -webkit-appearance: none; appearance: none;
}
:is(.czs, .czs-pop) .czs-input::placeholder { color: #7b828d; opacity: 1; }
:is(.czs, .czs-pop) .czs-input::-webkit-search-cancel-button, :is(.czs, .czs-pop) .czs-input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
:is(.czs, .czs-pop) button, :is(.czs, .czs-pop) button:hover, :is(.czs, .czs-pop) button:focus, :is(.czs, .czs-pop) button:active {
    margin: 0; padding: var(--czs-pad, 0); border: var(--czs-border, 0); border-radius: var(--czs-radius, 50%);
    background: var(--czs-bg, none); color: var(--czs-color, inherit); box-shadow: none;
    font: inherit; font-size: var(--czs-size, inherit); font-weight: var(--czs-weight, inherit); line-height: 1.2; letter-spacing: 0; text-transform: none; text-decoration: none; cursor: pointer;
}
:is(.czs, .czs-pop) button:focus-visible, :is(.czs, .czs-pop) a:focus-visible { outline: 2px solid var(--czs-ink); outline-offset: 2px; }
:is(.czs, .czs-pop) .czs-submit {
    --czs-bg: var(--czp-primary); --czs-color: var(--czp-on-primary);
    flex: none; display: grid; place-items: center; width: 40px; height: 40px; transition: transform .15s ease;
}
:is(.czs, .czs-pop) .czs-submit:hover { transform: scale(1.06); }
.czs-pop .czs-clear { --czs-color: var(--czs-muted); flex: none; display: grid; place-items: center; width: 34px; height: 34px; }
.czs-pop .czs-clear:hover { --czs-bg: var(--czs-soft); --czs-color: var(--czs-ink); }
.czs-pop .czs-clear svg { width: 18px; height: 18px; }

/* ---------- the pop-up ---------- */
.czs-pop { position: fixed; inset: 0; z-index: 99990; font-size: 15px; line-height: 1.4; }
.czs-backdrop {
    position: absolute; inset: 0; background: rgba(15, 17, 22, .55); opacity: 0; transition: opacity .2s ease;
    -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.czs-panel {
    position: fixed; top: var(--czs-top, 12px); left: var(--czs-left, 12px); display: flex; flex-direction: column;
    width: min(1080px, calc(100vw - 24px)); max-height: calc(100vh - var(--czs-top, 12px) - 12px);
    background: #fff; border-radius: 26px; box-shadow: 0 28px 80px rgba(15, 17, 22, .32); overflow: hidden;
    opacity: 0; transform: translateY(-12px) scale(.97); transform-origin: top center;
    transition: opacity .2s ease, transform .24s cubic-bezier(.2, .9, .3, 1.2);
}
.czs-pop.is-open .czs-backdrop { opacity: 1; }
.czs-pop.is-open .czs-panel { opacity: 1; transform: none; }
.czs-pop.is-closing .czs-panel { transition: opacity .15s ease, transform .15s ease; }
.czs-head { flex: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.czs-head .czs-bar { flex: 1 1 auto; }
.czs-pop .czs-x { --czs-bg: var(--czs-soft); flex: none; display: grid; place-items: center; width: 44px; height: 44px; }
.czs-pop .czs-x:hover { --czs-bg: #e4e6ea; }

.czs-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 22px; padding: 8px 24px 24px; }
.czs-section { display: flex; flex-direction: column; gap: 12px; }
.czs-pop .czs-heading { margin: 0; padding: 0; font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--czs-muted); line-height: 1.2; }
.czs-pop .czs-none { margin: 4px 0 8px; color: var(--czs-muted); font-size: 15px; }

/* searches : bubbles */
.czs-terms { display: flex; flex-wrap: wrap; gap: 8px; }
.czs-pop .czs-term {
    --czs-border: 1px solid var(--czs-line); --czs-radius: 100px; --czs-pad: 9px 16px 9px 12px; --czs-size: 14px; --czs-weight: 600;
    display: inline-flex; align-items: center; gap: 8px; transition: background-color .15s ease;
}
.czs-pop .czs-term:hover { --czs-bg: var(--czs-soft); --czs-border: 1px solid #b9bfc8; }
.czs-pop .czs-term svg { flex: none; width: 16px; height: 16px; color: var(--czp-primary); }

/* categories */
.czs-cats { display: flex; flex-wrap: wrap; gap: 10px; }
.czs-pop .czs-cat {
    display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border-radius: 100px; background: var(--czs-soft);
    color: var(--czs-ink); font-size: 14px; font-weight: 700; text-decoration: none; transition: background-color .15s ease;
}
.czs-pop .czs-cat:hover { background: #e4e6ea; color: var(--czs-ink); text-decoration: none; }
.czs-cat-image { flex: none; display: block; width: 36px; height: 36px; border-radius: 50%; background: #fff; overflow: hidden; }
.czs-cat-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.czs-cat-name:first-child { padding-left: 8px; }
.czs-pop .czs-cat svg { flex: none; width: 14px; height: 14px; color: var(--czs-muted); }

/* products : the catalog's card , smaller. One row , four at most. */
.czs-products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.czs-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 8px 8px 12px; border: 1px solid var(--czs-line); border-radius: 14px; background: #fff; transition: box-shadow .18s ease; }
.czs-card:hover { box-shadow: 0 8px 24px rgba(15, 17, 22, .14); }
.czs-pop .czs-card-media { position: relative; display: block; aspect-ratio: 1 / 1; border-radius: 10px; background: var(--czs-soft); overflow: hidden; }
.czs-card-media img { display: block; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.czs-card-tag { position: absolute; top: 8px; left: 8px; padding: 2px 7px; border-radius: 4px; font-size: 11px; font-weight: 700; line-height: 1.4; }
.czs-swatches { position: relative; z-index: 2; display: flex; align-items: center; gap: 5px; height: 18px; margin: 9px 2px 6px; overflow: hidden; }
/* the same light grey ring as on the products page : one line , a second one when pointed at , nothing black */
.czs-pop .czs-swatch { --czs-bg: var(--czs-swatch, #ccc); --czs-border: 1px solid #d6d8db; flex: none; width: 14px; height: 14px; outline: 0 solid #d6d8db; }
.czs-pop .czs-swatch:hover { outline: 1px solid #d6d8db; outline-offset: 0; }
.czs-overlay { position: absolute; display: block; pointer-events: none; color: #000; }
.czs-overlay[hidden] { display: none; }
.czs-overlay svg, .czs-card-media .czs-overlay img { display: block; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: normal; }
.czs-overlay svg * { fill: currentColor; }
.czs-overlay svg [fill="none"] { fill: none; }
.czs-swatch-more { font-size: 11px; color: var(--czs-muted); }
.czs-pop .czs-card-title { margin: 0 2px; color: var(--czs-ink); font-size: 13.5px; font-weight: 700; line-height: 1.3; text-decoration: none; overflow-wrap: anywhere; }
.czs-pop .czs-card-title:hover { color: var(--czs-ink); text-decoration: none; }
/* the whole card is the link , the swatches stay their own */
.czs-card-title::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }

@media (prefers-reduced-motion: reduce) {
    .czs-panel, .czs-backdrop, :is(.czs, .czs-pop) .czs-submit { transition: none !important; }
    .czs-panel { transform: none; }
}
