/* Price list page: [cws_cjenik_prikaz] and the `pricelist` Elementor widget.
   Markup: CWS_Cjenik_Pricelist::render(). Fonts are inherited from the theme;
   the widget's Style tab writes the --cws-pl-* variables. Three built-in
   layouts (list / table / cards) share the section, nav and note styles; a
   custom theme template (layout "custom") brings its own stylesheet and this
   file only styles the plugin-emitted root. Kit armour at the end. */

.cws-pl{
  --cws-pl-ink:oklch(0.25 0.012 80);
  --cws-pl-muted:oklch(0.52 0.01 80);
  --cws-pl-line:oklch(0.9 0.008 85);
  --cws-pl-accent:oklch(0.52 0.11 245);
  --cws-pl-price:var(--cws-pl-ink);
  --cws-pl-sale:oklch(0.55 0.17 25);
  --cws-pl-anchor:var(--cws-pl-muted);
  --cws-pl-card:#ffffff;
  --cws-pl-head:var(--cws-pl-ink);
  --cws-pl-chip-bg:oklch(0.96 0.006 85);
  --cws-pl-chip-ink:var(--cws-pl-ink);
  --cws-pl-chip-on-bg:var(--cws-pl-ink);
  --cws-pl-chip-on-ink:#ffffff;
  --cws-pl-note-bg:oklch(0.97 0.02 85);
  --cws-pl-gap:56px;
  --cws-pl-row-gap:10px;
  --cws-pl-radius:14px;
  --cws-pl-leader:block;
  --cws-pl-sticky-top:0px;
  --cws-pl-cols:3;
  max-width:1100px;
  margin:0 auto;
  color:var(--cws-pl-ink);
  font-size:16px;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
}
.cws-pl *,.cws-pl *::before,.cws-pl *::after{box-sizing:border-box;}

/* hero */
.cws-pl-title{font-size:clamp(30px,5vw,44px);font-weight:600;letter-spacing:-0.025em;line-height:1.1;margin:0 0 12px;color:var(--cws-pl-ink);text-wrap:pretty;}
.cws-pl-intro{font-size:clamp(15px,2vw,18px);color:var(--cws-pl-muted);margin:0 0 28px;max-width:60ch;text-wrap:pretty;}
.cws-pl-empty{color:var(--cws-pl-muted);margin:0;}
.cws-pl-notice{padding:12px 16px;border:1px dashed var(--cws-pl-line);border-radius:var(--cws-pl-radius);color:var(--cws-pl-muted);font-size:14px;}

/* navigation: chips */
.cws-pl-nav{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 32px;padding:0;list-style:none;}
.cws-pl-nav .cws-pl-chip{display:inline-flex;align-items:center;gap:6px;padding:9px 15px;border-radius:999px;background:var(--cws-pl-chip-bg);color:var(--cws-pl-chip-ink);font-size:14px;font-weight:500;line-height:1.2;text-decoration:none;white-space:nowrap;transition:background-color .18s ease,color .18s ease,transform .18s ease;}
.cws-pl-nav .cws-pl-chip:hover{transform:translateY(-1px);}
.cws-pl-nav .cws-pl-chip.is-active{background:var(--cws-pl-chip-on-bg);color:var(--cws-pl-chip-on-ink);}
.cws-pl-nav .cws-pl-chip .cws-pl-count{font-size:12px;opacity:.65;}
.cws-pl--sticky .cws-pl-nav{position:sticky;top:var(--cws-pl-sticky-top);z-index:5;background:inherit;padding:10px 0;margin-top:-10px;}
.cws-pl--nav-chips.cws-pl--sticky .cws-pl-nav{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent);}
.cws-pl--nav-chips.cws-pl--sticky .cws-pl-nav::-webkit-scrollbar{display:none;}

