/* =====================================================
   MP HEADER - mp-header.css
   ===================================================== */


/* =====================================================
   1) GLAVA - vrstica
   ===================================================== */
.header-center .mp-head {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 0;
}

/* --- LOGO --- */
.mp-head__logo {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}
.mp-head__logo img {
  display: block;
  height: 48px;
  width: auto;
}

/* --- ISKALNIK (SO SearchPro modul) --- */
.mp-head__search {
  flex: 1 1 auto;
  min-width: 0;
}
.mp-head__search input[type="text"],
.mp-head__search input.autosearch-input,
.mp-head__search .form-control {
  width: 100% !important;
  height: 46px !important;
  border: 1px solid #d8dae5 !important;
  border-radius: 9999px !important;
  padding-left: 18px !important;
  box-shadow: none !important;
  font-size: 14px !important;
}
.mp-head__search input:focus,
.mp-head__search .form-control:focus {
  border-color: #2B3D8F !important;
  outline: none !important;
}

/* --- ORODJA --- */
.mp-head__tools {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}


/* =====================================================
   2) ENOSTAVNE IKONE: zelje / primerjava / racun
   ===================================================== */
.mp-head__action--icon {
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #2B3D8F;
  transition: background-color 0.2s ease;
  text-decoration: none;
}
.mp-head__action--icon:hover {
  background: #f3f4f5;
  color: #2B3D8F;
  text-decoration: none;
}

.mp-head__action--icon .mp-head__action-ico {
  font-size: 20px;
  line-height: 1;
  color: #2B3D8F;
}

