/*
 * ProTechTrader category collection experience
 * Staged candidate: 2026-09-01
 * Scoped to .s_modern_category so product, search, and checkout surfaces are unchanged.
 */

#content.s_modern_category {
  --pttc-ink: #102a43;
  --pttc-text: #243b53;
  --pttc-muted: #526b82;
  --pttc-line: #d8e2ec;
  --pttc-soft: #f4f8fb;
  --pttc-surface: #ffffff;
  --pttc-action: #0057b3;
  --pttc-action-hover: #00458f;
  --pttc-action-soft: #eaf3ff;
  --pttc-accent: #f4b942;
  --pttc-sale: #b42318;
  --pttc-focus: #0f78d4;
  --pttc-radius-sm: 8px;
  --pttc-radius: 14px;
  --pttc-radius-lg: 22px;
  --pttc-shadow: 0 8px 28px rgba(16, 42, 67, .08);
  --pttc-shadow-hover: 0 16px 38px rgba(16, 42, 67, .14);
  width: min(calc(100% - 40px), 960px) !important;
  max-width: 960px !important;
  /* Shoppica centers .s_wrap with left:50% + translateX(-50%); margins must stay zero. */
  margin-inline: 0 !important;
  padding: 28px 0 72px !important;
  color: var(--pttc-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-sizing: border-box;
}

.s_modern_category *,
.s_modern_category *::before,
.s_modern_category *::after {
  box-sizing: border-box;
}

.s_modern_category a,
.s_modern_category button,
.s_modern_category input,
.s_modern_category select {
  font: inherit;
}

.s_modern_category a:focus-visible,
.s_modern_category button:focus-visible,
.s_modern_category input:focus-visible,
.s_modern_category select:focus-visible {
  outline: 3px solid rgba(15, 120, 212, .34) !important;
  outline-offset: 3px;
}

.ptt-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Category introduction */
.s_modern_category .ptt-header {
  margin: 0 0 26px;
}

.s_modern_category #breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin: 0 0 18px !important;
  color: var(--pttc-muted);
  font-size: 13px;
  line-height: 1.5;
}

.s_modern_category #breadcrumbs a {
  color: var(--pttc-muted) !important;
  text-decoration: none;
}

.s_modern_category #breadcrumbs a:hover {
  color: var(--pttc-action) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.s_modern_category .ptt-header > h1,
.s_modern_category .ptt-header > .seopage_h1 {
  max-width: 900px;
  margin: 0 0 18px !important;
  color: var(--pttc-ink) !important;
  font-family: inherit !important;
  font-size: clamp(30px, 4vw, 46px) !important;
  font-weight: 800 !important;
  letter-spacing: -.035em;
  line-height: 1.08 !important;
}

.ptt-desc-shell {
  position: relative;
  max-width: 920px;
}

.s_modern_category .ptt-desc {
  max-width: 920px;
  color: var(--pttc-text);
  font-size: 16px;
  line-height: 1.68;
  overflow-wrap: anywhere;
}

.s_modern_category .ptt-desc::after {
  content: "";
  display: table;
  clear: both;
}

.s_modern_category .ptt-desc p {
  margin: 0 0 14px;
}

.s_modern_category .ptt-desc a {
  color: var(--pttc-action);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.s_modern_category .ptt-desc img,
.s_modern_category .ptt-desc iframe,
.s_modern_category .ptt-desc video {
  max-width: 100% !important;
  height: auto !important;
}

.s_modern_category .ptt-desc table {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  margin: 18px 0;
  overflow-x: auto;
  border: 1px solid var(--pttc-line);
  border-radius: var(--pttc-radius-sm);
  background: var(--pttc-surface);
  -webkit-overflow-scrolling: touch;
}

.s_modern_category .ptt-desc th,
.s_modern_category .ptt-desc td {
  min-width: 110px;
  padding: 11px 12px !important;
  color: var(--pttc-text);
  font-size: 13px !important;
  line-height: 1.45;
  vertical-align: top;
}

.s_modern_category .ptt-desc th {
  color: var(--pttc-ink);
  background: var(--pttc-soft);
}

.ptt-description-toggle {
  align-items: center;
  gap: 7px;
  min-height: 44px;
  margin-top: 8px;
  padding: 8px 2px;
  border: 0;
  background: transparent;
  color: var(--pttc-action);
  font-weight: 750;
  cursor: pointer;
}

.ptt-description-toggle:not([hidden]) {
  display: inline-flex;
}

.ptt-description-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform .2s ease;
}

