/* =========================================
   PowerGroom Mobile Bottom Navigation
   Dark Theme
   ========================================= */

.pg-mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;

  z-index: 999999;

  display: grid;
  grid-template-columns: repeat(5, 1fr);

  box-sizing: border-box;

  width: 100%;
  min-height: 68px;

  padding: 7px 4px calc(7px + env(safe-area-inset-bottom));

  background: #111111 !important;

  border-top: 1px solid rgba(255, 255, 255, 0.10) !important;

  box-shadow:
    0 -4px 16px rgba(0, 0, 0, 0.18) !important;
}


/* =========================
   Navigation item
   ========================= */

.pg-mobile-bottom-nav .pg-mobile-nav-item {
  appearance: none;
  -webkit-appearance: none;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;

  min-width: 0;

  margin: 0;
  padding: 3px 1px;

  border: 0;
  outline: 0;

  background: transparent !important;
  color: #ffffff !important;

  font: inherit;
  text-align: center;

  cursor: pointer;

  -webkit-tap-highlight-color: transparent;
}


/* =========================
   Icon
   ========================= */

.pg-mobile-bottom-nav .pg-mobile-nav-icon {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 27px;
  height: 27px;

  flex-shrink: 0;

  color: inherit !important;
}

.pg-mobile-bottom-nav .pg-mobile-nav-icon svg {
  display: block;

  width: 25px;
  height: 25px;

  fill: none !important;

  stroke: currentColor !important;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* =========================
   Label
   ========================= */

.pg-mobile-bottom-nav .pg-mobile-nav-label {
  display: block;

  margin-top: 3px;

  max-width: 100%;

  overflow: hidden;

  color: inherit !important;

  font-size: 11px;
  font-weight: 600;
  line-height: 13px;

  white-space: nowrap;
  text-overflow: ellipsis;
}


/* =========================
   Cart total
   ========================= */

.pg-mobile-bottom-nav .pg-mobile-cart-total {
  display: block;

  margin-top: 1px;

  max-width: 100%;

  color: #cfcfcf !important;

  font-size: 10px;
  font-weight: 600;
  line-height: 11px;

  white-space: nowrap;
}


/* =========================
   Cart badge
   ========================= */

.pg-mobile-bottom-nav .pg-mobile-cart-count {
  position: absolute;

  top: -7px;
  right: -10px;

  display: flex;
  align-items: center;
  justify-content: center;

  box-sizing: border-box;

  min-width: 18px;
  height: 18px;

  padding: 0 4px;

  border-radius: 999px;

  background: #eab848 !important;
  color: #111111 !important;

  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
}

.pg-mobile-cart-count[hidden] {
  display: none !important;
}


/* =========================
   Interaction
   ========================= */

.pg-mobile-bottom-nav .pg-mobile-nav-item:hover,
.pg-mobile-bottom-nav .pg-mobile-nav-item:focus,
.pg-mobile-bottom-nav .pg-mobile-nav-item:active {
  color: #ffffff !important;
}

.pg-mobile-bottom-nav .pg-mobile-nav-item:active {
  opacity: 0.6;
}


/* =========================
   Active item
   ========================= */

.pg-mobile-bottom-nav .pg-mobile-nav-item.pg-active {
  color: #eab848 !important;
}

.pg-mobile-bottom-nav
.pg-mobile-nav-item.pg-active
.pg-mobile-cart-total {
  color: #eab848 !important;
}


/* =========================
   Mobile only
   ========================= */

@media (max-width: 767px) {
  body {
    padding-bottom:
      calc(
        82px +
        env(safe-area-inset-bottom)
      );
  }

  /*
   * Скриваме оригиналния Ecwid mobile header
   * само визуално. Той остава в DOM и
   * продължава да подава live cart data-count.
   */
  .ins-header {
    display: none !important;
  }
}


/* =========================
   Desktop
   ========================= */

@media (min-width: 768px) {
  .pg-mobile-bottom-nav {
    display: none !important;
  }

  /* Целият cart бутон */
  body .ins-header__icons
  .ins-header__icon.ins-header__icon--cart {
    position: relative !important;

    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;

    box-sizing: border-box !important;

    width: 54px !important;
    min-width: 54px !important;
    max-width: 54px !important;

    height: auto !important;

    margin: 0 !important;
    padding: 0 !important;

    overflow: visible !important;

    text-align: center !important;
  }

  /* Самата Ecwid икона */
  body .ins-header__icons
  .ins-header__icon.ins-header__icon--cart > svg {
    position: relative !important;

    display: block !important;

    width: 24px !important;
    height: 24px !important;

    margin: 0 auto !important;
    padding: 0 !important;

    flex: none !important;

    transform: none !important;
  }

  /* Скриваме оригиналния Ecwid badge */
  body .ins-header__icons
  .ins-header__icon.ins-header__icon--cart::after {
    display: none !important;
    content: none !important;
  }

  /* Нашият собствен badge */
  body .ins-header__icons
  .ins-header__icon.ins-header__icon--cart::before {
    content: attr(data-count) !important;

    position: absolute !important;

    top: -7px !important;
    right: 6px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    box-sizing: border-box !important;

    width: 18px !important;
    min-width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 50% !important;

    background: #eab848 !important;
    color: #111111 !important;

    font-size: 10px !important;
    font-weight: 700 !important;
    line-height: 18px !important;

    text-align: center !important;

    box-shadow: none !important;

    z-index: 5 !important;

    pointer-events: none !important;
  }

  body .ins-header__icons
  .ins-header__icon.ins-header__icon--cart[data-count="0"]::before {
    display: none !important;
  }

  /* Сумата под иконата */
  body .ins-header__icons
  .ins-header__icon.ins-header__icon--cart
  .pg-desktop-cart-total {
    position: static !important;

    display: block !important;

    box-sizing: border-box !important;

    width: 54px !important;
    min-width: 54px !important;
    max-width: 54px !important;

    margin: 4px 0 0 !important;
    padding: 0 !important;

    color: currentColor !important;

    font-size: 10px !important;
    font-weight: 700 !important;
    line-height: 11px !important;

    text-align: center !important;
    white-space: nowrap !important;

    transform: none !important;
  }

  body .ins-header__icons
  .ins-header__icon.ins-header__icon--cart
  .pg-desktop-cart-total[hidden] {
    display: none !important;
  }
}
