.mobile-catalog-controls,
.mobile-category-chips,
.header .mobile-cart-link {
  display: none;
}

@media (max-width: 650px) {
  .header .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "logo tools" "nav nav" "search search";
    width: calc(100% - 28px);
    min-height: 0;
    gap: 7px 8px;
    padding-block: 10px 13px;
  }
  .header a.brand { grid-area: logo; min-width: 0; }
  .header .trivex-brand .trivex-logo { width: min(148px, 100%); }
  .header .header-tools {
    grid-area: tools;
    display: flex;
    gap: 5px;
    border: 0;
    padding: 0;
    margin: 0;
  }
  .header .header-icon { width: 31px; height: 40px; }
  .header #favorites-link { order: 1; }
  .header .mobile-cart-link { display: inline-flex; order: 2; }
  .header .currency-switch { order: 3; }
  .header .currency-switch { grid-template-columns: repeat(2, 25px); }
  .header .currency-switch::before { width: 25px; }
  .header .currency-switch img { width: 17px; height: 12px; }
  .header #mobile-cart-count {
    top: 1px;
    right: -2px;
    background: var(--brand-blue);
    color: white;
  }
  .header nav {
    grid-area: nav;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 24px;
  }
  .header nav a { font-size: 14px; }
  .header nav a[aria-current="page"] { font-weight: 700; }
  .header nav #cart-count { display: none; }
  .header .header-search {
    grid-area: search;
    width: 100%;
    min-width: 0;
    min-height: 42px;
    margin-top: 3px;
    gap: 7px;
  }
  .header .header-search > button { order: -1; }

  #catalogo { width: calc(100% - 24px); }
  #catalogo .catalog-heading { padding: 18px 0 12px; gap: 8px; align-items: center; }
  #catalogo .catalog-heading h1 { margin: 0; font-size: clamp(23px, 6vw, 34px); font-weight: 700; }
  #catalogo .catalog-heading :is(.eyebrow, .search),
  #catalogo .catalog-views { display: none; }
  .mobile-catalog-controls { display: flex; align-items: center; gap: 6px; }
  .mobile-catalog-controls label { display: flex; align-items: center; }
  .mobile-catalog-controls .catalog-sort-caption {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  #catalogo .mobile-catalog-controls :is(button, select) {
    min-height: 36px;
    border: 1px solid #d5d8e0;
    border-radius: 9px;
    background: white;
    color: var(--ink);
    font-size: 12px;
    padding: 5px 7px;
  }
  #catalogo .mobile-catalog-controls button[aria-expanded="true"] {
    border-color: var(--brand-blue);
    background: var(--brand-blue-soft);
    color: var(--brand-blue);
  }
  .mobile-category-chips {
    display: flex;
    gap: 7px;
    padding: 2px 2px 9px;
    margin: 0 -2px 5px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .mobile-category-chips button {
    flex: none;
    min-height: 36px;
    padding: 5px 13px;
    border: 1px solid #d5d8e0;
    border-radius: 999px;
    background: white;
    color: var(--ink);
    font-size: 13px;
  }
  .mobile-category-chips button[aria-pressed="true"] {
    border-color: var(--brand-blue);
    background: var(--brand-blue);
    color: white;
  }
  .mobile-category-chips button:focus-visible { outline-color: var(--brand-blue); outline-offset: 1px; }

  #catalogo .catalog-layout { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  #catalogo .filters { padding: 12px; border: 1px solid #dfe3ec; border-radius: 12px; }
  #catalogo .results-heading { min-height: auto; margin: 0 0 8px; }
  #catalogo .results-heading p { font-size: 11px; }
  #catalogo #catalog-products {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  #catalogo #catalog-products .product-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    border: 1px solid #dfe3ec;
    border-radius: 10px;
    background: white;
  }
  #catalogo #catalog-products .card-photo-link {
    display: block;
    width: 100%;
    align-self: stretch;
  }
  #catalogo #catalog-products .product-image {
    width: 100%;
    aspect-ratio: 4 / 5;
  }
  #catalogo #catalog-products .card-photo-main {
    object-fit: contain;
  }
  @media (hover: none) {
    #catalogo #catalog-products .card-photo-main { opacity: 1; }
    #catalogo #catalog-products .card-photo-second { opacity: 0; }
  }
  #catalogo .product-image .badge { left: 0; bottom: 3px; font-size: 9px; }
  #catalogo .card-favorite { top: 6px; right: 6px; width: 32px; height: 32px; }
  #catalogo .product-category { display: none; }
  #catalogo .product-card h3 {
    margin: 8px 0 6px;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }
  #catalogo .product-bottom {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    margin: auto 0 0;
  }
  #catalogo .price { font-size: 16px; }
  #catalogo .add-button {
    width: auto;
    min-height: 34px;
    padding: 5px 8px;
    border-color: var(--brand-blue);
    border-radius: 7px;
    background: var(--brand-blue);
    color: white;
    font-size: 11px;
    white-space: nowrap;
  }
  #catalogo .add-button:disabled { border-color: #dfe3ec; background: #f4f5f7; color: #626977; }
  #catalogo .card-variants { margin: 7px 0 0; gap: 5px; }
  #catalogo .card-variant { width: 29px; height: 29px; }
}
