/* Cidonija - category page UX */
.cid-bp { margin: 6px 0 18px; }
.cid-bp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.cid-bp-title { font-size: 18px; font-weight: 700; color: #222; }
.cid-bp-open { border: 1px solid #07b321; color: #07b321; background: #fff; border-radius: 16px; padding: 4px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.cid-bp-open:hover { background: #07b321; color: #fff; }

/* Popular brands as chips */
.cid-bp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cid-bp-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid #ddd; border-radius: 18px; background: #fff; color: #333; font-size: 14px; font-weight: 600; white-space: nowrap; text-decoration: none; cursor: pointer; }
.cid-bp-chip span { color: #999; font-weight: 400; font-size: 12px; }
.cid-bp-chip:hover, .cid-bp-chip:focus { border-color: #07b321; color: #07b321; text-decoration: none; }
.cid-bp-chip--all { border-color: #07b321; color: #07b321; }

/* "Rādīt visus" button + full list (desktop) */
.cid-bp-expand { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; height: 40px; padding: 0 20px; border: 2px solid #07b321; border-radius: 20px; background: #fff; color: #07b321; font-size: 15px; font-weight: 700; cursor: pointer; }
.cid-bp-expand:hover, .cid-bp-expand[aria-expanded="true"] { background: #07b321; color: #fff; }
.cid-bp-all { margin-top: 14px; padding: 14px 16px; border: 1px solid #e6e6e6; border-radius: 8px; background: #fafafa; }
.cid-bp-all[hidden] { display: none; }
.cid-bp-cols { list-style: none; margin: 0; padding: 0; columns: 5 170px; column-gap: 20px; }
.cid-bp-cols li { break-inside: avoid; padding: 3px 0; font-size: 15px; line-height: 1.5; }
.cid-bp-cols a { color: #337700; }
.cid-bp-count { color: #999; font-size: 12px; }

@media (min-width: 768px) {
  .cid-bp-open, .cid-bp-chip--all { display: none !important; }
  .cid-bp:not(.cid-bp--more) .cid-bp-all { display: none; }
}
@media (max-width: 767px) {
  .cid-bp-title { font-size: 16px; }
  .cid-bp-chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 2px 15px 6px; margin: 0 -15px; scroll-snap-type: x proximity; }
  .cid-bp-chips::-webkit-scrollbar { display: none; }
  .cid-bp-chip { scroll-snap-align: start; height: 34px; padding: 0 12px; font-size: 13px; }
  .cid-bp-expand, .cid-bp-all { display: none !important; }
}

/* Bottom sheet */
.cid-sheet { position: fixed; inset: 0; z-index: 2000; display: none; }
.cid-sheet.is-open { display: block; }
.cid-sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.cid-sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 86vh; height: 86vh; background: #fff; border-radius: 14px 14px 0 0; display: flex; flex-direction: column; box-shadow: 0 -6px 24px rgba(0,0,0,.18); animation: cid-up .2s ease-out; }
@keyframes cid-up { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (min-width: 768px) { .cid-sheet-panel { left: 50%; right: auto; width: 480px; margin-left: -240px; bottom: auto; top: 8vh; height: 80vh; border-radius: 12px; } }
.cid-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 8px; }
.cid-sheet-head strong { font-size: 17px; }
.cid-sheet-close { border: 0; background: #f2f2f2; width: 34px; height: 34px; border-radius: 50%; font-size: 20px; line-height: 34px; padding: 0; cursor: pointer; }
.cid-sheet-search { margin: 0 14px 8px; height: 40px; border: 1px solid #ccc; border-radius: 8px; padding: 0 12px; font-size: 16px; width: calc(100% - 28px); }
.cid-sheet-search:focus { border-color: #07b321; outline: none; box-shadow: 0 0 0 2px rgba(7,179,33,.15); }
.cid-sheet-body { position: relative; flex: 1; display: flex; min-height: 0; }
.cid-sheet-list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 14px 20px; }
.cid-sheet-letter { position: sticky; top: 0; background: #f7f7f7; color: #666; font-weight: 700; font-size: 12px; padding: 3px 8px; margin: 8px -4px 2px; border-radius: 4px; }
.cid-sheet-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 2px; border-bottom: 1px solid #f0f0f0; color: #222; font-size: 15px; text-decoration: none; }
.cid-sheet-item span { color: #999; font-size: 13px; }
.cid-sheet-item:hover, .cid-sheet-item:focus { color: #07b321; text-decoration: none; }
.cid-sheet-index { display: flex; flex-direction: column; justify-content: center; padding: 0 4px; }
.cid-sheet-index button { border: 0; background: none; font-size: 11px; font-weight: 700; color: #07b321; padding: 1px 4px; line-height: 1.3; cursor: pointer; }
.cid-sheet-empty { padding: 20px 2px; color: #888; }
body.cid-noscroll { overflow: hidden; }

/* Sticky bar (mobile) */
.cid-sticky { position: fixed; top: 0; left: 0; right: 0; z-index: 1500; display: flex; gap: 8px; padding: 8px 10px; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.12); transform: translateY(-110%); transition: transform .2s; }
.cid-sticky.is-visible { transform: none; }
.cid-sticky > * { flex: 1 1 0; min-width: 0; height: 38px; border: 1px solid #07b321; border-radius: 19px; background: #fff; color: #07b321; font-weight: 600; font-size: 14px; padding: 0 12px; }
.cid-sticky select { -webkit-appearance: none; appearance: none; text-align: center; text-align-last: center; }
@media (min-width: 768px) { .cid-sticky { display: none; } }

/* Products: 2 per row on mobile */
@media (max-width: 767px) {
  .cid-products { display: flex; flex-wrap: wrap; margin-left: -5px; margin-right: -5px; }
  .cid-products > .product-layout { width: 50% !important; float: none !important; padding-left: 5px; padding-right: 5px; display: flex; }
  .cid-products .product-thumb { flex: 1; display: flex !important; flex-direction: column; height: auto !important; min-height: 0 !important; margin-bottom: 10px; border-radius: 8px; overflow: hidden; }
  .cid-products .product-thumb .image { float: none !important; padding: 8px !important; margin: 0 !important; width: 100% !important; text-align: center; }
  .cid-products .product-thumb .image a { display: flex !important; align-items: center; justify-content: center; height: 150px; width: 100%; }
  .cid-products .product-thumb .image img { display: block; max-height: 150px; max-width: 100%; width: auto !important; height: auto !important; margin: 0 auto !important; object-fit: contain; }
  .cid-products .product-thumb > div:not(.image) { flex: 1; display: flex; flex-direction: column; }
  .cid-products .product-thumb .caption { flex: 1; padding: 0 8px !important; min-height: 0 !important; margin: 0 !important; display: flex; flex-direction: column; }
  .cid-products .product-thumb h4 { font-size: 13px; line-height: 1.35; font-weight: 600; margin: 0 0 4px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .cid-products .product-thumb .caption p { font-size: 12px; margin: 0 0 4px; }
  .cid-products .product-thumb .caption h6 { font-size: 11px; margin: 0 0 4px; color: #888; }
  .cid-products .product-thumb .price { margin-top: auto; margin-bottom: 6px; font-size: 16px; }
  .cid-products .product-thumb .price-tax { display: none; }
  .cid-products .cid-price-spacer { display: none !important; }
  .cid-products .product-thumb .button-group { border: 0 !important; background: none !important; margin: 0 8px 8px !important; width: auto !important; float: none !important; height: auto !important; overflow: visible !important; }
  .cid-products .product-thumb .button-group button { display: flex !important; align-items: center; justify-content: center; gap: 6px; width: 100% !important; max-width: none !important; float: none !important; height: 36px !important; line-height: 1 !important; padding: 0 8px !important; margin: 0 !important; border: 0 !important; border-radius: 18px !important; background: #07b321 !important; color: #fff !important; font-size: 14px !important; font-weight: 600; text-transform: none !important; white-space: nowrap; overflow: hidden; }
  .cid-products .product-thumb .button-group button:hover { background: #058a19 !important; }
  .cid-products .product-thumb .button-group button span { display: none !important; }
  .cid-products .product-thumb .button-group button::after { content: "Ielikt grozā"; }
}

/* Description: collapsed behind one link */
.cid-desc-hidden { display: none !important; }
.cid-desc-more { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: #07b321; font-weight: 600; font-size: 14px; padding: 0; margin: -4px 0 10px; cursor: pointer; }
.cid-desc-more:hover { text-decoration: underline; }
.cid-desc-hr { display: none; }

/* Load more + back to top */
.cid-loadmore-wrap { text-align: center; margin: 6px 0 20px; }
.cid-loadmore { min-width: 220px; height: 44px; border-radius: 22px; border: 0; background: #07b321; color: #fff; font-weight: 700; font-size: 15px; padding: 0 24px; cursor: pointer; }
.cid-loadmore:hover { background: #058a19; }
.cid-loadmore[disabled] { opacity: .7; cursor: wait; }
.cid-loadmore-info { display: block; color: #888; font-size: 12px; margin-top: 6px; }
.cid-pagination-hidden { display: none !important; }
.cid-top { position: fixed; right: 14px; bottom: 18px; z-index: 1400; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #07b321; color: #fff; font-size: 20px; box-shadow: 0 3px 10px rgba(0,0,0,.25); opacity: 0; pointer-events: none; transition: opacity .2s; cursor: pointer; }
.cid-top.is-visible { opacity: 1; pointer-events: auto; }
.cid-bp a:focus-visible, .cid-bp button:focus-visible, .cid-sheet button:focus-visible, .cid-sheet a:focus-visible, .cid-loadmore:focus-visible, .cid-top:focus-visible { outline: 2px solid #095b1c; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .cid-sheet-panel { animation: none; } .cid-sticky, .cid-top { transition: none; } }

/* Sort full width, no "Rādīt" selector (replaced by "Ielādēt vēl") */
.cid-hide { display: none !important; }
@media (max-width: 767px) { .cid-sort-col { width: 100% !important; } }

/* Tighter gap between breadcrumbs and category title */
ul.breadcrumb { margin-bottom: 10px; }
#content > h2:first-child { margin-top: 0; }

/* Few sub-categories (e.g. Smaržas, Matiem): big 2-column buttons on mobile */
@media (max-width: 767px) {
  .cid-bp:not(.cid-bp--more) .cid-bp-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; overflow: visible; margin: 0; padding: 0; }
  .cid-bp:not(.cid-bp--more) .cid-bp-chip { height: auto; min-height: 48px; padding: 8px 12px; border-radius: 10px; font-size: 15px; white-space: normal; line-height: 1.25; justify-content: space-between; text-align: left; }
  .cid-bp:not(.cid-bp--more) .cid-bp-chip span { font-size: 13px; }
}

/* No product counts next to brands / categories */
.cid-bp-chip > span, .cid-bp-count, .cid-sheet-item > span { display: none !important; }