.ptt-desc-shell.is-expanded .ptt-description-toggle svg {
  transform: rotate(180deg);
}

/* Guided finder */
.s_modern_category .ptt-kit-finder-cta {
  margin: 30px 0 0;
  border-color: #17486c;
  border-radius: var(--pttc-radius-lg);
  background: linear-gradient(122deg, #071d35 0%, #0b3659 58%, #0f5265 100%);
  box-shadow: 0 18px 42px rgba(7, 29, 53, .18);
}

.s_modern_category .ptt-kit-finder-primary,
.s_modern_category .ptt-kit-finder-secondary {
  min-height: 46px;
}

/* Related categories */
.s_modern_category .ptt-subcats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 32px;
  padding: 2px;
}

.s_modern_category .ptt-pill {
  min-height: 46px;
  padding: 8px 16px;
  border: 1px solid var(--pttc-line);
  border-radius: 999px;
  background: var(--pttc-surface);
  color: var(--pttc-text);
  box-shadow: 0 3px 10px rgba(16, 42, 67, .05);
  font-size: 14px;
  font-weight: 700;
}

.s_modern_category .ptt-pill:hover {
  border-color: #9abfe6;
  background: var(--pttc-action-soft);
  color: var(--pttc-action);
  transform: translateY(-1px);
}

.s_modern_category .ptt-pill img {
  width: 28px;
  height: 28px;
}

.ptt-pill-count {
  color: var(--pttc-muted);
  font-size: 12px;
  font-weight: 650;
}

/* Bestseller collection */
.s_modern_category .ptt-category-bestsellers {
  margin: 0 0 36px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid #cfdeeb;
  border-radius: var(--pttc-radius-lg);
  background: linear-gradient(145deg, #f4f8fb 0%, #edf5fc 100%);
}

.s_modern_category .ptt-bestseller-header {
  margin: 0 0 20px;
}

.s_modern_category .ptt-bestseller-header h2 {
  margin: 0;
  color: var(--pttc-ink);
  font-size: clamp(21px, 2.4vw, 28px);
  line-height: 1.2;
}

.s_modern_category .ptt-bestseller-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.s_modern_category .ptt-card-pop {
  min-width: 0;
  border: 1px solid #bdd2e7;
  transform: none;
  animation: none;
  box-shadow: 0 7px 20px rgba(16, 42, 67, .08);
}

.s_modern_category .ptt-card-pop:hover {
  transform: translateY(-3px) !important;
  border-color: #8bb8e4 !important;
  box-shadow: var(--pttc-shadow-hover) !important;
}

.s_modern_category .ptt-card-pop::before {
  content: "Best seller";
  top: 12px;
  left: 12px;
  padding: 5px 8px;
  border: 0;
  border-radius: 6px;
  background: #fff0bd;
  color: #704a00;
  box-shadow: none;
  animation: none;
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* Sorting and in-page filters */
.s_modern_category .ptt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 14px;
  padding: 16px;
  border: 1px solid var(--pttc-line);
  border-radius: var(--pttc-radius);
  background: var(--pttc-surface);
}

.s_modern_category .ptt-sort {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto minmax(110px, .6fr);
  align-items: center;
  gap: 10px;
}

.s_modern_category .ptt-sort label {
  margin: 0 !important;
  color: var(--pttc-text);
  font-size: 13px !important;
  font-weight: 750 !important;
}

.s_modern_category .ptt-select {
  width: auto;
  min-width: 0;
  min-height: 44px;
  padding: 9px 38px 9px 12px;
  border: 1px solid #b8c8d8;
  border-radius: var(--pttc-radius-sm);
  color: var(--pttc-text);
  background-color: #fff;
}

.s_modern_category #compare-total {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--pttc-action);
  font-size: 13px;
  font-weight: 750;
}

