.mobilna-donja-traka,
.mobilni-panel,
.mobilni-panel-overlay {
  display: none;
}

@media (max-width: 760px) {
  :root {
    --mobilna-nav-visina: 68px;
    --mobilna-nav-boja: var(--red, #b51c15);
    --mobilna-nav-tekst: #4a4a4a;
  }

  body {
    padding-bottom: calc(var(--mobilna-nav-visina) + env(safe-area-inset-bottom) + 10px);
  }

  body.mobilni-panel-otvoren,
  body.filter-drawer-open {
    overflow: hidden;
  }

  .site-header > .category-tree-nav {
    display: none !important;
  }

  .site-header .header-actions {
    display: flex !important;
    flex: 0 0 auto;
    gap: 2px;
  }

  .header-main-inner {
    min-height: 68px;
    gap: 8px;
  }

  .header-main-inner .logo img {
    width: clamp(105px, 30vw, 133px);
    height: auto;
  }

  .header-actions .header-action {
    min-width: 31px;
    min-height: 42px;
    justify-content: center;
    padding: 4px;
  }

  .header-actions .header-action svg {
    width: 19px;
    height: 19px;
  }

  .header-actions .action-with-label > span {
    display: none;
  }

  .mobilna-donja-traka {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 130;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: calc(var(--mobilna-nav-visina) + env(safe-area-inset-bottom));
    padding: 5px 4px calc(5px + env(safe-area-inset-bottom));
    border-top: 1px solid #e5e5e5;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 -5px 22px rgba(0, 0, 0, .08);
    backdrop-filter: blur(12px);
  }

  .mobilna-nav-stavka {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 56px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 3px 1px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--mobilna-nav-tekst);
    font: inherit;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .mobilna-nav-stavka svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobilna-nav-stavka > span:last-child {
    max-width: 100%;
    overflow: hidden;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobilna-nav-stavka:hover,
  .mobilna-nav-stavka:focus-visible,
  .mobilna-nav-stavka.aktivna,
  .mobilna-nav-stavka.otvoren {
    color: var(--mobilna-nav-boja);
  }

  .mobilna-nav-stavka.aktivna::before,
  .mobilna-nav-stavka.otvoren::before {
    position: absolute;
    top: -5px;
    left: 50%;
    width: 30px;
    height: 3px;
    border-radius: 999px;
    background: var(--mobilna-nav-boja);
    content: "";
    transform: translateX(-50%);
  }

  .mobilna-nav-ikona-okvir {
    position: relative;
    display: inline-flex;
  }

  .mobilna-nav-badge {
    position: absolute;
    top: -7px;
    right: -10px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--mobilna-nav-boja);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    line-height: 13px;
    text-align: center;
  }

  .mobilna-nav-badge.nema-broja {
    display: none;
  }

  .mobilni-panel-overlay {
    position: fixed;
    inset: 0 0 calc(var(--mobilna-nav-visina) + env(safe-area-inset-bottom)) 0;
    z-index: 105;
    display: block;
    background: rgba(0, 0, 0, .34);
  }

  .mobilni-panel-overlay[hidden],
  .mobilni-panel[hidden] {
    display: none !important;
  }

  .mobilni-panel {
    position: fixed;
    right: 0;
    bottom: calc(var(--mobilna-nav-visina) + env(safe-area-inset-bottom));
    left: 0;
    z-index: 115;
    display: block;
    max-height: min(72vh, 620px);
    overflow: hidden;
    border: 1px solid #e4e4e4;
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
    background: #fff;
    box-shadow: 0 -12px 34px rgba(0, 0, 0, .18);
  }

  .mobilni-panel-zaglavlje {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0 16px;
    border-bottom: 1px solid #ededed;
  }

  .mobilni-panel-zaglavlje strong {
    font-size: 17px;
  }

  .mobilni-panel-zatvori {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f4f4f4;
    color: #333;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
  }

  .mobilni-panel-sadrzaj {
    max-height: calc(min(72vh, 620px) - 55px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 10px 16px 20px;
    -webkit-overflow-scrolling: touch;
  }

  .mobilni-glavni-meni {
    padding-top: 0;
  }

  .mobilni-meni-svi,
  .mobilni-meni-odjel-sve {
    display: block;
    padding: 12px 8px;
    color: var(--mobilna-nav-boja);
    font-size: 13px;
    font-weight: 800;
  }

  .mobilni-meni-odjel {
    border-top: 1px solid #ececec;
  }

  .mobilni-meni-odjel > summary {
    position: relative;
    padding: 15px 30px 15px 8px;
    list-style: none;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
  }

  .mobilni-meni-odjel[open] > summary {
    position: sticky;
    top: 0;
    z-index: 4;
    border-bottom: 1px solid #eaded9;
    background: #fff;
    color: var(--mobilna-nav-boja);
    box-shadow: 0 4px 10px rgba(0, 0, 0, .07);
  }

  .mobilni-meni-odjel > summary::-webkit-details-marker {
    display: none;
  }

  .mobilni-meni-odjel > summary::after {
    position: absolute;
    top: 50%;
    right: 9px;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    content: "";
    transform: translateY(-65%) rotate(45deg);
  }

  .mobilni-meni-odjel[open] > summary::after {
    transform: translateY(-35%) rotate(225deg);
  }

  .mobilni-meni-odjel-sadrzaj {
    padding: 0 0 10px 8px;
  }

  .mobilni-meni-grupa {
    padding: 8px;
    border-top: 1px solid #f0f0f0;
  }

  .mobilni-meni-grupa-naslov {
    display: block;
    padding: 5px 0;
    color: #242424;
    font-size: 13px;
    font-weight: 750;
  }

  .mobilni-meni-linkovi {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 14px;
  }

  .mobilni-meni-linkovi a {
    padding: 8px 0;
    border-bottom: 1px solid #f2f2f2;
    color: #626262;
    font-size: 12px;
    line-height: 1.3;
  }

  .mobilni-profil {
    display: grid;
    gap: 4px;
    padding-top: 14px;
  }

  .mobilni-profil-kupac {
    display: grid;
    gap: 3px;
    margin-bottom: 8px;
    padding: 12px 13px;
    border-radius: 10px;
    background: #f7f4f2;
  }

  .mobilni-profil-kupac span,
  .mobilni-profil-poruka {
    color: #6f6f6f;
    font-size: 12px;
  }

  .mobilni-profil > a,
  .mobilni-profil-odjava button {
    display: flex;
    width: 100%;
    min-height: 46px;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    border: 0;
    border-bottom: 1px solid #eee;
    background: #fff;
    color: #242424;
    font: inherit;
    font-size: 14px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
  }

  .mobilni-profil-odjava {
    margin: 0;
  }

  .mobilni-profil-odjava button {
    color: var(--mobilna-nav-boja);
  }

  .mobilni-profil-broj {
    min-width: 24px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #f0f0f0;
    color: #555;
    font-size: 11px;
    text-align: center;
  }

  .mobilni-profil-poruka {
    margin: 0 0 10px;
    line-height: 1.45;
  }

  .mobilni-profil > a.mobilni-profil-primarni {
    justify-content: center;
    margin-bottom: 6px;
    border: 1px solid var(--mobilna-nav-boja);
    border-radius: 8px;
    background: var(--mobilna-nav-boja);
    color: #fff;
    font-weight: 750;
  }
}

@media (max-width: 380px) {
  .mobilna-nav-stavka > span:last-child { font-size: 9px; }
  .mobilna-nav-stavka svg { width: 21px; height: 21px; }
}
