/* trading_search.css */

.trading-surface {
    width: 100%;
    padding: 1.5rem;
    box-sizing: border-box;
}
@media (min-width: 768px) {
    .trading-surface {
        padding: 1.5rem 1.5rem 1.5rem 1rem;
    }
}
@media (max-width: 767px) {
    .trading-surface {
        padding: 0.5rem;
    }
}

/* Namespaced Trading Search Input Controls */
.app-trading-search__control {
  position: relative;
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  border-radius: 16px;
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.app-trading-search__control:focus-within {
  border-color: var(--input-focus-border);
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

.app-trading-search__icon-wrapper {
  color: var(--text-secondary);
  font-size: 1rem;
  padding: 0 0 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.app-trading-search__input {
  display: block;
  flex: 1;
  box-sizing: border-box;
  height: 40px;
  padding: 0 14px 0 10px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 0.9375rem;
  line-height: 1.25;
  touch-action: manipulation;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.app-trading-search__input::placeholder {
  color: var(--text-secondary);
}

.app-trading-search__input:focus {
  outline: none;
}

/* ============================================================
   DESKTOP: Always-visible inline search bar (≥ 768px)
   ============================================================ */
@media (min-width: 768px) {
    /* The toggle button (magnifying glass icon) is hidden on desktop */
    #app-trading-search-toggle {
        display: none !important;
    }

    /* The dropdown wrapper is always shown — override [hidden] attribute */
    #app-trading-search-dropdown {
        display: block !important;
        position: static !important;
        visibility: visible !important;
        pointer-events: auto !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        z-index: auto !important;
        box-shadow: none !important;
        background: none !important;
        border: none !important;
    }

    /* Inner form wrapper — flat and inline */
    .app-trading-search-dropdown__inner {
        display: flex !important;
        flex-direction: column !important;
        transform: none !important;
        opacity: 1 !important;
        background-color: transparent !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        overflow: visible !important;
        width: 100% !important;
    }

    .app-trading-search-dropdown__inner form {
        padding: 0 !important;
        background: none !important;
        width: 100% !important;
        max-width: 420px !important;
    }

    /* Autocomplete suggestions on desktop */
    .app-trading-search-autocomplete-dropdown {
        position: absolute !important;
        top: calc(100% + 6px) !important;
        left: 0 !important;
        right: 0 !important;
        max-height: 320px !important;
        overflow-y: auto !important;
        background-color: var(--bg-surface) !important;
        border: 1px solid var(--border-color) !important;
        border-radius: 12px !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25) !important;
        z-index: 300 !important;
    }
    .app-trading-search-autocomplete-dropdown[hidden] {
        display: none !important;
    }

    /* Ensure the search container is positioned for the autocomplete */
    #app-trading-search {
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        flex: 1 !important;
        max-width: 420px !important;
    }
}

/* ============================================================
   MOBILE: Slide-down search panel (< 768px)
   ============================================================ */
@media (max-width: 767px) {
    .app-trading-search-dropdown {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        top: calc(var(--app-header-height, 60px) + env(safe-area-inset-top, 0px)) !important;
        width: auto !important;
        height: 80vh !important;
        max-height: 80vh !important;
        z-index: 220 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transition: visibility 0.3s ease !important;
    }
    .app-trading-search-dropdown__inner {
        height: 100% !important;
        max-height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        transform: translateY(-100%) !important;
        opacity: 0 !important;
        transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.22s ease !important;
        will-change: transform, opacity !important;
        background-color: var(--bg-surface) !important;
        border-bottom: 1px solid var(--border-color) !important;
        border-radius: 0 0 16px 16px !important;
        box-shadow: 0 8px 24px rgba(0,0,0,0.3) !important;
        overflow: hidden !important;
    }
    
    /* Open states triggered by is-open class on parent #app-trading-search */
    #app-trading-search.is-open .app-trading-search-dropdown {
        visibility: visible !important;
        pointer-events: auto !important;
    }
    #app-trading-search.is-open .app-trading-search-dropdown__inner {
        transform: translateY(0) !important;
        opacity: 1 !important;
    }

    .app-trading-search-dropdown__inner form {
        flex: 0 0 auto !important;
        padding: 0.75rem 1rem !important;
        background-color: var(--bg-surface) !important;
    }
    /* Suggestion dropdown below the input fits the rest of the height */
    .app-trading-search-autocomplete-dropdown {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        flex: 1 1 auto !important;
        max-height: none !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        border-top: 1px solid var(--border-color) !important;
        overflow-y: auto !important;
        display: block !important;
        background-color: var(--bg-surface) !important;
    }
    .app-trading-search-autocomplete-dropdown[hidden] {
        display: none !important;
    }
}

