/*
Theme Name: Metalis
Theme URI: https://metalis.hr/
Author: Metalis Migration
Author URI: https://metalis.hr/
Description: Industrial product-catalog WordPress theme for Metalis d.o.o. — clean, responsive, Polylang-ready, built to display the imported Joomla content (cable-tray product pages, spec tables, news, contact). Recreates the metalis.hr look: white header, dark slate text, sky-blue accent, dark footer.
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: metalis
Tags: industrial, business, catalog, multilingual, custom-menu, featured-images, threaded-comments, translation-ready
*/

:root {
  --ml-dark: #2b2f3b;
  --ml-darker: #1f2330;
  --ml-accent: #22b8f0;
  --ml-accent-dark: #1598c9;
  --ml-primary: #1e6cb7;
  --ml-text: #373737;
  --ml-muted: #6b7280;
  --ml-bg: #ffffff;
  --ml-bg-soft: #f5f5f5;
  --ml-border: #e8e8e8;
  --ml-radius: 6px;
  --ml-max: 1200px;
  --ml-header-h: 88px;
  --font: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-headings: "Inter", "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Reset-lite */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ml-text);
  background: var(--ml-bg);
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--ml-accent-dark); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--ml-accent); }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ml-dark);
  margin: 0 0 .6em;
  -webkit-font-smoothing: antialiased;
}
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: clamp(1.15rem, 2.4vw, 1.45rem); }
h4 { font-size: 1.15rem; }
p { margin: 0 0 1.2em; }
ul, ol { margin: 0 0 1.2em 1.3em; padding: 0; }
li { margin: 0 0 .4em; }
blockquote { margin: 0 0 1.2em; padding: .8em 1.2em; border-left: 4px solid var(--ml-accent); background: var(--ml-bg-soft); color: var(--ml-muted); }
hr { border: 0; border-top: 1px solid var(--ml-border); margin: 2em 0; }

/* Layout */
.ml-container { max-width: var(--ml-max); margin: 0 auto; padding: 0 24px; }
.site-main { padding: 48px 0 80px; }
@media (max-width: 767px) { .site-main { padding: 28px 0 56px; } }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--ml-bg);
  border-bottom: 1px solid var(--ml-border);
  box-shadow: 0 2px 12px rgba(43,47,59,.05);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--ml-header-h); gap: 24px;
}
.site-brand a { display: inline-flex; align-items: center; }
.site-brand img { max-height: 64px; width: auto; display: block; }
.site-name { font-size: 1.3rem; font-weight: 700; color: var(--ml-dark); letter-spacing: .02em; }
.site-name .accent { color: var(--ml-accent); }

/* Navigation */
.main-nav { display: flex; align-items: center; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav li { position: relative; margin: 0; }
.main-nav a {
  display: block; padding: 14px 16px;
  font-size: .94rem; font-weight: 600;
  color: var(--ml-dark); letter-spacing: .01em;
  border-radius: var(--ml-radius);
}
.main-nav a:hover, .main-nav .current-menu-item > a { color: var(--ml-accent); background: rgba(34,184,240,.08); }
.main-nav .sub-menu {
  position: absolute; top: 100%; left: 0;
  min-width: 220px; background: #fff;
  border: 1px solid var(--ml-border); border-radius: var(--ml-radius);
  box-shadow: 0 12px 30px rgba(43,47,59,.12);
  flex-direction: column; gap: 0;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: all .2s ease; padding: 6px 0;
}
.main-nav li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.main-nav .sub-menu a { padding: 10px 16px; border-radius: 0; }
.main-nav .sub-menu a:hover { background: var(--ml-bg-soft); }

/* Language switcher (Polylang) */
.lang-switch { display: flex; align-items: center; gap: 6px; margin-left: 8px; }
.lang-switch a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 30px; padding: 0 6px;
  font-size: .8rem; font-weight: 700; color: var(--ml-dark);
  border: 1px solid var(--ml-border); border-radius: 4px; text-transform: uppercase;
}
.lang-switch a.current, .lang-switch a:hover { background: var(--ml-accent); color: #fff; border-color: var(--ml-accent); }

/* Mobile menu toggle */
.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; background: none; border: 1px solid var(--ml-border);
  border-radius: var(--ml-radius); cursor: pointer;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ml-dark); position: relative; }
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--ml-dark);
}
.nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 991px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: fixed; top: var(--ml-header-h); left: 0; right: 0; bottom: 0;
    background: #fff; flex-direction: column; align-items: stretch;
    padding: 16px; overflow-y: auto; transform: translateX(100%); transition: transform .25s ease;
    border-top: 1px solid var(--ml-border);
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; width: 100%; gap: 0; }
  .main-nav a { padding: 14px 8px; border-bottom: 1px solid var(--ml-border); border-radius: 0; }
  .main-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding-left: 16px; display: none; }
  .main-nav .menu-item-has-children.open > .sub-menu { display: flex; }
  .lang-switch { margin: 8px 0 0; }
}

/* Breadcrumb */
.breadcrumbs { font-size: .85rem; color: var(--ml-muted); margin-bottom: 20px; }
.breadcrumbs a { color: var(--ml-muted); }
.breadcrumbs a:hover { color: var(--ml-accent); }
.breadcrumbs .sep { margin: 0 .4em; opacity: .5; }

/* Page header */
.page-header { margin-bottom: 36px; padding-bottom: 18px; border-bottom: 3px solid var(--ml-accent); }
.page-title { margin: 0; }
.entry-meta { font-size: .85rem; color: var(--ml-muted); margin-top: 6px; }

