/* ================== FIX: Page width overflow + sticky bar cutoff (Issue 2) ================== */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

* {
    max-width: 100%;
}

@media (max-width: 768px) {
    /* Ensure content never sits under the sticky bottom bar */
    body {
        padding-bottom: 64px;
    }

    /* Mobile dropdown menu must never exceed viewport width */
    .mobile-dropdown-menu {
        max-width: calc(100vw - 32px);
        right: 0;
        left: auto;
    }

    /* Sticky bar always pinned fully visible at bottom */
    .sticky-mobile-cta {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
    }
}

/* ================== FIX: Mobile header overflow (Issue 1) ================== */
.mobile-header-controls {
    display: none;
    align-items: center;
    gap: 8px;               /* was missing → buttons could overlap/overflow */
    flex-shrink: 0;
}

.mobile-direct-call,
.insta-mobile-btn,
.three-dot-menu-btn {
    flex-shrink: 0;          /* prevent icons from shrinking off-screen */
    width: 36px;
    height: 36px;
    min-width: 36px;
}

@media (max-width: 768px) {
    .mobile-header-controls { display: flex; }

    /* Reduce logo text size so it doesn't push icons off small screens */
    .logo { font-size: 1.1rem; }
    .logo i { font-size: 1rem; }
    .logo-img { height: 34px; }
}

@media (max-width: 360px) {
    .header-container { gap: 6px; }
    .logo { font-size: 0.95rem; }
    .logo-img { height: 30px; }
    .mobile-header-controls { gap: 6px; }
    .mobile-direct-call,
    .insta-mobile-btn,
    .three-dot-menu-btn {
        width: 34px;
        height: 34px;
        min-width: 34px;
        font-size: 1rem;
    }
}

/* ================== FIX: Sticky mobile bar — always 1 row of 4, auto-fit width (Issue 3) ================== */
.sticky-mobile-cta {
    display: flex !important;
    grid-template-columns: none !important;
    flex-wrap: nowrap !important;
    width: 100%;
    overflow: hidden;
}

.sticky-cta-item {
    flex: 1 1 0;
    min-width: 0;          /* allow items to shrink below content size */
    padding: 8px 2px;
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sticky-cta-item i {
    font-size: 1rem;
}

.sticky-cta-item.cta-instagram {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    color: white;
}

@media (max-width: 400px) {
    .sticky-cta-item { font-size: 0.62rem; padding: 7px 1px; gap: 1px; }
    .sticky-cta-item i { font-size: 0.9rem; }
}

@media (max-width: 340px) {
    .sticky-cta-item { font-size: 0.58rem; padding: 6px 1px; }
    .sticky-cta-item i { font-size: 0.85rem; }
}

/* ================== HIDE THREE-DOT MENU (not needed for now) ================== */
.three-dot-menu-btn {
    display: none !important;
}
.mobile-dropdown-menu {
    display: none !important;
}

/* ================== DESKTOP SAFETY OVERRIDE ================== */
@media (min-width: 769px) {
    body {
        padding-bottom: 0 !important;
    }

    .sticky-mobile-cta {
        display: none !important;
    }
}
