/* UAVCHIP product directory: compact catalog workspace for UAV and memory hubs. */
.product-directory-page {
  --pd-navy: #0b1f38;
  --pd-navy-2: #153a63;
  --pd-blue: #1268c4;
  --pd-blue-soft: #eaf3fc;
  --pd-orange: #f47b0a;
  --pd-border: #d5e0eb;
  --pd-muted: #5c7085;
  --pd-surface: #fff;
  background: #f4f7fa;
}

.product-directory-page .pd-masthead {
  padding: 24px 0 28px !important;
}

.product-directory-page .pd-masthead h1 {
  max-width: 900px;
  margin-bottom: 8px;
  font-size: clamp(28px, 3.6vw, 42px) !important;
}

.product-directory-page .pd-masthead p {
  max-width: 900px;
  font-size: clamp(14px, 1.4vw, 16px) !important;
  line-height: 1.6 !important;
}

.product-directory-page .pd-masthead .breadcrumb {
  padding-bottom: 8px;
}

.product-directory-page .pd-masthead .page-header-meta {
  margin-top: 10px;
}

.product-directory-page .pd-main {
  min-height: 70vh;
  background: #f4f7fa;
}

.product-directory-page .pd-section {
  padding: clamp(30px, 4vw, 52px) 0 64px;
}

.product-directory-page .pd-section > .container,
.product-directory-page .pd-masthead > .container {
  max-width: 1420px;
}

.pd-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--pd-border);
}

.pd-section-heading h2 {
  margin: 0 0 5px;
  color: var(--pd-navy);
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.2;
  letter-spacing: -.025em;
}

.pd-section-heading p {
  margin: 0;
  color: var(--pd-muted);
  font-size: 14px;
}

.pd-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.pd-sidebar {
  position: static;
  overflow: visible;
  border: 0;
  background: transparent;
}