/* navigation: sidebar */
.cws-pl--nav-sidebar{display:grid;grid-template-columns:minmax(200px,260px) minmax(0,1fr);gap:40px;align-items:start;}
.cws-pl--nav-sidebar .cws-pl-hero{grid-column:1 / -1;}
.cws-pl--nav-sidebar .cws-pl-nav{flex-direction:column;flex-wrap:nowrap;align-items:stretch;gap:2px;margin:0;}
.cws-pl--nav-sidebar .cws-pl-nav .cws-pl-chip{border-radius:10px;justify-content:space-between;background:transparent;padding:9px 12px;white-space:normal;flex-shrink:0;}
.cws-pl--nav-sidebar .cws-pl-nav .cws-pl-chip:hover{background:var(--cws-pl-chip-bg);transform:none;}
.cws-pl--nav-sidebar .cws-pl-nav .cws-pl-chip.is-active{background:var(--cws-pl-chip-on-bg);color:var(--cws-pl-chip-on-ink);}
.cws-pl--nav-sidebar.cws-pl--sticky .cws-pl-nav{top:calc(var(--cws-pl-sticky-top) + 16px);padding:0;margin:0;max-height:calc(100vh - var(--cws-pl-sticky-top) - 32px);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;}
@media (max-width:860px){
  .cws-pl--nav-sidebar{display:block;}
  .cws-pl--nav-sidebar .cws-pl-nav{flex-direction:row;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;gap:8px;margin:0 0 28px;}
  .cws-pl--nav-sidebar .cws-pl-nav::-webkit-scrollbar{display:none;}
  .cws-pl--nav-sidebar .cws-pl-nav .cws-pl-chip{background:var(--cws-pl-chip-bg);border-radius:999px;padding:9px 15px;white-space:nowrap;}
  .cws-pl--nav-sidebar.cws-pl--sticky .cws-pl-nav{position:sticky;top:var(--cws-pl-sticky-top);padding:10px 0;margin-top:-10px;max-height:none;overflow-x:auto;overflow-y:hidden;}
}

/* sections */
.cws-pl-cat{margin:0 0 var(--cws-pl-gap);scroll-margin-top:calc(var(--cws-pl-sticky-top) + 72px);}
.cws-pl-cat:last-child{margin-bottom:0;}
.cws-pl-cat-title{font-size:clamp(22px,3vw,28px);font-weight:600;letter-spacing:-0.02em;line-height:1.2;margin:0 0 6px;color:var(--cws-pl-head);}
.cws-pl-cat-intro{color:var(--cws-pl-muted);margin:0 0 18px;max-width:64ch;}
.cws-pl-cat-title + .cws-pl-items,.cws-pl-cat-title + .cws-pl-table,.cws-pl-cat-title + .cws-pl-cards{margin-top:16px;}
.cws-pl-sub{margin:22px 0 0;scroll-margin-top:calc(var(--cws-pl-sticky-top) + 72px);}
.cws-pl-sub-title{font-size:13px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--cws-pl-muted);margin:0 0 10px;}
.cws-pl-note{margin:14px 0 0;padding:10px 14px;border-radius:calc(var(--cws-pl-radius) * .7);background:var(--cws-pl-note-bg);color:var(--cws-pl-ink);font-size:14px;line-height:1.45;}
.cws-pl-note + .cws-pl-sub{margin-top:26px;}

/* items: list */
.cws-pl-items{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--cws-pl-row-gap);}
.cws-pl-item{display:flex;align-items:baseline;gap:12px;}
.cws-pl-main{min-width:0;flex:0 1 auto;}
.cws-pl-name{font-weight:500;color:var(--cws-pl-ink);}
.cws-pl-name a{color:inherit;text-decoration:none;}
.cws-pl-name a:hover{text-decoration:underline;}
.cws-pl-code{font-size:12px;color:var(--cws-pl-muted);font-variant-numeric:tabular-nums;margin-right:8px;}
.cws-pl-desc{display:block;font-size:14px;color:var(--cws-pl-muted);margin-top:2px;}
.cws-pl-leader{flex:1 1 auto;display:var(--cws-pl-leader);min-width:24px;border-bottom:2px dotted var(--cws-pl-line);transform:translateY(-.35em);}
.cws-pl-priceblock{flex:0 0 auto;text-align:right;white-space:nowrap;display:flex;flex-direction:column;align-items:flex-end;gap:2px;}
.cws-pl-price{font-weight:600;color:var(--cws-pl-price);font-variant-numeric:tabular-nums;}
.cws-pl-unit{font-weight:400;color:var(--cws-pl-muted);font-size:.85em;}
.cws-pl-item.is-sale .cws-pl-price{color:var(--cws-pl-sale);}
.cws-pl-was{font-size:.85em;color:var(--cws-pl-muted);text-decoration:line-through;font-weight:400;}
.cws-pl-sale-label{display:inline-block;font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--cws-pl-sale);margin-left:6px;}
.cws-pl-anchor{font-size:12px;color:var(--cws-pl-anchor);font-variant-numeric:tabular-nums;} /* also .cws-pl-lowest (the 30-day lowest price line carries both classes) */
.cws-pl-unavail{display:inline-block;font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--cws-pl-muted);margin-left:6px;}
.cws-pl-item.is-unavailable .cws-pl-name,.cws-pl-item.is-unavailable .cws-pl-price{color:var(--cws-pl-muted);}
.cws-pl-item.is-unavailable .cws-pl-price{text-decoration:line-through;}
@media (max-width:520px){
  .cws-pl-item{flex-wrap:wrap;}
  .cws-pl-leader{display:none;}
  .cws-pl-priceblock{width:100%;align-items:flex-start;text-align:left;}
}

