/**
 * notebook / mobile / small + ซ่อน scroll แนวนอน
 * PC layout → store-desktop-restore.css
 */

html.store-entered,
html.store-entered body {
  overflow-x: hidden;
  max-width: 100%;
}

html.store-entered .purchase-feed-panel,
html.store-entered .purchase-feed-track-wrap,
html.store-entered #purchaseFeedPanel,
html.store-entered #purchaseFeedTrackWrap {
  overflow: hidden !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html.store-entered .purchase-feed-panel::-webkit-scrollbar,
html.store-entered .purchase-feed-track-wrap::-webkit-scrollbar {
  display: none;
  height: 0;
  width: 0;
}

@media (min-width: 768px) and (max-width: 1023px) {
  html[data-device="notebook"] .store-shell {
    padding-left: var(--shell-pad, 1.25rem) !important;
    padding-right: var(--shell-pad, 1.25rem) !important;
  }

  html[data-device="notebook"] .goatx-inner {
    min-height: clamp(300px, 44vh, 500px) !important;
  }

  html[data-device="notebook"] .live-stats-grid,
  html[data-device="notebook"] #liveStatsGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html[data-device="notebook"] .purchase-feed-card {
    flex: 0 0 min(var(--pf-card-width, 280px), 46vw) !important;
    width: min(var(--pf-card-width, 280px), 46vw) !important;
  }

  html[data-device="notebook"] .why-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html[data-device="notebook"] .store-grid,
  html[data-device="notebook"] #storeGrid,
  html[data-device="notebook"] #categoryStoreGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 480px) and (max-width: 767px) {
  html[data-device="mobile"] .store-shell {
    padding-left: var(--shell-pad, 0.875rem) !important;
    padding-right: var(--shell-pad, 0.875rem) !important;
  }

  html[data-device="mobile"] .goatx-inner {
    min-height: clamp(260px, 36vh, 400px) !important;
  }

  html[data-device="mobile"] .live-stats-grid,
  html[data-device="mobile"] #liveStatsGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html[data-device="mobile"] .purchase-feed-card {
    flex: 0 0 min(var(--pf-card-width, 260px), 88vw) !important;
    width: min(var(--pf-card-width, 260px), 88vw) !important;
  }

  html[data-device="mobile"] .why-grid {
    grid-template-columns: 1fr !important;
  }

  html[data-device="mobile"] .store-grid,
  html[data-device="mobile"] #storeGrid,
  html[data-device="mobile"] #categoryStoreGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.65rem !important;
  }

  html[data-device="mobile"] .sf-card-inner {
    border-radius: 10px !important;
  }

  html[data-device="mobile"] .sf-body {
    padding: 0.6rem 0.6rem 0.7rem !important;
    gap: 0.3rem !important;
  }

  html[data-device="mobile"] .sf-name {
    font-size: 0.76rem !important;
    min-height: calc(1.25em * 2) !important;
  }

  html[data-device="mobile"] .sf-price {
    font-size: 0.84rem !important;
  }

  html[data-device="mobile"] .sf-btn {
    min-height: 34px !important;
    height: 34px !important;
    font-size: 0.7rem !important;
    padding: 0 0.65rem !important;
  }

  html[data-device="mobile"] .sf-badge {
    font-size: 0.52rem !important;
    padding: 0.16rem 0.38rem !important;
  }

  html[data-device="mobile"] .sf-card-badges {
    top: 0.45rem !important;
    left: 0.45rem !important;
    right: 0.45rem !important;
  }

  html[data-device="mobile"] .sf-actions {
    padding-top: 0.35rem !important;
  }
}

@media (max-width: 479px) {
  html[data-device="small"] .store-shell {
    padding-left: var(--shell-pad, 0.75rem) !important;
    padding-right: var(--shell-pad, 0.75rem) !important;
  }

  html[data-device="small"] .goatx-inner {
    min-height: clamp(220px, 32vh, 360px) !important;
  }

  html[data-device="small"] .live-stats-grid,
  html[data-device="small"] #liveStatsGrid {
    grid-template-columns: 1fr !important;
  }

  html[data-device="small"] .purchase-feed-card {
    flex: 0 0 min(var(--pf-card-width, 240px), 92vw) !important;
    width: min(var(--pf-card-width, 240px), 92vw) !important;
  }

  html[data-device="small"] .why-grid {
    grid-template-columns: 1fr !important;
  }

  html[data-device="small"] .store-grid,
  html[data-device="small"] #storeGrid,
  html[data-device="small"] #categoryStoreGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.55rem !important;
  }

  html[data-device="small"] .sf-card-inner {
    border-radius: 9px !important;
  }

  html[data-device="small"] .sf-body {
    padding: 0.5rem 0.5rem 0.6rem !important;
    gap: 0.25rem !important;
  }

  html[data-device="small"] .sf-name {
    font-size: 0.7rem !important;
    min-height: calc(1.2em * 2) !important;
  }

  html[data-device="small"] .sf-price {
    font-size: 0.78rem !important;
  }

  html[data-device="small"] .sf-btn {
    min-height: 30px !important;
    height: 30px !important;
    font-size: 0.65rem !important;
    padding: 0 0.5rem !important;
  }

  html[data-device="small"] .sf-badge {
    font-size: 0.48rem !important;
    padding: 0.14rem 0.32rem !important;
  }
}