.pd-sidebar-head {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  border: 1px solid var(--pd-border);
  border-bottom: 3px solid var(--pd-blue);
  border-radius: 5px 5px 0 0;
  background: var(--pd-navy);
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.pd-sidebar-head button {
  display: none;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
}

.pd-category-nav {
  max-height: none;
  overflow: visible;
  padding: 7px 0;
  border: 1px solid var(--pd-border);
  border-top: 0;
  border-radius: 0 0 5px 5px;
  background: var(--pd-surface);
}

.pd-category-button {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 42px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px 9px 15px;
  border: 0;
  border-bottom: 1px solid #edf1f5;
  background: #fff;
  color: #293e56;
  text-align: left;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.pd-category-button > span:first-child {
  min-width: 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.pd-category-button:last-child {
  border-bottom: 0;
}

.pd-category-button::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: transparent;
}

.pd-category-button:hover {
  background: #f5f9fd;
  color: var(--pd-blue);
}

.pd-category-button.is-active {
  background: var(--pd-blue-soft);
  color: #0d5bae;
  font-weight: 800;
}

.pd-category-button.is-active::before {
  background: var(--pd-blue);
}

.pd-category-count {
  min-width: 31px;
  padding: 2px 6px;
  border-radius: 12px;
  background: #e9eef4;
  color: #506478;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.pd-category-button.is-active .pd-category-count {
  background: #fff;
  color: #0d5bae;
}

.pd-popular {
  overflow: hidden;
  margin-top: 18px;
  border: 1px solid var(--pd-border);
  border-radius: 5px;
  background: var(--pd-surface);
}

.pd-popular-head {
  padding: 15px 15px 11px;
  border-bottom: 3px solid var(--pd-orange);
  background: var(--pd-navy);
}

.pd-popular-head h3 {
  margin: 0;
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.3;
}

.pd-popular-head p {
  margin: 3px 0 0;
  color: #b9cce0;
  font-size: 10.5px;
  line-height: 1.4;
}

.pd-popular ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pd-popular li + li {
  border-top: 1px solid #edf1f5;
}

.pd-popular a {
  display: flex;
  min-height: 52px;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 8px 15px;
  color: var(--pd-navy);
  text-decoration: none;
  transition: background .15s, color .15s;
}

.pd-popular a:hover,
.pd-popular a:focus-visible {
  background: var(--pd-blue-soft);
  color: var(--pd-blue);
}

.pd-popular a:focus-visible {
  outline: 2px solid var(--pd-orange);
  outline-offset: -2px;
}

.pd-popular strong {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 12.5px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.pd-popular span {
  color: var(--pd-muted);
  font-size: 10.5px;
  line-height: 1.35;
}

.pd-mobile-filter {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid var(--pd-blue);
  border-radius: 4px;
  background: #fff;
  color: var(--pd-blue);
  font-weight: 800;
  cursor: pointer;
}

.pd-results {
  min-width: 0;
}

.pd-toolbar {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) auto;
  align-items: end;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--pd-border);
  border-bottom: 3px solid var(--pd-blue);
  border-radius: 5px 5px 0 0;
  background: #fff;
}

.pd-search label,
.pd-page-size {
  display: block;
  margin-bottom: 6px;
  color: var(--pd-navy);
  font-size: 12px;
  font-weight: 800;
}

.pd-search-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.pd-search-control input {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #bfcddd;
  border-right: 0;
  border-radius: 4px 0 0 4px;
  background: #fff;
  color: var(--pd-navy);
  font-size: 15px;
}

.pd-search-control button {
  min-height: 44px;
  padding: 8px 17px;
  border: 1px solid var(--pd-blue);
  background: var(--pd-blue);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.pd-search-control .pd-clear {
  border-color: #bfcddd;
  border-left: 0;
  border-radius: 0 4px 4px 0;
  background: #fff;
  color: #52677d;
}

.pd-page-size {
  margin: 0;
  white-space: nowrap;
}

.pd-page-size select {
  display: block;
  min-width: 88px;
  min-height: 44px;
  margin-top: 6px;
  padding: 8px 30px 8px 10px;
  border: 1px solid #bfcddd;
  border-radius: 4px;
  background: #fff;
  color: var(--pd-navy);
  font-size: 14px;
}

.pd-result-meta {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 15px;
  border: 1px solid var(--pd-border);
  border-top: 0;
  background: #f8fafc;
}

.pd-result-meta p {
  margin: 0;
  color: #43586d;
  font-size: 13px;
  font-weight: 700;
}

.pd-result-meta > span {
  color: var(--pd-blue);
  font-size: 12px;
  font-weight: 800;
}

.pd-table-wrap {
  overflow: hidden;
  border: 1px solid var(--pd-border);
  border-top: 0;
  border-radius: 0 0 5px 5px;
  background: #fff;
}

.pd-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.pd-table th {
  height: 44px;
  padding: 10px 13px;
  border-right: 1px solid rgba(255,255,255,.12);
  background: var(--pd-navy);
  color: #dce9f5;
  font-size: 10.5px;
  letter-spacing: .065em;
  text-align: left;
  text-transform: uppercase;
}

.pd-table th:nth-child(1) { width: 22%; }
.pd-table th:nth-child(2) { width: 20%; }
.pd-table th:nth-child(3) { width: 36%; }
.pd-table th:nth-child(4) { width: 22%; }

.pd-table td {
  min-height: 66px;
  padding: 12px 13px;
  border-right: 1px solid #edf1f5;
  border-bottom: 1px solid #dfe7ef;
  color: #34495e;
  font-size: 13px;
  line-height: 1.45;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.pd-table tbody tr:nth-child(even) td {
  background: #f8fafc;
}

.pd-table tbody tr:hover td {
  background: #edf5fd;
}

.pd-table tbody tr:last-child td {
  border-bottom: 0;
}

.pd-model {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  color: #0b5eb7;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
  text-decoration: none;
}

.pd-model:hover {
  color: var(--pd-orange);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pd-category-chip {
  display: inline-block;
  padding: 4px 8px;
  border: 1px solid #c7d8e9;
  border-radius: 3px;
  background: #eef5fc;
  color: #235b8e;
  font-size: 11px;
  font-weight: 800;
}

.pd-description {
  display: -webkit-box;
  overflow: hidden;
  color: #52677d;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.pd-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 7px;
}

.pd-view,
.pd-rfq {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 850;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}

.pd-view {
  border: 1px solid var(--pd-blue);
  background: var(--pd-blue);
  color: #fff;
}

.pd-view:hover {
  background: var(--pd-navy-2);
  color: #fff;
}

.pd-rfq {
  border: 1px solid #f0a15d;
  background: #fff8f1;
  color: #b34f00;
}

.pd-rfq:hover,
.pd-rfq.is-added {
  border-color: var(--pd-orange);
  background: var(--pd-orange);
  color: #fff;
}

.pd-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding-top: 18px;
}

.pd-page-button {
  min-width: 38px;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #c8d5e2;
  border-radius: 4px;
  background: #fff;
  color: #27425d;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.pd-page-button:hover:not(:disabled),
.pd-page-button[aria-current="page"] {
  border-color: var(--pd-blue);
  background: var(--pd-blue);
  color: #fff;
}

.pd-page-button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.pd-page-ellipsis {
  min-width: 28px;
  color: var(--pd-muted);
  text-align: center;
}

.pd-empty,
.pd-noscript {
  padding: 42px 24px;
  color: var(--pd-muted);
  text-align: center;
}

.pd-empty strong {
  display: block;
  margin-bottom: 8px;
  color: var(--pd-navy);
  font-size: 18px;
}

.pd-empty a {
  display: inline-flex;
  margin-top: 16px;
  padding: 9px 14px;
  border-radius: 4px;
  background: var(--pd-orange);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.pd-loading-line {
  display: block;
  padding: 16px;
  color: var(--pd-muted);
  font-size: 12px;
}

@media (prefers-reduced-motion: no-preference) {
  .pd-table tbody tr {
    animation: pd-row-in .18s ease-out both;
  }
  @keyframes pd-row-in {
    from { transform: translateY(3px); }
    to { transform: translateY(0); }
  }
}

@media (max-width: 1100px) {
  .pd-layout { grid-template-columns: 225px minmax(0, 1fr); }
  .pd-table th:nth-child(1) { width: 24%; }
  .pd-table th:nth-child(2) { width: 20%; }
  .pd-table th:nth-child(3) { width: 24%; }
  .pd-table th:nth-child(4) { width: 32%; }
}

@media (max-width: 900px) {
  .product-directory-page .pd-masthead { padding: 20px 0 24px !important; }
  .pd-section-heading { align-items: center; }
  .pd-mobile-filter { display: inline-flex; flex: 0 0 auto; }
  .pd-layout { grid-template-columns: 1fr; }
  .pd-sidebar { display: none; position: static; max-width: none; }
  .pd-sidebar.is-open { display: block; }
  .pd-sidebar-head button { display: inline-flex; align-items: center; justify-content: center; }
  .pd-category-nav { display: grid; max-height: none; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; padding: 7px; gap: 4px; }
  .pd-category-button { border: 1px solid #e2e8ef; border-radius: 3px; }
  .pd-popular ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pd-popular li { border-top: 1px solid #edf1f5; }
  .pd-popular li:nth-child(odd) { border-right: 1px solid #edf1f5; }
}

@media (max-width: 680px) {
  .product-directory-page .pd-section { padding-top: 24px; }
  .pd-section-heading { align-items: stretch; flex-direction: column; gap: 14px; }
  .pd-mobile-filter { width: 100%; }
  .pd-category-nav { grid-template-columns: 1fr; }
  .pd-popular ul { grid-template-columns: 1fr; }
  .pd-popular li:nth-child(odd) { border-right: 0; }
  .pd-toolbar { grid-template-columns: 1fr; }
  .pd-page-size { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
  .pd-page-size select { margin-top: 0; }
  .pd-search-control { grid-template-columns: minmax(0, 1fr) auto; }
  .pd-search-control .pd-clear { grid-column: 1 / -1; min-height: 38px; border: 1px solid #bfcddd; border-top: 0; border-radius: 0 0 4px 4px; }
  .pd-result-meta { align-items: flex-start; flex-direction: column; gap: 3px; }
  .pd-table, .pd-table tbody, .pd-table tr, .pd-table td { display: block; width: 100%; }
  .pd-table thead { display: none; }
  .pd-table tbody { padding: 10px; }
  .pd-table tbody tr { margin-bottom: 10px; border: 1px solid var(--pd-border); border-left: 3px solid var(--pd-blue); border-radius: 4px; background: #fff; }
  .pd-table tbody tr:last-child { margin-bottom: 0; }
  .pd-table td { min-height: 0; padding: 8px 11px; border: 0; border-bottom: 1px solid #edf1f5; background: #fff !important; }
  .pd-table td::before { content: attr(data-label); display: block; margin-bottom: 3px; color: #74879a; font-size: 9.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
  .pd-table td:last-child { border-bottom: 0; }
  .pd-actions { flex-direction: row; }
  .pd-view, .pd-rfq { flex: 1 1 130px; }
  .pd-description { -webkit-line-clamp: 3; }
  .pd-pagination { justify-content: center; }
}

@media (max-width: 420px) {
  .pd-search-control { display: grid; grid-template-columns: 1fr; }
  .pd-search-control input { border: 1px solid #bfcddd; border-radius: 4px 4px 0 0; }
  .pd-search-control button { border-radius: 0; }
  .pd-search-control .pd-clear { grid-column: auto; }
  .pd-page-button { min-width: 36px; min-height: 36px; }
}
