/* ================================================
   PSX MARKET PORTAL — Mobile CSS (max-width: 768px)
   ================================================ */

.psx-portal { padding: 0 12px 36px; }

/* Hero */
.psx-hero { border-radius: 14px; padding: 22px 18px; margin-bottom: 14px; }
.psx-hero-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
.psx-hero-title { font-size: 22px; }
.psx-hero-sub { font-size: 12px; }
.psx-hero-index { align-self: stretch; text-align: center; }
.psx-kse-value { font-size: 36px; }
.psx-kse-change { font-size: 13px; }
.psx-kse-meta { gap: 12px; flex-wrap: wrap; justify-content: center; }
.psx-hero-status { align-self: stretch; text-align: center; }

/* Indices — horizontal scroll */
.psx-indices-strip { border-radius: 10px; margin-bottom: 14px; overflow-x: auto; }
.psx-indices-inner {
  display: flex;
  grid-template-columns: none;
  min-width: max-content;
}
.psx-indices-inner .psx-idx-item { min-width: 100px; border-right: 1px solid var(--psx-border); }
.psx-idx-val { font-size: 14px; }
.psx-idx-name { font-size: 9px; }

/* Summary */
.psx-summary-inner { grid-template-columns: 1fr 1fr; gap: 8px; }
.psx-summary-card { padding: 12px; gap: 8px; }
.psx-summary-icon { width: 36px; height: 36px; font-size: 15px; border-radius: 10px; }
.psx-summary-val { font-size: 20px; }
.psx-summary-bar { display: none; }

/* Top Movers */
.psx-top-movers { margin-bottom: 14px; }
.psx-top-movers-inner { grid-template-columns: 1fr; gap: 10px; }
.psx-mover-card { padding: 14px; }
.psx-mr-name { max-width: 160px; font-size: 10px; }

/* Most Active */
.psx-most-active { margin-bottom: 14px; }
.psx-section-title { font-size: 14px; margin-bottom: 10px; }
.psx-ma-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
.psx-ma-card { padding: 12px 8px; }
.psx-ma-name { font-size: 9px; min-height: 22px; }
.psx-ma-vol { font-size: 12px; }

/* Sectors */
.psx-top-sectors { margin-bottom: 14px; }
.psx-sector-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
.psx-sec-card { padding: 12px 10px; }
.psx-sec-name { font-size: 10px; min-height: 26px; }
.psx-sec-vol { font-size: 12px; }

/* Controls */
.psx-controls-bar { padding: 12px; border-radius: 10px; margin-bottom: 12px; }
.psx-search-wrap input { padding: 9px 12px 9px 38px; font-size: 12px; }
.psx-sector-filters {
  overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch;
  padding-bottom: 4px; gap: 5px;
}
.psx-sector-filters::-webkit-scrollbar { display: none; }
.psx-filter-btn { flex-shrink: 0; font-size: 10px; padding: 5px 10px; }
.psx-sort-select { width: 100%; font-size: 12px; }

/* Table — card layout on mobile */
.psx-stock-table-wrap { border-radius: 10px; overflow: hidden; }
.psx-stock-table thead { display: none; }
.psx-stock-table, .psx-stock-table tbody { display: block; }
.psx-stock-row {
  display: flex; flex-wrap: wrap; padding: 10px 12px; gap: 4px;
  border-bottom: 1px solid var(--psx-border); align-items: center;
}
.psx-stock-row:last-child { border-bottom: none; }
.psx-stock-row td { border: none; padding: 0; font-size: 11px; }
.psx-stock-row td:nth-child(1) { width: auto; order: 1; margin-right: 6px; }
.psx-stock-row td:nth-child(2) { width: 100%; order: 3; margin-bottom: 2px; }
.psx-stock-row td:nth-child(3) { width: 100%; order: 4; margin-bottom: 4px; }
.psx-stock-row td:nth-child(7) { order: 2; margin-left: auto; }
.psx-stock-row td:nth-child(9) { order: 5; }
.psx-stock-row td:nth-child(4),
.psx-stock-row td:nth-child(5),
.psx-stock-row td:nth-child(6),
.psx-stock-row td:nth-child(8),
.psx-stock-row td:nth-child(10) { display: none; }
.psx-company-name { font-size: 11px; }
.psx-sym-badge { font-size: 10px; padding: 2px 7px; }
.psx-sector-tag { font-size: 9px; }

/* Info Footer */
.psx-info-footer { margin-top: 24px; }
.psx-info-inner { grid-template-columns: 1fr; gap: 10px; }
.psx-info-card { padding: 16px; border-radius: 10px; }
.psx-info-card h3 { font-size: 14px; }
.psx-info-card p { font-size: 11px; }

/* Dark mode mobile */
body.dark .psx-stock-row { border-bottom-color: rgba(255,255,255,0.05); }