/* Autocomplete suggestion item styles */
.search-autocomplete-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: background-color 0.12s ease;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    box-sizing: border-box;
}
.search-autocomplete-option:hover, .search-autocomplete-option.is-selected {
    background-color: var(--table-row-hover);
}
.search-autocomplete-option i {
    color: var(--text-secondary);
    font-size: 0.88rem;
    width: 16px;
    text-align: center;
}
.search-autocomplete-option-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-autocomplete-no-results {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* produce-grid and produce-card styles (reused from storefront) */
.produce-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}
.produce-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.produce-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.produce-card-img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    padding: 8px;
    background: var(--table-row-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 2rem;
    box-sizing: border-box;
}
.produce-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.produce-card-title {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.produce-card-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.produce-card-price-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}
.produce-card-price {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
}
.produce-card-comm {
    color: var(--accent-solid);
    font-size: 0.85rem;
    font-weight: 500;
}
.produce-card-delivery-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
}
.produce-card-stock {
    color: var(--text-secondary);
    font-size: 0.85rem;
    background: var(--table-row-bg);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

/* sf-box-grid and sf-box-card styles (reused from storefront) */
.sf-box-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
.sf-box-card {
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 2px solid color-mix(in srgb, var(--box-colour) 40%, transparent);
    background: var(--bg-surface);
    box-shadow: 0 4px 20px color-mix(in srgb, var(--box-colour) 15%, transparent);
    transition: transform 0.2s ease, box-shadow 0.25s ease;
}
.sf-box-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px color-mix(in srgb, var(--box-colour) 28%, transparent);
}
.sf-box-card-header {
    background: var(--box-colour);
    padding: 1.1rem 1.25rem 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}
.sf-box-icon-wrap {
    background: rgba(255,255,255,0.18);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sf-box-icon {
    color: #fff;
    font-size: 1.1rem;
}
.sf-box-tier-label {
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    flex: 1;
}
.sf-box-lug-badge {
    background: rgba(255,255,255,0.22);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    white-space: nowrap;
}
.sf-box-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.sf-box-title {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}
.sf-box-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0 0 0.9rem 0;
    flex: 1;
}
.sf-box-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.9rem;
}
.sf-box-meta span { display: flex; align-items: center; gap: 0.3rem; }
.sf-box-price-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0.75rem 0;
    margin-bottom: 1rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.sf-box-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--box-colour);
    line-height: 1;
}
.sf-box-comm {
    color: var(--accent-solid);
    font-size: 0.85rem;
    font-weight: 500;
}
.sf-box-order-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.sf-box-stepper {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: var(--input-bg);
}
.sf-stepper-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.8rem;
}
.sf-stepper-input {
    width: 40px;
    text-align: center;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    outline: none;
    -moz-appearance: textfield;
}
.sf-stepper-input::-webkit-inner-spin-button,
.sf-stepper-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.sf-box-add-btn {
    flex: 1;
    background: var(--box-colour);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    touch-action: manipulation;
}
.sf-box-add-btn:hover:not(:disabled) { opacity: 0.88; }
.sf-box-add-btn:active:not(:disabled) { transform: scale(0.98); }
.sf-box-add-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.sf-empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    grid-column: 1 / -1;
}