/* Content typography (block-editor + classic) */
.entry-content { font-size: 16px; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content h3 { margin-top: 1.4em; }
.entry-content img { border-radius: var(--ml-radius); margin: 1em 0; }
.entry-content img.alignleft { float: left; margin: .4em 1.2em 1em 0; }
.entry-content img.alignright { float: right; margin: .4em 0 1em 1.2em; }
.entry-content img.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.entry-content .aligncenter { display: block; margin: 1em auto; }
.entry-content figure { margin: 1em 0; }
.entry-content figcaption { font-size: .85rem; color: var(--ml-muted); text-align: center; margin-top: .4em; }
.entry-content ul, .entry-content ol { margin-left: 1.4em; }
.entry-content li { margin-bottom: .35em; }
.entry-content a { text-decoration: underline; text-decoration-color: rgba(34,184,240,.4); text-underline-offset: 2px; }
.entry-content a:hover { text-decoration-color: var(--ml-accent); }
.entry-content .wp-block-button > a, .entry-content .btn {
  display: inline-block; padding: 12px 26px; background: var(--ml-accent); color: #fff;
  font-weight: 600; border-radius: var(--ml-radius); text-decoration: none; transition: background .2s;
}
.entry-content .wp-block-button > a:hover, .entry-content .btn:hover { background: var(--ml-accent-dark); color: #fff; }

/* Spec / product tables — the heart of a cable-tray catalog */
.entry-content table, .ml-table {
  width: 100%; border-collapse: collapse; margin: 1.4em 0;
  font-size: .92rem; background: #fff; box-shadow: 0 1px 3px rgba(43,47,59,.06);
  border: 1px solid var(--ml-border); border-radius: var(--ml-radius); overflow: hidden;
}
.entry-content table th, .ml-table th {
  background: var(--ml-dark); color: #fff; text-align: left;
  padding: 12px 14px; font-weight: 600; font-size: .85rem; letter-spacing: .02em; text-transform: uppercase;
  border-bottom: 2px solid var(--ml-accent);
}
.entry-content table td, .ml-table td { padding: 11px 14px; border-top: 1px solid var(--ml-border); vertical-align: top; }
.entry-content table tr:nth-child(even) td, .ml-table tr:nth-child(even) td { background: var(--ml-bg-soft); }
.entry-content table tr:hover td, .ml-table tr:hover td { background: rgba(34,184,240,.06); }
.entry-content table thead th { border-bottom: 2px solid var(--ml-accent); }
@media (max-width: 640px) {
  .entry-content table, .ml-table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
}

/* Featured image */
.entry-thumb { margin-bottom: 28px; border-radius: var(--ml-radius); overflow: hidden; }
.entry-thumb img { display: block; width: 100%; }

/* Cards / product grid (used by front-page and archive) */
.ml-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.ml-card {
  background: #fff; border: 1px solid var(--ml-border); border-radius: var(--ml-radius);
  overflow: hidden; transition: transform .2s ease, box-shadow .2s ease;
}
.ml-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(43,47,59,.14); border-color: var(--ml-accent); }
.ml-card-img { aspect-ratio: 16/11; overflow: hidden; background: var(--ml-bg-soft); }
.ml-card-img img { width: 100%; height: 100%; object-fit: cover; }
.ml-card-body { padding: 18px 18px 20px; }
.ml-card-body h3 { margin: 0 0 .35em; font-size: 1.1rem; }
.ml-card-body h3 a { color: var(--ml-dark); }
.ml-card-body h3 a:hover { color: var(--ml-accent); }
.ml-card-body p { font-size: .9rem; color: var(--ml-muted); margin: 0; }
.ml-card-more { display: inline-block; margin-top: 10px; font-size: .85rem; font-weight: 600; color: var(--ml-accent-dark); }

/* Section title */
.ml-section-title { text-align: center; margin-bottom: 36px; }
.ml-section-title h2 { margin-bottom: 8px; }
.ml-section-title p { color: var(--ml-muted); margin: 0; }
.ml-section-title::after {
  content: ""; display: block; width: 60px; height: 3px; background: var(--ml-accent);
  margin: 14px auto 0; border-radius: 2px;
}

/* Hero (front page) */
.hero {
  background: linear-gradient(135deg, var(--ml-dark) 0%, var(--ml-darker) 100%);
  color: #fff; padding: 80px 0; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -10%; top: -30%; width: 50%; height: 160%;
  background: radial-gradient(circle, rgba(34,184,240,.25), transparent 60%);
}
.hero-inner { position: relative; z-index: 1; max-width: 760px; }
.hero h1 { color: #fff; margin-bottom: .4em; }
.hero p { font-size: 1.1rem; color: rgba(255,255,255,.85); margin-bottom: 1.4em; }
.hero .btn-primary {
  display: inline-block; padding: 14px 30px; background: var(--ml-accent); color: #fff;
  font-weight: 600; border-radius: var(--ml-radius); transition: background .2s;
}
.hero .btn-primary:hover { background: var(--ml-accent-dark); color: #fff; }
.hero .btn-ghost {
  display: inline-block; padding: 14px 30px; margin-left: 10px; border: 1px solid rgba(255,255,255,.4);
  color: #fff; font-weight: 600; border-radius: var(--ml-radius);
}
.hero .btn-ghost:hover { border-color: var(--ml-accent); color: var(--ml-accent); }

/* Feature band */
.feature-band { background: var(--ml-bg-soft); padding: 56px 0; }
.feature-band .ml-grid { margin-top: 8px; }

/* Archive / blog */
.archive-header { margin-bottom: 36px; }
.posts-list { display: grid; gap: 28px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.post-card { background: #fff; border: 1px solid var(--ml-border); border-radius: var(--ml-radius); overflow: hidden; }
.post-card .post-thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.post-card .post-body { padding: 18px 20px 22px; }
.post-card .post-date { font-size: .78rem; color: var(--ml-accent-dark); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.post-card h3 { margin: 6px 0 8px; font-size: 1.2rem; }
.post-card h3 a { color: var(--ml-dark); }
.post-card h3 a:hover { color: var(--ml-accent); }
.post-card p { font-size: .9rem; color: var(--ml-muted); margin: 0 0 10px; }

/* Pagination */
.ml-pagination { margin-top: 48px; display: flex; gap: 6px; justify-content: center; }
.ml-pagination a, .ml-pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px; border: 1px solid var(--ml-border);
  border-radius: var(--ml-radius); font-weight: 600; font-size: .9rem; color: var(--ml-dark);
}
.ml-pagination a:hover, .ml-pagination .current { background: var(--ml-accent); color: #fff; border-color: var(--ml-accent); }

/* Footer */
.site-footer { background: var(--ml-dark); color: rgba(255,255,255,.85); padding: 56px 0 0; }
.site-footer a { color: rgba(255,255,255,.75); }
.site-footer a:hover { color: var(--ml-accent); }
.footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.1); }
@media (max-width: 767px) { .footer-cols { grid-template-columns: 1fr; gap: 28px; } }
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer-col p, .footer-col li { font-size: .9rem; color: rgba(255,255,255,.7); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 6px; }
.footer-brand img { max-height: 54px; margin-bottom: 14px; filter: brightness(0) invert(1); }
.site-footer .footer-bottom { padding: 20px 0; font-size: .85rem; color: rgba(255,255,255,.55); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* 404 / no-results */
.ml-box { text-align: center; padding: 60px 24px; }
.ml-box .big { font-size: 4rem; font-weight: 700; color: var(--ml-accent); line-height: 1; margin-bottom: 10px; }

/* Contact blocks */
.ml-contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; margin: 1.4em 0; }
.ml-contact-item { background: var(--ml-bg-soft); border-radius: var(--ml-radius); padding: 22px; }
.ml-contact-item h4 { margin: 0 0 8px; color: var(--ml-dark); }
.ml-contact-item .ic { color: var(--ml-accent); font-size: 1.4rem; margin-bottom: 8px; display: inline-block; }

/* Screen-reader / a11y */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ml-accent); color: #fff; padding: 10px 18px; z-index: 200; border-radius: 0 0 var(--ml-radius) 0; }
.skip-link:focus { left: 0; }

/* WordPress core align classes */
.alignleft { float: left; }
.alignright { float: right; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text, .gallery-caption { font-size: .85rem; color: var(--ml-muted); text-align: center; }
.size-auto, .size-full, .size-large, .size-medium { max-width: 100%; height: auto; }

/* WooCommerce technical catalogue */
.single-product .site-main { padding-top: 28px; }
.ml-product-shell { max-width: 1320px; }
.ml-product-hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  gap: 64px; align-items: start; padding: 20px 0 56px;
}
.ml-product-gallery { position: sticky; top: calc(var(--ml-header-h) + 24px); min-width: 0; }
.ml-product-gallery .woocommerce-product-gallery { width: 100% !important; float: none !important; margin: 0 !important; }
.ml-product-gallery .woocommerce-product-gallery__wrapper {
  margin: 0; border: 1px solid var(--ml-border); background: var(--ml-bg); min-height: 520px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: none !important;
}
.ml-product-gallery .woocommerce-product-gallery__image {
  width: 100%;
  box-shadow: none !important;
  transform: none !important;
  transition: none !important;
}
.ml-product-gallery .woocommerce-product-gallery__image:hover,
.ml-product-gallery .woocommerce-product-gallery__image img:hover {
  box-shadow: none !important;
  transform: none !important;
}
.ml-product-gallery .woocommerce-product-gallery__image img { width: 100%; max-height: 600px; object-fit: contain; padding: 30px; }
.ml-product-gallery .flex-control-thumbs { display: flex; gap: 10px; list-style: none; margin: 12px 0 0; padding: 0; }
.ml-product-gallery .flex-control-thumbs li {
  width: 76px !important; margin: 0 !important; border: 1px solid var(--ml-border); cursor: pointer;
  box-shadow: none !important;
  transform: none !important;
  transition: border-color 0.15s ease;
}
.ml-product-gallery .flex-control-thumbs li:hover {
  transform: none !important;
  box-shadow: none !important;
  border-color: var(--ml-accent);
}
.ml-product-gallery .flex-control-thumbs img { display: block; aspect-ratio: 1; object-fit: contain; padding: 6px; }
.ml-product-kicker { color: var(--ml-accent-dark); font-size: .76rem; font-weight: 700; text-transform: uppercase; margin-bottom: 10px; }
/* STARI .ml-product-title OBRISAN (koristi se novi body.single-product .ml-single-title-line wrapper) */
.ml-product-code { display: flex; gap: 18px; flex-wrap: wrap; color: var(--ml-muted); font-size: .9rem; padding-bottom: 22px; border-bottom: 1px solid var(--ml-border); }
.ml-product-code strong { color: var(--ml-dark); }
.ml-product-lead { font-size: 1rem; margin: 24px 0; }
.ml-key-specs { margin: 0; border-top: 1px solid var(--ml-border); }
.ml-key-spec {
  display: grid; grid-template-columns: minmax(130px, .85fr) 1.4fr; gap: 20px;
  padding: 12px 0; border-bottom: 1px solid var(--ml-border); margin: 0;
}
.ml-key-spec dt { color: var(--ml-muted); font-size: .84rem; font-weight: 600; }
.ml-key-spec dd { color: var(--ml-dark); font-size: .9rem; font-weight: 600; margin: 0; text-align: right; }
.ml-product-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.ml-button {
  min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 20px; border: 1px solid var(--ml-accent); border-radius: 4px; font: inherit;
  font-size: .9rem; font-weight: 700; cursor: pointer; text-decoration: none;
}
.ml-button-primary { color: #fff; background: var(--ml-accent); }
.ml-button-primary:hover { color: #fff; background: var(--ml-accent-dark); border-color: var(--ml-accent-dark); }
.ml-button-secondary { color: var(--ml-dark); background: var(--ml-bg); border-color: var(--ml-border); }
.ml-button-secondary:hover { color: var(--ml-accent-dark); border-color: var(--ml-accent); }
.ml-product-content { border-top: 1px solid var(--ml-border); }
.ml-product-tabs { position: sticky; top: var(--ml-header-h); z-index: 20; background: var(--ml-bg); border-bottom: 1px solid var(--ml-border); }
.ml-product-tabs-inner { display: flex; gap: 34px; overflow-x: auto; scrollbar-width: none; }
.ml-product-tab {
  flex: 0 0 auto; padding: 19px 0 16px; border: 0; border-bottom: 3px solid transparent;
  color: var(--ml-muted); background: transparent; font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer;
}
.ml-product-tab.active, .ml-product-tab:hover { color: var(--ml-dark); border-bottom-color: var(--ml-accent); }
.ml-product-section { padding: 64px 0; border-bottom: 1px solid var(--ml-border); scroll-margin-top: calc(var(--ml-header-h) + 62px); }
.ml-product-section-head { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 56px; }
.ml-product-section-head > h2 { font-size: 1.55rem; }
.ml-product-description > :first-child { margin-top: 0; }
.ml-tech-table { width: 100%; border-collapse: collapse; border-top: 2px solid var(--ml-dark); }
.ml-tech-table th, .ml-tech-table td { padding: 15px 12px; border-bottom: 1px solid var(--ml-border); text-align: left; font-size: .9rem; }
.ml-tech-table th { width: 42%; color: var(--ml-muted); font-weight: 500; }
.ml-tech-table td { color: var(--ml-dark); font-weight: 600; }
.ml-tech-table tr:nth-child(even) { background: var(--ml-bg-soft); }
.ml-download-list { display: grid; gap: 10px; }
.ml-download {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 16px; border: 1px solid var(--ml-border); color: var(--ml-dark);
}
.ml-download:hover { border-color: var(--ml-accent); color: var(--ml-accent-dark); }
.ml-download-icon { color: var(--ml-accent-dark); font-size: 1.35rem; text-align: center; }
.ml-download small { display: block; color: var(--ml-muted); margin-top: 2px; }
.ml-download-action { font-size: .82rem; font-weight: 700; }
.ml-related-products ul.products { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 0 !important; }
.ml-related-products ul.products::before, .ml-related-products ul.products::after { display: none !important; }
.ml-related-products li.product { width: auto !important; float: none !important; margin: 0 !important; border: 1px solid var(--ml-border); padding: 16px !important; }
.ml-related-products li.product:hover { border-color: var(--ml-accent); }
.ml-related-products li.product img { aspect-ratio: 4/3; object-fit: contain; margin-bottom: 14px !important; }
.ml-related-products .woocommerce-loop-product__title { color: var(--ml-dark); font-size: 1rem !important; }
.ml-related-products .price, .ml-related-products .button { display: none !important; }
.ml-product-empty { color: var(--ml-muted); font-size: .9rem; }

@media (max-width: 991px) {
  .ml-product-hero { grid-template-columns: 1fr; gap: 32px; }
  .ml-product-gallery { position: static; }
  .ml-product-gallery .woocommerce-product-gallery__wrapper { min-height: 420px; }
  .ml-product-section-head { grid-template-columns: 1fr; gap: 22px; }
  .ml-related-products ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* WooCommerce shop / product_cat archive pages (group pages) */
body.tax-product_cat #site-main,
body.post-type-archive-product #site-main,
body.woocommerce-page #site-main {
  padding-left: 56px;
  padding-right: 56px;
  padding-top: 48px;
  padding-bottom: 80px;
  max-width: calc(var(--ml-max) + 112px);
  margin-left: auto;
  margin-right: auto;
}
body.tax-product_cat .woocommerce-breadcrumb,
body.post-type-archive-product .woocommerce-breadcrumb {
  font-size: .85rem;
  color: var(--ml-muted);
  margin-bottom: 22px;
}
body.tax-product_cat .woocommerce-breadcrumb a,
body.post-type-archive-product .woocommerce-breadcrumb a {
  color: var(--ml-muted);
}
body.tax-product_cat .page-title,
body.post-type-archive-product .page-title {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  margin: 0 0 .6em;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--ml-accent);
}
body.tax-product_cat .woocommerce-result-count,
body.post-type-archive-product .woocommerce-result-count,
body.tax-product_cat .woocommerce-ordering,
body.post-type-archive-product .woocommerce-ordering {
  margin-top: 28px;
  margin-bottom: 28px;
}
body.tax-product_cat .term-description,
body.post-type-archive-product .term-description {
  margin-bottom: 32px;
}

/* Subcategory grid (group pages) */
body.tax-product_cat ul.products,
body.post-type-archive-product ul.products {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px 32px;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
body.tax-product_cat ul.products::before,
body.tax-product_cat ul.products::after,
body.post-type-archive-product ul.products::before,
body.post-type-archive-product ul.products::after {
  display: none !important;
}
body.tax-product_cat ul.products li.product,
body.post-type-archive-product ul.products li.product {
  width: auto !important;
  float: none !important;
  margin: 0 !important;
  background: var(--ml-bg);
  border: 1px solid var(--ml-border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
body.tax-product_cat ul.products li.product:hover,
body.post-type-archive-product ul.products li.product:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(30,108,183,.12);
  border-color: var(--ml-primary, #1e6cb7);
}
body.tax-product_cat ul.products li.product a.woocommerce-LoopProduct-link,
body.post-type-archive-product ul.products li.product a.woocommerce-LoopProduct-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 16px 16px 18px;
}
body.tax-product_cat ul.products li.product img,
body.post-type-archive-product ul.products li.product img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: contain;
  background: #ffffff;
  border-radius: 8px;
  padding: 0;
  margin: 0 0 16px 0 !important;
  flex: 0 0 auto;
}
body.tax-product_cat ul.products li.product h2.woocommerce-loop-product__title,
body.post-type-archive-product ul.products li.product h2.woocommerce-loop-product__title,
body.tax-product_cat ul.products li.product h2.woocommerce-loop-category__title,
body.post-type-archive-product ul.products li.product h2.woocommerce-loop-category__title {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  color: var(--ml-dark) !important;
  margin: auto 0 0 0 !important;
  padding: 0 !important;
  text-align: left;
  width: 100% !important;
  min-height: 0;
  overflow: hidden;
}
body.tax-product_cat ul.products li.product h2.woocommerce-loop-product__title > span,
body.post-type-archive-product ul.products li.product h2.woocommerce-loop-product__title > span,
body.tax-product_cat ul.products li.product h2.woocommerce-loop-category__title > span,
body.post-type-archive-product ul.products li.product h2.woocommerce-loop-category__title > span {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  word-break: break-word;
}
body.tax-product_cat ul.products li.product h2.woocommerce-loop-category__title .cat-title-text,
body.post-type-archive-product ul.products li.product h2.woocommerce-loop-category__title .cat-title-text {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap !important;
  line-height: 1.25;
  display: block;
  word-break: keep-all;
  padding: 3px 6px 5px 2px;
}
body.tax-product_cat ul.products li.product h2.woocommerce-loop-product__title .vc-badge,
body.post-type-archive-product ul.products li.product h2.woocommerce-loop-product__title .vc-badge,
body.tax-product_cat ul.products li.product h2.woocommerce-loop-category__title .vc-badge,
body.post-type-archive-product ul.products li.product h2.woocommerce-loop-category__title .vc-badge,
body.tax-product_cat ul.products li.product h2 mark.count,
body.post-type-archive-product ul.products li.product h2 mark.count {
  flex: 0 0 auto;
  margin: 0;
  font-size: 0.74rem;
  background: var(--ml-primary, #1e6cb7);
  color: #fff;
  border-radius: 999px;
  padding: 3px 9px;
  font-weight: 800;
  letter-spacing: 0.2px;
  line-height: 1.2;
  white-space: nowrap;
  background: var(--ml-primary, #1e6cb7);
  border: 0;
  text-decoration: none;
}
body.tax-product_cat ul.products li.product h2 mark.count,
body.post-type-archive-product ul.products li.product h2 mark.count {
  background: var(--ml-primary, #1e6cb7);
  color: #fff;
}
body.tax-product_cat ul.products li.product h2 mark.count::before,
body.post-type-archive-product ul.products li.product h2 mark.count::before { content: none; }
body.tax-product_cat ul.products li.product h2 mark.count::after,
body.post-type-archive-product ul.products li.product h2 mark.count::after { content: none; }
body.tax-product_cat ul.products li.product .price,
body.post-type-archive-product ul.products li.product .price,
body.tax-product_cat ul.products li.product .button,
body.post-type-archive-product ul.products li.product .button {
  display: none !important;
}

/* Varijanti count badge na kartici — fallback inline span direkt u title */
.woocommerce-loop-product__title .vc-badge,
.woocommerce-loop-category__title .vc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .74rem;
  background: var(--ml-primary, #1e6cb7);
  color: #fff;
  border-radius: 999px;
  padding: 3px 9px;
  font-weight: 800;
  margin: 0 0 0 auto;
  line-height: 1.2;
  white-space: nowrap;
}

/* Faza 5 — Redizajn SVIH kartica (proizvodi + subcategories) konzistentan OBO benchmark 17.09 */
body.tax-product_cat ul.products li.product,
body.post-type-archive-product ul.products li.product {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: none !important;
  transition: border-color .2s ease;
}
body.tax-product_cat ul.products li.product:hover,
body.post-type-archive-product ul.products li.product:hover {
  transform: none !important;
  box-shadow: none !important;
  border-color: var(--ml-primary, #1e6cb7);
}

body.tax-product_cat ul.products li.product a,
body.post-type-archive-product ul.products li.product a {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0 !important;
  text-decoration: none;
}

/* Stari title tagovi (uklonjeni actioni ali fallback sakrij za svaki slučaj) */
body.tax-product_cat ul.products li.product h2.woocommerce-loop-product__title,
body.tax-product_cat ul.products li.product h2.woocommerce-loop-category__title,
body.post-type-archive-product ul.products li.product h2.woocommerce-loop-product__title,
body.post-type-archive-product ul.products li.product h2.woocommerce-loop-category__title {
  display: none !important;
}

/* Media sekcija (badge + slika) — zajednička za proizvode + subcategory */
body.tax-product_cat ul.products li.product .ml-product-media,
body.post-type-archive-product ul.products li.product .ml-product-media {
  position: relative;
  padding: 20px 20px 16px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 220px;
}

body.tax-product_cat ul.products li.product .ml-product-media img,
body.post-type-archive-product ul.products li.product .ml-product-media img {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  flex: 1 1 auto;
  display: block;
}

/* Kratki badge (pill) u gornjem lijevom kutu */
body.tax-product_cat ul.products li.product .ml-short-badge,
body.post-type-archive-product ul.products li.product .ml-short-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: #ffffff;
  color: var(--ml-primary, #1e6cb7);
  border: 1px solid rgba(30, 108, 183, .2);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.2px;
  z-index: 2;
  box-shadow: none !important;
}

/* Footer sekcija — odvojena bordrom, naslov + krug arrow */
body.tax-product_cat ul.products li.product .ml-product-footer,
body.post-type-archive-product ul.products li.product .ml-product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 20px 24px;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
  flex: 0 0 auto;
}

body.tax-product_cat ul.products li.product .ml-pf-left,
body.post-type-archive-product ul.products li.product .ml-pf-left {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.tax-product_cat ul.products li.product .ml-pf-sub,
body.post-type-archive-product ul.products li.product .ml-pf-sub {
  font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: 0.1px;
}

body.tax-product_cat ul.products li.product .ml-pf-title,
body.post-type-archive-product ul.products li.product .ml-pf-title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: 1.12rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  margin: 0 !important;
  padding: 0 !important;
  word-break: break-word;
  text-align: left;
  white-space: normal;
}

/* Krug sa strelicom desno */
body.tax-product_cat ul.products li.product .ml-pf-arrow,
body.post-type-archive-product ul.products li.product .ml-pf-arrow {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--ml-primary, #1e6cb7);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, color .2s ease;
}

body.tax-product_cat ul.products li.product:hover .ml-pf-arrow,
body.post-type-archive-product ul.products li.product:hover .ml-pf-arrow {
  background: var(--ml-primary, #1e6cb7);
  color: #ffffff;
}

/* Responsive kartice (proizvodi + subcategories zajedno) */
@media (max-width: 1100px) {
  body.tax-product_cat ul.products li.product .ml-pf-title,
  body.post-type-archive-product ul.products li.product .ml-pf-title {
    font-size: 1.02rem;
  }
  body.tax-product_cat ul.products li.product .ml-pf-arrow,
  body.post-type-archive-product ul.products li.product .ml-pf-arrow {
    width: 40px;
    height: 40px;
  }
}
@media (max-width: 767px) {
  body.tax-product_cat ul.products li.product .ml-product-media,
  body.post-type-archive-product ul.products li.product .ml-product-media {
    min-height: 180px;
    padding: 16px 16px 12px;
  }
  body.tax-product_cat ul.products li.product .ml-short-badge,
  body.post-type-archive-product ul.products li.product .ml-short-badge {
    top: 12px;
    left: 12px;
    padding: 5px 12px;
    font-size: 0.78rem;
  }
  body.tax-product_cat ul.products li.product .ml-product-footer,
  body.post-type-archive-product ul.products li.product .ml-product-footer {
    padding: 18px 16px 20px;
    gap: 12px;
  }
  body.tax-product_cat ul.products li.product .ml-pf-title,
  body.post-type-archive-product ul.products li.product .ml-pf-title {
    font-size: 1rem;
  }
  body.tax-product_cat ul.products li.product .ml-pf-arrow,
  body.post-type-archive-product ul.products li.product .ml-pf-arrow {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 1100px) {
  body.tax-product_cat #site-main,
  body.post-type-archive-product #site-main,
  body.woocommerce-page #site-main {
    padding-left: 40px;
    padding-right: 40px;
  }
  body.tax-product_cat ul.products,
  body.post-type-archive-product ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 767px) {
  body.tax-product_cat #site-main,
  body.post-type-archive-product #site-main,
  body.woocommerce-page #site-main {
    padding-left: 22px;
    padding-right: 22px;
    padding-top: 32px;
  }
  body.tax-product_cat ul.products,
  body.post-type-archive-product ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 16px;
  }
}
@media (max-width: 480px) {
  body.tax-product_cat #site-main,
  body.post-type-archive-product #site-main,
  body.woocommerce-page #site-main {
    padding-left: 16px;
    padding-right: 16px;
  }
  body.tax-product_cat ul.products,
  body.post-type-archive-product ul.products {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .ml-container { padding-left: 18px; padding-right: 18px; }
  .ml-product-hero { padding-top: 8px; padding-bottom: 38px; }
  .ml-product-gallery .woocommerce-product-gallery__wrapper { min-height: 310px; }
  .ml-product-gallery .woocommerce-product-gallery__image img { max-height: 360px; padding: 18px; }
  .ml-product-code { gap: 8px 14px; }
  .ml-key-spec { grid-template-columns: 1fr 1fr; }
  .ml-product-actions { display: grid; }
  .ml-product-tabs-inner { gap: 24px; }
  .ml-product-section { padding: 44px 0; }
  .ml-tech-table th, .ml-tech-table td { padding: 12px 9px; }
  .ml-download { grid-template-columns: 34px minmax(0, 1fr); }
  .ml-download-action { display: none; }
  .ml-related-products ul.products { grid-template-columns: 1fr; }
}

/* ============================================================
   Phase 2a — Single Product Redesign (grupe + filter + badge)
   ============================================================ */

/* —— 1. Family code ispod naslova —— */
.family-code {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--ml-primary, #1e6cb7);
  margin: 8px 0 14px 0;
  line-height: 1.35;
}
.family-code .dim-example {
  display: inline-block;
  margin-left: 10px;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--ml-text-soft, #5b6c7e);
}

/* Varijanti counter u h2 tehničkih podataka */
.variant-total {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ml-text-soft, #5b6c7e);
  margin-left: 10px;
}

/* —— 2. Key specs 2-kol grid —— */
body.single-product .ml-key-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 22px;
  margin: 18px 0 22px 0;
  padding: 16px 18px;
  background: var(--ml-surface-soft, #f7f9fc);
  border: 1px solid var(--ml-border, #e2e8f0);
  border-radius: 8px;
}
body.single-product .ml-key-spec {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  gap: 4px 12px;
  margin: 0;
  padding: 0;
  border: 0;
}
body.single-product .ml-key-spec dt {
  font-size: 0.78rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  color: var(--ml-text-soft, #5b6c7e);
  white-space: normal;
  padding: 2px 0;
}
body.single-product .ml-key-spec dd {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ml-text, #12263f);
  padding: 2px 0;
  margin: 0;
  text-align: right;
}

/* —— 3. Sticky filter bar iznad tablica —— */
.ml-variant-filter {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px 14px;
  align-items: end;
  position: sticky;
  top: 0;
  z-index: 10;
  background: #ffffff;
  border: 1px solid var(--ml-border, #e2e8f0);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 0 0 28px 0;
  box-shadow: 0 2px 10px rgba(30, 108, 183, 0.08);
}
.ml-variant-filter .vf {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ml-variant-filter .vf span {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--ml-text-soft, #5b6c7e);
}
.ml-variant-filter .vf input {
  width: 100%;
  height: 42px;
  padding: 8px 12px;
  font-size: 0.95rem;
  border: 1px solid var(--ml-border, #d2dae4);
  border-radius: 6px;
  background: #fff;
  transition: border-color 0.15s ease;
}
.ml-variant-filter .vf input:focus {
  outline: none;
  border-color: var(--ml-primary, #1e6cb7);
  box-shadow: 0 0 0 3px rgba(30, 108, 183, 0.14);
}
.ml-variant-filter .vf-search {
  grid-column: span 1;
}

/* —— 4. Grupe SKU podnaslovi —— */
.ml-tech-group-heading {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ml-text, #12263f);
  padding: 0 0 10px 0;
  margin: 30px 0 16px 0;
  border-bottom: 2px solid var(--ml-primary, #1e6cb7);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.ml-tech-group-heading small {
  font-size: 0.85rem;
  color: var(--ml-text-soft, #5b6c7e);
  font-weight: 500;
}
.ml-tech-group-heading:first-of-type {
  margin-top: 0;
}

/* —— 5. Nova grupirana tablica —— */
.ml-tech-table-wrap {
  margin: 0 0 8px 0;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}
.ml-scroll-hint {
  font-size: 0.75rem;
  color: var(--ml-text-soft, #5b6c7e);
  margin: 4px 2px 0 2px;
  display: none;
}

body.single-product table.ml-tech-table {
  width: 100%;
  min-width: 1120px !important;
  border-collapse: collapse;
  margin: 0;
  border: 1px solid var(--ml-border, #e2e8f0);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  font-size: 0.88rem;
}
body.single-product table.ml-tech-table thead th {
  position: static;
  background: var(--ml-primary, #1e6cb7);
  color: #ffffff;
  font-family: var(--font-headings);
  font-weight: 700;
  font-weight: 700 !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.2px;
  text-align: left;
  padding: 11px 14px !important;
  border: 0;
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow: visible !important;
  line-height: 1.2 !important;
}
body.single-product table.ml-tech-table thead th:first-child  { border-radius: 4px 0 0 0; min-width: 150px !important; }
body.single-product table.ml-tech-table thead th:nth-child(2)   { min-width: 165px !important; }
body.single-product table.ml-tech-table thead th:nth-child(3)   { min-width: 165px !important; }
body.single-product table.ml-tech-table thead th:nth-child(4)   { min-width: 155px !important; }
body.single-product table.ml-tech-table thead th:nth-child(5)   { min-width: 155px !important; }
body.single-product table.ml-tech-table thead th:nth-child(6)   { min-width: 145px !important; }
body.single-product table.ml-tech-table thead th:last-child {
  border-radius: 0 4px 0 0;
  min-width: 180px !important;
}
/* Dinamički sticky offset računa inline JS wp_footer (vidi functions.php).
   Varijabla --th-sticky-top = admin-bar(0/32/46) + site-header + tabs, prilagođava se svakom viewportu/login statusu. */
body.single-product table.ml-tech-table colgroup col.t-col-kb,
body.single-product table.ml-tech-table tbody td.t-kb {
  min-width: 130px;
}
body.single-product table.ml-tech-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--ml-border, #eef2f7);
  color: var(--ml-text, #12263f);
  vertical-align: middle;
}
body.single-product table.ml-tech-table tbody tr:nth-child(even) td {
  background: var(--ml-surface-soft, #f8fafc);
}
body.single-product table.ml-tech-table tbody tr:last-child td {
  border-bottom: 0;
}
body.single-product table.ml-tech-table tbody td.t-ozn {
  font-weight: 700;
  color: var(--ml-primary, #1e6cb7);
  white-space: nowrap;
}
body.single-product table.ml-tech-table tbody td.t-num {
  font-variant-numeric: tabular-nums;
  text-align: right;
  padding-right: 20px;
  color: var(--ml-text, #12263f);
}
body.single-product table.ml-tech-table tbody td.t-kb code {
  background: var(--ml-surface-soft, #f1f5f9);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ml-primary-dark, #164f85);
}

/* —— 6. Badge N SKU na grid karticama —— */
body.tax-product_cat ul.products li.product,
body.post-type-archive-product ul.products li.product {
  position: relative;
}
.sku-count-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 6;
  background: var(--ml-primary, #1e6cb7);
  color: #fff;
  padding: 4px 9px;
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  line-height: 1.2;
  box-shadow: 0 2px 6px rgba(18, 38, 63, 0.18);
  pointer-events: none;
}

/* ============================================================
   Phase 2a — Responsive (≤ 1100px, ≤ 767px, ≤ 480px)
   ============================================================ */
@media (max-width: 1100px) {
  .ml-variant-filter { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ml-variant-filter .vf-search { grid-column: span 3; }
  body.tax-product_cat #site-main,
  body.post-type-archive-product #site-main,
  body.woocommerce-page #site-main {
    padding-left: 40px;
    padding-right: 40px;
  }
  body.tax-product_cat ul.products,
  body.post-type-archive-product ul.products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 20px;
  }
  body.single-product .ml-pribor-grid.ml-obo-pribor-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 20px;
  }
}
@media (max-width: 767px) {
  .family-code { font-size: 1.05rem; margin: 6px 0 12px; }
  body.single-product .ml-key-specs {
    grid-template-columns: 1fr;
    gap: 8px 18px;
    padding: 14px 16px;
    margin: 14px 0 18px;
  }
  body.single-product .ml-key-spec dd { text-align: left; }
  .ml-variant-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    position: static; /* sticky ugasen na mob-u zbog header bara */
  }
  .ml-variant-filter .vf-search { grid-column: span 2; }
  .ml-variant-filter .vf input { height: 44px; font-size: 1rem; }
  .ml-tech-group-heading { font-size: 1.1rem; margin: 24px 0 12px; }
  .ml-tech-table-wrap { overflow-x: auto; padding-bottom: 4px; }
  .ml-scroll-hint { display: block; }

  body.tax-product_cat ul.products,
  body.post-type-archive-product ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 16px;
  }
  body.tax-product_cat ul.products li.product h2.woocommerce-loop-product__title,
  body.post-type-archive-product ul.products li.product h2.woocommerce-loop-product__title,
  body.tax-product_cat ul.products li.product h2.woocommerce-loop-category__title,
  body.post-type-archive-product ul.products li.product h2.woocommerce-loop-category__title {
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.88rem !important;
  }
  body.tax-product_cat ul.products li.product img,
  body.post-type-archive-product ul.products li.product img {
    padding: 14px;
    margin-bottom: 12px !important;
  }
  body.tax-product_cat ul.products li.product a.woocommerce-LoopProduct-link,
  body.post-type-archive-product ul.products li.product a.woocommerce-LoopProduct-link {
    padding: 12px 12px 14px;
  }

  body.single-product table.ml-tech-table { min-width: 1100px !important; }
  body.single-product table.ml-tech-table thead th {
    padding: 9px 10px !important;
    font-size: 0.70rem !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
  }
  body.single-product table.ml-tech-table tbody td { padding: 9px 10px; font-size: 0.80rem; }
  .sku-count-badge { font-size: 0.65rem; padding: 3px 7px; top: 8px; right: 8px; }
  body.single-product .ml-pribor-grid.ml-obo-pribor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 16px;
  }
  body.single-product h3.ml-pribor-title { font-size: 0.88rem; padding: 12px 12px 14px 12px; }
}
@media (max-width: 480px) {
  .ml-variant-filter { grid-template-columns: 1fr; }
  .ml-variant-filter .vf-search { grid-column: auto; }
  .ml-tech-group-heading { font-size: 1rem; }
  body.single-product .ml-key-specs { padding: 12px 14px; }
  .family-code { font-size: 0.98rem; }

  body.tax-product_cat #site-main,
  body.post-type-archive-product #site-main,
  body.woocommerce-page #site-main {
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 32px;
    padding-bottom: 56px;
  }
  body.tax-product_cat ul.products,
  body.post-type-archive-product ul.products {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  body.tax-product_cat ul.products li.product img,
  body.post-type-archive-product ul.products li.product img {
    padding: 24px;
  }
  body.single-product .ml-pribor-grid.ml-obo-pribor-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  body.single-product h3.ml-pribor-title { padding: 12px 14px 14px 14px; }
}

/* ============================================================
   Phase 2b — OBO-Inspired Single Product Redesign
   ml-obo-* prefix. Koristi se u single-product.php (OBO layout)
   ============================================================ */

/* —— 0. Globalna podrška za TABS (samo se pokazuje tab-panel.active) —— */
.ml-obo-content .tab-panel:not(.active) { display: none !important; }
.ml-obo-section-h {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--ml-text, #12263f);
  margin: 0 0 22px 0;
  padding: 0;
  line-height: 1.25;
}
.ml-obo-description p {
  font-size: 0.96rem;
  line-height: 1.65;
  color: var(--ml-text, #2d3748);
  margin: 0 0 14px 0;
  max-width: 80ch;
}
.ml-obo-certstrip {
  margin-top: 22px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.ml-obo-certstrip:empty { display: none; }

/* —— 1. HERO 2-col (OBO layout) —— */
body.single-product .ml-obo-hero {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 40px !important;
  align-items: start !important;
  padding: 10px 0 18px 0 !important;
}
body.single-product .ml-obo-gallery {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}

/* ============================================================
   SINGLE naslov (H1 + obitelj u JEDNOM REDU)
   ============================================================ */
body.postid-9249 .ml-single-title-line,
body.single-product .ml-single-title-line {
  display: flex !important;
  flex-direction: row !important;
  align-items: baseline !important;
  justify-content: flex-start !important;
  gap: 14px !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 8px 0 !important;
  white-space: normal !important;
  overflow: visible !important;
  flex-wrap: wrap !important;
}
body.postid-9249 .ml-single-title-line .ml-product-title,
body.single-product .ml-single-title-line .ml-product-title {
  display: inline-block !important;
  font-size: clamp(1.45rem, 2.4vw, 2.2rem) !important;
  line-height: 1.15 !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  text-overflow: clip !important;
  flex: 0 1 auto !important;
  min-width: 0 !important;
  width: auto !important;
  max-width: 100% !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em !important;
  font-family: var(--font-headings) !important;
}
body.postid-9249 .ml-single-title-line .ml-product-title-family,
body.single-product .ml-single-title-line .ml-product-title-family {
  display: inline !important;
  flex: 0 0 auto !important;
  color: var(--ml-primary, #1e6cb7) !important;
  font-size: clamp(1.4rem, 2.2vw, 2rem) !important;
  line-height: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em !important;
  width: auto !important;
}
body.postid-9249 .ml-single-title-line .ml-product-title-family strong,
body.single-product .ml-single-title-line .ml-product-title-family strong {
  font-weight: 800 !important;
  font-family: var(--font-headings) !important;
  display: inline !important;
}
body.single-product .ml-obo-family {
  font-size: 1.05rem;
  margin: 0 0 14px 0;
  padding: 0;
  letter-spacing: 0.2px;
}

/* —— 2. Id row: Šifra | Prvi KB | Dostupno (OBO Brt.art. | EAN red) —— */
.ml-obo-idrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 10px 16px;
  background: var(--ml-surface-soft, #f7f9fc);
  border: 1px solid var(--ml-border, #e2e8f0);
  border-radius: 6px;
  margin: 6px 0 18px 0;
  font-size: 0.92rem;
}
.ml-obo-idrow span { color: var(--ml-text-soft, #5b6c7e); }
.ml-obo-idrow strong { color: var(--ml-primary-dark, #164f85); font-weight: 700; }
.ml-obo-idrow-sep { opacity: 0.35; user-select: none; }
.ml-obo-upit { color: var(--ml-primary, #1e6cb7) !important; font-weight: 600 !important; }

/* —— 3. Tip select dropdown (OBO "Brt.art. / Tip") —— */
.ml-obo-tipselect {
  display: grid;
  gap: 6px;
  margin: 0 0 22px 0;
}
.ml-obo-tipselect label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--ml-text-soft, #5b6c7e);
}
.ml-obo-tipselect select {
  width: 100%;
  min-height: 44px;
  padding: 8px 40px 8px 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ml-text, #12263f);
  background: #fff;
  border: 1px solid var(--ml-border, #d2dae4);
  border-radius: 6px;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231e6cb7' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ml-obo-tipselect select:focus {
  outline: none;
  border-color: var(--ml-primary, #1e6cb7);
  box-shadow: 0 0 0 3px rgba(30, 108, 183, 0.14);
}
.ml-obo-tip-kb {
  font-size: 0.9rem;
  color: var(--ml-text-soft, #5b6c7e);
  padding: 0 2px;
}
.ml-obo-tip-kb strong { color: var(--ml-primary-dark, #164f85); font-weight: 700; }

/* ================ X.1 — OBO PILL SELECTOR za ŠIRINU ================ */

/* (A) ODABRANA IZVEDBA / KATALOŠKI BROJ — 2 kol, 1 red (kao OBO header iznad pillova) */
.ml-obo-tipselect .ml-obo-selected {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
  padding: 16px 0;
  border-top: 1px solid var(--ml-border, #e2e8f0);
  border-bottom: 1px solid var(--ml-border, #e2e8f0);
  margin: 8px 0 18px 0;
}
.ml-obo-selected .ml-obo-sel-col { display: flex; flex-direction: column; gap: 4px; }
.ml-obo-selected .ml-obo-sel-right { align-items: flex-end; text-align: right; }
.ml-obo-selected .ml-obo-sel-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--ml-text-soft, #5b6c7e);
}
.ml-obo-selected .ml-obo-sel-value {
  font-family: var(--ml-font-head, 'Inter', sans-serif);
  font-size: 1.22rem;
  font-weight: 600;
  color: var(--ml-text, #12263f);
  line-height: 1.2;
  word-break: break-word;
}
.ml-obo-selected .ml-obo-kb { color: var(--ml-primary, #1e6cb7); }

/* (B) PILL selector — OBO 2-line pill (veliki broj iznad + "mm" ispod) */
.ml-obo-tipselect .ml-obo-pill-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ml-text, #12263f);
  margin: 4px 0 10px 0;
  display: block;
}
.ml-obo-tipselect .ml-obo-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin: 0 0 18px 0;
}
.ml-obo-tipselect .ml-obo-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 74px;
  padding: 8px 14px;
  background: #ffffff;
  color: var(--ml-text, #12263f);
  border: 1.5px solid var(--ml-border, #e2e8f0);
  border-radius: 12px;
  font-family: inherit;
  cursor: pointer;
  line-height: 1;
  text-align: center;
  user-select: none;
  box-shadow: none !important;
  transform: none !important;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.ml-obo-tipselect .ml-obo-pill:hover {
  border-color: var(--ml-primary, #1e6cb7);
  box-shadow: none !important;
  transform: none !important;
}
.ml-obo-tipselect .ml-obo-pill:focus {
  outline: none;
  border-color: var(--ml-primary, #1e6cb7);
  box-shadow: 0 0 0 3px rgba(30,108,183,0.14);
}
.ml-obo-tipselect .ml-obo-pill.active {
  background: var(--ml-primary, #1e6cb7);
  border-color: var(--ml-primary, #1e6cb7);
  color: #ffffff;
}
.ml-obo-pill .ml-obo-pill-num {
  font-family: var(--ml-font-head, 'Inter', sans-serif);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 1.1;
}
.ml-obo-pill .ml-obo-pill-unit {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  opacity: 0.92;
}
.ml-obo-pill.active .ml-obo-pill-unit { opacity: 1; }

/* (C) 2x2 SPEC grid (Materijal | Zaštita / Visina | Duljina) — label L value R redovima */
.ml-obo-tipselect .ml-obo-specs-2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0 0 22px 0;
  border-top: 1px solid var(--ml-border, #e2e8f0);
}
.ml-obo-specs-2x2 .ml-obo-sp-row {
  display: contents;
}
.ml-obo-specs-2x2 .ml-obo-sp-item {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 10px 18px;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px solid var(--ml-border, #e2e8f0);
  border-right: 0;
}
.ml-obo-specs-2x2 .ml-obo-sp-row > .ml-obo-sp-item:nth-child(odd)  { padding-right: 12px; }
.ml-obo-specs-2x2 .ml-obo-sp-row > .ml-obo-sp-item:nth-child(even) { padding-left: 12px; }
.ml-obo-sp-item .ml-obo-sp-label {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ml-text-soft, #5b6c7e);
  text-transform: none;
  letter-spacing: 0;
}
.ml-obo-sp-item .ml-obo-sp-value {
  font-family: var(--ml-font-head, 'Inter', sans-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ml-text, #12263f);
}

/* ================ X.1 — Responsive pill selector ================ */
@media (max-width: 900px) {
  .ml-obo-tipselect .ml-obo-pill { min-width: 66px; padding: 7px 11px; }
  .ml-obo-pill .ml-obo-pill-num { font-size: 1.22rem; }
  .ml-obo-tipselect .ml-obo-specs-2x2 { grid-template-columns: 1fr; }
  .ml-obo-specs-2x2 .ml-obo-sp-row > .ml-obo-sp-item:nth-child(odd)  { padding-right: 0; }
  .ml-obo-specs-2x2 .ml-obo-sp-row > .ml-obo-sp-item:nth-child(even) { padding-left: 0; }
  .ml-obo-specs-2x2 .ml-obo-sp-item { grid-template-columns: 90px 1fr; }
}
@media (max-width: 680px) {
  .ml-obo-tipselect .ml-obo-selected {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px 0;
  }
  .ml-obo-selected .ml-obo-sel-right { align-items: flex-start; text-align: left; }
  .ml-obo-tipselect .ml-obo-pills { gap: 8px 10px; }
  .ml-obo-tipselect .ml-obo-pill { min-width: 60px; padding: 6px 10px; }
  .ml-obo-pill .ml-obo-pill-num { font-size: 1.12rem; }
  .ml-obo-pill .ml-obo-pill-unit { font-size: 0.73rem; }
}

/* —— 4. 1-COL SPEC LIST (OBO style — label L | value R, NE 2-col grid!) —— */
body.single-product dl.ml-obo-spec-list {
  display: block;
  width: 100%;
  margin: 6px 0 24px 0;
  padding: 4px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  gap: 0;
}
body.single-product .ml-obo-spec-row {
  display: grid !important;
  grid-template-columns: 140px minmax(0, 1fr) !important;
  gap: 8px 20px !important;
  padding: 10px 0 !important;
  border-bottom: 1px solid var(--ml-border, #eef2f7);
  align-items: center;
}
body.single-product .ml-obo-spec-row:last-child { border-bottom: 0; }
body.single-product .ml-obo-spec-row dt {
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: var(--ml-text-soft, #5b6c7e) !important;
  padding: 0 !important;
  white-space: normal !important;
  margin: 0 !important;
  text-align: left !important;
}
body.single-product .ml-obo-spec-row dd {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ml-text, #12263f);
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
}
.ml-chip {
  display: inline-block;
  padding: 2px 9px;
  margin-left: 6px;
  border-radius: 10px;
  background: var(--ml-surface-soft, #eef4fb);
  color: var(--ml-primary-dark, #164f85);
  font-size: 0.78rem;
  font-weight: 700;
}

/* —— 5. CTA (OBO: veća primarna CTA brand boje) —— */
body.single-product .ml-obo-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 14px;
}
body.single-product a.ml-obo-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-decoration: none;
  transition: transform 0.08s ease, box-shadow 0.15s ease, opacity 0.1s ease;
}
body.single-product a.ml-obo-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(30, 108, 183, 0.22); }
body.single-product a.ml-obo-cta:active { transform: translateY(0); opacity: 0.92; }
body.single-product a.ml-obo-cta-sec {
  min-height: 42px;
  background: #fff !important;
  color: var(--ml-primary, #1e6cb7) !important;
  border: 1.5px solid var(--ml-primary, #1e6cb7) !important;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 18px;
}
body.single-product a.ml-obo-cta-sec:hover {
  background: var(--ml-primary, #1e6cb7) !important;
  color: #fff !important;
  box-shadow: 0 3px 10px rgba(30, 108, 183, 0.18);
}

/* —— 6. TABS (underline + sticky) —— */
body.single-product .ml-obo-tabs {
  position: sticky;
  top: 0;
  z-index: 11;
  background: #fff;
  border-top: 1px solid var(--ml-border, #e2e8f0);
  border-bottom: 1px solid var(--ml-border, #e2e8f0);
  margin: 28px 0 0 0;
}
body.single-product .ml-obo-tabs .ml-product-tabs-inner {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0;
  padding: 0;
  -webkit-overflow-scrolling: touch;
}
body.single-product .ml-obo-tabs .ml-product-tab {
  position: relative;
  flex: 0 0 auto;
  padding: 18px 22px 16px 22px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ml-text-soft, #5b6c7e);
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0.3px;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.2s ease;
}
body.single-product .ml-obo-tabs .ml-product-tab small.obo-tab-count {
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.75;
  margin-left: 2px;
}
body.single-product .ml-obo-tabs .ml-product-tab:hover {
  color: var(--ml-primary, #1e6cb7);
}
body.single-product .ml-obo-tabs .ml-product-tab.active {
  color: var(--ml-primary, #1e6cb7);
  border-bottom-color: var(--ml-primary, #1e6cb7);
}
body.single-product .ml-obo-section.tab-panel { padding: 38px 0 28px 0; }

/* —— 7. TAB 2: Tehnički podaci (individualna 2-col name:value TABLICA) —— */
.ml-obo-techspec-wrap {
  max-width: 760px;
  margin: 0;
}
table.ml-obo-techspec {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  background: #fff;
  font-size: 0.92rem;
  border: 1px solid var(--ml-border, #e2e8f0);
  border-radius: 6px;
  overflow: hidden;
}
table.ml-obo-techspec th[scope="row"] {
  width: 40%;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--ml-text-soft, #5b6c7e);
  font-size: 0.86rem;
  background: var(--ml-surface-soft, #f7f9fc);
  border-bottom: 1px solid var(--ml-border, #eef2f7);
  vertical-align: middle;
}
table.ml-obo-techspec td {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--ml-text, #12263f);
  border-bottom: 1px solid var(--ml-border, #eef2f7);
  vertical-align: middle;
}
table.ml-obo-techspec tr:last-child th[scope="row"],
table.ml-obo-techspec tr:last-child td { border-bottom: 0; }

/* —— 8. TAB 3: Svi tipovi (filter + tablice) —— */
body.single-product .ml-obo-group-h { margin-top: 30px; }
body.single-product .ml-obo-filter {
  position: sticky;
  top: 62px;
  z-index: 9;
}

/* —— 9. GLAVNI PROIZVOD — KOLIČNJAŠKO polje + Dodaj u košaricu (HERO) —— */
body.single-product .ml-cart-main {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  align-content: flex-start;
  align-self: flex-start;
  gap: 12px;
  margin: 16px 0 0 0;
  flex-wrap: wrap;
  max-height: 46px;
  min-height: 46px;
}

/* Količnjaško polje — OBO stil, 3 segmenta (bez arrow spina) */
body.single-product .ml-qty {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--ml-border, #e2e8f0);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  height: 46px;
  flex: 0 0 auto;
  box-sizing: border-box;
}
body.single-product .ml-qty.ml-qty-sm {
  height: 36px;
}
body.single-product .ml-qty-btn {
  width: 46px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: var(--ml-surface-soft, #f7f9fc);
  color: var(--ml-text, #12263f);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  user-select: none;
}
body.single-product .ml-qty.ml-qty-sm .ml-qty-btn {
  width: 36px;
  font-size: 1rem;
}
body.single-product .ml-qty-btn:hover {
  background: var(--ml-primary, #1e6cb7);
  color: #fff;
}
body.single-product .ml-qty-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--ml-surface-soft, #f7f9fc);
  color: var(--ml-text-soft, #5b6c7e);
}
body.single-product .ml-qty-input {
  width: 52px;
  height: 100%;
  border: 0;
  border-left: 1px solid var(--ml-border, #e2e8f0);
  border-right: 1px solid var(--ml-border, #e2e8f0);
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ml-text, #12263f);
  background: #fff;
  padding: 0;
  margin: 0;
  outline: none;
  box-sizing: border-box;
  -moz-appearance: textfield;
}
body.single-product .ml-qty.ml-qty-sm .ml-qty-input {
  width: 40px;
  font-size: 0.9rem;
}
body.single-product .ml-qty-input::-webkit-outer-spin-button,
body.single-product .ml-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* CTA gumb — Pošalji upit */
body.single-product .ml-button-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  gap: 8px;
  height: 46px;
  min-height: 46px;
  max-height: 46px;
  min-width: 180px;
  max-width: 100%;
  flex: 0 1 240px;
  padding: 0 22px;
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: var(--ml-primary, #1e6cb7);
  color: #fff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.93rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
}
body.single-product .ml-button-cart:hover {
  background: #195796;
}
body.single-product .ml-button-cart:disabled {
  opacity: 0.7;
  cursor: progress;
}

/* Loading spinner u gumbu */
body.single-product .ml-cart-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ml-spin 0.75s linear infinite;
}
body.single-product .ml-button-cart.is-loading .ml-cart-spinner {
  display: inline-block;
}
@keyframes ml-spin {
  to { transform: rotate(360deg); }
}

/* Notice poruke (success / error) */
body.single-product .ml-cart-notice {
  display: none;
  margin: 10px 0 0 0;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.9rem;
  line-height: 1.5;
  font-weight: 500;
}
body.single-product .ml-cart-notice.is-visible {
  display: block;
}
body.single-product .ml-cart-notice.ml-success {
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #14532d;
}
body.single-product .ml-cart-notice.ml-error {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #7f1d1d;
}

/* —— 10. TAB 4: Pribor — TABLIČNI prikaz po grupama (OBO stil) —— */
p.ml-product-empty {
  color: var(--ml-text-soft, #5b6c7e);
  font-size: 0.95rem;
  padding: 20px 24px;
  background: var(--ml-surface-soft, #f7f9fc);
  border: 1px dashed var(--ml-border, #d2dae4);
  border-radius: 6px;
  max-width: 760px;
  margin: 0;
  line-height: 1.6;
}

body.single-product .ml-pribor-group-block {
  margin: 0 0 36px 0;
}
body.single-product .ml-obo-group-h {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ml-text, #12263f);
  margin: 0 0 14px 0;
  padding: 0 2px 4px 0;
  border-bottom: 2px solid var(--ml-primary, #1e6cb7);
  display: inline-block;
}
body.single-product .ml-obo-group-h small {
  font-weight: 500;
  font-size: 0.82rem;
  color: var(--ml-text-soft, #5b6c7e);
  letter-spacing: 0;
  margin-left: 8px;
}

/* Tablica wrapper — za overflow (desktop ne treba, mobile fallback) */
body.single-product .ml-pribor-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--ml-border, #e2e8f0);
  border-radius: 8px;
  background: #fff;
}

/* Glavna tablica Pribora */
body.single-product table.ml-pribor-table.ml-obo-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.9rem;
  background: #fff;
}
body.single-product table.ml-pribor-table thead th {
  padding: 12px 16px;
  text-align: left;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ml-text-soft, #5b6c7e);
  background: var(--ml-surface-soft, #f7f9fc);
  border-bottom: 1px solid var(--ml-border, #e2e8f0);
  vertical-align: middle;
  white-space: nowrap;
}
body.single-product table.ml-pribor-table thead th.col-act {
  text-align: right;
  padding-right: 20px;
}
body.single-product table.ml-pribor-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--ml-border, #eef2f7);
  vertical-align: middle;
  color: var(--ml-text, #12263f);
  transition: background 0.1s ease;
}
body.single-product table.ml-pribor-table tbody tr:last-child td {
  border-bottom: 0;
}
body.single-product table.ml-pribor-table tbody tr:hover td {
  background: var(--ml-surface-soft, #f7f9fc);
}

/* Stupac 1: Artikl (thumb + naziv + badge) */
body.single-product table.ml-pribor-table .col-art .ml-art-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
body.single-product table.ml-pribor-table .col-art .ml-art-thumb {
  flex: 0 0 56px;
  width: 56px;
  height: 42px;
  background: #fff;
  border: 1px solid var(--ml-border, #eef2f7);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.single-product table.ml-pribor-table .col-art .ml-art-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
body.single-product table.ml-pribor-table .col-art .ml-art-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.3;
  color: var(--ml-text, #12263f);
}
body.single-product table.ml-pribor-table .col-art .ml-art-name .ml-art-vcount {
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--ml-primary, #1e6cb7);
  letter-spacing: 0.01em;
}

/* Stupac 2: Tip / Šifra (code monospace) */
body.single-product table.ml-pribor-table .col-type code {
  display: inline-block;
  padding: 3px 8px;
  background: var(--ml-surface-soft, #f7f9fc);
  border: 1px solid var(--ml-border, #eef2f7);
  border-radius: 4px;
  font-family: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ml-text, #12263f);
  letter-spacing: 0.01em;
}

/* Stupac 3: Kataloški broj */
body.single-product table.ml-pribor-table .col-kb {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ml-text, #12263f);
  font-variant-numeric: tabular-nums;
}

/* Stupac 4: Količina + UOM tekst */
body.single-product table.ml-pribor-table .col-qty {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}
body.single-product table.ml-pribor-table .col-qty .ml-uom {
  font-size: 0.76rem;
  color: var(--ml-text-soft, #5b6c7e);
  font-weight: 500;
  line-height: 1;
}

/* Stupac 5: Akcija — ovalni plavi plus gumb (kao OBO narančasti) */
body.single-product table.ml-pribor-table .col-act {
  text-align: right;
  padding-right: 20px !important;
}
body.single-product .ml-add-row.ml-add-pribor {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 40px;
  border-radius: 999px;
  background: var(--ml-primary, #1e6cb7);
  color: #fff;
  border: 0;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, transform 0.08s ease, opacity 0.15s ease;
  position: relative;
}
body.single-product .ml-add-row.ml-add-pribor span {
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  display: block;
  margin-top: -2px;
}
body.single-product .ml-add-row.ml-add-pribor:hover {
  background: #195796;
}
body.single-product .ml-add-row.ml-add-pribor:active {
  transform: scale(0.96);
}
body.single-product .ml-add-row.ml-add-pribor.is-loading {
  opacity: 0.7;
  cursor: progress;
}
body.single-product .ml-add-row.ml-add-pribor.is-loading span {
  display: none;
}
body.single-product .ml-add-row.ml-add-pribor.is-loading::after {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ml-spin 0.75s linear infinite;
}

/* —— 10. TAB 5: Dokumenti (OBO style list) —— */
.ml-obo-downloads {
  display: grid;
  gap: 10px;
  max-width: 760px;
}
.ml-obo-download-item {
  grid-template-columns: 40px minmax(0, 1fr) auto !important;
  padding: 16px 20px !important;
  background: #fff;
  border: 1px solid var(--ml-border, #e2e8f0);
  border-radius: 6px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
}
.ml-obo-download-item:hover {
  border-color: var(--ml-primary, #1e6cb7);
  box-shadow: 0 4px 14px rgba(30, 108, 183, 0.12);
  transform: translateY(-1px);
}
.ml-obo-download-item .ml-download-info small { margin-top: 3px; display: inline-block; }

/* —— 11. Related Products tab section heading —— */
body.single-product #povezani-proizvodi.ml-obo-section .products {
  margin-top: 6px;
}

/* ============================================================
   Phase 2b — RESPONSIVE (≤ 1100px, ≤ 767px, ≤ 480px)
   ============================================================ */
@media (max-width: 1100px) {
  body.single-product .ml-obo-hero {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 30px !important;
  }
  body.single-product .ml-obo-tabs .ml-product-tab { padding: 16px 18px 14px 18px; font-size: 0.85rem; }
  body.single-product .ml-obo-filter { top: 58px; }

  /* SINGLE naslov: tablet 1100px premotaj u 2 reda ako ne stane */
  body.postid-9249 .ml-single-title-line,
  body.single-product .ml-single-title-line {
    white-space: normal !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  body.postid-9249 .ml-single-title-line .ml-product-title,
  body.single-product .ml-single-title-line .ml-product-title {
    white-space: normal !important;
    flex: 1 1 100% !important;
    display: block !important;
  }
  body.postid-9249 .ml-single-title-line .ml-product-title-family,
  body.single-product .ml-single-title-line .ml-product-title-family {
    flex: 0 0 auto !important;
    display: inline !important;
  }
}
@media (max-width: 767px) {
  body.single-product .ml-obo-family { font-size: 0.95rem; margin: 0 0 10px 0; }
  body.single-product .ml-obo-idrow { padding: 9px 14px; font-size: 0.88rem; gap: 8px 12px; }
  body.single-product .ml-obo-tipselect select { min-height: 46px; font-size: 1rem; }
  body.single-product .ml-obo-spec-row {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 2px 0 !important;
    padding: 10px 0 !important;
  }
  body.single-product .ml-obo-spec-row dt { padding: 0 0 2px 0 !important; font-size: 0.82rem !important; }
  body.single-product .ml-obo-spec-row dd { padding: 0 !important; }
  body.single-product a.ml-obo-cta { min-height: 52px; font-size: 1rem; }
  body.single-product .ml-obo-tabs { top: 0; }
  body.single-product .ml-obo-tabs .ml-product-tab { padding: 14px 14px 12px 14px; font-size: 0.82rem; }
  body.single-product .ml-obo-section.tab-panel { padding: 26px 0 18px 0; }
  table.ml-obo-techspec th[scope="row"] {
    width: 45%;
    font-size: 0.82rem;
    padding: 10px 12px;
  }
  table.ml-obo-techspec td { padding: 10px 12px; font-size: 0.9rem; }
  body.single-product .ml-obo-section-h { font-size: 1.3rem; margin-bottom: 18px; }
  body.single-product .ml-obo-filter { position: static; }
  p.ml-product-empty { padding: 16px 18px; font-size: 0.92rem; }

  /* Naslov 767px: 2 retka max */
  body.postid-9249 .ml-single-title-line,
  body.single-product .ml-single-title-line {
    gap: 6px !important;
    margin-bottom: 6px !important;
    white-space: normal !important;
    flex-wrap: wrap !important;
  }
  body.postid-9249 .ml-single-title-line .ml-product-title,
  body.single-product .ml-single-title-line .ml-product-title {
    font-size: clamp(1.25rem, 5.4vw, 1.7rem) !important;
    white-space: normal !important;
    line-height: 1.2 !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    display: block !important;
  }
  body.postid-9249 .ml-single-title-line .ml-product-title-family,
  body.single-product .ml-single-title-line .ml-product-title-family {
    font-size: clamp(1.15rem, 5vw, 1.55rem) !important;
    display: inline !important;
  }

  /* ===== HERO cart — mobilni layout ===== */
  body.single-product .ml-cart-main {
    flex-direction: column;
    gap: 10px;
  }
  body.single-product .ml-qty {
    height: 46px;
    width: 100%;
  }
  body.single-product .ml-qty .ml-qty-btn {
    width: 52px;
    flex: 0 0 52px;
  }
  body.single-product .ml-qty .ml-qty-input {
    width: auto;
    flex: 1 1 auto;
    font-size: 1rem;
  }
  body.single-product .ml-button-cart {
    height: 46px;
    min-width: 100%;
    font-size: 0.95rem;
  }

  /* ===== PRIBOR TABLICA — mobilni fallback (kartice umjesto tablica) ===== */
  body.single-product .ml-pribor-table-wrap {
    border: 0;
    background: transparent;
    overflow-x: visible;
  }
  body.single-product table.ml-pribor-table.ml-obo-table thead {
    display: none;
  }
  body.single-product table.ml-pribor-table.ml-obo-table,
  body.single-product table.ml-pribor-table.ml-obo-table tbody,
  body.single-product table.ml-pribor-table.ml-obo-table tr,
  body.single-product table.ml-pribor-table.ml-obo-table td {
    display: block;
    width: 100% !important;
  }
  body.single-product table.ml-pribor-table.ml-obo-table tbody tr {
    background: #fff;
    border: 1px solid var(--ml-border, #e2e8f0);
    border-radius: 8px;
    padding: 12px 14px 14px 14px;
    margin: 0 0 14px 0;
    box-shadow: 0 1px 3px rgba(18, 38, 63, 0.05);
  }
  body.single-product table.ml-pribor-table.ml-obo-table tbody tr:last-child {
    margin-bottom: 0;
  }
  body.single-product table.ml-pribor-table.ml-obo-table tbody td {
    padding: 6px 0;
    border-bottom: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }
  body.single-product table.ml-pribor-table.ml-obo-table tbody td::before {
    content: attr(data-label);
    font-family: 'Inter', sans-serif;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--ml-text-soft, #5b6c7e);
    flex: 0 0 auto;
    padding-top: 2px;
    min-width: 90px;
  }
  body.single-product table.ml-pribor-table.ml-obo-table tbody td.col-art {
    padding: 0 0 6px 0;
  }
  body.single-product table.ml-pribor-table.ml-obo-table tbody td.col-art::before {
    display: none;
  }
  body.single-product table.ml-pribor-table.ml-obo-table tbody td.col-art .ml-art-link {
    width: 100%;
    gap: 10px;
  }
  body.single-product table.ml-pribor-table.ml-obo-table tbody td.col-art .ml-art-thumb {
    flex: 0 0 64px;
    width: 64px;
    height: 48px;
  }
  body.single-product table.ml-pribor-table.ml-obo-table tbody td.col-art .ml-art-name {
    font-size: 0.95rem;
  }
  body.single-product table.ml-pribor-table.ml-obo-table tbody td.col-type::before {
    content: "Tip / Šifra";
  }
  body.single-product table.ml-pribor-table.ml-obo-table tbody td.col-kb::before {
    content: "Kataloški br.";
  }
  body.single-product table.ml-pribor-table.ml-obo-table tbody td.col-qty::before {
    content: "Količina";
  }
  body.single-product table.ml-pribor-table.ml-obo-table tbody td.col-qty {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  body.single-product table.ml-pribor-table.ml-obo-table tbody td.col-qty::before {
    padding-top: 0;
  }
  body.single-product table.ml-pribor-table.ml-obo-table tbody td.col-qty .ml-qty.ml-qty-sm {
    width: 100%;
    height: 40px;
  }
  body.single-product table.ml-pribor-table.ml-obo-table tbody td.col-qty .ml-qty.ml-qty-sm .ml-qty-btn {
    flex: 0 0 44px;
    width: 44px;
  }
  body.single-product table.ml-pribor-table.ml-obo-table tbody td.col-qty .ml-qty.ml-qty-sm .ml-qty-input {
    flex: 1 1 auto;
    width: auto;
  }
  body.single-product table.ml-pribor-table.ml-obo-table tbody td.col-act {
    padding: 8px 0 0 0;
    justify-content: center;
    text-align: center;
    padding-right: 0 !important;
  }
  body.single-product table.ml-pribor-table.ml-obo-table tbody td.col-act::before {
    display: none;
  }
  body.single-product .ml-add-row.ml-add-pribor {
    width: 100%;
    max-width: 220px;
    height: 42px;
    border-radius: 8px;
  }
  body.single-product .ml-add-row.ml-add-pribor span {
    margin-top: 0;
    margin-right: 6px;
  }
  body.single-product .ml-add-row.ml-add-pribor::before {
    content: "Dodaj u košaricu";
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
  }
}

/* =============================================
   SVI TIPOVI — standalone section ISPOD SVIH TABOVA
   ============================================= */
.svi-tipovi-sep {
  border: 0;
  border-top: 2px solid var(--ml-border-strong, #cbd5e1);
  margin: 72px 0 36px;
  opacity: 0.55;
}
.svi-tipovi-standalone {
  padding-top: 0;
  /* Uvijek vidljiv — dok je bio u tabs, toggle-ao se display:none */
  display: block !important;
}
.svi-tipovi-h {
  margin-top: 0;
  margin-bottom: 24px !important;
  padding-top: 8px;
}

/* ==============================================================
   GALLERY REDESIGN · OBO.hr INSPIRED (vert thumbs left + big right)
   ============================================================== */

/* ⚠️ OVERRIDE: stari Woo default gallery CSS (sticky, old thumbs wrapper) je zastario jer gallery više ne poziva woocommerce_show_product_images() */
body.single-product .ml-product-gallery {
  position: sticky;
  top: calc(var(--ml-header-h) + 24px);
  min-width: 0;
  display: flex !important;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 18px;
  width: 100% !important;
  min-height: 480px;
  background: #ffffff;
}
/* Makni stari Woo gallery inner wrappere ako ih slučajno Net/Browser cache drži */
body.single-product .ml-product-gallery .woocommerce-product-gallery,
body.single-product .ml-product-gallery .flex-control-thumbs,
body.single-product .ml-product-gallery .woocommerce-product-gallery__wrapper {
  display: none !important;
}

/* --- Lijevi vertikalni thumbnails (OBO layout vert stupac 5-6komada) --- */
.ml-gal-thumbs {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 10px;
  width: 84px;
  flex: 0 0 84px;
  max-height: 580px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-right: 2px;
}
.ml-gal-thumbs::-webkit-scrollbar { width: 4px; }
.ml-gal-thumbs::-webkit-scrollbar-track { background: transparent; }
.ml-gal-thumbs::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }

.gal-thumb {
  display: block;
  width: 84px;
  height: 84px;
  border: 2px solid var(--ml-border, #e2e8f0);
  border-radius: 6px;
  background: #ffffff;
  padding: 2px;
  cursor: pointer;
  transition: all 180ms ease;
  flex: 0 0 auto;
  overflow: hidden;
}
.gal-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
}
.gal-thumb:hover {
  border-color: var(--ml-primary, #1e6cb7);
  box-shadow: none !important;
  transform: none !important;
}
.gal-thumb.active {
  border-color: var(--ml-primary, #1e6cb7) !important;
  box-shadow: none !important;
  background: #eff6ff;
}

/* --- Desna velika slika (main) + caption --- */
.ml-gal-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.ml-gal-main-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #ffffff;
  border: 1px solid var(--ml-border, #e2e8f0);
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  box-shadow: none !important;
  transform: none !important;
  transition: border-color 180ms ease;
}
.ml-gal-main-inner:hover {
  box-shadow: none !important;
  transform: none !important;
}
.ml-gal-main-inner img[data-gal-main-img] {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-height: unset !important;
  min-height: unset !important;
  object-fit: contain !important;
  object-position: center !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
}

/* Zoom gumb (gornji desni kut glavne slike, OBO.de stil) */
.ml-gal-zoom-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--ml-border, #e2e8f0);
  color: var(--ml-primary, #1e6cb7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none !important;
  transition: all 180ms ease;
  padding: 0;
  line-height: 1;
}
.ml-gal-zoom-btn:hover {
  background: var(--ml-primary, #1e6cb7);
  color: #ffffff;
  border-color: var(--ml-primary, #1e6cb7);
  transform: none !important;
  box-shadow: none !important;
}
.ml-gal-zoom-btn:active { transform: scale(0.96); }

/* Caption ispod slike (vrsta slike: Fotografija / Stručni crtež) + brojač */
.ml-gal-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 8px 14px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #334155;
}
.ml-gal-caption small {
  font-size: 0.82rem;
  line-height: 1.4;
}
.ml-gal-caption small:first-child {
  font-weight: 700;
  color: var(--ml-primary, #1e6cb7);
}
.ml-gal-counter {
  font-weight: 500;
  opacity: 0.8;
  color: #64748b;
}

/* ==============================================================
   LIGHTBOX ZOOM MODAL · fullscreen + +/- zoom + prev/next + drag
   ============================================================== */
#mlLightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
#mlLightbox.open { display: flex; }

/* Overlay close (klik van slike) */
#mlLightboxOverlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  cursor: zoom-out;
}

/* Top bar (close + zoom + counter) */
.ml-lightbox-topbar {
  position: absolute;
  top: 22px;
  left: 22px;
  right: 22px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}
.ml-lightbox-topbar > * { pointer-events: auto; }
.ml-lightbox-counter {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.55);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.ml-lightbox-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.55);
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.ml-lb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1;
  transition: all 140ms ease;
  font-family: inherit;
}
.ml-lb-btn:hover {
  background: var(--ml-primary, #1e6cb7);
  border-color: var(--ml-primary, #1e6cb7);
  transform: translateY(-1px);
}
.ml-lb-btn.close-btn {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(248, 113, 113, 0.5);
  color: #ffffff;
  font-size: 1.15rem;
  min-width: 44px;
  height: 44px;
}
.ml-lb-btn.close-btn:hover { background: #ef4444; border-color: #ef4444; }

/* Stage WRAP (glavna slika + caption iznad thumba + thumbnails ispod = OBO stil) */
.ml-lightbox-stage-wrap {
  position: relative;
  z-index: 3;
  width: 92vw;
  max-width: 1600px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 18px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.45);
  overflow: hidden;
  user-select: none;
  touch-action: none;
}
/* Slika (zoomable + draggable) */
.ml-lightbox-stage {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 72vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid var(--ml-border, #e2e8f0);
  border-radius: 10px;
  padding: 0;
  touch-action: none;
}
.ml-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transform-origin: center center;
  transition: transform 120ms ease-out;
  will-change: transform;
  -webkit-user-drag: none;
  user-select: none;
  display: block;
  margin: 0 auto;
}

/* Caption (iznad thumbnaila, unutar bijelog wrapa, plavi pill) */
.ml-lightbox-caption {
  position: static !important;
  left: auto !important;
  bottom: auto !important;
  transform: none !important;
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--ml-primary, #1e6cb7);
  font-size: 0.88rem;
  font-weight: 700;
  border: 1px solid rgba(30, 108, 183, 0.12);
  pointer-events: none;
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  z-index: 5;
}

/* Thumbnails strip ISPOD (OBO stil, bijela pozadina unutar wrapa) */
.ml-lightbox-thumbs {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  padding: 4px 2px 6px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  background: transparent;
}
.ml-lightbox-thumbs::-webkit-scrollbar { height: 4px; }
.ml-lightbox-thumbs::-webkit-scrollbar-track { background: transparent; }
.ml-lightbox-thumbs::-webkit-scrollbar-thumb { background: rgba(203,213,225,.8); border-radius: 999px; }
.ml-lb-thumb {
  flex: 0 0 auto;
  width: 88px;
  height: 72px;
  padding: 0;
  background: #ffffff;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: all 140ms ease;
  display: block;
  box-shadow: 0 2px 6px rgba(15,23,42,.08);
}
.ml-lb-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f8fafc;
  padding: 4px;
  border-radius: 4px;
}
.ml-lb-thumb:hover {
  border-color: rgba(30, 108, 183, 0.4);
  transform: translateY(-1px);
}
.ml-lb-thumb.active {
  border-color: var(--ml-primary, #1e6cb7) !important;
  box-shadow: 0 0 0 3px rgba(30, 108, 183, 0.14);
  background: #eff6ff;
}

/* Top bar (counter + controls + close) IZNAD bijelog boxa */
.ml-lightbox-topbar {
  position: absolute;
  top: calc(50% - (min(92vh, 900px) / 2) - 60px);
  left: 50%;
  transform: translateX(-50%);
  width: min(92vw, 1600px);
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}
@media (max-height: 820px) {
  .ml-lightbox-topbar {
    top: 12px;
    width: 92vw;
  }
}

/* Prev / Next arrovi (strane, bijele unutar bijelog stage-wrap okvira) */
.ml-lb-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--ml-dark, #0f172a);
  border: 1px solid var(--ml-border, #e2e8f0);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 140ms ease;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.ml-lb-arrow:hover {
  background: var(--ml-primary, #1e6cb7);
  color: #ffffff;
  border-color: var(--ml-primary, #1e6cb7);
  transform: translateY(-50%) scale(1.06);
  box-shadow: 0 12px 32px rgba(30, 108, 183, 0.22);
}
.ml-lb-arrow.prev { left: 28px; }
.ml-lb-arrow.next { right: 28px; }

/* Duplicate old caption rule — obrisano jer je definirano iznad u stage-wrap bloku. */

/* --- RESPONSIVE gallery: ≤1100px -> thumbs postaju HORIZONTALNI iznad velike slike (mob) --- */
@media (max-width: 1100px) {
  body.single-product .ml-product-gallery {
    flex-direction: column;
    gap: 14px;
    min-height: unset;
  }
  .ml-gal-thumbs {
    width: 100%;
    max-height: 104px;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding-right: 0;
    padding-bottom: 2px;
  }
  .gal-thumb { width: 76px; height: 76px; }
  .ml-gal-main-inner { aspect-ratio: 4 / 3; min-height: 320px; }
}
@media (max-width: 767px) {
  body.single-product .ml-product-gallery { position: static; }
  .ml-gal-zoom-btn { width: 36px; height: 36px; top: 8px; right: 8px; }
  .ml-gal-main-inner { padding: 0; min-height: 280px; }
  .gal-thumb { width: 68px; height: 68px; }
  .ml-lb-arrow { width: 42px; height: 42px; }
  .ml-lb-arrow.prev { left: 8px; } .ml-lb-arrow.next { right: 8px; }
  .ml-lightbox-counter { font-size: 0.8rem; }
}

/* ==============================================================
   TEHNIČKI PODACI TAB · Stručni crtež (figure iznad tablice dimenzija)
   ============================================================== */
body.single-product .ml-tech-drawing {
  margin: 8px auto 28px auto;
  padding: 0;
  max-width: 86%;
  display: block;
  text-align: center;
}
.ml-tech-drawing-inner {
  background: #ffffff;
  border: 1px solid var(--ml-border, #e2e8f0);
  border-radius: 10px;
  padding: 0;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
  transition: box-shadow 200ms ease, transform 200ms ease;
}
.ml-tech-drawing-inner:hover {
  box-shadow: 0 14px 38px rgba(30, 108, 183, 0.12);
  transform: translateY(-1px);
}
.ml-tech-drawing-inner img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 460px;
  object-fit: contain;
  margin: 0 auto;
}
.ml-tech-drawing-cap {
  margin-top: 10px;
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--ml-primary, #1e6cb7);
  font-weight: 700;
  font-size: 0.86rem;
}
@media (max-width: 1100px) {
  body.single-product .ml-tech-drawing { max-width: 100%; }
  .ml-tech-drawing-inner { padding: 0; }
  .ml-tech-drawing-inner img { max-height: 340px; }
}
@media (max-width: 767px) {
  body.single-product .ml-tech-drawing { margin-bottom: 20px; }
  .ml-tech-drawing-inner img { max-height: 280px; }
}

/* ================================================================
   Responsive tweaks za novi grid 3-col + lightbox thumbs (OBO)
   ================================================================ */
@media (max-width: 767px) {
  .ml-lightbox-stage-wrap {
    width: 98vw;
    max-height: 96vh;
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
  }
  .ml-lightbox-stage { max-height: 62vh; border-radius: 8px; }
  .ml-lightbox-thumbs { gap: 8px; padding: 2px 0; }
  .ml-lb-thumb { width: 68px; height: 56px; }
  .ml-lb-arrow { width: 40px; height: 40px; }
  .ml-lb-arrow.prev { left: 6px; } .ml-lb-arrow.next { right: 6px; }
  .ml-lightbox-topbar {
    top: 8px !important;
    width: 98vw !important;
  }
  .ml-lightbox-counter { font-size: 0.8rem; padding: 4px 10px; }
  .ml-lightbox-caption { font-size: 0.8rem; padding: 6px 14px; }
  body.single-product .ml-obo-hero { gap: 22px; }
  body.single-product .ml-obo-gallery { max-width: 100%; margin: 0; }
  body.tax-product_cat ul.products li.product a.woocommerce-LoopProduct-link,
  body.post-type-archive-product ul.products li.product a.woocommerce-LoopProduct-link {
    padding: 12px 12px 14px;
  }
  body.tax-product_cat ul.products li.product img,
  body.post-type-archive-product ul.products li.product img {
    margin-bottom: 12px !important;
  }
  .ml-product-title {
    white-space: normal;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: clamp(1.35rem, 5vw, 1.8rem);
  }
}

/* =========================================================
   Faza Y.5 — Filter bar za overview Perforiranih (OBO benchmark)
   Flat dizajn: bez sjena, bez lifta, 12px radius, Inter font
   ========================================================= */
.ml-cat-filters {
  width: 100%;
  margin: 8px 0 28px 0;
  padding: 20px 22px;
  background: #ffffff;
  border: 1px solid var(--ml-border, #e2e8f0);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: none !important;
}
.ml-cf-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: none !important;
}
.ml-cf-label {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: #475569;
  min-width: 112px;
  flex-shrink: 0;
  letter-spacing: -0.01em;
}
.ml-cf-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  box-shadow: none !important;
}
.ml-cf-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid var(--ml-border, #e2e8f0);
  background: #ffffff;
  color: var(--ml-primary, #1e6cb7);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none !important;
  transform: none !important;
  line-height: 1;
}
.ml-cf-pill:hover {
  border-color: var(--ml-primary, #1e6cb7);
  color: var(--ml-primary, #1e6cb7);
  background: #ffffff;
  box-shadow: none !important;
  transform: none !important;
}
.ml-cf-pill:focus-visible {
  outline: 2px solid var(--ml-primary, #1e6cb7);
  outline-offset: 2px;
}
.ml-cf-pill.is-active {
  background-color: var(--ml-primary, #1e6cb7);
  color: #ffffff;
  border-color: var(--ml-primary, #1e6cb7);
  font-weight: 700;
  box-shadow: none !important;
  transform: none !important;
}
.ml-cf-pill.is-active:hover {
  background-color: var(--ml-primary, #1e6cb7);
  color: #ffffff;
  box-shadow: none !important;
  transform: none !important;
}

@media (max-width: 767px) {
  .ml-cat-filters {
    padding: 16px 14px;
    margin: 4px 0 22px 0;
    gap: 14px;
    border-radius: 12px;
  }
  .ml-cf-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .ml-cf-label {
    min-width: unset;
    font-size: 0.9rem;
  }
  .ml-cf-pill {
    height: 38px;
    padding: 0 14px;
    font-size: 0.88rem;
  }
}

/* =========================================================
   Faza L1 — Ljestvičaste kanale overview (term 760)
   Konzistentnost s Perforiranim: subcat kartice sakrivene na overviewu
   Filtri se primjenjuju na PRODUCT kartice (ne subcat)
   ========================================================= */
body.tax-product_cat.term-760 .woocommerce ul.products li.product-category.product,
body.tax-product_cat.term-760 .woocommerce ul.products li.product-category {
  display: none;
}

/* =========================================================
   SHOP GLAVNA STRANICA (/shop/) — archive-product.php
   Korak 1 (3 grupe) + Podgrupa pill + Lijevi filter + Grid
   Dizajn: FLAT, bez sjena, bez hover transformacija (project memory pravila)
   Typography: Inter H1-H6 (naslovi), Nunito Sans (body)
   Font weights: Pill brojevi 700, Pill labele 600, Spec labele 500, Spec vrijednosti 600
   ========================================================= */

/* ---------- Glavni wrapper ---------- */
.ml-shop {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 80px;
  box-sizing: border-box;
  font-family: 'Nunito Sans', -apple-system, sans-serif;
  color: #2b2f3b;
}

/* ---------- KORAK 1 ---------- */
.ml-shop-korak1 { width: 100%; }
.ml-shop-korak1-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}
.ml-korak-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5a5f6e;
  font-weight: 600;
  margin: 0 0 6px 0;
}
.ml-korak-title {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 1.9rem;
  line-height: 1.2;
  color: #2b2f3b;
  margin: 0;
  padding: 0;
  letter-spacing: -0.01em;
}
.ml-shop-prikazi-sve {
  font-size: 0.92rem;
  font-weight: 600;
  color: #1598c9;
  text-decoration: none;
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
}
.ml-shop-prikazi-sve:hover { color: #22b8f0; }

/* Grupe 3-kartice grid */
.ml-shop-groups-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.ml-shop-group-card {
  position: relative;
  border: 1px solid #e2e4e9;
  border-radius: 4px;
  padding: 24px 22px 20px;
  background: #ffffff;
  box-sizing: border-box;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s ease;
}
.ml-shop-group-card.is-active {
  background: #2b2f3b;
  border-color: #2b2f3b;
  color: #ffffff;
}
.ml-shop-group-num {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: #8a8fa0;
  margin-bottom: 14px;
  letter-spacing: 0.05em;
}
.ml-shop-group-card.is-active .ml-shop-group-num { color: #9ba0b0; }
.ml-shop-group-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 10px 0;
  color: inherit;
}
.ml-shop-group-desc {
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0 0 18px 0;
  color: #555a6a;
  flex-grow: 1;
}
.ml-shop-group-card.is-active .ml-shop-group-desc { color: #c6cad6; }

.ml-shop-group-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: none;
  border: 0;
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  color: #1598c9;
  cursor: pointer;
  align-self: flex-start;
}
.ml-shop-group-card.is-active .ml-shop-group-cta { color: #ffffff; }
.ml-shop-group-cta:focus { outline: none; }

/* ---------- Podgrupa: 1 redak pillova (P2 spec: 1 redak, mješano po grupi) ---------- */
.ml-shop-subgroup-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid #e8eaee;
  border-bottom: 1px solid #e8eaee;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.ml-shop-subgroup-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #5a5f6e;
  letter-spacing: -0.005em;
}
.ml-shop-subgroup-pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ml-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 6px;
  border: 1px solid #d4d7df;
  background: #ffffff;
  color: #2b2f3b;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  box-sizing: border-box;
  min-width: 64px;
}
.ml-pill:hover { border-color: #b5b8c1; }
.ml-pill.is-active {
  background: #2b2f3b;
  border-color: #2b2f3b;
  color: #ffffff;
  font-weight: 700;
}
.ml-pill:focus { outline: none; }

/* ---------- BODY 2 kolone (filter lijevo + grid desno) ---------- */
.ml-shop-body {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 32px;
  align-items: start;
}

/* ---------- LIJEVI FILTER ---------- */
.ml-shop-filter {
  border-radius: 4px;
  box-sizing: border-box;
}
.ml-shop-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eceef2;
}
.ml-shop-filter-title {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: #2b2f3b;
}
.ml-shop-filter-clear {
  background: none;
  border: 0;
  padding: 2px 4px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #5a5f6e;
  border-bottom: 1px solid #c2c6d1;
  cursor: pointer;
}
.ml-shop-filter-clear:hover { color: #1598c9; border-color: #1598c9; }
.ml-shop-filter-clear:focus { outline: none; }

.ml-filter-fieldset {
  border: 0;
  padding: 14px 0;
  margin: 0;
  border-bottom: 1px solid #eceef2;
}
.ml-filter-fieldset.is-empty { opacity: 0.35; }
.ml-filter-legend {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #2b2f3b;
  padding: 0 0 10px 0;
  margin: 0;
}
.ml-filter-radio-label,
.ml-filter-check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  font-size: 0.9rem;
  color: #3a3f4d;
  cursor: pointer;
  user-select: none;
}
.ml-filter-radio-label input,
.ml-filter-check-label input {
  accent-color: #1598c9;
  width: 16px;
  height: 16px;
  cursor: pointer;
  margin: 0;
}

/* ---------- REZULTATI (desno) ---------- */
.ml-shop-results { width: 100%; min-width: 0; }
.ml-shop-results-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}
.ml-shop-count {
  font-size: 0.96rem;
  color: #2b2f3b;
}
.ml-shop-count strong {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1.02rem;
}
/* WC default sort select styling */
.woocommerce .ml-shop-results .woocommerce-ordering select.orderby {
  padding: 8px 36px 8px 12px;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.9rem;
  border: 1px solid #d4d7df;
  border-radius: 4px;
  background: #ffffff;
  min-height: 38px;
  color: #2b2f3b;
}

/* Aktivni filteri (chipsi) */
.ml-shop-activefilters {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 22px;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid #eceef2;
  border-bottom: 1px solid #eceef2;
  flex-wrap: wrap;
}
.ml-shop-activefilters-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ml-af-label {
  font-size: 0.86rem;
  color: #5a5f6e;
  font-weight: 600;
  margin-right: 4px;
}
.ml-af-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 10px;
  background: #eef4f8;
  color: #1598c9;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 4px;
}
.ml-af-chip-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1598c9;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 3px;
}
.ml-af-chip-close:hover { background: #1598c9; color: #ffffff; }
.ml-shop-clearall {
  background: none;
  border: 0;
  padding: 4px 4px 6px 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #5a5f6e;
  border-bottom: 1px solid #c2c6d1;
  cursor: pointer;
}
.ml-shop-clearall:hover { color: #1598c9; border-color: #1598c9; }
.ml-shop-clearall:focus { outline: none; }

/* ---------- GRID proizvoda (3 kolone) ---------- */
.woocommerce ul.products.ml-ul-shopgrid,
.ml-shop-results ul.products {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 20px !important;
  padding: 0 !important;
  margin: 0 0 32px 0 !important;
  list-style: none !important;
  width: 100%;
}
.woocommerce ul.products.ml-ul-shopgrid::before,
.woocommerce ul.products.ml-ul-shopgrid::after,
.ml-shop-results ul.products::before,
.ml-shop-results ul.products::after { display: none !important; }

.ml-product-card.woocommerce {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  position: relative;
  background: #ffffff;
  border: 1px solid #e2e4e9;
  border-radius: 4px;
  box-sizing: border-box;
  list-style: none !important;
}
.ml-product-card::before,
.ml-product-card::after { display: none !important; }

/* Medija (slika ili placeholder + 2 badge) */
.ml-pc-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f7f8fa;
  overflow: hidden;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ml-pc-img-link {
  display: block;
  width: 100%;
  height: 100%;
}
.ml-pc-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
  padding: 16px;
  box-sizing: border-box;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
}
.ml-pc-ph-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}
.ml-pc-ph-placeholder { width: 100%; height: 100%; display: block; }

/* Badge lijevi (prefix PK) + badge desni (KB sku) */
.ml-pc-badge {
  position: absolute;
  top: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  padding: 4px 8px;
  border-radius: 3px;
  background: #ffffff;
  border: 1px solid #e2e4e9;
  box-sizing: border-box;
}
.ml-pc-badge-left {
  left: 12px;
  color: #1598c9;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.ml-pc-badge-right {
  right: 12px;
  color: #6a6f7e;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Naslov proizvoda */
.ml-pc-title {
  margin: 0;
  padding: 16px 18px 4px 18px;
  font-family: 'Inter', sans-serif;
  font-size: 0.98rem;
  line-height: 1.35;
  font-weight: 500;
  color: #2b2f3b;
  min-height: 3.8em;
}
.ml-pc-title-link {
  color: inherit;
  text-decoration: none;
}
.ml-pc-title-link:hover { color: #1598c9; }

/* Spec tablica 2 kolone */
.ml-pc-spec {
  display: grid;
  grid-template-columns: 1fr 2px 1fr;
  gap: 10px;
  margin: 12px 18px 16px 18px;
  padding: 0;
}
.ml-pc-spec-row {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  gap: 4px;
  margin: 0;
  padding: 0;
}
.ml-pc-spec-divider {
  align-self: stretch;
  border-left: 1px solid #e6e8ed;
}
.ml-pc-spec-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: #6a6f7e;
  margin: 0;
  padding: 0;
}
.ml-pc-spec-val {
  font-family: 'Inter', sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  color: #2b2f3b;
  margin: 0;
  padding: 0;
  font-variant-numeric: tabular-nums;
}

/* CTA gumb */
.ml-pc-cta {
  padding: 0 18px 20px 18px;
  border-top: 1px solid #eceef2;
  margin: 0;
  padding-top: 14px;
}
.ml-pc-cta-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 2px 4px 2px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #2b2f3b;
  text-decoration: none;
}
.ml-pc-cta-link span { flex-grow: 1; }
.ml-pc-cta-link svg { opacity: 0.7; }
.ml-pc-cta-link:hover { color: #1598c9; }
.ml-pc-cta-link:hover svg { opacity: 1; }

/* ---------- INDIVIDUALNI product_cat arhiv (unitarno grid + naslov) ---------- */
.ml-term-archive {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 24px 80px;
  box-sizing: border-box;
  font-family: 'Nunito Sans', sans-serif;
  color: #2b2f3b;
}
.ml-term-header {
  margin: 12px 0 24px 0;
  padding-bottom: 18px;
  border-bottom: 2px solid #22b8f0;
}
.ml-term-title {
  font-family: 'Inter', sans-serif;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 8px 0;
  padding: 0;
  color: #2b2f3b;
}
.ml-term-desc {
  color: #555a6a;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Term arhive grid (default WC grid poštujemo) */
body.tax-product_cat ul.products {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 20px !important;
  width: 100%;
}
body.tax-product_cat ul.products::before,
body.tax-product_cat ul.products::after { display: none !important; }

/* P1: DUPLA SIGURNOST - ako remove_action ne uhvati, ostaje skriveno CSS-om */
body.tax-product_cat .ml-cf-wrap,
body.tax-product_cat .ml-cat-filters,
body.tax-product_cat .ml-filter-perforirani,
body.tax-product_cat [class*="perforirani-filterbar"] {
  display: none !important;
}

/* ---------- Responsive (1280 / 1024 / 768 / 480) ---------- */
@media (max-width: 1080px) {
  .ml-shop-groups-grid { grid-template-columns: 1fr; }
  .ml-shop-body { grid-template-columns: 260px 1fr; gap: 20px; }
  .woocommerce ul.products.ml-ul-shopgrid,
  .ml-shop-results ul.products { grid-template-columns: repeat(2, 1fr) !important; }
  body.tax-product_cat ul.products { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 780px) {
  .ml-shop-body { grid-template-columns: 1fr; }
  .ml-shop-filter { border: 1px solid #e2e4e9; padding: 18px; border-radius: 4px; }
  .woocommerce ul.products.ml-ul-shopgrid,
  .ml-shop-results ul.products { grid-template-columns: 1fr !important; }
  body.tax-product_cat ul.products { grid-template-columns: 1fr !important; }
  .ml-korak-title { font-size: 1.55rem; }
}
@media (max-width: 480px) {
  .ml-shop { padding: 20px 16px 60px; }
  .ml-shop-group-card { min-height: unset; }
  .ml-pc-title { min-height: unset; }
}

