/* ============================================
   KOMESTIC - Mobile Bottom Toolbar
   Add to: assets/css/mobile-toolbar.css
   ============================================ */

/* ---- Spacer so page content isn't hidden behind toolbar ---- */
body.has-mobile-toolbar {
    padding-bottom: 70px;
}

/* ---- Main toolbar container ---- */
.komestic-mobile-toolbar {
    display: none; /* hidden on desktop */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fff;
    border-top: 1px solid #f0ece6;
    height: 70px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

/* ---- Inner flex row ---- */
.komestic-mobile-toolbar__inner {
    display: flex;
    align-items: stretch;
    height: 100%;
    width: 100%;
}

/* ---- Individual tab item ---- */
.komestic-mobile-toolbar__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    color: #888;
    font-size: 15px;
    font-family: inherit;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: none;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    transition: color 0.2s ease;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.komestic-mobile-toolbar__item:hover,
.komestic-mobile-toolbar__item.active {
    color: #3052A4;
    text-decoration: none;
}

/* ---- Icon wrapper ---- */
.komestic-mobile-toolbar__icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
}

.komestic-mobile-toolbar__icon svg {
    width: 30px;
    height: 58px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.18s ease;
}

.komestic-mobile-toolbar__item:active .komestic-mobile-toolbar__icon svg {
    transform: scale(0.88);
}

/* Active dot indicator */
.komestic-mobile-toolbar__item.active::after {
    content: '';
    position: absolute;
    top: 6px;
    width: 4px;
    height: 4px;
    background: #b8860b;
    border-radius: 50%;
}

/* ---- Badge (cart count) ---- */
.komestic-toolbar-badge {
    position: absolute;
    top: -5px;
    right: -7px;
    background: #b8860b;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    letter-spacing: 0;
    text-transform: none;
    pointer-events: none;
}

.komestic-toolbar-badge:empty,
.komestic-toolbar-badge[data-count="0"] {
    display: none;
}

/* ---- Label ---- */
.komestic-mobile-toolbar__label {
    line-height: 1;
    transition: opacity 0.2s;
}

/* ---- Show only on mobile ---- */
@media (max-width: 991px) {
    .komestic-mobile-toolbar {
        display: flex;
    }
}

/* ---- Safe area for iPhone notch ---- */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .komestic-mobile-toolbar {
        height: calc(75px + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
    }
    body.has-mobile-toolbar {
        padding-bottom: calc(75px + env(safe-area-inset-bottom));
    }
}
