/* ElectroJC catalog-product lane: listing filters, unified card extras, PDP gallery/lightbox, reviews. Base = theme.css (static). */

/* static: only index.html is body.mk-dark; catalog pages are light */
body.mk-dark:has(.mk-oc-catalog) { background: #fff; color: #333; }
body.mk-dark:has(.mk-oc-catalog) .mk-h2 { color: #1a1a1a; font-weight: 600; font-size: 24px; }
body.mk-dark:has(.mk-oc-catalog) .mk-crumbs.breadcrumbs { color: #666; }
body.mk-dark:has(.mk-oc-catalog) .mk-prose a { color: inherit; }
body.mk-dark:has(.mk-oc-catalog) .mk-faq .collapse { border-color: #ddd; color: #333; }
@media (max-width: 640px) { body.mk-dark:has(.mk-oc-catalog) .mk-h2 { font-size: 21px; } }

/* ---- card ---- */
.mk-pcard .mk-price { display: flex; align-items: baseline; justify-content: center; gap: 2px; flex-wrap: nowrap; }
.mk-price .mk-old { font-size: 15px; font-weight: 400; color: #888; margin-right: 8px; white-space: nowrap; }
.mk-pcard .mk-pactions .mk-btn-cart.btn, .mk-pcard .mk-pactions .mk-btn-wish.btn { height: 40px; min-height: 40px; }
.mk-pcard .mk-btn-cart .mk-btn-txt { overflow: hidden; text-overflow: ellipsis; }
.mk-grid > div { display: flex; min-width: 0; }
.mk-grid > div > .mk-pcard { width: 100%; }

/* ---- filters ---- */
.mk-filters .mk-price-range { align-items: center; }
.mk-filters .mk-price-range .input { min-width: 0; padding: 0 10px; font-size: 13px; }
.mk-filters .mk-price-range .mk-dash { color: #999; flex: 0 0 auto; }
.mk-filters input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.mk-filters input[type=number]::-webkit-outer-spin-button, .mk-filters input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mk-filters .input:focus { outline: 2px solid var(--mk-yellow, #f5c518); outline-offset: 0; border-color: var(--mk-yellow, #f5c518); }
.mk-filters .collapse-content { overflow: visible; }
.mk-filters .mk-f-more { display: none; }
.mk-filters .is-expanded .mk-f-more { display: flex; }
.mk-f-toggle { background: none; border: 0; padding: 6px 0 0; font-size: 13px; font-weight: 700; color: #1a1a1a; text-decoration: underline; cursor: pointer; }
.mk-f-links a { display: block; padding: 4px 0; font-size: 13px; color: #333; }
.mk-f-links a:hover { color: #000; text-decoration: underline; }
.mk-f-clear { display: inline-flex; gap: 6px; align-items: center; margin-top: 14px; font-size: 13px; font-weight: 700; color: #c0392b; }
.mk-filters label .checkbox { flex: 0 0 auto; }
.mk-filters-side .mk-drawer-panel { padding-bottom: 24px; }
.mk-filters-side .mk-drawer-head { display: flex; align-items: center; justify-content: space-between; background: var(--mk-graphite, #2e2e2e); color: #fff; padding: 12px 16px; font-weight: 800; text-transform: uppercase; }

/* ---- toolbar / pager ---- */
.mk-toolbar .select { padding-right: 2.4rem; background-position: calc(100% - 18px) calc(1px + 50%), calc(100% - 13px) calc(1px + 50%); }
.mk-toolbar .mk-sorts .select:first-child { min-width: 230px; }
.mk-toolbar .mk-sorts .select:last-child { min-width: 128px; }
.mk-pager.join { flex-wrap: nowrap; max-width: 100%; }
.mk-pager .btn { text-decoration: none; }
.mk-pager .mk-gap { background: #fff; border-color: #ddd; color: #888; }
.mk-found { margin-top: 4px; }
.mk-oc-empty .mk-empty { margin-bottom: 8px; }
.mk-cat-desc { margin-top: 6px; }

/* ---- PDP gallery ---- */
.mk-oc-gallery { min-width: 0; }
.mk-gallery-main .mk-energy-pdp { left: auto; right: 16px; top: 16px; width: 56px; }
.mk-gallery-main .mk-arrow.btn { z-index: 2; }
.mk-oc-thumbs { overflow-x: auto; scroll-behavior: smooth; scroll-snap-type: x mandatory; scrollbar-width: none; }
.mk-oc-thumbs::-webkit-scrollbar { display: none; }
.mk-oc-thumbs button { flex: 0 0 calc((100% - 50px) / 6); width: auto; height: auto; aspect-ratio: 1 / 1; scroll-snap-align: start; padding: 4px; }
.mk-delivery form.join { display: flex; width: 100%; max-width: 100%; }
.mk-delivery form.join .input { flex: 1 1 auto; min-width: 0; width: auto; }
.mk-delivery form.join .btn { flex: 0 0 auto; }
.mk-qty input { color: #111; }
.mk-stock-no { color: #c0392b; font-weight: 800; font-size: 13px; }
.mk-pinfo .mk-price { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }

/* ---- lightbox ---- */
.mk-oc-lightbox { touch-action: pan-y; }
.mk-oc-lightbox .btn { background: #fff; color: #111; border: 0; width: 48px; height: 48px; min-height: 48px; font-size: 18px; box-shadow: 0 2px 12px rgba(0,0,0,.4); }
.mk-oc-lightbox .btn:hover { background: var(--mk-yellow, #f5c518); color: #000; }
.mk-oc-lightbox .mk-lb-close { top: 16px; right: 16px; }
.mk-oc-lightbox .mk-lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.mk-oc-lightbox .mk-lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.mk-oc-lightbox .mk-lb-count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 14px; font-weight: 700; }

/* ---- tabs / specs / reviews ---- */
.mk-ptabs { max-width: 100%; }
.mk-specs th, .mk-specs td { overflow-wrap: anywhere; }
.mk-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.mk-form .mk-lbl { display: block; margin: 12px 0 4px; font-size: 13px; font-weight: 700; }
.mk-form .input, .mk-form .textarea { width: 100%; }
.mk-form .mk-rate label { font-size: 26px; }
.mk-reviews { display: grid; gap: 12px; margin-bottom: 16px; }
.mk-review { border: 1px solid #eee; border-radius: 10px; padding: 14px 16px; background: #fff; }
.mk-review-head { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.mk-review-head span { color: #888; font-size: 12px; }
.mk-review p { margin-top: 6px; font-size: 14px; line-height: 1.5; }
.mk-stars .is-off { color: #ddd; }
.mk-stars-sm { font-size: 12px; }
.mk-rv-pager .pagination { display: inline-flex; list-style: none; padding: 0; margin: 0 0 16px; border: 1px solid #ddd; border-radius: 30px; overflow: hidden; }
.mk-rv-pager .pagination li a, .mk-rv-pager .pagination li span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 10px; background: #fff; color: #111; font-weight: 700; border-left: 1px solid #ddd; }
.mk-rv-pager .pagination li:first-child a, .mk-rv-pager .pagination li:first-child span { border-left: 0; }
.mk-rv-pager .pagination li.active span, .mk-rv-pager .pagination li.active a { background: var(--mk-yellow, #f5c518); }

/* ---- related carousel ---- */
.mk-oc-related .mk-viewport { overflow: hidden; }

@media (max-width: 1023px) {
  .mk-toolbar .mk-sorts .select:first-child, .mk-toolbar .mk-sorts .select:last-child { min-width: 0; }
}
@media (max-width: 640px) {
  .mk-pcard .mk-pactions .mk-btn-cart.btn, .mk-pcard .mk-pactions .mk-btn-wish.btn { height: 36px; min-height: 36px; }
  .mk-price .mk-old { font-size: 12px; margin-right: 4px; }
  .mk-pcard .mk-price { flex-wrap: wrap; }
  .mk-oc-thumbs button { flex-basis: calc((100% - 50px) / 6); padding: 2px; }
  .mk-ptabs.tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mk-ptabs .tab { padding: 0 4px; font-size: 13px; }
  .mk-specs th { width: 42%; }
  .mk-specs th, .mk-specs td { padding: 8px; font-size: 13px; }
  .mk-oc-lightbox .btn { width: 42px; height: 42px; min-height: 42px; }
  .mk-oc-lightbox .mk-lb-prev { left: 8px; } .mk-oc-lightbox .mk-lb-next { right: 8px; }
  .mk-pager .btn { min-width: 36px; padding: 0 8px; }
}