.s_modern_category .ptt-fast-filters-bar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 310px);
  gap: 12px 18px !important;
  align-items: center !important;
  margin: 0 0 22px !important;
  padding: 14px 16px !important;
  border: 1px solid var(--pttc-line) !important;
  border-radius: var(--pttc-radius) !important;
  background: var(--pttc-soft) !important;
}

.ptt-filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ptt-filter-label {
  margin-right: 2px;
  color: var(--pttc-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.s_modern_category .ptt-filter-pill {
  min-height: 38px;
  padding: 8px 13px !important;
  border: 1px solid #b8c8d8 !important;
  border-radius: 999px !important;
  background: var(--pttc-surface) !important;
  color: var(--pttc-text) !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  cursor: pointer;
}

.s_modern_category .ptt-filter-pill:hover {
  border-color: #729fcc !important;
  background: var(--pttc-action-soft) !important;
}

.s_modern_category .ptt-filter-pill.active,
.s_modern_category .ptt-filter-pill[aria-pressed="true"] {
  border-color: var(--pttc-action) !important;
  background: var(--pttc-action) !important;
  color: #fff !important;
}

.ptt-filter-search {
  position: relative;
  display: block;
  width: 100%;
}

.ptt-filter-search svg {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 17px;
  height: 17px;
  transform: translateY(-50%);
  fill: var(--pttc-muted);
  pointer-events: none;
}

.s_modern_category #ptt-instant-page-filter {
  width: 100% !important;
  min-height: 44px;
  padding: 9px 13px 9px 39px !important;
  border: 1px solid #b8c8d8 !important;
  border-radius: var(--pttc-radius-sm) !important;
  background: var(--pttc-surface) !important;
  color: var(--pttc-text);
  font-size: 14px !important;
}

.ptt-filter-status {
  grid-column: 1 / -1;
  color: var(--pttc-muted);
  font-size: 12px;
}

/* Product collection */
.s_modern_category .ptt-product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  margin: 0;
}

.s_modern_category .ptt-card {
  min-width: 0;
  height: auto;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--pttc-line);
  border-radius: var(--pttc-radius);
  background: var(--pttc-surface);
  box-shadow: 0 4px 16px rgba(16, 42, 67, .045);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.s_modern_category .ptt-card:hover {
  z-index: 2;
  transform: translateY(-3px);
  border-color: #a4c5e5;
  box-shadow: var(--pttc-shadow-hover);
}

.s_modern_category .ptt-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  margin: 0 0 13px;
  padding: 8px;
  border-radius: 10px;
  background: #f8fafc;
}

.s_modern_category .ptt-card-image img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.s_modern_category .ptt-card-title {
  min-height: 42px;
  height: auto;
  margin: 0 0 10px;
  color: var(--pttc-ink);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
}

