/* GebraBit mobile home layout — Alpha 11
   Compact one-row header and one-row search for 320–430 px screens. */

.home-topbar-label--mobile {
  display: none;
}

.home-topbar-home-icon {
  display: none;
}

@media (max-width: 700px) {
  .home-topbar-label--desktop {
    display: none;
  }

  .home-topbar-label--mobile {
    display: inline;
  }

  .home-topbar {
    min-height: 58px;
    display: grid;
    grid-template-columns: .95fr 1.2fr 1.05fr .9fr .65fr;
    grid-template-areas: "datasheets supporters stores register brand";
    grid-template-rows: 38px;
    align-content: center;
    column-gap: 3px;
    padding: 10px 6px;
    direction: ltr;
    overflow: hidden;
  }

  .home-topbar-brand {
    grid-area: brand;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
    color: #2e3339;
    font-size: clamp(.52rem, 1.65vw, .67rem);
    font-weight: 900;
    line-height: 1.2;
    white-space: nowrap;
    direction: ltr;
  }

  .home-topbar-brand .home-topbar-mark {
    display: none !important;
  }

  .home-topbar-brand-name {
    display: none !important;
  }

  .home-topbar-home-icon {
    width: 22px;
    height: 22px;
    display: block;
    fill: currentColor;
  }

  .home-topbar-nav {
    display: contents;
  }

  .home-topbar-nav .home-topbar-item,
  .home-topbar-nav .home-topbar-item.is-pending {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    color: #2e3339;
    font-size: clamp(.48rem, 1.55vw, .63rem);
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    white-space: nowrap;
    direction: rtl;
    overflow: hidden;
  }

  .home-topbar-item.is-register { grid-area: register; }
  .home-topbar-item.is-stores { grid-area: stores; }
  .home-topbar-item.is-supporters { grid-area: supporters; }
  .home-topbar-item.is-datasheets { grid-area: datasheets; }

  .home-topbar-badge {
    flex: 0 0 auto;
    min-width: 20px;
    min-height: 19px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 4px;
    border-radius: 7px;
    font-size: clamp(.45rem, 1.35vw, .55rem);
  }

  .home-search-page {
    min-height: calc(100dvh - 58px);
    overflow-x: hidden;
  }

  .home-hero {
    width: calc(100% - 18px);
    margin-top: 42px;
  }

  .home-brand-emblem {
    width: 96px;
    height: 96px;
    border-radius: 27px;
  }

  .home-brand-emblem span {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    font-size: 1.9rem;
  }

  .home-brand-emblem i {
    top: 13px;
    right: 15px;
  }

  .home-hero h1 {
    display: none;
  }

  .home-hero > p {
    margin: 24px 0 18px;
    color: #20242a;
    font-size: .86rem;
    font-weight: 800;
  }

  .home-main-search {
    width: 100%;
    min-height: 58px;
    display: grid;
    grid-template-columns: minmax(68px, .7fr) minmax(0, 1.45fr) 42px 42px;
    grid-template-rows: 48px;
    grid-template-areas: "modes input camera submit";
    align-items: stretch;
    gap: 0;
    direction: ltr;
    overflow: hidden;
    border: 5px solid #f6f7f9;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, .055);
  }

  .home-main-search input {
    grid-area: input;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 0 8px;
    border: 0;
    font-size: clamp(.64rem, 2vw, .76rem);
    line-height: 1.2;
    text-align: right;
    direction: rtl;
    white-space: nowrap;
  }

  .home-main-search input::placeholder {
    font-size: clamp(.6rem, 1.9vw, .72rem);
    text-align: right;
    direction: rtl;
  }

  .home-visual-search-button,
  .home-search-submit {
    width: 38px;
    height: 38px;
    align-self: center;
    justify-self: center;
    margin: 0;
  }

  .home-visual-search-button {
    grid-area: camera;
  }

  .home-search-submit {
    grid-area: submit;
  }

  .home-visual-search-button svg,
  .home-search-submit svg {
    width: 21px;
    height: 21px;
  }

  .home-search-modes {
    grid-area: modes;
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    direction: ltr;
    border: 0;
    border-right: 1px solid #e5e7ea;
    background: #ffffff;
  }

  .home-search-mode,
  .home-search-mode.is-disabled {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 0 2px;
    font-size: clamp(.46rem, 1.55vw, .61rem);
    white-space: nowrap;
  }

  .home-search-mode.is-active {
    margin: 5px 2px;
    border-radius: 14px;
  }

  .home-visual-search-status {
    margin-top: 8px;
    font-size: .68rem;
  }

  .home-category-grid {
    width: min(100%, 520px);
    margin: 42px auto 0;
    padding: 0 7px 8px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 28px 3px;
    overflow: visible;
    direction: rtl;
  }

  .home-category-card {
    min-width: 0;
    width: auto;
    display: grid;
    justify-items: center;
    gap: 8px;
  }

  .home-category-card:nth-child(6) { grid-column: 3; }
  .home-category-card:nth-child(7) { grid-column: 4; }

  .home-category-icon {
    width: clamp(52px, 17vw, 68px);
    height: clamp(52px, 17vw, 68px);
  }

  .home-category-icon svg {
    width: clamp(32px, 10vw, 41px);
    height: clamp(32px, 10vw, 41px);
  }

  .home-category-card strong {
    font-size: .64rem;
    line-height: 1.55;
  }

  .home-category-count {
    top: -5px;
    right: calc(50% - 35px);
    min-width: 31px;
    min-height: 20px;
    padding: 2px 5px;
    border-radius: 7px;
    font-size: .55rem;
  }

  .home-category-icon--all {
    font-size: 1.4rem;
  }

  .home-footer {
    margin-top: auto;
    padding: 76px 10px calc(86px + env(safe-area-inset-bottom));
  }

  .home-footer nav {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
  }

  .home-footer nav a {
    padding-inline: 8px;
    font-size: .61rem;
    white-space: nowrap;
  }

  .home-footer p {
    display: none;
  }

  .home-accessibility {
    left: auto;
    right: 14px;
    bottom: calc(92px + env(safe-area-inset-bottom));
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 340px) {
  .home-topbar {
    grid-template-columns: .95fr 1.2fr 1.05fr .9fr .65fr;
    column-gap: 2px;
    padding-inline: 4px;
  }

  .home-topbar-nav .home-topbar-item,
  .home-topbar-nav .home-topbar-item.is-pending,
  .home-topbar-brand {
    font-size: .47rem;
  }

  .home-topbar-badge {
    min-width: 18px;
    padding-inline: 3px;
    font-size: .44rem;
  }

  .home-main-search {
    grid-template-columns: 66px minmax(0, 1fr) 38px 38px;
  }

  .home-visual-search-button,
  .home-search-submit {
    width: 35px;
    height: 35px;
  }

  .home-main-search input,
  .home-main-search input::placeholder {
    font-size: .67rem;
  }
}
