﻿/* Geekfast ERP responsive rules — 2026-11-04 */
@media (max-width: 1319px) {
  /* compact tables: hide secondary columns, keep identity/status/price/actions */
  #collectTable { min-width: 900px; }
  #collectTable th:nth-child(3), #collectTable td:nth-child(3),
  #collectTable th:nth-child(4), #collectTable td:nth-child(4),
  #collectTable th:nth-child(7), #collectTable td:nth-child(7),
  #collectTable th:nth-child(8), #collectTable td:nth-child(8),
  #collectTable th:nth-child(9), #collectTable td:nth-child(9),
  #collectTable th:nth-child(10), #collectTable td:nth-child(10) { display: none !important; }

  #onlineTable { min-width: 900px; }
  #onlineTable th:nth-child(3), #onlineTable td:nth-child(3),
  #onlineTable th:nth-child(4), #onlineTable td:nth-child(4),
  #onlineTable th:nth-child(7), #onlineTable td:nth-child(7),
  #onlineTable th:nth-child(8), #onlineTable td:nth-child(8),
  #onlineTable th:nth-child(10), #onlineTable td:nth-child(10),
  #onlineTable th:nth-child(12), #onlineTable td:nth-child(12),
  #onlineTable th:nth-child(13), #onlineTable td:nth-child(13),
  #onlineTable th:nth-child(14), #onlineTable td:nth-child(14) { display: none !important; }

  #publishTable { min-width: 760px; }
  #publishTable th:nth-child(3), #publishTable td:nth-child(3),
  #publishTable th:nth-child(5), #publishTable td:nth-child(5),
  #publishTable th:nth-child(6), #publishTable td:nth-child(6) { display: none !important; }

  #storeTable { min-width: 820px; }
  #storeTable th:nth-child(4), #storeTable td:nth-child(4),
  #storeTable th:nth-child(5), #storeTable td:nth-child(5),
  #storeTable th:nth-child(6), #storeTable td:nth-child(6),
  #storeTable th:nth-child(9), #storeTable td:nth-child(9),
  #storeTable th:nth-child(10), #storeTable td:nth-child(10),
  #storeTable th:nth-child(11), #storeTable td:nth-child(11) { display: none !important; }

  /* calculator: single column + CTA fixed to viewport bottom */
  .calc-layout { grid-template-columns: 1fr; padding-bottom: 96px; }
  .calc-result-side { position: static; }
  .calc-action-bar {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 900;
    margin: 0 !important;
    padding: 10px 12px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .18);
  }
  .calc-form-side { padding-bottom: 96px; }
}

@media (max-width: 900px) {
  /* keep only the decision-making columns */
  #collectTable { min-width: 560px; }
  #collectTable th:nth-child(6), #collectTable td:nth-child(6) { display: none !important; }

  #onlineTable { min-width: 560px; }
  #onlineTable th:nth-child(9), #onlineTable td:nth-child(9),
  #onlineTable th:nth-child(11), #onlineTable td:nth-child(11) { display: none !important; }

  #publishTable { min-width: 560px; }
  #storeTable { min-width: 600px; }
  #storeTable th:nth-child(1), #storeTable td:nth-child(1),
  #storeTable th:nth-child(2), #storeTable td:nth-child(2),
  #storeTable th:nth-child(8), #storeTable td:nth-child(8) { display: none !important; }

  /* header: fewer controls, larger touch targets */
  #newActionBtn { display: none !important; }
  .header-store-btn span:not(.header-store-dot) { display: none !important; }
  .header-store-btn { padding: 0 8px !important; }
  .sidebar-toggle, .header-icon-btn, .header-tab { width: 40px !important; height: 40px !important; }

  /* banner wraps instead of squeezing */
  #promoAlertBanner { flex-wrap: wrap !important; }
  #promoAlertBanner > div { flex: 1 1 calc(100% - 60px); }
  #promoAlertBanner > a { order: 3; margin-left: 30px; }
  #promoAlertBanner > button { order: 2; margin-left: auto; }
}

@media (max-width: 640px) {
  /* table fits width; product metadata is secondary */
  #collectTable, #onlineTable, #publishTable, #storeTable {
    min-width: 0 !important;
    table-layout: auto;
  }
  .product-source-row { display: none !important; }
  .product-info-cell { gap: 8px; }
  .product-thumb { width: 44px; height: 58px; }
  .product-name { font-size: 12.5px; line-height: 1.45; }

  #onlineTable th:nth-child(1), #onlineTable td:nth-child(1) { display: none !important; }
  #publishTable th:nth-child(1), #publishTable td:nth-child(1) { display: none !important; }
  #storeTable th:nth-child(3), #storeTable td:nth-child(3) { display: none !important; }

  .calc-action-bar { left: 10px; right: 10px; bottom: 10px; gap: 8px; }
  .calc-submit-btn { flex: 1; padding: 10px 8px !important; font-size: 13px !important; }
  .calc-auto-save-hint { display: none !important; }
}


@media (max-width: 640px) {
  .collect-table th, .collect-table td, .publish-table th, .publish-table td {
    padding: 8px 6px !important;
  }
  .collect-table .product-thumb, .publish-table .product-thumb { width: 38px; height: 50px; }
  .collect-table .product-name, .publish-table .product-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  #collectTable th:nth-child(1), #collectTable td:nth-child(1) { width: 30px !important; }
  #collectTable th:nth-child(2), #collectTable td:nth-child(2) { width: auto !important; min-width: 0 !important; }
  #collectTable th:nth-child(5), #collectTable td:nth-child(5) { width: 62px !important; }
  #collectTable th:last-child, #collectTable td:last-child { width: 54px !important; }

  #onlineTable th:nth-child(2), #onlineTable td:nth-child(2) { width: auto !important; min-width: 0 !important; }
  #onlineTable th:nth-child(5), #onlineTable td:nth-child(5),
  #onlineTable th:nth-child(6), #onlineTable td:nth-child(6) { width: 62px !important; }
  #onlineTable th:last-child, #onlineTable td:last-child { width: 54px !important; }

  #publishTable th:nth-child(2), #publishTable td:nth-child(2) { width: auto !important; min-width: 0 !important; }
  #publishTable th:nth-child(4), #publishTable td:nth-child(4) { width: 64px !important; }
  #publishTable th:last-child, #publishTable td:last-child { width: 54px !important; }
}