/* tekst skrit, a dostopen za bralnike */
.mp-head__action--icon .mp-head__action-txt {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* rdec krogec za stevec (zelje + primerjava) */
.mp-head__badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #F81D4B;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}
.mp-head__badge[data-empty="true"] { display: none; }


/* =====================================================
   3) KOSARICA - sam markup SO Market:
      <div class="mp-head__cart">
        <div id="cart" class="btn-group btn-shopping-cart">
          <a class="top_cart dropdown-toggle">
            <div class="shopcart">
              <span class="handle"><i class="icon-basket icons"></i></span>
              <span class="title">Kosarica |</span>
              <p class="text-shopping-cart cart-total-full">0 izdelek...</p>
            </div>
          </a>
          <ul class="shoppingcart-box">...</ul>
        </div>
        <span class="mp-cart-badge">0</span>
      </div>
   ===================================================== */

.mp-head__cart {
  position: relative;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* notranji #cart */
.mp-head__cart #cart.btn-group,
.mp-head__cart #cart {
  width: 44px;
  height: 44px;
  position: static;            /* dropdown se sidra na .mp-head__cart */
  margin: 0; padding: 0;
  background: transparent;
  box-shadow: none;
  border: 0;
}

/* klikabilna povezava (krog) */
.mp-head__cart .top_cart {
  width: 44px; height: 44px;
  display: inline-flex !important;
  align-items: center; justify-content: center;
  padding: 0 !important; margin: 0 !important;
  background: transparent !important;
  border: 0 !important; box-shadow: none !important;
  border-radius: 50%;
  cursor: pointer;
  color: #2B3D8F;
  transition: background-color 0.2s ease;
}
.mp-head__cart .top_cart:hover,
.mp-head__cart .top_cart:focus,
.mp-head__cart .top_cart.open { background: #f3f4f5; }

/* notranji .shopcart - poravnaj v eno vrsto */
.mp-head__cart .shopcart {
  display: inline-flex !important;
  align-items: center; justify-content: center;
  width: 100%; height: 100%;
  margin: 0 !important; padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

/* .handle - ovojnica za ikono */
.mp-head__cart .shopcart .handle {
  display: inline-flex !important;
  align-items: center; justify-content: center;
  margin: 0 !important; padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  float: none !important;
  width: auto !important; height: auto !important;
}

/* ikona kosarice */
.mp-head__cart .shopcart .handle i.icon-basket,
.mp-head__cart .shopcart .handle i.icons {
  font-size: 22px !important;
  color: #2B3D8F !important;
  line-height: 1 !important;
  margin: 0 !important;
}

/* SKRIJ tekste "Kosarica |" in "0 izdelek(ov) - 0,00 EUR" */
.mp-head__cart .shopcart .title,
.mp-head__cart .shopcart .text-shopping-cart,
.mp-head__cart .shopcart .cart-total-full {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* RDEC KROGEC */
.mp-head__cart .mp-cart-badge {
  position: absolute;
  top: 0; right: 0;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  background: #F81D4B; color: #fff;
  border: 2px solid #fff;
  border-radius: 999px;
  font-size: 10px; font-weight: 700;
  line-height: 14px; text-align: center;
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
}
.mp-head__cart .mp-cart-badge[data-empty="true"] { display: none; }

/* DROPDOWN .shoppingcart-box - poravnaj desno */
.mp-head__cart .shoppingcart-box {
  right: 0 !important;
  left: auto !important;
  min-width: 280px;
  z-index:99999;
  margin-top: 8px !important;
  border-radius: 8px;
  border: 1px solid #e1e3e4;
  box-shadow: 0 14px 34px rgba(15, 36, 120, 0.13);
}


/* =====================================================
   4) MOBILE: skrij sekundarna orodja, iskalnik v polno sirino
   ===================================================== */
@media (max-width: 1299px) {
  .header-center .mp-head { flex-wrap: wrap; gap: 12px; padding: 10px 0; }
  .mp-head__logo img { height: 38px; }
  .mp-head__action--hide-mobile { display: none !important; }
  .mp-head__search { order: 3; flex-basis: 100%; }
}

/* =====================================================
   MINI CART - MOBILE FIX / DRAWER CARD
   Prepreci horizontalni overflow na mobile
   ===================================================== */

@media (max-width: 768px) {

  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .mp-head__cart {
  position: relative !important;
}

.mp-head__cart #cart.btn-group,
.mp-head__cart #cart {
  position: static !important;
}

.mp-head__cart .mp-cart-badge {
  top: 0 !important;
  right: 0 !important;
  z-index: 100 !important;
}

  .mp-head__cart .shoppingcart-box,
  #cart .shoppingcart-box,
  .shoppingcart-box.dropdown-menu {
    position: fixed !important;
    top: 72px !important;
    left: 12px !important;
    right: 12px !important;

    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;

    max-height: calc(100vh - 92px);
    overflow-y: auto;
    overflow-x: hidden;

    margin: 0 !important;
    padding: 0 !important;

    border-radius: 14px !important;
    z-index: 999999 !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22) !important;
  }

  .shoppingcart-box .table {
    width: 100% !important;
    margin-bottom: 0 !important;
    table-layout: fixed;
  }

  .shoppingcart-box .table td {
    padding: 10px 8px !important;
    vertical-align: top !important;
  }

  .shoppingcart-box .table td:first-child {
    width: 64px !important;
  }

  .shoppingcart-box img.preview {
    width: 56px !important;
    height: 56px !important;
    object-fit: contain;
  }

  .shoppingcart-box .cart_product_name {
    display: block;
    max-width: 100%;
    font-size: 13px;
    line-height: 1.35;
    word-break: break-word;
  }

  .shoppingcart-box .cart-price-d {
    font-size: 13px;
    white-space: nowrap;
  }

  .shoppingcart-box .table-bordered td {
    font-size: 13px;
  }

  .shoppingcart-box p.text-right {
    display: flex;
    gap: 8px;
    padding: 12px;
    margin: 0 !important;
    text-align: center !important;
  }

  .shoppingcart-box p.text-right .btn {
    flex: 1 1 0;
    min-height: 42px;
    padding: 10px 8px !important;
    font-size: 13px;
    border-radius: 10px;
    white-space: nowrap;
  }
  
   .header-center .mp-head {
    position: relative;
  }

  .mp-head__tools {
    margin-left: auto !important;
    justify-content: flex-end !important;
  }

  .mp-head__cart {
    margin-left: auto !important;
    margin-right: 0 !important;
  }
}

/* =====================================================
   MEGA PROMO VARIANTE (A in B)
   - A: izdelek dneva  (.mp-mega__promo--product)
   - B: pomoc pri izbiri (.mp-mega__promo--help)
   ===================================================== */

/* skupna osnova - oba sta gradnja na obstojecem .mp-mega__promo */
.mp-mega__promo--product,
.mp-mega__promo--help {
  display: none;        /* skrito na mobile drawerju, kot original */
}

@media (min-width: 992px) {

  .mp-mega__promo--product,
  .mp-mega__promo--help {
    display: flex;
    flex-direction: column;
    flex: 0 0 250px;
    min-height: 230px;
    margin: 28px 20px 24px 0;
    padding: 18px;
    border-radius: 8px;
    background: #2B3D8F;
    color: #fff;
    overflow: hidden;
    transition: filter 0.2s ease;
  }
  .mp-mega__promo--product:hover,
  .mp-mega__promo--help:hover { filter: brightness(1.06); color: #fff; }


  /* =========================================
     VARIANTA A: TOP IZDELEK
     ========================================= */
  .mp-mega__promo--product .mp-promo__pill {
    align-self: flex-start;
    background: rgba(255,255,255,0.14);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    border-radius: 999px;
    margin-bottom: 10px;
  }

  .mp-mega__promo--product .mp-promo__row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
  }
  .mp-mega__promo--product .mp-promo__thumb {
    width: 64px; height: 64px;
    background: rgba(255,255,255,0.12);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
  }
  .mp-mega__promo--product .mp-promo__thumb img {
    max-width: 100%; max-height: 100%; object-fit: contain;
  }
  .mp-mega__promo--product .mp-promo__thumb i {
    font-size: 28px;
    color: rgba(255,255,255,0.85);
  }
  .mp-mega__promo--product .mp-promo__info { min-width: 0; }
  .mp-mega__promo--product .mp-promo__name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 4px;
  }
  .mp-mega__promo--product .mp-promo__spec {
    display: block;
    font-size: 11px;
    opacity: 0.85;
    line-height: 1.35;
  }

  .mp-mega__promo--product .mp-promo__bottom {
    margin-top: auto;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
  }
  .mp-mega__promo--product .mp-promo__prices { display: flex; flex-direction: column; }
  .mp-mega__promo--product .mp-promo__old {
    font-size: 11px;
    opacity: 0.7;
    text-decoration: line-through;
    line-height: 1;
  }
  .mp-mega__promo--product .mp-promo__new {
    font-size: 20px;
    font-weight: 700;
    color: #F81D4B;
    line-height: 1.1;
    margin-top: 2px;
  }
  .mp-mega__promo--product .mp-promo__cta {
    background: #F81D4B;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 6px;
    white-space: nowrap;
  }


  /* =========================================
     VARIANTA B: POMOC PRI IZBIRI
     ========================================= */
  .mp-mega__promo--help .mp-promo__icon-wrap {
    width: 44px; height: 44px;
    background: rgba(255,255,255,0.14);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 12px;
  }
  .mp-mega__promo--help .mp-promo__icon-wrap i {
    font-size: 22px;
    color: #fff;
  }
  .mp-mega__promo--help .mp-promo__title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 4px;
  }
  .mp-mega__promo--help .mp-promo__sub {
    font-size: 11px;
    opacity: 0.85;
    line-height: 1.4;
    margin-bottom: 14px;
  }
  .mp-mega__promo--help .mp-promo__actions {
    margin-top: auto;
    display: flex;
    gap: 6px;
  }
  .mp-mega__promo--help .mp-promo__btn {
    flex: 1;
    text-align: center;
    padding: 8px 6px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    transition: opacity 0.2s ease, background-color 0.2s ease;
  }
  .mp-mega__promo--help .mp-promo__btn--solid { background: #F81D4B; }
  .mp-mega__promo--help .mp-promo__btn--solid:hover { opacity: 0.9; color: #fff; }
  .mp-mega__promo--help .mp-promo__btn--ghost { background: rgba(255,255,255,0.14); }
  .mp-mega__promo--help .mp-promo__btn--ghost:hover { background: rgba(255,255,255,0.22); color: #fff; }
}


/* =====================================================
   IKONSKE PISAVE - font-display: swap
   ===================================================== */
@font-face {
  font-family: "FontAwesome";
  font-display: swap;
  src: local("FontAwesome");
}
@font-face {
  font-family: "simple-line-icons";
  font-display: swap;
  src: local("simple-line-icons");
}