/* Desktop section pages (above 900px; modules/browse.php): the title with three figures on the panel itself, a rail of
   sections with their counts beside the list, All / In stock / Instant as a segmented control, and the brands as one
   price list — logo, plans, how it is delivered, the starting price in a column. Phones keep the hero + rows of sections.css. */
.sx-crumbs, .sx-deck, .sx-tabs, .sx-cta { display: none; }
.sx-cost { display: contents; }
.sx-page.sx-all { box-shadow: none; } /* the page shares its class with the home's "all services" card, which draws a ring */
@media (max-width: 900px) { .sx-soon-note { display: none; } }

@media (min-width: 901px) {
  .sx-browse .sx-page { grid-template-columns: minmax(0, 1fr); gap: 28px; }

  /* Head: no box, the breadcrumb lives in the top bar */
  .sx-browse .sx-hero { position: static; display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; height: auto; min-height: 0; padding: 0 0 24px;
    border-bottom: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; }
  html[dir] .sx-browse .sx-hero { background: none; } /* sections.css lights the hero per direction */
  .sx-browse .sx-hero::before, .sx-browse .sx-hero::after { content: none; }
  .sx-browse .sx-hero-bar, .sx-browse .sx-fan, .sx-crumbs, .sx-deck { display: none; }
  .sx-browse .sx-hero-main { display: block; min-width: 0; }
  .sx-browse .sx-hero h1 { margin: 0; color: var(--text); font-size: 28px; font-weight: 700; line-height: 1.25; letter-spacing: 0; }
  .sx-browse .sx-stats { display: flex; flex: none; margin: 0; padding: 0; list-style: none; }
  .sx-browse .sx-stats li { display: grid; gap: 2px; min-width: 0; padding: 0 22px; border-radius: 0; background: none; box-shadow: none; line-height: 1.3; }
  .sx-browse .sx-stats li:last-child { padding-inline-end: 0; }
  .sx-browse .sx-stats li + li { border-inline-start: 1px solid var(--line-2); }
  .sx-browse .sx-stats b { color: var(--text); font: 700 22px var(--font); font-variant-numeric: tabular-nums; }
  .sx-browse .sx-stats li.is-accent b { color: var(--ok); }
  .sx-browse .sx-stats span { color: var(--muted); font-size: 12.5px; font-weight: 500; white-space: nowrap; }

  /* Rail beside the list */
  .sx-browse .sx-body { display: grid; grid-template-columns: 224px minmax(0, 1fr); grid-template-areas: "rail filters" "rail list" "rail empty"; align-items: start; gap: 16px 40px; }
  .sx-tabs { grid-area: rail; position: sticky; top: 76px; display: grid; gap: 2px; }
  .sx-tab { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 8px; color: var(--muted); font-size: 13.5px; font-weight: 500;
    transition: background-color .15s; }
  .sx-tab:hover { background: var(--wash); }
  .sx-tab:focus-visible { outline: 2px solid rgb(var(--accent-rgb) / .7); outline-offset: -2px; }
  .sx-tab i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--sx-fg); }
  .sx-tab.is-all i { background: none; box-shadow: inset 0 0 0 1.5px var(--muted); }
  .sx-tab span { flex: 1 1 auto; min-width: 0; overflow: hidden; color: var(--text-2); text-overflow: ellipsis; white-space: nowrap; }
  .sx-tab b { flex: none; color: var(--faint); font: 500 12.5px var(--font); font-variant-numeric: tabular-nums; }
  .sx-tab.is-on { background: var(--wash-2); }
  .sx-tab.is-on span { color: var(--text); font-weight: 600; }
  .sx-tab.is-on b { color: var(--text-2); }
  .sx-tab.is-all + .sx-tab { margin-top: 10px; }

  /* All / In stock / Instant */
  .sx-browse .sx-filters { grid-area: filters; justify-self: start; flex-wrap: nowrap; gap: 2px; margin: 0; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: none; }
  .sx-browse .sx-filters .hf-btn { height: 30px; min-height: 30px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; box-shadow: none; color: var(--muted); font-size: 13px; font-weight: 500; }
  .sx-browse .sx-filters .hf-btn:hover { color: var(--text); }
  .sx-browse .sx-filters .hf-btn.is-active { background: var(--wash-2); color: var(--text); font-weight: 600; }
  .sx-browse .sx-filters .hf-count { color: var(--faint); font: 500 12px var(--font); font-variant-numeric: tabular-nums; }
  .sx-browse .sx-filters .hf-btn .ic { display: none; }

  /* The price list: rows on one surface, hairlines from the 1px gaps (hidden rows leave no line behind) */
  .sx-browse .sx-list { grid-area: list; display: grid; gap: 1px; overflow: hidden; border-radius: 12px; background: var(--line); }
  .sx-browse .cc-empty { grid-area: empty; }
  .sx-browse .sx-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 120px 150px 12px; align-items: center; gap: 0 18px; min-height: 68px; padding: 12px 20px;
    border-radius: 0; background: var(--w-card); box-shadow: none; color: var(--text); transition: background-color .15s; }
  .sx-browse .sx-row:hover { transform: none; background: var(--w-card-2); }
  .sx-browse .sx-row:active { transform: none; }
  .sx-browse .sx-row:focus-visible { outline: 2px solid rgb(var(--accent-rgb) / .7); outline-offset: -2px; }
  .sx-browse .sx-row > *, .sx-browse .sx-row .sx-badge, .sx-browse .sx-row .sx-cost, .sx-browse .sx-row::after { grid-row: 1; } /* .sx-end is display: contents */
  .sx-browse .sx-row .bt { grid-column: 1; width: 40px; height: 40px; border-radius: 11px; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .1); }
  .sx-browse .sx-main { grid-column: 2; gap: 2px; line-height: 1.35; }
  .sx-browse .sx-main strong { font: 600 15px var(--font); }
  .sx-browse .sx-main small { color: var(--muted); font-size: 12.5px; font-weight: 400; }
  .sx-browse .sx-end { display: contents; }
  .sx-browse .sx-badge { grid-column: 3; justify-self: start; gap: 7px; height: auto; padding: 0; border-radius: 0; background: none; color: var(--text-2); font-size: 13px; font-weight: 500;
    line-height: 1.35; white-space: normal; } /* "Yeniden stokta olacak" wraps instead of running into the price */
  .sx-browse .sx-badge::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
  .sx-browse .sx-badge.is-instant { color: var(--ok); }
  .sx-browse .sx-badge.is-instant::before { background: var(--ok); }
  .sx-browse .sx-badge.is-out { color: var(--warn); }
  .sx-browse .sx-badge.is-out::before { background: var(--warn); }
  .sx-browse .sx-badge.is-soon { color: var(--muted); }
  .sx-browse .sx-cost { grid-column: 4; justify-self: end; display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
  .sx-browse .sx-cost .sx-from { color: var(--faint); font-size: 12.5px; font-weight: 400; }
  .sx-browse .sx-soon-note { font-size: 13px; }
  .sx-browse .sx-price .mn { gap: 4px; }
  .sx-browse .sx-price .mn b { font: 600 16px var(--font); font-variant-numeric: tabular-nums; }
  .sx-browse .sx-price .mn small { color: var(--muted); font-size: 12px; font-weight: 500; }
  /* the row's chevron, pointing the reading way */
  .sx-browse .sx-row::after { content: ""; grid-column: 5; justify-self: center; width: 7px; height: 7px; border: solid var(--faint); border-width: 0 0 1.5px 1.5px; transform: rotate(45deg);
    transition: transform .15s var(--ease), border-color .15s; }
  html[dir="ltr"] .sx-browse .sx-row::after { transform: rotate(-135deg); }
  .sx-browse .sx-row:hover::after { border-color: var(--text); transform: translateX(-2px) rotate(45deg); }
  html[dir="ltr"] .sx-browse .sx-row:hover::after { transform: translateX(2px) rotate(-135deg); }
  .sx-browse .sx-row.is-out, .sx-browse .sx-row.is-soon { opacity: 1; }
  .sx-browse .sx-row.is-out .bt, .sx-browse .sx-row.is-soon .bt { opacity: .55; filter: grayscale(1); }
  .sx-browse .sx-row.is-out .sx-main strong, .sx-browse .sx-row.is-soon .sx-main strong { color: var(--text-2); }
  [data-theme="light"] .sx-browse .sx-row { background: var(--panel); }
  [data-theme="light"] .sx-browse .sx-row:hover { background: var(--panel-2); }
  [data-theme="light"] .sx-browse .sx-list { box-shadow: 0 0 0 1px var(--line); }
}
@media (min-width: 901px) and (max-width: 1180px) {
  .sx-browse .sx-body { grid-template-columns: 196px minmax(0, 1fr); gap: 16px 24px; }
  .sx-browse .sx-row { grid-template-columns: 40px minmax(0, 1fr) 132px 12px; }
  .sx-browse .sx-row .sx-badge { grid-row: 2; grid-column: 2; margin-top: 4px; font-size: 12.5px; }
  .sx-browse .sx-row .sx-cost { grid-column: 3; grid-row: 1 / 3; }
  .sx-browse .sx-row::after { grid-column: 4; grid-row: 1 / 3; }
  .sx-browse .sx-row .bt { grid-row: 1 / 3; }
  .sx-browse .sx-main { grid-row: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .sx-browse .sx-row::after, .sx-browse .sx-row:hover::after { transition: none; }
}