.s_modern_category .ptt-card-title a:hover {
  color: var(--pttc-action);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.s_modern_category .ptt-card-meta {
  gap: 10px;
}

.s_modern_category .ptt-price-box {
  min-height: 26px;
  flex-wrap: wrap;
  gap: 5px 8px;
}

.s_modern_category .ptt-price {
  color: var(--pttc-ink);
  font-size: 18px;
  font-weight: 800;
}

.s_modern_category .ptt-price-special {
  color: var(--pttc-sale) !important;
}

.s_modern_category .ptt-price-old {
  color: var(--pttc-muted);
}

.s_modern_category .ptt-rating {
  min-height: 20px;
  gap: 5px;
}

.s_modern_category .ptt-stars-svg svg {
  width: 13px;
  height: 13px;
}

.ptt-rating-value {
  color: var(--pttc-ink);
  font-size: 12px;
  font-weight: 750;
}

.s_modern_category .ptt-review-count {
  color: var(--pttc-muted);
  font-size: 11px;
}

.s_modern_category .ptt-actions-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.s_modern_category .ptt-btn-add {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--pttc-action);
  border-radius: var(--pttc-radius-sm);
  background: var(--pttc-action);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.s_modern_category .ptt-btn-add:hover {
  border-color: var(--pttc-action-hover);
  background: var(--pttc-action-hover);
}

.s_modern_category .ptt-btn-see-options {
  background: #0e6571;
  border-color: #0e6571;
}

.s_modern_category .ptt-btn-see-options:hover {
  background: #094d56;
  border-color: #094d56;
}

.s_modern_category .ptt-btn-backorder-card {
  border-color: #d6a11e !important;
  background: #fff4cb !important;
  color: #684900 !important;
}

.s_modern_category .ptt-icon-btn {
  display: inline-grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #b8c8d8;
  border-radius: var(--pttc-radius-sm);
  background: #fff;
  color: var(--pttc-muted);
  cursor: pointer;
}

.s_modern_category .ptt-icon-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.s_modern_category .ptt-icon-btn:hover {
  border-color: #e07878;
  background: #fff5f5;
  color: #b42318;
}

.s_modern_category .ptt-out-of-stock {
  opacity: 1;
}

.s_modern_category .ptt-out-of-stock-label {
  top: 12px;
  right: 12px;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 10px;
}

.ptt-filter-empty,
.s_modern_category .ptt-empty-state {
  margin-top: 18px;
  padding: 32px 20px;
  border: 1px dashed #aebfce;
  border-radius: var(--pttc-radius);
  background: var(--pttc-soft);
  color: var(--pttc-muted);
  text-align: center;
}

.ptt-filter-empty strong,
.ptt-filter-empty span {
  display: block;
}

.ptt-filter-empty strong {
  margin-bottom: 5px;
  color: var(--pttc-ink);
  font-size: 16px;
}

.s_modern_category .ptt-pagination {
  margin-top: 42px;
}

.s_modern_category .ptt-pagination a,
.s_modern_category .ptt-pagination b {
  min-width: 44px;
  width: 44px;
  height: 44px;
}

/* Page utilities */
#ptt-sort-loading {
  background: rgba(255, 255, 255, .82) !important;
}

#ptt-back-top {
  background: var(--pttc-action) !important;
  box-shadow: 0 8px 22px rgba(0, 87, 179, .28) !important;
}

