/* ============================================
   Sandık Motor - Mobil Navbar
   Sadece mobilde (768px altı) görünür
   ============================================ */

/* ─── Yatay scroll'u engelle ─── */
@media (max-width: 768px) {
    html,
    html body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
}

/* ─── Toolbar Container ─── */
.smn-toolbar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: 100vw;
    z-index: 999999;
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
    padding: 0;
    margin: 0;
    height: 62px;
    align-items: stretch;
    justify-content: space-around;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    box-sizing: border-box;
    overflow: hidden;
}

/* Sadece mobilde göster */
@media (max-width: 768px) {
    .smn-toolbar {
        display: flex !important;
    }

    /* Sayfanın altında navbar kadar boşluk bırak */
    body {
        padding-bottom: 62px !important;
    }

    /* Woodmart temasının kendi toolbar'ını gizle (varsa çakışmasın) */
    .wd-toolbar {
        display: none !important;
    }
}

/* ─── Toolbar Item (Her Buton) ─── */
.smn-toolbar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-decoration: none !important;
    color: #333333;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    padding: 6px 2px;
    position: relative;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    border: none;
    outline: none;
    gap: 3px;
}

.smn-toolbar-item:hover,
.smn-toolbar-item:focus {
    text-decoration: none !important;
}

.smn-toolbar-item:active {
    transform: scale(0.93);
}

/* ─── İkon ─── */
.smn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
}

.smn-icon svg {
    width: 22px;
    height: 22px;
}

/* ─── Etiket ─── */
.smn-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

/* ─── Motor Çeşitleri ─── */
.smn-item-motor {
    color: #333333;
}

.smn-item-motor:hover,
.smn-item-motor:focus {
    background-color: #f5f5f5;
    color: #222222 !important;
}

.smn-item-motor .smn-icon svg {
    stroke: #555555;
}

/* ─── Şanzımanlar ─── */
.smn-item-sanziman {
    color: #333333;
}

.smn-item-sanziman:hover,
.smn-item-sanziman:focus {
    background-color: #f5f5f5;
    color: #222222 !important;
}

.smn-item-sanziman .smn-icon svg {
    stroke: #555555;
}

/* ─── Hemen Ara (Kırmızı) ─── */
.smn-item-call {
    color: #dc2626;
}

.smn-item-call:hover,
.smn-item-call:focus {
    background-color: #fef2f2;
    color: #dc2626 !important;
}

.smn-item-call .smn-icon svg {
    stroke: #dc2626;
}

.smn-item-call .smn-label {
    color: #dc2626;
}

/* Kırmızı pulse animasyon */
.smn-item-call .smn-icon {
    position: relative;
}

.smn-item-call .smn-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(220, 38, 38, 0.15);
    transform: translate(-50%, -50%);
    animation: smn-pulse-red 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes smn-pulse-red {
    0%, 100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 1;
    }
}

/* ─── Teklif İste / WhatsApp (Yeşil) ─── */
.smn-item-whatsapp {
    color: #25d366;
}

.smn-item-whatsapp:hover,
.smn-item-whatsapp:focus {
    background-color: #f0fdf4;
    color: #25d366 !important;
}

.smn-item-whatsapp .smn-icon svg {
    fill: #25d366;
}

.smn-item-whatsapp .smn-label {
    color: #22c55e;
}

/* Yeşil pulse animasyon */
.smn-item-whatsapp .smn-icon {
    position: relative;
}

.smn-item-whatsapp .smn-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.15);
    transform: translate(-50%, -50%);
    animation: smn-pulse-green 2s ease-in-out infinite;
    animation-delay: 1s;
    pointer-events: none;
}

@keyframes smn-pulse-green {
    0%, 100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 1;
    }
}

/* ─── Ayırıcı çizgiler (butonlar arası) ─── */
.smn-toolbar-item + .smn-toolbar-item {
    border-left: 1px solid #f0f0f0;
}

/* ─── iOS Safe Area (notch'lu cihazlar) ─── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .smn-toolbar {
        padding-bottom: env(safe-area-inset-bottom);
        height: calc(62px + env(safe-area-inset-bottom));
    }

    @media (max-width: 768px) {
        body {
            padding-bottom: calc(62px + env(safe-area-inset-bottom)) !important;
        }
    }
}

/* ─── Landscape modda biraz daha kompakt ─── */
@media (max-width: 768px) and (orientation: landscape) {
    .smn-toolbar {
        height: 50px;
    }

    .smn-icon svg {
        width: 18px;
        height: 18px;
    }

    .smn-label {
        font-size: 9px;
    }

    body {
        padding-bottom: 50px !important;
    }
}