/* steppers and details links for produce-card */
.sf-box-details-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 0.6rem;
    padding: 0.55rem 1rem;
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    box-sizing: border-box;
    transition: background 0.15s, color 0.15s;
    touch-action: manipulation;
}
.sf-box-details-link:hover { background: var(--btn-secondary-hover); color: var(--text-primary); }

.trading-btn {
    display: inline-block;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    box-sizing: border-box;
    transition: background 0.15s;
}
.trading-btn:hover:not(:disabled) {
    background: var(--btn-primary-hover);
}
.trading-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 900px) {
    .sf-box-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .sf-box-grid { grid-template-columns: 1fr; }
}



@media (max-width: 767px) {
    .container.app-page-surface {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .produce-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    .sf-box-grid {
        gap: 0.5rem !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    /* Add padding to text sections in search page so they don't touch screen edge */
    .container.app-page-surface > div:first-child,
    .sf-vegbox-heading,
    section > div:first-child {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    .produce-card-img {
        height: 130px;
    }
    .produce-card-content {
        padding: 0.75rem;
    }
    .produce-card-title {
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .produce-card-desc {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .produce-card-price-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
    }
    .produce-card-price {
        font-size: 1.1rem;
    }
    .produce-card-comm {
        font-size: 0.75rem;
    }
    .produce-card-stock {
        font-size: 0.75rem;
        padding: 0.15rem 0.4rem;
    }
}

/* Produce Catalog Layout */
.produce-catalog-layout {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-top: 1rem;
}

/* Sidebar rail on desktop */
.produce-catalog-filters {
    flex: 0 0 220px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem;
    position: sticky;
    top: calc(var(--app-header-height, 60px) + 20px);
    align-self: flex-start;
    box-sizing: border-box;
}

.produce-catalog-main {
    flex: 1;
    min-width: 0;
}

/* Filter controls */
.produce-catalog-filters__section {
    margin-bottom: 1.25rem;
}

.produce-catalog-filters__label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.produce-catalog-filters__select {
    width: 100%;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-primary);
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    font-size: 0.9rem;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23b4b4b4' viewBox='0 0 16 16'><path fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/></svg>");
    background-repeat: no-repeat;
    background-position: calc(100% - 12px) center;
    padding-right: 32px;
}

.produce-catalog-filters__select:focus {
    border-color: var(--input-focus-border);
}

.produce-catalog-filters__clear {
    display: block;
    text-align: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    margin-top: 1rem;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.produce-catalog-filters__clear:hover {
    background-color: var(--btn-secondary-hover);
    color: var(--text-primary);
}

/* Mobile Trigger and Panel */
.produce-mobile-filters-trigger-wrapper {
    display: none;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}

.produce-mobile-filters-trigger {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    touch-action: manipulation;
}

.produce-mobile-filters-apply-btn {
    background-color: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    touch-action: manipulation;
    transition: background-color 0.15s ease;
}

.produce-mobile-filters-apply-btn:hover {
    background-color: var(--btn-primary-hover);
}

.produce-mobile-filters-clear-btn {
    display: inline-block;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    box-sizing: border-box;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.produce-mobile-filters-clear-btn:hover {
    background-color: var(--btn-secondary-hover);
    color: var(--text-primary);
}

/* Smooth Dropdown Animation Standard for mobile filter panel */
.produce-mobile-filters-panel-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: grid-template-rows;
    overflow: hidden;
    margin-bottom: 1rem;
}
.produce-mobile-filters-panel-inner {
    min-height: 0;
    opacity: 0;
    transition: opacity 0.2s ease;
    will-change: opacity;
    padding: 0.5rem 1rem 1rem 1rem;
}
.produce-mobile-filters-panel-wrapper.is-open {
    grid-template-rows: 1fr;
}
.produce-mobile-filters-panel-wrapper.is-open .produce-mobile-filters-panel-inner {
    opacity: 1;
}

/* Responsiveness overrides */
@media (max-width: 1023px) {
    .produce-catalog-layout {
        flex-direction: column;
        gap: 0;
    }
    .produce-catalog-filters {
        display: none;
    }
    .produce-mobile-filters-trigger-wrapper {
        display: block;
    }
}

/* ═══════════ CART BOTTOM BAR (Mobile only) ═══════════ */
#cart-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom, 0px)) 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
    box-sizing: border-box;
    transform: translateY(0);
    opacity: 1;
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.25s ease, left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

#cart-bottom-bar.is-hidden {
    transform: translateY(calc(100% + 40px)) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ── Desktop: hide the bottom bar, show the top nav pills ── */
@media (min-width: 768px) {
    #cart-bottom-bar {
        display: none !important;
    }
    /* Remove the bottom padding the bottom bar used to need */
    .trading-surface {
        padding-bottom: 1.5rem;
    }
    /* Sidebar shift for content wrapper */
    .app-sidebar-open .content-wrapper {
        margin-left: calc(var(--sidebar-width, 280px) + 16px) !important;
    }
}

/* ═══════════ DESKTOP NAV CART + CUSTOMER PILLS ═══════════ */

/*
 * .sf-desktop-nav-actions — wraps the header__alerts div on the storefront.
 * Adds horizontal flex layout so pills sit neatly before the icon.
 */
.sf-desktop-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/*
 * Base pill style — hidden on mobile, visible on desktop.
 */
.sf-nav-pill {
    display: none; /* hidden mobile-first */
    align-items: center;
    gap: 0.45rem;
    border: none;
    border-radius: 20px;
    padding: 0.45rem 1rem;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    touch-action: manipulation;
    transition: opacity 0.15s ease, transform 0.1s ease;
    white-space: nowrap;
    line-height: 1;
    font-family: inherit;
}
.sf-nav-pill:active { transform: scale(0.97); }

/* Cart pill — filled blue (primary action) */
.sf-nav-pill--cart {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
}
.sf-nav-pill--cart:hover { background: var(--btn-primary-hover); }

/* Separator dot between count and total */
.sf-nav-pill__sep {
    opacity: 0.5;
    font-weight: 400;
}

/* Total amount — slightly bolder */
.sf-nav-pill__total {
    font-variant-numeric: tabular-nums;
    opacity: 0.92;
}

/* Customer pill — secondary style */
.sf-nav-pill--customer {
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
    border: 1px solid var(--border-color);
    max-width: 180px;
}
.sf-nav-pill--customer:hover { background: var(--btn-secondary-hover); }
.sf-nav-pill--customer span { overflow: hidden; text-overflow: ellipsis; max-width: 120px; }

/* Chevron rotates when customer modal is open (optional enhancement) */
.sf-nav-pill__chevron {
    font-size: 0.65rem;
    opacity: 0.6;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

/* Prices pill — clean bridge back to Market Prices app */
.sf-nav-pill--prices {
    background: var(--btn-secondary-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    text-decoration: none !important;
}
.sf-nav-pill--prices:hover {
    background: var(--btn-secondary-hover);
    border-color: var(--accent-solid);
    color: var(--accent-solid);
}

/* ── Show pills only on desktop ── */
@media (min-width: 768px) {
    .sf-nav-pill {
        display: inline-flex;
    }
}

/* ── WeBuyVeg Brand Mark & Responsive Header ── */
.we-buy-veg-mark {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
    border-radius: 6px;
    transition: transform 0.2s ease;
}

@media (max-width: 480px) {
    .we-buy-veg-mark {
        width: 28px;
        height: 28px;
    }
}

/* ── Ultra-narrow screen header protection (< 360px) ── */
@media (max-width: 359px) {
    .we-buy-veg-mark {
        width: 24px;
        height: 24px;
    }
    .app-header__brand .app-header__brand-text {
        font-size: 0.98rem !important;
    }
    .app-header__brand .app-header__tagline {
        display: none !important;
    }
    .app-header__inner {
        gap: 2px !important;
        padding-left: 4px !important;
        padding-right: 4px !important;
    }
}


