/* Stock page — mobile (max-width: 768px) */

@media (max-width: 768px) {
  body.rj-stock-page {
    overflow-x: clip;
  }

  body.rj-stock-page .stk,
  body.rj-stock-page main.stk {
    max-width: 100%;
    overflow-x: clip;
  }

  body.rj-stock-page .container {
    padding-left: 16px;
    padding-right: 16px;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  /* Hero */
  .stk-hero {
    padding-top: 16px;
    overflow-x: clip;
  }

  .stk-hero__grid {
    gap: 24px;
    padding-bottom: 20px;
  }

  .stk-breadcrumb {
    font-size: 0.76rem;
  }

  .stk-hero__badge {
    margin-bottom: 16px;
    font-size: 0.74rem;
  }

  .stk-hero__title-line {
    font-size: clamp(1.9rem, 9vw, 2.5rem);
  }

  .stk-hero__lead {
    font-size: 0.92rem;
    line-height: 1.65;
    margin-bottom: 18px;
    max-width: 100%;
  }

  .stk-hero__trust li {
    font-size: 0.76rem;
  }

  .stk-hero__metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding-top: 18px;
  }

  .stk-hero__metrics > div {
    padding: 11px 8px;
    text-align: center;
  }

  .stk-hero__stage {
    max-width: none;
  }

  .stk-hero__thumb:hover {
    transform: none;
  }

  .stk-finder {
    margin-bottom: -16px;
    width: 100%;
    max-width: 100%;
    padding: 16px;
    border-radius: var(--rj-radius);
  }

  .stk-finder__bar {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .stk-finder__bar .rj-btn {
    width: 100%;
    justify-content: center;
  }

  /* Ribbon */
  .stk-ribbon {
    padding: 36px 0 20px;
    overflow-x: clip;
  }

  .stk-ribbon__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 14px;
  }

  .stk-ribbon__label {
    width: auto;
  }

  .stk-ribbon__track {
    width: 100%;
    mask-image: linear-gradient(90deg, #000 calc(100% - 20px), transparent);
  }

  /* Body */
  body.rj-stock-page .stk-body,
  body.rj-stock-page .stock-page {
    padding: 0 0 48px;
  }

  /* Toolbar */
  body.rj-stock-page .stock-toolbar {
    padding: 12px 14px;
    margin-bottom: 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    border-radius: var(--rj-radius);
  }

  body.rj-stock-page .stock-toolbar-left,
  body.rj-stock-page .stock-toolbar-right,
  .stk-toolbar__left,
  .stk-toolbar__right {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  body.rj-stock-page .stk-toolbar__filters {
    width: 100%;
    justify-content: center;
    padding: 13px 16px;
    background: var(--rj-teal) !important;
    color: #fff !important;
    border-color: var(--rj-teal) !important;
    box-shadow: 0 6px 16px rgba(188, 0, 45, 0.25);
  }

  body.rj-stock-page .stk-toolbar__filters:hover {
    background: var(--rj-teal-d) !important;
    color: #fff !important;
  }

  .stk-filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #fff;
    color: var(--rj-teal);
    font-size: 0.72rem;
    font-weight: 800;
  }

  body.rj-stock-page .stock-results-count {
    text-align: center;
    justify-content: center;
    padding: 2px 0;
  }

  body.rj-stock-page .stock-results-count strong {
    font-size: 1.3rem;
  }

  body.rj-stock-page .stock-results-count span,
  body.rj-stock-page .stock-results-count em {
    font-size: 0.8rem;
  }

  .stk-toolbar__right {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
  }

  body.rj-stock-page .stock-view-toggle {
    display: none;
  }

  body.rj-stock-page .stock-sort-form {
    grid-column: 1;
    min-width: 0;
  }

  body.rj-stock-page .stock-sort-select {
    width: 100%;
    font-size: 0.86rem;
    padding: 11px 36px 11px 12px;
  }

  .stk-toolbar__save {
    grid-column: 2;
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
    min-width: 44px;
  }

  /* Chips */
  body.rj-stock-page .stk-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    margin-bottom: 14px;
    scrollbar-width: none;
  }

  body.rj-stock-page .stk-chips::-webkit-scrollbar {
    display: none;
  }

  body.rj-stock-page .stock-filter-chip {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 0.76rem;
  }

  body.rj-stock-page .stock-main,
  .stk-main {
    min-width: 0;
    max-width: 100%;
  }

  .stk-results-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px;
    width: 100%;
    max-width: 100%;
  }

  .stk-unit {
    min-width: 0;
    max-width: 100%;
  }

  .stk-unit__body {
    padding: 16px 18px 18px;
  }

  .stk-unit__specs li {
    font-size: 0.72rem;
    padding: 5px 9px;
  }

  .stk-unit__foot {
    flex-wrap: wrap;
    gap: 10px;
  }

  .stk-unit__link {
    font-size: 0.8rem;
  }

  /* Empty */
  body.rj-stock-page .stk-empty {
    padding: 40px 20px;
    border-radius: var(--rj-radius);
  }

  body.rj-stock-page .stk-empty h3 {
    font-size: 1.25rem;
  }

  body.rj-stock-page .stk-empty p {
    font-size: 0.88rem;
  }

  .stk-empty__actions {
    flex-direction: column;
    width: 100%;
  }

  .stk-empty__actions .rj-btn {
    width: 100%;
    justify-content: center;
  }

  /* Pagination */
  body.rj-stock-page .stk-pagination {
    margin-top: 28px;
    gap: 6px;
  }

  body.rj-stock-page .stock-page-btn {
    min-width: 40px;
    height: 40px;
    font-size: 0.84rem;
  }

  /* Filter drawer */
  body.rj-stock-page .stock-filters {
    width: min(100vw, 400px);
  }

  .stk-sidebar__head {
    padding: max(16px, env(safe-area-inset-top)) 18px 16px;
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--rj-paper);
  }

  body.rj-stock-page .stock-filters-form {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .stk-sidebar__section {
    padding: 18px;
  }

  .stk-sidebar__actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    box-shadow: 0 -8px 20px rgba(18, 18, 18, 0.04);
  }

  /* CTA */
  .stk-cta {
    padding-bottom: 56px;
  }

  .stk-cta__inner {
    padding: 24px 20px;
    border-radius: var(--rj-radius);
  }

  .stk-cta__copy h2 {
    font-size: 1.45rem;
  }

  .stk-cta__actions {
    flex-direction: column;
  }

  .stk-cta__actions .rj-btn {
    width: 100%;
  }

  body.rj-stock-page .topbar-left span:not(:first-child) {
    display: none;
  }
}

@media (max-width: 480px) {
  body.rj-stock-page .stock-filters {
    width: 100%;
    max-width: 100%;
  }

  .stk-hero__title-line {
    font-size: clamp(1.75rem, 10vw, 2.15rem);
  }
}
