/* Cjenik i bazna cijena – public price list (also used in the admin for archive snapshots). */
.cj {
    --cj-accent: #ee0000; --cj-accent-ink: #fff; --cj-head: #262626; --cj-head-ink: #fff; --cj-ink: #262626; --cj-muted: #595959;
    --cj-bg: #fff; --cj-zebra: #fafafa; --cj-field: #f2f2f2; --cj-line: #e4e4e4; --cj-page: transparent;
    background: var(--cj-page); color: var(--cj-ink); font-variant-numeric: tabular-nums; line-height: 1.45; position: relative;
}
.cj *, .cj *::before, .cj *::after { box-sizing: border-box; }
.cj-page { padding: 2rem 0 3rem; }
.cj-wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.cj-embed { margin: 0; padding: 16px; background: #fff; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.cj-head { margin-bottom: 1.2rem; }
.cj-title { margin: 0 0 .4rem; padding-left: .7rem; border-left: 5px solid var(--cj-accent); color: var(--cj-ink); font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.2; }
.cj-intro { color: var(--cj-muted); }
.cj-intro > :last-child { margin-bottom: 0; }
.cj-empty { padding: 1rem; background: var(--cj-field); border-radius: 6px; }
.cj-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.cj-search { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 0 0 1rem; }
.cj-search label { flex: 1 1 260px; max-width: 420px; }
.cj-search-input { width: 100%; padding: .6rem .8rem; font: inherit; color: var(--cj-ink); background: var(--cj-bg); border: 1px solid var(--cj-line); border-radius: 6px; }
.cj-search-input:focus { outline: 2px solid var(--cj-accent); outline-offset: 1px; }
.cj-search-info { color: var(--cj-muted); font-size: .9rem; }
.cj-noresult { color: var(--cj-muted); }

.cj-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--cj-line); border-radius: 6px; background: var(--cj-bg); }
.cj-table { width: 100%; border-collapse: collapse; background: var(--cj-bg); font-size: .97rem; }
.cj-table th, .cj-table td { padding: .65rem .8rem; border-bottom: 1px solid var(--cj-line); text-align: left; vertical-align: top; }
.cj-table thead th { background: var(--cj-head); color: var(--cj-head-ink); font-size: .85rem; font-weight: 600; vertical-align: bottom; }
.cj-table thead th small { display: block; font-weight: 400; opacity: .8; font-size: .78rem; }
.cj-table tbody tr.cj-item:nth-child(even) { background: var(--cj-zebra); }
.cj-table tbody tr:last-child td { border-bottom: 0; }
.cj-c-num { text-align: right !important; white-space: nowrap; }
.cj-table thead .cj-c-main { background: var(--cj-accent); color: var(--cj-accent-ink); }
.cj-table td.cj-c-main strong { font-size: 1.05rem; }
.cj-c-sku { white-space: nowrap; color: var(--cj-muted); }
.cj-group th { background: var(--cj-field); color: var(--cj-accent); font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; padding: .5rem .8rem; }
.cj-name { font-weight: 600; display: block; }
.cj-desc { display: block; color: var(--cj-muted); font-size: .86rem; }
.cj-promo { display: inline-block; margin-top: .25rem; padding: .05rem .45rem; border-radius: 99px; background: var(--cj-accent); color: var(--cj-accent-ink); font-size: .74rem; font-weight: 600; }
.cj-base { display: inline-block; }
.cj-base-date { display: block; color: var(--cj-muted); font-size: .78rem; }
.cj-saving { display: inline-block; padding: 0 .35rem; border-radius: 4px; background: var(--cj-accent); color: var(--cj-accent-ink); font-size: .74rem; font-weight: 700; }
.cj-none { color: var(--cj-muted); }
.cj-item[hidden], .cj-group[hidden] { display: none; }

.cj-note { margin-top: 1rem; color: var(--cj-muted); font-size: .86rem; }
.cj-note p { margin: 0 0 .5rem; }
.cj-basis { font-style: italic; }

.cj-files, .cj-archive { margin-top: 2rem; padding-top: 1rem; border-top: 3px solid var(--cj-head); }
.cj-files-title, .cj-archive-title { margin: 0 0 .6rem; font-size: 1.1rem; color: var(--cj-ink); }
.cj-current { margin: .3rem 0; display: flex; flex-wrap: wrap; gap: .3rem .9rem; }
.cj-current span { font-weight: 600; }
.cj-files a, .cj-archive a { color: var(--cj-accent); }
.cj-files-intro, .cj-archive-intro { color: var(--cj-muted); font-size: .88rem; }
.cj-files-list { margin: 0; padding: 0; list-style: none; font-size: .86rem; }
.cj-files-list li { padding: .3rem 0; border-bottom: 1px dashed var(--cj-line); overflow-wrap: anywhere; }
.cj-file { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; }