@media (max-width: 1100px) {
  .s_modern_category .ptt-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .s_modern_category .ptt-bestseller-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  #content.s_modern_category {
    width: min(calc(100% - 28px), 720px) !important;
    padding-top: 20px !important;
  }

  .s_modern_category .ptt-toolbar,
  .s_modern_category .ptt-fast-filters-bar {
    grid-template-columns: 1fr;
  }

  .s_modern_category .ptt-toolbar {
    align-items: stretch;
  }

  .s_modern_category .ptt-sort {
    grid-template-columns: minmax(82px, auto) minmax(0, 1fr);
  }

  .s_modern_category .ptt-select {
    width: 100%;
  }

  .s_modern_category #compare-total {
    justify-content: center;
  }

  .s_modern_category .ptt-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (max-width: 640px) {
  #content.s_modern_category {
    width: calc(100% - 24px) !important;
    padding: 18px 0 56px !important;
  }

  .s_modern_category .ptt-header > h1,
  .s_modern_category .ptt-header > .seopage_h1 {
    margin-bottom: 14px !important;
    font-size: clamp(27px, 9vw, 36px) !important;
  }

  .s_modern_category .ptt-desc {
    font-size: 16px;
    line-height: 1.62;
  }

  .s_modern_category .ptt-desc img[style*="float"],
  .s_modern_category .ptt-desc img[align="left"],
  .s_modern_category .ptt-desc img[align="right"] {
    display: block !important;
    float: none !important;
    width: min(76%, 260px) !important;
    margin: 0 auto 18px !important;
  }

  .ptt-desc-shell.is-collapsible:not(.is-expanded) .ptt-desc {
    max-height: 355px;
    overflow: hidden;
  }

  .ptt-desc-shell.is-collapsible:not(.is-expanded)::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 48px;
    left: 0;
    height: 76px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 82%);
    pointer-events: none;
  }

  .s_modern_category .ptt-kit-finder-cta {
    margin-top: 22px;
    padding: 24px 18px;
    border-radius: 18px;
  }

  .s_modern_category .ptt-kit-finder-copy h2 {
    font-size: 27px;
  }

  .s_modern_category .ptt-kit-finder-primary,
  .s_modern_category .ptt-kit-finder-secondary {
    width: 100%;
  }

  .s_modern_category .ptt-subcats {
    width: 100%;
    margin-bottom: 24px !important;
    padding: 2px 2px 10px !important;
  }

  .s_modern_category .ptt-category-bestsellers {
    margin: 0 0 28px;
    padding: 20px 16px;
    border-radius: 18px;
  }

  .s_modern_category .ptt-bestseller-grid {
    display: flex;
    gap: 12px;
    margin: 0;
    padding: 2px 2px 12px;
    overflow-x: auto;
    scroll-padding-inline: 2px;
    scrollbar-width: thin;
  }

  .s_modern_category .ptt-bestseller-grid .ptt-card {
    flex: 0 0 min(72vw, 250px);
    min-width: min(72vw, 250px);
  }

  .s_modern_category .ptt-toolbar {
    flex-direction: column;
    margin-bottom: 12px;
    padding: 14px;
  }

  .s_modern_category .ptt-fast-filters-bar {
    display: flex !important;
    flex-direction: column;
    align-items: stretch !important;
    padding: 12px !important;
  }

  .ptt-filter-group {
    flex-wrap: nowrap;
    margin: 0 -2px;
    padding: 2px 2px 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .ptt-filter-group::-webkit-scrollbar {
    display: none;
  }

  .ptt-filter-label,
  .s_modern_category .ptt-filter-pill {
    flex: 0 0 auto;
  }

  .ptt-filter-status {
    order: 3;
  }

  .s_modern_category .ptt-card {
    padding: 10px;
    border-radius: 11px;
  }

  .s_modern_category .ptt-card-image {
    margin-bottom: 10px;
    padding: 5px;
  }

  .s_modern_category .ptt-card-title {
    min-height: 56px;
    margin-bottom: 7px;
    font-size: 13px;
    line-height: 1.42;
    -webkit-line-clamp: 3;
  }

  .s_modern_category .ptt-price {
    font-size: 16px;
  }

  .s_modern_category .ptt-stars-svg svg:nth-child(n+2) {
    display: none;
  }

  .s_modern_category .ptt-stars-svg::after {
    content: "★";
    color: #fbbf24;
    font-size: 13px;
  }

  .s_modern_category .ptt-btn-add {
    padding-inline: 7px;
    font-size: 12px;
  }

  .s_modern_category .ptt-btn-add svg {
    display: none;
  }

  .s_modern_category .ptt-icon-btn {
    flex-basis: 42px;
    width: 42px;
    height: 44px;
  }

  #ptt-back-top {
    right: 12px !important;
    bottom: 18px !important;
  }
}

@media (max-width: 339px) {
  .s_modern_category .ptt-product-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .s_modern_category *,
  .s_modern_category *::before,
  .s_modern_category *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
