/*
 * Public price list — com_bmcjenik on biljnamehanika.hr.
 *
 * Uses the g5_biljna theme tokens (`--bm-*`, declared on :root by the theme
 * stylesheet every page loads). Nothing is restated here: a second copy of the
 * palette is a second place for it to drift.
 *
 * Wide: one table per group — šifra · usluga · cijena s PDV-om · sidrena.
 * Narrow (< 46em): each row becomes a card; the price cells carry their own
 * label from data-label, so the anchor price never loses its date.
 */
.bm-cj { color: var(--bm-text); }

.bm-cj__head { max-width: 60rem; margin-bottom: 2.4rem; }
.bm-cj__title { font-size: clamp(1.6rem, 3vw, 2.3rem); margin: .6rem 0 .8rem; }
.bm-cj__lead { color: var(--bm-muted); font-size: 1.1rem; max-width: 62ch; margin: 0; }

.bm-cj__facts { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.4rem 0 0; padding: 0; list-style: none; }
.bm-cj__facts li { padding: .45rem .9rem; border-radius: 999px; background: var(--bm-mist); color: var(--bm-ink); font-size: .88rem; font-weight: 600; }
.bm-cj__facts li:nth-child(3) { background: var(--bm-sun); }

.bm-cj__empty { padding: 1.2rem 1.4rem; border-radius: var(--bm-r); background: var(--bm-mist); border-left: 4px solid var(--bm-leaf); }

.bm-cj__group { margin-top: 2.2rem; }
.bm-cj__section { font: 700 1.2rem/1.25 var(--bm-display); color: var(--bm-ink); margin: 0 0 .8rem; display: flex; align-items: center; gap: .7rem; }
.bm-cj__section::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--bm-leaf); flex: none; }

.bm-cj__table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--bm-white); border: 1px solid var(--bm-mist); border-radius: var(--bm-r); overflow: hidden; font-size: 1rem; }
.bm-cj__table thead th { background: var(--bm-ink); color: var(--bm-on-ink); font: 700 .78rem/1.3 var(--bm-sans); text-transform: uppercase; letter-spacing: .08em; text-align: left; padding: .85rem 1rem; vertical-align: bottom; }
.bm-cj__table thead th small { display: block; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--bm-sun); font-size: .8rem; margin-top: .15rem; }
.bm-cj__table tbody th, .bm-cj__table tbody td { padding: .9rem 1rem; border-top: 1px solid var(--bm-mist); vertical-align: middle; text-align: left; }
.bm-cj__table tbody tr:first-child th, .bm-cj__table tbody tr:first-child td { border-top: 0; }
.bm-cj__table tbody tr:nth-child(even) { background: var(--bm-paper); }
.bm-cj__table tbody tr:target { background: #FFF6CC; }

.bm-cj__code { width: 5.5rem; }
td.bm-cj__code span { display: inline-block; min-width: 3.2rem; text-align: center; padding: .25rem .5rem; border-radius: 8px; background: var(--bm-mist); color: var(--bm-leaf-d); font: 700 .92rem/1.2 var(--bm-mono); }

.bm-cj__name { font-weight: 600; color: var(--bm-ink); line-height: 1.4; }
.bm-cj__note { display: block; font-weight: 400; color: var(--bm-muted); font-size: .88rem; margin-top: .2rem; }
.bm-cj__sale { display: inline-block; margin-left: .4rem; padding: .1rem .5rem; border-radius: 999px; background: var(--bm-sun); font-size: .75rem; font-weight: 700; }

.bm-cj__num { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; width: 11rem; }
.bm-cj__price strong { font: 800 1.15rem/1.2 var(--bm-display); color: var(--bm-ink); }
.bm-cj__price small, .bm-cj__low30 { display: block; color: var(--bm-muted); font-size: .8rem; }
.bm-cj__anchor { color: var(--bm-muted); font-weight: 600; }
.bm-cj__anchorcol { width: 12rem; }
.bm-cj__ask { color: var(--bm-muted); font-style: italic; }

.bm-cj__foot { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; align-items: flex-end; justify-content: space-between; margin-top: 2.4rem; }
.bm-cj__notes { max-width: 68ch; color: var(--bm-muted); font-size: .95rem; }
.bm-cj__notes p { margin: 0 0 .6rem; }

.bm-cj__data { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; margin-top: 3rem; padding: 2rem; border-radius: var(--bm-r-lg); background: var(--bm-mist); }
.bm-cj__data p { color: var(--bm-muted); font-size: .95rem; margin: .5rem 0 1rem; }
.bm-cj__feeds, .bm-cj__archive { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.bm-cj__feeds a { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: .6rem; align-items: center; padding: .6rem .8rem; border-radius: 12px; background: var(--bm-white); color: var(--bm-text); text-decoration: none; font-size: .82rem; }
.bm-cj__feeds a:hover { outline: 2px solid var(--bm-leaf); }
.bm-cj__feeds b { font: 700 .8rem var(--bm-mono); color: var(--bm-leaf-d); }
.bm-cj__feeds span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--bm-muted); }
.bm-cj__archive { max-height: 15rem; overflow: auto; }
.bm-cj__archive li { display: flex; gap: .8rem; align-items: center; padding: .45rem .8rem; border-radius: 10px; background: var(--bm-white); font-size: .9rem; }
.bm-cj__archive time { font-weight: 700; margin-right: auto; font-variant-numeric: tabular-nums; }
.bm-cj__archive time small { display: block; font-weight: 400; color: var(--bm-muted); font-size: .8rem; }
.bm-cj__archive a { font: 700 .78rem var(--bm-mono); color: var(--bm-leaf-d); }
.bm-cj__muted { font-style: italic; }

@media (max-width: 52em) {
  .bm-cj__data { grid-template-columns: minmax(0, 1fr); padding: 1.4rem; }
}

/* Cards on phones: the header row goes, every price cell labels itself. */
@media (max-width: 46em) {
  .bm-cj__table, .bm-cj__table tbody, .bm-cj__table tr, .bm-cj__table th, .bm-cj__table td { display: block; width: auto; }
  .bm-cj__table { border: 0; background: none; border-radius: 0; overflow: visible; }
  .bm-cj__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .bm-cj__table tbody { display: grid; gap: .7rem; }
  .bm-cj__table tbody tr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .3rem .8rem; padding: 1rem; border: 1px solid var(--bm-mist); border-radius: 16px; background: var(--bm-white) !important; }
  .bm-cj__table tbody th, .bm-cj__table tbody td { padding: 0; border: 0; }
  td.bm-cj__code { grid-row: 1; }
  .bm-cj__name { grid-column: 2; }
  .bm-cj__num { grid-column: 1 / -1; display: flex !important; justify-content: space-between; align-items: baseline; gap: 1rem; width: auto; white-space: normal; text-align: right; }
  .bm-cj__num::before { content: attr(data-label); text-align: left; color: var(--bm-muted); font-size: .82rem; font-weight: 600; }
  .bm-cj__price { margin-top: .5rem; padding-top: .6rem; border-top: 1px dashed var(--bm-line) !important; flex-wrap: wrap; }
  .bm-cj__price small { display: inline; margin-left: .3rem; }
  .bm-cj__ask::before { content: none; }
}
