/* Mikronet usporedba – boje i pismo teme (Porto). */
:root { --mf-primary: var(--porto-primary-color, #944cf5); --mf-heading: var(--porto-heading-color, #222529); --mf-border: #e7e7e7; --mf-muted: #8a8f98; --mf-good: #1e8e4e; --mf-diff: #f7f2ff; }

/* Gumb na kartici i stranici proizvoda */
.mf-cmp { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; margin: 6px 0 0 6px; padding: 0 12px; border: 1px solid var(--mf-border); border-radius: 0; background: #fff; color: #383f48; font: inherit; font-size: 12px; font-weight: 600; line-height: 1; text-transform: uppercase; letter-spacing: .01em; cursor: pointer; vertical-align: middle; transition: border-color .15s, color .15s, background .15s; white-space: nowrap; }
.mf-cmp:hover { border-color: var(--mf-primary); color: var(--mf-primary); }
.mf-cmp.is-on { border-color: var(--mf-primary); background: var(--mf-diff); color: var(--mf-primary); }
.mf-cmp-ico { flex: none; }
.mf-cmp-single { margin: 12px 0 4px; }
.mf-cmp--single { margin: 0; height: 40px; padding: 0 16px; }
.products .mf-cmp--card { margin-left: 0; }
.product-list-content .mf-cmp--card, .add-links .mf-cmp--card { margin-left: 6px; }

/* Traka s odabranima */
.mf-cmpbar { position: fixed; left: 50%; bottom: 16px; z-index: 9990; width: min(980px, calc(100% - 24px)); transform: translate(-50%, 140%); transition: transform .25s ease; pointer-events: none; }
.mf-cmpbar.is-on { transform: translate(-50%, 0); pointer-events: auto; }
.mf-cmpbar__inner { display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 16px; background: #fff; border: 1px solid var(--mf-border); border-top: 3px solid var(--mf-primary); box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.mf-cmpbar__toggle { flex: none; display: flex; flex-direction: column; align-items: flex-start; padding: 0; border: 0; background: none; color: var(--mf-heading); font: inherit; font-size: 13px; line-height: 1.3; cursor: default; }
.mf-cmpbar__n { color: var(--mf-muted); font-size: 12px; }
.mf-cmpbar__items { display: flex; flex: 1 1 auto; gap: 8px; min-width: 0; margin: 0; padding: 0; list-style: none; }
.mf-cmpbar__item { position: relative; display: flex; align-items: center; gap: 8px; flex: 1 1 0; min-width: 0; margin: 0; padding: 4px 26px 4px 4px; border: 1px solid var(--mf-border); }
.mf-cmpbar__item.is-empty { border-style: dashed; color: var(--mf-muted); }
.mf-cmpbar__img { flex: none; width: 40px; height: 40px; background: #f4f4f4; }
.mf-cmpbar__img img { display: block; width: 40px; height: 40px; object-fit: contain; background: #fff; }
.mf-cmpbar__name { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 12px; line-height: 1.3; color: var(--mf-heading); }
.mf-cmpbar__item.is-empty .mf-cmpbar__name { color: var(--mf-muted); }
.mf-cmpbar__x { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: #f4f4f4; color: #555; font-size: 15px; line-height: 22px; cursor: pointer; }
.mf-cmpbar__x:hover { background: var(--mf-primary); color: #fff; }
.mf-cmpbar__actions { flex: none; display: flex; align-items: center; gap: 10px; }
.mf-cmpbar__go { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 18px; background: var(--mf-primary); color: #fff !important; font-size: 13px; font-weight: 600; text-decoration: none !important; text-transform: uppercase; white-space: nowrap; }
.mf-cmpbar__go:hover { filter: brightness(1.08); }
.mf-cmpbar__go.is-disabled { background: #f4f4f4; color: var(--mf-muted) !important; text-transform: none; font-weight: 500; }
.mf-cmpbar__clear { padding: 0; border: 0; background: none; color: var(--mf-muted); font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; }
body.mf-cmpbar-on { padding-bottom: 90px; }

/* Obavijest */
.mf-toast { position: fixed; left: 50%; bottom: 110px; z-index: 9995; max-width: calc(100% - 32px); padding: 10px 16px; background: #222529; color: #fff; font-size: 13px; line-height: 1.4; transform: translate(-50%, 20px); opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; }
.mf-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Stranica usporedbe */
.mf-compare { --mf-label: 200px; margin: 10px 0 40px; }
.mf-compare.is-loading { opacity: .6; }
.mf-cmp-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-bottom: 16px; }
.mf-cmp-top__count { margin: 0; }
.mf-cmp-top__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.mf-cmp-link { padding: 0; border: 0; background: none; color: var(--mf-primary); font: inherit; font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.mf-cmp-switch { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 600; color: var(--mf-heading); cursor: pointer; }
.mf-cmp-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mf-cmp-switch__ui { position: relative; width: 36px; height: 20px; border-radius: 10px; background: #d5d8dc; transition: background .15s; }
.mf-cmp-switch__ui::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.mf-cmp-switch input:checked + .mf-cmp-switch__ui { background: var(--mf-primary); }
.mf-cmp-switch input:checked + .mf-cmp-switch__ui::after { transform: translateX(16px); }
.mf-cmp-switch input:focus-visible + .mf-cmp-switch__ui { outline: 2px solid var(--mf-primary); outline-offset: 2px; }

.mf-cmp-keys { margin: 0 0 16px; padding: 14px 18px; border-left: 3px solid var(--mf-good); background: #f3faf6; }
.mf-cmp-keys h3 { margin: 0 0 8px; font-size: 15px; }
.mf-cmp-keys ul { margin: 0; padding: 0; list-style: none; }
.mf-cmp-keys li { margin: 3px 0; font-size: 13px; }
.mf-cmp-keys li span { color: var(--mf-muted); }
.mf-cmp-note { margin: 0 0 16px; padding: 12px 16px; background: #f4f4f4; font-size: 13px; }
.mf-cmp-legend { margin: 0 0 10px; font-size: 12px; color: var(--mf-muted); }
.mf-cmp-legend__diff { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; background: var(--mf-diff); border: 1px solid #e3d5fb; }
.mf-cmp-empty { padding: 30px; border: 1px dashed var(--mf-border); text-align: center; }

.mf-cmp-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--mf-border); }
.mf-cmp-table { width: 100%; min-width: calc(var(--mf-label) + var(--mf-n, 2) * 180px); margin: 0 !important; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 13px; }
.mf-cmp-table th, .mf-cmp-table td { padding: 10px 12px; border: 0; border-bottom: 1px solid var(--mf-border); border-left: 1px solid var(--mf-border); vertical-align: top; text-align: left; overflow-wrap: anywhere; background: #fff; }
.mf-cmp-table tr > :first-child { position: sticky; left: 0; z-index: 2; width: var(--mf-label); border-left: 0; background: #fafafa; color: var(--mf-heading); font-weight: 600; box-shadow: 1px 0 0 var(--mf-border); }
.mf-cmp-table tbody th small { display: block; margin-top: 2px; font-weight: 400; font-size: 11px; color: var(--mf-muted); }
.mf-cmp-table thead th { position: relative; vertical-align: top; font-weight: 400; }
.mf-cmp-prod { padding-top: 14px !important; text-align: center !important; }
.mf-cmp-prod__img { display: block; margin: 0 auto 8px; max-width: 150px; }
.mf-cmp-prod__img img { display: block; width: 100%; aspect-ratio: 1/1; object-fit: contain; background: #fff; }
.mf-cmp-prod__name { display: block; margin-bottom: 6px; color: var(--mf-heading) !important; font-size: 14px; font-weight: 600; line-height: 1.35; }
.mf-cmp-prod__price { margin-bottom: 6px; font-size: 16px; font-weight: 600; color: var(--mf-heading); }
.mf-cmp-prod__price .isaw-anchor-price { font-size: 11px !important; }
.mf-cmp-prod__stock { display: inline-block; margin-bottom: 10px; padding: 2px 8px; font-size: 12px; font-weight: 600; }
.mf-cmp-prod__stock.is-instock { background: #e8f6ee; color: var(--mf-good); }
.mf-cmp-prod__stock.is-outofstock { background: #fdecec; color: #c0392b; }
.mf-cmp-prod__stock.is-onbackorder { background: #fff6e0; color: #9a6a00; }
.mf-cmp-prod__cart .button { width: 100%; margin: 0; font-size: 12px; padding: 10px 8px; }
.mf-cmp-prod__cart .added_to_cart { display: block; margin-top: 6px; font-size: 12px; }
.mf-cmp-remove { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; padding: 0; border: 1px solid var(--mf-border); border-radius: 50%; background: #fff; color: #555; font-size: 17px; line-height: 26px; cursor: pointer; }
.mf-cmp-remove:hover { border-color: var(--mf-primary); background: var(--mf-primary); color: #fff; }
.mf-cmp-addcell { vertical-align: middle !important; text-align: center !important; }
.mf-cmp-addcell a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 200px; padding: 10px; border: 1px dashed #cfd3d8; color: var(--mf-primary) !important; font-weight: 600; text-decoration: none !important; }
.mf-cmp-addcell small { color: var(--mf-muted); font-weight: 400; }
.mf-cmp-plus { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--mf-diff); font-size: 24px; line-height: 1; }
.mf-add-col { background: #fff; }

.mf-group th { padding: 9px 12px !important; background: #f4f4f4 !important; color: var(--mf-heading); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.mf-group th:first-child { position: sticky; }
.mf-row.is-diff td, .mf-row.is-diff > th { background: var(--mf-diff); }
.mf-row.is-diff > th { box-shadow: inset 3px 0 0 var(--mf-primary), 1px 0 0 var(--mf-border); }
.mf-row td.is-best { color: var(--mf-good); font-weight: 700; }
.mf-best { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 2px; background: var(--mf-good); color: #fff; font-size: 10px; font-weight: 700; line-height: 1.5; text-transform: uppercase; vertical-align: 1px; }
.mf-row td.is-missing { color: #b8bcc2; }
.mf-cmp-table.only-diff .mf-row.is-same { display: none; }

@media (max-width: 991px) {
	.mf-cmpbar { bottom: 0; width: 100%; }
	.mf-cmpbar__inner { gap: 10px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); border-left: 0; border-right: 0; }
	.mf-cmpbar__item { flex: 0 0 auto; padding: 0; border: 0; }
	.mf-cmpbar__item.is-empty, .mf-cmpbar__name { display: none; }
	.mf-cmpbar__img, .mf-cmpbar__img img { width: 44px; height: 44px; }
	.mf-cmpbar__x { top: -6px; right: -6px; width: 20px; height: 20px; line-height: 20px; font-size: 13px; background: #222529; color: #fff; }
	.mf-cmpbar__clear { display: none; }
	.mf-cmpbar__go { height: 44px; padding: 0 14px; }
	body.mf-cmpbar-on { padding-bottom: 76px; }
	.mf-toast { bottom: 90px; }
	.mf-cmp { height: 40px; }
}
@media (max-width: 600px) {
	.mf-compare { --mf-label: 104px; }
	.mf-cmp-table { min-width: calc(var(--mf-label) + var(--mf-n, 2) * max(124px, (100vw - var(--mf-label) - 34px) / 2)); font-size: 12px; }
	.mf-cmp-table th, .mf-cmp-table td { padding: 8px; }
	.mf-cmp-prod__img { max-width: 96px; }
	.mf-cmp-prod__name { font-size: 12px; }
	.mf-cmp-prod__price { font-size: 14px; }
	.mf-cmp-top__actions { width: 100%; justify-content: space-between; }
	.mf-cmp-addcell a { min-height: 140px; }
}
