/* Desktop header: city-pincode like reference - teal icon + "CITY - PINCODE" full text */
.ps-location--mini {
    flex-shrink: 0;
}

.ps-location--mini .ps-location__trigger {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    width: auto !important;
    min-width: auto !important;
    padding-right: 6px;
}

.ps-location--mini .ps-location__trigger>i.icon-map-marker {
    color: var(--t2-primary, #0d9488) !important;
    font-size: 18px !important;
}

.ps-location--mini .header-location-city-pincode {
    position: static !important;
    display: inline !important;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--t2-dark, #0f172a) !important;
    white-space: nowrap;
    letter-spacing: 0.02em;
    bottom: auto !important;
    right: auto !important;
    overflow: visible !important;
    max-width: none !important;
    text-overflow: unset !important;
}

.ps-location--mini .ps-location__trigger:hover .header-location-city-pincode {
    color: var(--t2-dark, #0f172a) !important;
}

/* Header logo - use weblogo.png everywhere, scales at any size */
.header .ps-logo img,
.header img.header-logo,
.header--mobile .ps-logo img,
.header--mobile img.header-logo,
.header--mobile-product .ps-logo img,
.header--mobile-categories .ps-logo img {
    object-fit: contain !important;
    width: auto !important;
    max-width: 100%;
}

/* Keep Quikr Mart logo (weblogo.png) visible in header even when sticky - override default hide */
.header.header--sticky .header__left .ps-logo {
    display: block !important;
}

.header.header--sticky .header__left .ps-logo img {
    max-height: 40px !important;
    height: 40px !important;
}

/* === Mobile header - no red background === */
.header--mobile {
    background: var(--t2-surface, #fff) !important;
    overflow: visible !important;
}

/* === Mobile app bar: logo | location (GPS + city-pincode) | cart === */
.header--mobile .mobile-app-bar {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    gap: 10px;
}

.header--mobile .mobile-app-bar .navigation__left {
    flex: 0 0 auto;
}

.header--mobile .mobile-app-bar .navigation__right {
    flex: 0 0 auto;
    margin-left: auto;
}

/* Location bar - full width row below app bar */
.header--mobile .mobile-location-bar {
    padding: 6px 15px;
    background: var(--t2-bg, #f8fafc);
    border-bottom: 1px solid var(--t2-border, #e2e8f0);
}

.header--mobile .mobile-location-bar .mobile-location__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--t2-dark, #0f172a) !important;
    text-decoration: none;
}

.header--mobile .mobile-location-bar .mobile-location__link i {
    font-size: 16px;
    color: var(--t2-primary, #0d9488) !important;
    flex-shrink: 0;
}

.header--mobile .mobile-location-bar .mobile-location__link:hover {
    color: var(--t2-primary) !important;
}

/* App bar icons - stay visible on hover (no white/disappear) */
.header--mobile .mobile-app-bar .header__extra,
.header--mobile .mobile-app-bar .header__extra i,
.header--mobile .mobile-app-bar .ps-block--user-header a,
.header--mobile .mobile-app-bar .ps-block--user-header a i {
    color: var(--t2-dark, #0f172a) !important;
}

.header--mobile .mobile-app-bar .header__extra:hover,
.header--mobile .mobile-app-bar .header__extra:hover i,
.header--mobile .mobile-app-bar .ps-block--user-header a:hover,
.header--mobile .mobile-app-bar .ps-block--user-header a:hover i {
    color: var(--t2-primary, #0d9488) !important;
}

/* Search bar - full width, no red on sides */
@media (max-width: 1199px) {
    .header--mobile .ps-search--mobile {
        display: block !important;
    }
}

.header--mobile .ps-search--mobile {
    padding: 10px 15px;
    border-bottom: 1px solid var(--t2-border, #e2e8f0);
    background: var(--t2-surface, #fff) !important;
    max-width: 100% !important;
    margin: 0 !important;
}

.header--mobile .ps-search--mobile .form-group--nest,
.header--mobile .ps-form--search-mobile {
    display: flex !important;
    align-items: center;
    gap: 8px;
    width: 100% !important;
    max-width: 100% !important;
}

.header--mobile .ps-form--search-mobile .form-group--nest {
    position: relative !important;
    overflow: visible !important;
}

.header--mobile .ps-search--mobile,
.header--mobile .ps-form--search-mobile {
    overflow: visible !important;
}

/* Mobile: flat panel, no elevated card, dividers only between suggestions */
.header--mobile .ps-panel--search-result-mobile,
.header .ps-panel--search-result.ps-panel--search-result-mobile {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: auto !important;
    max-height: 320px !important;
    padding: 12px !important;
    padding-bottom: 8px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    background-color: #ffffff !important;
    background: #ffffff !important;
    z-index: 9999 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.header--mobile .ps-panel--search-result-mobile .ps-panel__content,
.header .ps-panel--search-result-mobile .ps-panel__content {
    padding: 0 !important;
    width: 100% !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: 280px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    background-color: transparent !important;
}

/* Search suggestions: flat panel, dividers only, no elevated card */
.ps-panel--search-result {
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.ps-panel--search-result .ps-panel__content {
    width: 100% !important;
    box-sizing: border-box !important;
    max-height: 320px !important;
    overflow-y: auto !important;
}

.ps-panel--search-result .ps-product--search-result,
.ps-panel--search-result .ps-product.ps-product--wide.ps-product--search-result {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.ps-panel--search-result .ps-product--search-result>*,
.ps-panel--search-result .ps-product.ps-product--wide.ps-product--search-result>* {
    flex-basis: auto !important;
}

.ps-panel--search-result .ps-product__thumbnail {
    flex: 0 0 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 28px !important;
    max-width: 28px !important;
}

.ps-panel--search-result .ps-product__title {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.ps-panel--search-result .ps-product {
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 10px 0 !important;
    border: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

.ps-panel--search-result .ps-product:last-child {
    border-bottom: none !important;
}

.ps-panel--search-result .ps-product:hover {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.ps-panel--search-result .ps-product:last-child:hover {
    border-bottom: none !important;
}

.header--mobile .ps-form--search-mobile .form-control {
    flex: 1;
    min-width: 0;
    border-radius: 24px !important;
    padding: 10px 18px !important;
}

.header--mobile .ps-form--search-mobile button {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50% !important;
    background: var(--t2-primary, #0d9488) !important;
    color: #fff !important;
    border: none;
}

/* === Mobile Top Categories - 4 equal columns === */
.t2-top-cats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px 8px;
    padding: 4px 0;
}

.t2-top-cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
}

.t2-top-cat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    margin-bottom: 6px;
}

.t2-top-cat-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.t2-top-cat-name {
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
    color: rgba(255, 255, 255, 0.95);
}

/* === Gaps between Top Categories and banners === */
.t2-top-cats-mobile {
    margin-bottom: 20px !important;
}

#homepage-1 .ps-home-banner .d-block.d-md-none+.ps-container {
    margin-top: 16px !important;
}

/* Cart count badge - white text on primary color circle - SPECIFIC TO CART ONLY */
.ps-cart--mini .header__extra span,
.header .ps-cart--mini .header__extra span,
.header.header--1 .ps-cart--mini .header__extra span,
.header.header--standard .ps-cart--mini .header__extra span,
.header.header--mobile .ps-cart--mini .header__extra span,
.header--mobile .ps-cart--mini .header__extra span {
    background-color: #0d9488 !important;
    color: #ffffff !important;
}

.ps-cart--mini .header__extra span i,
.header .ps-cart--mini .header__extra span i,
.header.header--1 .ps-cart--mini .header__extra span i,
.header.header--standard .ps-cart--mini .header__extra span i,
.header.header--mobile .ps-cart--mini .header__extra span i,
.header--mobile .ps-cart--mini .header__extra span i,
.ps-cart--mini .header__extra span #total-items,
.header .ps-cart--mini .header__extra span #total-items {
    color: #ffffff !important;
}

/* Mobile app bar cart badge */
.header--mobile .mobile-app-bar .header__extra span {
    background-color: var(--t2-primary, #0d9488) !important;
    color: #fff !important;
}

.header--mobile .mobile-app-bar .header__extra span i,
.header--mobile .mobile-app-bar .header__extra span #total-items {
    color: #fff !important;
}