.cj-archive-list { margin: 0; padding: 0; list-style: none; }
.cj-archive-item { border: 1px solid var(--cj-line); border-radius: 6px; margin-bottom: .4rem; background: var(--cj-bg); }
.cj-archive-item.is-open { background: var(--cj-field); }
.cj-archive-btn { width: 100%; display: flex; align-items: center; gap: .8rem; padding: .6rem .8rem; border: 0; background: none; font: inherit; color: var(--cj-ink); cursor: pointer; text-align: left; }
.cj-archive-date { font-weight: 700; min-width: 7rem; }
.cj-archive-meta { color: var(--cj-muted); font-size: .86rem; flex: 1; }
.cj-archive-arrow { width: .6rem; height: .6rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
.is-open .cj-archive-arrow { transform: rotate(-135deg); }
.cj-archive-body { padding: 0 .8rem .8rem; }
.cj-archive-sign { color: var(--cj-muted); font-size: .8rem; margin: .5rem 0 0; }

.cj-top { position: fixed; right: 16px; bottom: 16px; z-index: 50; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--cj-accent); color: var(--cj-accent-ink); font-size: 1.3rem; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.cj-top[hidden] { display: none; }

/* Phones: every row becomes a card with labels. */
@media (max-width: 700px) {
    .cj-table-wrap { border: 0; background: none; overflow: visible; }
    .cj-table, .cj-table tbody, .cj-table tr, .cj-table td, .cj-table th { display: block; width: 100%; }
    .cj-table thead { display: none; }
    .cj-table tr.cj-item, .cj-table--archive tbody tr { margin-bottom: .6rem; border: 1px solid var(--cj-line); border-radius: 8px; background: var(--cj-bg) !important; overflow: hidden; }
    .cj-table tr.cj-item[hidden] { display: none; }
    .cj-group th { margin: 1rem 0 .4rem; border-radius: 6px; }
    .cj-table td { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem .8rem; border-bottom: 1px solid var(--cj-line); text-align: right; }
    .cj-table td::before { content: attr(data-label); color: var(--cj-muted); font-size: .82rem; text-align: left; flex: 0 0 auto; max-width: 55%; }
    .cj-table td.cj-c-name { display: block; text-align: left; background: var(--cj-field); }
    .cj-table td.cj-c-name::before { display: none; }
    .cj-table td.cj-c-main { background: var(--cj-bg); }
    .cj-table td.cj-c-base { flex-wrap: wrap; }
    .cj-base-date { width: 100%; }
    .cj-c-num { white-space: normal; }
    .cj-archive-btn { flex-wrap: wrap; gap: .2rem .8rem; }
    .cj-archive-meta { flex-basis: 100%; order: 3; }
}

/* --- Shared by the designs A, B and C ------------------------------------------------------ */
.cj--elegant, .cj--cards, .cj--table { padding: clamp(20px, 4vw, 44px) clamp(14px, 3vw, 36px); border-radius: 18px; }
.cj-sub { margin: 0 0 .3rem; color: var(--cj-accent); font-size: .78rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.cj [hidden] { display: none !important; }
.cj-price { font-weight: 700; white-space: nowrap; }
.cj-meta { display: flex; flex-direction: column; gap: .1rem; font-size: .78rem; color: var(--cj-muted); }
.cj-meta b { color: var(--cj-ink); font-weight: 600; }
.cj-nav { display: flex; gap: .5rem; flex-wrap: wrap; }
.cj-chip { font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: .5rem; border: 1px solid var(--cj-line); background: var(--cj-bg); color: var(--cj-ink);
    border-radius: 99px; padding: .42rem .95rem; font-size: .88rem; font-weight: 500; }
.cj-chip.is-on { background: var(--cj-accent); border-color: var(--cj-accent); color: var(--cj-accent-ink); }
.cj-chip:focus-visible { outline: 2px solid var(--cj-accent); outline-offset: 2px; }
.cj-chip small { opacity: .65; font-size: .78rem; }

/* --- A · Elegant (menu style) ---------------------------------------------------------------- */
.cj--elegant { --cj-accent: #a07d4f; --cj-accent-ink: #fff; --cj-ink: #2b2622; --cj-muted: #8a7f75; --cj-bg: #fff; --cj-line: #e9dfd2; --cj-field: #f4ede3; --cj-head: #2b2622; --cj-head-ink: #fff; --cj-zebra: #fbf8f4; --cj-page: #f7f4ef; }
.cj--elegant .cj-top-area { text-align: center; margin-bottom: 1.6rem; }
.cj--elegant .cj-head { margin-bottom: 1rem; }
.cj--elegant .cj-title { border: 0; padding: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.9rem, 4.5vw, 2.7rem); font-weight: 700; }
.cj--elegant .cj-search { justify-content: center; }
.cj--elegant .cj-search-input { border-radius: 99px; padding: .7rem 1.1rem; }
.cj--elegant .cj-sheet { background: var(--cj-bg); border-radius: 18px; padding: clamp(20px, 4vw, 40px); box-shadow: 0 22px 50px -28px rgba(60, 40, 15, .35); max-width: 900px; margin: 0 auto; }
.cj--elegant .cj-sec + .cj-sec { margin-top: 1.8rem; }
.cj--elegant .cj-sec-title { display: flex; align-items: center; gap: .8rem; margin: 0 0 .6rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; color: var(--cj-ink); }
.cj--elegant .cj-sec-title::after { content: ""; flex: 1; height: 1px; background: var(--cj-line); }
.cj--elegant .cj-line { padding: .5rem 0; }
.cj--elegant .cj-line-main { display: flex; align-items: baseline; gap: .6rem; }
.cj--elegant .cj-name { font-weight: 500; display: inline; }
.cj--elegant .cj-dots { flex: 1; min-width: 1.5rem; border-bottom: 2px dotted var(--cj-line); transform: translateY(-4px); }
.cj--elegant .cj-price { font-size: 1.06rem; }
.cj--elegant .cj-line-sub { display: flex; justify-content: space-between; gap: 1rem; }
.cj--elegant .cj-meta { text-align: right; margin-left: auto; }
.cj--elegant .cj-note, .cj--elegant .cj-files, .cj--elegant .cj-archive { max-width: 900px; margin-left: auto; margin-right: auto; }

/* --- B · Modern cards ------------------------------------------------------------------------- */
.cj--cards { --cj-accent: #0f7f86; --cj-accent-ink: #fff; --cj-ink: #0f2a2e; --cj-muted: #5d777b; --cj-bg: #fff; --cj-line: #d5e7e8; --cj-field: #e3f1f2; --cj-head: #0f2a2e; --cj-head-ink: #fff; --cj-zebra: #f6fbfb; --cj-page: #eef7f7; }
.cj--cards .cj-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: 1rem; }
.cj--cards .cj-head { margin: 0; }
.cj--cards .cj-title { border: 0; padding: 0; font-size: clamp(1.8rem, 4vw, 2.4rem); letter-spacing: -.02em; }
.cj--cards .cj-search { margin: 0; flex: 0 1 320px; }
.cj--cards .cj-search label { max-width: none; }
.cj--cards .cj-search-input { border: 0; border-radius: 12px; padding: .75rem 1rem; box-shadow: 0 4px 14px rgba(15, 42, 46, .08); }
.cj--cards .cj-nav { flex-wrap: nowrap; overflow-x: auto; padding: .3rem 0 1rem; scrollbar-width: none; }
.cj--cards .cj-chip { white-space: nowrap; }
.cj--cards .cj-sec { margin-top: 1.2rem; }
.cj--cards .cj-sec-title { display: flex; align-items: center; gap: .5rem; margin: 0 0 .7rem; font-size: 1.08rem; }
.cj-count { font-size: .75rem; font-weight: 600; color: var(--cj-muted); background: var(--cj-field); border-radius: 99px; padding: .1rem .55rem; }
.cj--cards .cj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.cj-card { background: var(--cj-bg); border: 1px solid var(--cj-line); border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
    box-shadow: 0 1px 2px rgba(15, 42, 46, .05), 0 10px 26px -18px rgba(15, 42, 46, .3); }
.cj-card .cj-name { font-weight: 600; line-height: 1.3; }
.cj-card-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: .8rem; }
.cj-card .cj-price { font-size: 1.45rem; color: var(--cj-accent); letter-spacing: -.01em; }
.cj-card .cj-meta { text-align: right; }

/* --- C · Professional table with group menu ----------------------------------------------------- */
.cj--table { --cj-accent: #1f3b8a; --cj-accent-ink: #fff; --cj-ink: #1c2333; --cj-muted: #677189; --cj-bg: #fff; --cj-line: #e7eaf1; --cj-field: #eef2fb; --cj-head: #f8f9fc; --cj-head-ink: #677189; --cj-zebra: #fafbfe; --cj-page: #f3f5f9; }
.cj--table .cj-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; }
.cj--table .cj-aside { position: sticky; top: 20px; align-self: start; }
.cj--table .cj-title { border: 0; padding: 0; font-size: 1.5rem; }
.cj--table .cj-intro { font-size: .9rem; }
.cj--table .cj-nav { flex-direction: column; gap: .15rem; margin-top: 1rem; }
.cj--table .cj-chip { justify-content: space-between; border: 0; border-radius: 8px; background: transparent; padding: .5rem .7rem; text-align: left; }
.cj--table .cj-chip.is-on { background: var(--cj-accent); color: var(--cj-accent-ink); }
.cj--table .cj-search label { max-width: none; }
.cj--table .cj-search-input { border-radius: 10px; }
.cj-box { background: var(--cj-bg); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 3px rgba(28, 35, 51, .08); border: 1px solid var(--cj-line); }
.cj-ptable { width: 100%; border-collapse: collapse; }
.cj-ptable th, .cj-ptable td { padding: .8rem 1rem; border-bottom: 1px solid var(--cj-line); text-align: left; vertical-align: middle; }
.cj-ptable thead th { background: var(--cj-head); color: var(--cj-head-ink); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.cj-ptable thead small { display: block; font-weight: 500; text-transform: none; letter-spacing: 0; }
.cj-ptable .cj-group th { background: var(--cj-field); color: var(--cj-accent); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; padding: .55rem 1rem; }
.cj-ptable .cj-item:hover td { background: var(--cj-zebra); }
.cj-ptable .cj-name { font-weight: 500; }
.cj-ptable .cj-c-base, .cj-ptable .cj-c-low { color: var(--cj-muted); white-space: nowrap; }
.cj-ptable .cj-price { display: inline-block; background: var(--cj-accent); color: var(--cj-accent-ink); border-radius: 8px; padding: .25rem .6rem; }
.cj-ptable tbody tr:last-child td { border-bottom: 0; }

@media (max-width: 760px) {
    .cj--table .cj-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .cj--table .cj-aside { position: static; }
    .cj--table .cj-nav { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .cj--table .cj-chip { background: var(--cj-bg); white-space: nowrap; }
    .cj--table .cj-chip small { display: none; }
    .cj-ptable thead { display: none; }
    .cj-ptable .cj-group th { margin: 0; border-radius: 0; }
    .cj-ptable, .cj-ptable tbody, .cj-ptable tr, .cj-ptable td, .cj-ptable th { display: block; width: 100%; }
    .cj-ptable tr.cj-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .25rem .8rem; padding: .8rem 1rem; border-bottom: 1px solid var(--cj-line); }
    .cj-ptable tr.cj-item td { padding: 0; border: 0; width: auto; }
    .cj-ptable td.cj-c-name { grid-column: 1 / -1; }
    .cj-ptable td.cj-c-base, .cj-ptable td.cj-c-low { grid-column: 1; text-align: left !important; font-size: .8rem; white-space: normal; }
    .cj-ptable td.cj-c-base::before, .cj-ptable td.cj-c-low::before { content: attr(data-label) ": "; }
    .cj-ptable td.cj-c-main { grid-column: 2; grid-row: 2 / span 2; align-self: center; }
    .cj-ptable .cj-base-date { display: none; }
    .cj--elegant .cj-line-sub { flex-direction: column; gap: .1rem; }
    .cj--elegant .cj-meta { text-align: left; margin-left: 0; }
    .cj--cards .cj-grid { grid-template-columns: 1fr; }
    .cj--cards .cj-search { flex-basis: 100%; }
}

@media print {
    .cj--elegant, .cj--cards, .cj--table { background: none; padding: 0; }
    .cj-nav, .cj-aside .cj-nav { display: none !important; }
    .cj--table .cj-layout { display: block; }
    .cj-card { break-inside: avoid; box-shadow: none; }
    .cj [data-cj-item][hidden], .cj [data-cj-sec][hidden] { display: revert !important; }

    .cj-search, .cj-top, .cj-archive, .cj-noresult { display: none !important; }
    .cj-table-wrap { overflow: visible; border: 0; }
    .cj-table { font-size: 10pt; }
    .cj-table thead { display: table-header-group; }
    .cj-table tr { break-inside: avoid; }
    .cj-item[hidden], .cj-group[hidden] { display: table-row !important; }
}
