/* Keep the desktop sidebar, and disclose filters only when needed on phones. */
.catalog-filters { min-width: 0; }
.mobile-filter-summary { display: none; }
.catalog-account-controls { display: contents; }
.mobile-market-search { display: none; }
.mobile-market-name { display: none; }

@media (max-width: 768px) {
    html { scroll-padding-top: 8rem; }
    .shop-search-row { display: none; }
    .catalog-page .market-hero-inner { position: relative; }
    .mobile-market-search { display: block; position: absolute; top: 50%; transform: translateY(-50%); right: .75rem; z-index: 5; }
    .mobile-market-search summary { display: grid; place-items: center; width: 48px; height: 48px; margin-left: auto; border: 1px solid #e0eee6; border-radius: 50%; background: #fff; color: #132a13; font-size: 1.3rem; cursor: pointer; list-style: none; box-shadow: 0 3px 12px rgba(19,42,19,.12); }
    .mobile-market-search summary::-webkit-details-marker { display: none; }
    .mobile-market-search[open] { left: .75rem; top: .75rem; transform: none; }
    .mobile-market-search-form { display: flex; align-items: center; gap: .35rem; margin-top: .5rem; padding: .3rem; border-radius: 12px; background: #fff; }
    .mobile-market-search-form input[type="search"] { min-width: 0; width: 100%; min-height: 44px; padding: .5rem; border: 0; border-radius: 8px; background: #fff; color: #132a13; font-size: 16px; }
    .mobile-market-search-form button { flex-shrink: 0; min-height: 44px; padding: .5rem .8rem; border: 0; border-radius: 999px; background: #f2c94c; color: #132a13; font-weight: 800; }
    .mobile-market-search :focus-visible { outline: 3px solid #20864e; outline-offset: 2px; }
    .catalog-page .market-hero-inner:has(.mobile-market-search[open]) { padding-top: 8rem; }
    .market-hero-copy .market-eyebrow { max-width: calc(100% - 56px); }
    .shop-header.sticky-top { position: sticky; top: 0; z-index: 1030; }
    .shop-main-inner { grid-template-columns: minmax(0, 1fr) auto auto; gap: .2rem; padding: .35rem 0; }
    .shop-brand .marketgo-logo { min-width: 104px; height: 34px; padding: .25rem .55rem .3rem; }
    .shop-brand .marketgo-word { font-size: 1.15rem; }
    .shop-brand .marketgo-tag { font-size: .36rem; }
    .catalog-account-controls .shop-action i, .cart-summary-mobile i, .delivery-control i { font-size: 1.1rem; }
    .cart-summary-mobile span { font-size: .8rem; }
    .catalog-account-controls { display: flex; align-items: center; grid-column: 2; grid-row: 1; }
    .catalog-account-controls .account-menu { display: block; }
    .catalog-account-controls .shop-action { display: inline-flex; justify-content: center; width: 44px; min-height: 44px; padding: 0; }
    .catalog-account-controls .shop-action span { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .shop-actions .cart-summary-mobile { grid-column: 3; grid-row: 1; }
    .shop-main-inner, .shop-search-inner { width: calc(100% - 1.5rem); }
    .delivery-control { padding: 0 .4rem; gap: .4rem; min-height: 44px; }
    .delivery-copy { min-width: 0; flex: 1; }
    #deliveryLocationText { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; }
    .delivery-label { display: none; }
    .delivery-change-btn { min-height: 44px; padding: .2rem .55rem; font-size: .75rem; }
    .cart-summary-mobile { padding: .3rem .5rem; min-height: 44px; gap: .35rem; }
    .cart-summary-mobile small { display: none; }
    .shop-search-inner { padding: .25rem 0 .7rem; }
    .search-input { height: 46px; font-size: 16px; }
    .search-btn { min-height: 40px; }
    .mobile-category-menu { display: none; }
    .catalog-inner { width: calc(100% - 1.5rem); }
    .catalog-breadcrumb { font-size: .8rem; margin-bottom: .4rem; }
    .catalog-layout { grid-template-columns: minmax(0, 1fr); gap: .8rem; }
    .catalog-filters { border: 1px solid #e0eee6; border-radius: 12px; background: #fff; }
    .mobile-filter-summary { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 48px; padding: .7rem 1rem; color: #006b5a; font-weight: 700; cursor: pointer; list-style: none; }
    .mobile-filter-summary::-webkit-details-marker { display: none; }
    .mobile-filter-summary span i { margin-right: .4rem; }
    .catalog-filters[open] > summary > i { transform: rotate(180deg); }
    .catalog-sidebar { position: static; grid-template-columns: minmax(0, 1fr); gap: .5rem; padding: .5rem; }
    .filter-summary { padding: .75rem; }
    .filter-body a { min-height: 44px; align-items: center; }
    .sidebar-lower { display: none; }
    .catalog-main { min-width: 0; }
    .catalog-page .market-hero, .catalog-page .market-hero-inner { min-height: 0; }
    .catalog-page .market-hero-inner { display: flex; align-items: center; min-height: clamp(96px, 26vw, 150px); padding: .5rem .75rem; }
    .catalog-page .market-hero h1 { margin: 0; padding: 0; font-size: clamp(.95rem, 4vw, 1.2rem); line-height: 1.15; text-transform: none; }
    .market-hero .desktop-market-name, .market-hero .market-eyebrow, .market-hero .market-hero-actions { display: none; }
    .mobile-market-name { display: grid; place-items: center; width: clamp(120px, 34vw, 190px); min-height: clamp(72px, 20vw, 110px); padding: .6rem; border: 1px solid rgba(255,255,255,.85); border-radius: 22%; background: rgba(19,42,19,.72); color: #f2c94c; text-align: center; text-decoration: none; overflow-wrap: anywhere; }
    .mobile-market-name:hover { color: #f2c94c; }
    .mobile-market-name:focus-visible { outline: 3px solid #f2c94c; outline-offset: 3px; }
    .market-hero-copy > p, .market-hero-points, .hero-shop-btn { display: none; }
    .market-hero-actions { margin-top: .6rem; }
    .market-hero-actions .hero-home-btn { width: auto; min-height: 44px; padding: .5rem .85rem; font-size: .85rem; }
    .category-sections { padding: 0; gap: 1.5rem; }
    .product-category-section, .product-category-section:nth-child(even) { margin-top: 1rem; gap: .7rem; }
    .category-promo { min-height: 0; padding: 1rem; border-radius: 12px; box-shadow: none; }
    .category-promo-copy { padding-right: 25%; }
    .category-promo h2 { max-width: none; font-size: 1.3rem; line-height: 1.2; }
    .category-promo p, .category-promo-eyebrow, .category-shop-button { display: none; }
    .category-promo-image { width: 25%; height: 75px; right: .25rem; bottom: -.5rem; }
    .category-products { padding: 0; background: transparent; box-shadow: none; }
    .category-products .product-category-header { padding: .25rem 0 .65rem; gap: .5rem; }
    .product-category-heading { font-size: 1rem; line-height: 1.3; }
    .category-view-all { min-height: 44px; padding: .4rem; }
    .category-products .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; background: transparent; }
    .product-card { width: 100%; min-width: 0; padding: .5rem; border-radius: 12px; }
    .product-card:hover { transform: none; }
    .product-image-area { min-height: 170px; padding: 32px 0 44px; border-radius: 8px; }
    .product-image-area .card-img-top { height: 100px; max-height: 100px; }
    .wishlist-card-form { top: 0; right: 0; }
    .wishlist-card-button { width: 44px; height: 44px; box-shadow: none; }
    .cart-action { right: 0; bottom: 0; min-height: 44px; }
    .cart-add-btn.add-btn { width: 44px; height: 44px; min-height: 44px; padding: 0; }
    .cart-quantity-control { grid-template-columns: 44px 28px 44px; width: 116px; min-height: 44px; }
    .cart-qty-btn { height: 44px; }
    .product-card .card-body { padding: .6rem .15rem .15rem; text-align: left !important; }
    .product-listing-name { font-size: .9rem; min-height: 2.5em; margin-bottom: .35rem; overflow-wrap: anywhere; }
    .product-pricing { justify-items: start; gap: .3rem; margin: 0 0 .65rem; }
    .product-pricing-main { justify-content: flex-start; }
    .product-pricing--listing .product-selling-price { font-size: .98rem; }
    .product-savings { display: none; }
    .variant-chips { justify-content: flex-start; min-height: 44px; max-height: 96px; gap: .3rem; margin-bottom: 0 !important; }
    .chip { min-height: 44px; padding: .4rem .55rem; max-width: 100%; overflow-wrap: anywhere; }
    #products-grid { scroll-margin-top: 1rem; }
}

@media (max-width: 350px) {
    .category-products .products-grid { gap: .45rem; }
    .product-card { padding: .35rem; }
    .product-pricing--listing .product-selling-price { font-size: .9rem; }
}
