:root {
  --p: #185fa5;
  --p-mid: #378add;
  --p-light: #eff6ff;
  --p-border: #b5d4f4;
  --p-dark: #0c447c;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --border: #e2e8f0;
  --border-h: #cbd5e1;
  --txt-h: #0f172a;
  --txt-b: #334155;
  --txt-m: #64748b;
  --txt-s: #94a3b8;
  --red: #a32d2d;
  --red-bg: #fcebeb;
  --red-bdr: #f09595;
  --grn: #27500a;
  --grn-bg: #eaf3de;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
}
.shop-page {
  background: var(--bg);
  padding: 28px 0 60px;
}
.shop-topbar {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.shop-heading {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.3px;
  line-height: 1.2;
  margin: 0;
}
.shop-heading span {
  color: var(--brand);
}
.shop-sub {
  font-size: 0.8rem;
  color: var(--text-subtle);
  font-weight: 400;
  display: block;
  margin-top: 3px;
}
.shop-search-outer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 420px;
}
.shop-search-wrap {
  position: relative;
  flex: 1;
}
.shop-search-wrap .s-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  font-size: 0.85rem;
  pointer-events: none;
}
.shop-search {
  width: 100%;
  border: 0.5px solid var(--border-h);
  border-radius: var(--radius-md);
  padding: 9px 12px 9px 34px;
  font-size: 0.85rem;
  font-family: inherit;
  background: #f8fafc;
  color: var(--text-heading);
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.shop-search:focus {
  border-color: var(--p-mid);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(55, 138, 221, 0.1);
}
.btn-search {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 9px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.btn-search:hover {
  background: var(--brand-dark);
}
.shop-sort-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sort-lbl {
  font-size: 0.8rem;
  color: var(--text-subtle);
  white-space: nowrap;
}
.sort-select {
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 28px 8px 10px;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-body);
  background: var(--surface)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath fill='%2394A3B8' d='M5 6L0 0h10z'/%3E%3C/svg%3E")
    no-repeat right 10px center;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  cursor: pointer;
}
.sort-select:focus {
  border-color: var(--p-mid);
}
.btn-mobile-filter {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-body);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.shop-body {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 20px;
  align-items: start;
}
.shop-sidebar {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  position: sticky;
  top: 90px;
}
.sb-section {
  margin-bottom: 20px;
}
.sb-section:last-child {
  margin-bottom: 0;
}
.sb-head {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 0.5px solid #f1f5f9;
}
.sb-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sb-list li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-body);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition:
    background 0.12s,
    color 0.12s;
  margin-bottom: 2px;
}
.sb-list li a .sb-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cbd5e1;
  flex-shrink: 0;
  transition: background 0.12s;
}
.sb-list li a:hover,
.sb-list li a.active {
  background: var(--brand-light);
  color: var(--brand);
}
.sb-list li a.active {
  font-weight: 700;
}
.sb-list li a.active .sb-dot,
.sb-list li a:hover .sb-dot {
  background: var(--brand);
}
.price-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.price-list li a {
  display: block;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-body);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition:
    background 0.12s,
    color 0.12s;
  margin-bottom: 2px;
}
.price-list li a:hover,
.price-list li a.active {
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 600;
}
.shop-content {
}
.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 10px;
  flex-wrap: wrap;
}
.result-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.result-count strong {
  color: var(--text-heading);
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: var(--brand-light);
  border: 0.5px solid var(--p-border);
  color: var(--brand);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    background 0.15s,
    color 0.15s;
}
.filter-chip:hover {
  background: var(--red-bg);
  color: var(--red);
  border-color: var(--red-bdr);
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.product-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition:
    border-color 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
}
.product-card:hover {
  border-color: var(--p-mid);
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(24, 95, 165, 0.1);
}
.pc-img-wrap {
  position: relative;
  background: #f8fafc;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 0.5px solid #f1f5f9;
  overflow: hidden;
  padding: 16px;
}
.pc-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.35s ease;
}
.product-card:hover .pc-img-wrap img {
  transform: scale(1.07);
}
.pc-no-img {
  font-size: 3rem;
  color: var(--border-h);
}
.pc-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.18s;
}
.product-card:hover .pc-overlay {
  opacity: 1;
}
.oos-card .pc-overlay {
  display: none;
}
.btn-quick-add {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transform: translateY(8px);
  transition:
    background 0.15s,
    transform 0.2s;
  box-shadow: 0 4px 14px rgba(24, 95, 165, 0.25);
}
.product-card:hover .btn-quick-add {
  transform: translateY(0);
}
.btn-quick-add:hover {
  background: var(--brand-dark);
}
.pc-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 100px;
  z-index: 2;
}
.badge-new {
  background: var(--brand-light);
  color: var(--brand);
  border: 0.5px solid var(--p-border);
}
.badge-out {
  background: #f1f5f9;
  color: var(--text-subtle);
  border: 0.5px solid var(--border);
}
.pc-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.pc-warranty {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--grn);
  margin-bottom: 6px;
}
.pc-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.45;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pc-name a {
  color: inherit;
  text-decoration: none;
}
.pc-name a:hover {
  color: var(--brand);
}
.pc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 0.5px dashed #f1f5f9;
}
.pc-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--red);
}
.btn-cart-sm {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #f8fafc;
  border: 0.5px solid var(--border);
  color: var(--brand);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1rem;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
  flex-shrink: 0;
}
.btn-cart-sm:hover:not(:disabled) {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn-cart-sm:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.oos-card {
  opacity: 0.65;
}
.oos-card .pc-img-wrap img {
  filter: grayscale(0.8);
}
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 72px 24px;
  background: var(--surface);
  border: 0.5px dashed var(--border-h);
  border-radius: var(--radius-lg);
}
.empty-icon {
  width: 72px;
  height: 72px;
  background: #f8fafc;
  border: 0.5px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 2rem;
  color: var(--text-subtle);
}
.empty-state h5 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 6px;
}
.empty-state p {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 380px;
  margin: 0 auto;
}
@@media (max-width:1100px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@@media (max-width:991px) {
  .shop-body {
    grid-template-columns: 1fr;
  }
  .shop-sidebar {
    display: none;
    position: static;
  }
  .btn-mobile-filter {
    display: flex;
  }
}
@@media (max-width:640px) {
  .products-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .shop-topbar {
    flex-direction: column;
    align-items: stretch;
  }
  .shop-search-outer {
    max-width: 100%;
  }
}