/* items: table */
.cws-pl-table{width:100%;border-collapse:collapse;background:var(--cws-pl-card);border:1px solid var(--cws-pl-line);border-radius:var(--cws-pl-radius);overflow:hidden;}
.cws-pl-table th,.cws-pl-table td{padding:11px 14px;border-bottom:1px solid var(--cws-pl-line);text-align:left;vertical-align:top;}
.cws-pl-table th{font-size:12px;font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:var(--cws-pl-muted);background:var(--cws-pl-chip-bg);}
.cws-pl-table tr:last-child td{border-bottom:0;}
.cws-pl-table td.cws-pl-td-price,.cws-pl-table th.cws-pl-th-price{text-align:right;white-space:nowrap;}
.cws-pl-table td.cws-pl-td-price .cws-pl-priceblock{align-items:flex-end;}
.cws-pl--table .cws-pl-item.is-unavailable td{color:var(--cws-pl-muted);}
@media (max-width:640px){
  .cws-pl-table th{display:none;}
  .cws-pl-table td{display:block;border-bottom:0;padding:4px 14px;}
  .cws-pl-table td:first-child{padding-top:12px;}
  .cws-pl-table td.cws-pl-td-price{padding-bottom:12px;border-bottom:1px solid var(--cws-pl-line);text-align:left;}
  .cws-pl-table td.cws-pl-td-price .cws-pl-priceblock{align-items:flex-start;}
  .cws-pl-table tr:last-child td.cws-pl-td-price{border-bottom:0;}
}

/* items: cards */
.cws-pl-cards{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(var(--cws-pl-cols),minmax(0,1fr));gap:calc(var(--cws-pl-row-gap) + 6px);}
.cws-pl-cards .cws-pl-item{flex-direction:column;align-items:stretch;gap:10px;padding:18px;background:var(--cws-pl-card);border:1px solid var(--cws-pl-line);border-radius:var(--cws-pl-radius);}
.cws-pl-cards .cws-pl-leader{display:none;}
.cws-pl-cards .cws-pl-priceblock{align-items:flex-start;text-align:left;margin-top:auto;}
.cws-pl-cards .cws-pl-price{font-size:1.15em;}
.cws-pl-cards .cws-pl-image{display:block;width:100%;aspect-ratio:4 / 3;object-fit:cover;border-radius:calc(var(--cws-pl-radius) * .6);margin:-6px 0 4px;}
@media (max-width:900px){.cws-pl-cards{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width:560px){.cws-pl-cards{grid-template-columns:1fr;}}

/* footnote */
.cws-pl-foot{margin:36px 0 0;font-size:13px;color:var(--cws-pl-muted);}

/* ── Elementor kit armour ────────────────────────────────────────────────
   The kit colours every <a> at (0,1,1) and its :hover/:focus at (0,2,1). The
   chips and item links are <a>: re-assert their colour under the root at
   (0,2,0)+, through the --cws-pl-* variables so the Style tab still wins.
   See docs/architecture/elementor-kit-armour.md. */
.cws-pl .cws-pl-nav a.cws-pl-chip,
.cws-pl .cws-pl-nav a.cws-pl-chip:hover,
.cws-pl .cws-pl-nav a.cws-pl-chip:focus{color:var(--cws-pl-chip-ink);text-decoration:none;}
.cws-pl .cws-pl-nav a.cws-pl-chip.is-active,
.cws-pl .cws-pl-nav a.cws-pl-chip.is-active:hover,
.cws-pl .cws-pl-nav a.cws-pl-chip.is-active:focus{color:var(--cws-pl-chip-on-ink);}
.cws-pl .cws-pl-name a,
.cws-pl .cws-pl-name a:hover,
.cws-pl .cws-pl-name a:focus{color:inherit;}
.cws-pl .cws-pl-nav a.cws-pl-chip:focus-visible{outline:2px solid var(--cws-pl-accent);outline-offset:2px;}
