/* Phone-only header */
.site-header,
.storefront-primary-navigation,
.header-widget-region,
.secondary-navigation,
.site-header-cart {
    display: none !important;
}

.tfd-mobile-header {
    position: relative;
    z-index: 9998;
    width: 100%;
    background: #fff;
    border-bottom: 1px solid #e3e3e3;
    box-shadow: 0 3px 14px rgba(0,0,0,.08);
}

.tfd-mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 34px;
    padding: 6px 14px;
    background: #202020;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
}

.tfd-mobile-topbar a,
.tfd-mobile-topbar span {
    color: #fff !important;
    text-decoration: none !important;
    white-space: nowrap;
}

.tfd-mobile-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 70px;
    padding: 9px 14px 7px;
    background: #fff;
}

.tfd-mobile-brand {
    display: block;
    max-width: 190px;
    line-height: 1;
}

.tfd-mobile-brand .custom-logo-link {
    display: block;
}

.tfd-mobile-brand img,
.tfd-mobile-brand .custom-logo {
    display: block;
    width: auto;
    max-width: 180px;
    max-height: 54px;
    margin: 0;
    object-fit: contain;
}

.tfd-mobile-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tfd-mobile-call,
.tfd-mobile-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 1px solid #b72b22;
    border-radius: 5px;
    text-decoration: none !important;
}

.tfd-mobile-call {
    width: 42px;
    background: #fff;
    color: #b72b22 !important;
    font-size: 18px;
}

.tfd-mobile-menu-button {
    gap: 8px;
    padding: 8px 12px;
    background: #b72b22;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.tfd-bars {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 18px;
}

.tfd-bars span {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
}

.tfd-mobile-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 94px;
    gap: 8px;
    padding: 0 14px 12px;
    background: #fff;
}

.tfd-mobile-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.tfd-mobile-search input[type="search"] {
    width: 100%;
    height: 46px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid #cfcfcf;
    border-right: 0;
    border-radius: 5px 0 0 5px;
    background: #fff;
    color: #222;
    font-size: 15px;
    box-shadow: none;
}

.tfd-mobile-search button {
    width: 42px;
    height: 46px;
    margin: 0;
    padding: 0;
    border: 1px solid #b72b22;
    border-radius: 0 5px 5px 0;
    background: #b72b22;
    color: #fff;
    font-size: 24px;
}

.tfd-mobile-navigation {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
    background: #fff;
    border-top: 1px solid #e2e2e2;
    box-shadow: 0 10px 22px rgba(0,0,0,.14);
}

.tfd-mobile-navigation[hidden] {
    display: none !important;
}

.tfd-mobile-menu,
.tfd-mobile-menu ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.tfd-mobile-menu > li {
    border-bottom: 1px solid #ececec;
}

.tfd-mobile-menu a {
    display: block;
    padding: 14px 18px;
    color: #222 !important;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none !important;
}

.tfd-mobile-menu .sub-menu {
    background: #f8f8f8;
}

.tfd-mobile-menu .sub-menu a {
    padding-left: 34px;
    font-size: 14px;
    font-weight: 500;
}

.tfd-mobile-nav-footer {
    display: grid;
    gap: 8px;
    padding: 16px 18px;
    background: #202020;
    color: #fff;
    font-size: 13px;
}

.tfd-mobile-nav-footer a {
    color: #fff !important;
    font-weight: 700;
    text-decoration: none !important;
}

@media (max-width: 390px) {
    .tfd-mobile-brand img,
    .tfd-mobile-brand .custom-logo {
        max-width: 150px;
        max-height: 46px;
    }

    .tfd-mobile-topbar {
        font-size: 10px;
    }
}


.tfd-mobile-visit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    height: 46px;
    padding: 0 9px;
    border: 1px solid #b72b22;
    border-radius: 5px;
    background: #fff;
    color: #b72b22 !important;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;
    white-space: nowrap;
}

.tfd-mobile-visit span:first-child {
    font-size: 18px;
}

/* Hide Storefront's old mobile footer/search bar. The new header already
   provides working product search, phone and directions actions. */
.storefront-handheld-footer-bar,
.handheld-navigation + .storefront-handheld-footer-bar,
#site-navigation .handheld-navigation,
.mobile-bottom-bar,
.sticky-mobile-bar,
.mobile-search-overlay,
.site-search.active,
.widget_product_search[style*="position: fixed"] {
    display: none !important;
}

/* Prevent old fixed mobile bars from reserving excessive red space. */
body {
    padding-bottom: 0 !important;
}

@media (max-width: 390px) {
    .tfd-mobile-search-row {
        grid-template-columns: minmax(0, 1fr) 84px;
        gap: 6px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .tfd-mobile-visit {
        padding-left: 7px;
        padding-right: 7px;
        font-size: 12px;
    }
}
