/* Warehouse stock: dots in one column; selected = brighter text+dot, no outline */
.product-card-stock {
  font-size: 0;
  line-height: 0;
  margin: 3px 0 1px;
  min-height: 0;
}

.pcw {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  font-family: Inter, system-ui, sans-serif;
}
.pcw__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.pcw__item {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 15px;
  padding: 1px 4px 1px 3px;
  margin: 0 -3px;
  line-height: 1.1;
  border-radius: 4px;
  box-sizing: border-box;
}

.pcw__link {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 500;
  text-decoration: none;
  color: #3a9a5c;
  background: none;
  border: 0;
  outline: none;
  padding: 0;
  margin: 0;
  border-radius: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  line-height: 1.15;
  box-shadow: none;
  transition: color .12s ease;
}
.pcw__link:hover {
  color: #2a8a4c;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(42, 138, 76, 0.35);
}
/* current: whole row wash (text + dot) */
.pcw__item.is-selected {
  background: rgba(18, 170, 70, 0.12);
}
.pcw__item.is-selected .pcw__link {
  color: #087a30;
  font-weight: 650;
  text-decoration: none;
  box-shadow: none;
  background: none;
}
.pcw__item.is-out .pcw__link {
  color: #d06060;
  font-weight: 450;
}
.pcw__item.is-out .pcw__link:hover {
  color: #c04040;
  text-decoration-color: rgba(192, 64, 64, 0.35);
}
.pcw__item.is-out.is-selected {
  background: rgba(220, 60, 60, 0.1);
}
.pcw__item.is-out.is-selected .pcw__link {
  color: #c02020;
  font-weight: 650;
  text-decoration: none;
}
.pcw__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* dots aligned in one vertical column on the right */
.pcw__dot {
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3a9a5c;
}
.pcw__item.is-selected .pcw__dot {
  background: #087a30;
}
.pcw__item.is-out .pcw__dot {
  background: #d06060;
}
.pcw__item.is-out.is-selected .pcw__dot {
  background: #c02020;
}

/* Remainder — own palette */
.pcw__summary {
  margin: 4px 0 0;
  padding-top: 3px;
  border-top: 1px solid rgba(90, 110, 130, 0.12);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: #3d5a73;
}
.pcw__summary.is-out {
  color: #8a6b4a;
  font-weight: 600;
}

.product-card .product-card-footer .product-variant-select {
  margin-bottom: 2px;
  padding-right: 28px !important;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}
.product-card .product-card-qty {
  margin-top: 4px;
}

/* Product page: warehouse custom dropdown */
.pcw--product.pcw--select {
  margin: 0 0 12px;
  max-width: none;
  width: max-content;
  max-width: 100%;
  padding: 0;
  background: transparent;
  font-family: inherit;
  position: relative;
  z-index: 35;
}

.pcw--select .pcw__field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin: 0;
  width: max-content;
  max-width: 100%;
  position: relative;
}

.pcw--select .pcw__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
  line-height: 1.2;
}

.pcw--select .pcw__select--native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.pcw--select .pcw__trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: 100%;
  min-height: 52px;
  padding: 8px 36px 8px 12px;
  box-sizing: border-box;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  position: relative;
  transition:
    border-color 0.12s ease,
    background-color 0.12s ease,
    box-shadow 0.12s ease;
}

.pcw--select .pcw__trigger-main {
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
}

.pcw--select .pcw__trigger-text {
  color: #0f172a;
  font-weight: 600;
  white-space: nowrap;
}

.pcw--select .pcw__trigger-status {
  font-size: inherit;
  font-weight: 600;
  white-space: nowrap;
}

.pcw--select .pcw__trigger-status::before {
  content: "— ";
  color: inherit;
  font-weight: 500;
}

.pcw--select .pcw__trigger.is-in .pcw__trigger-status {
  color: #15803d;
}

.pcw--select .pcw__trigger.is-out .pcw__trigger-status {
  color: #dc2626;
}

.pcw--select .pcw__trigger.is-out .pcw__trigger-status::before {
  color: #dc2626;
}

.pcw--select .pcw__trigger.is-in {
  border-color: #86efac;
  background: #f0fdf4;
}

.pcw--select .pcw__trigger.is-out {
  border-color: #fecaca;
  background: #fef2f2;
}

.pcw--select .pcw__trigger.is-out .pcw__trigger-text {
  color: #0f172a;
}

.pcw--select .pcw__trigger-chevron {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2364748b' stroke-width='1.75'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M6 8l4 4 4-4'/%3E%3C/svg%3E")
    center / contain no-repeat;
  transition: transform 0.15s ease;
}

.pcw--select.is-open .pcw__trigger-chevron {
  transform: rotate(180deg);
}

.pcw--select .pcw__trigger:hover {
  border-color: #86efac;
}

.pcw--select .pcw__trigger.is-out:hover {
  border-color: #fca5a5;
}

.pcw--select .pcw__trigger:focus {
  outline: none;
  border-color: #3b6fd9;
  box-shadow: 0 0 0 3px rgba(59, 111, 217, 0.12);
}

.pcw--select .pcw__menu {
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 100%;
  width: max-content;
  max-width: min(420px, 92vw);
  padding: 6px;
  margin: 0;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.pcw--select .pcw__menu[hidden] {
  display: none !important;
}

.pcw--select.is-open .pcw__menu {
  display: flex;
}

.pcw--select .pcw__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 0.8125rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease;
}

.pcw--select .pcw__option:hover {
  background: #f8fafc;
}

.pcw--select .pcw__option.is-selected {
  background: #eff6ff;
}

.pcw--select .pcw__option-name {
  color: #0f172a;
  font-weight: 600;
  white-space: nowrap;
}

.pcw--select .pcw__option-status {
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.pcw--select .pcw__option.is-in .pcw__option-status {
  color: #15803d;
}

.pcw--select .pcw__option.is-out .pcw__option-status {
  color: #dc2626;
}

.pcw--select .pcw__option.is-in .pcw__option-name {
  color: #14532d;
}

.pcw--select .pcw__option.is-out .pcw__option-name {
  color: #7f1d1d;
}

.pcw--select .pcw__option.is-in {
  background: rgba(22, 163, 74, 0.06);
}

.pcw--select .pcw__option.is-out {
  background: rgba(185, 28, 28, 0.05);
}

.pcw--select .pcw__option.is-in:hover {
  background: rgba(22, 163, 74, 0.12);
}

.pcw--select .pcw__option.is-out:hover {
  background: rgba(185, 28, 28, 0.1);
}

.pcw--select .pcw__option.is-selected.is-in {
  box-shadow: inset 0 0 0 1px #86efac;
}

.pcw--select .pcw__option.is-selected.is-out {
  box-shadow: inset 0 0 0 1px #fecaca;
}

/* Legacy native select (fallback if still present) */
.pcw--select .pcw__select:not(.pcw__select--native) {
  width: 100%;
  max-width: 100%;
  height: 40px;
  padding: 0 36px 0 12px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background:
    #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2364748b' stroke-width='1.75'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M6 8l4 4 4-4'/%3E%3C/svg%3E")
    no-repeat
    right 10px center / 16px 16px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: #15803d;
  cursor: pointer;
  appearance: none;
}

.pcw--select .pcw__select:not(.pcw__select--native).is-out {
  color: #b91c1c;
  border-color: #fecaca;
  background-color: #fef2f2;
}

/* Legacy card switcher (category cards still use vertical list) */
.pcw--product:not(.pcw--select) {
  margin: 0 0 12px;
  max-width: none;
  width: 100%;
  padding: 0;
  background: transparent;
  font-family: inherit;
}

.pcw--product .pcw__list {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.pcw--product .pcw__item {
  display: block;
  min-height: 0;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent !important;
}

.pcw--product .pcw__link {
  display: inline-flex;
  align-items: stretch;
  justify-content: flex-start;
  flex: 0 0 auto;
  position: relative;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid #d8dee6;
  border-radius: 8px;
  background: #f7f8fa;
  color: #4b5563;
  font-size: 0.8125rem;
  font-weight: 550;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  box-shadow: none;
  transition:
    border-color 0.12s ease,
    background 0.12s ease,
    color 0.12s ease,
    box-shadow 0.12s ease;
}

.pcw--product .pcw__body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.pcw--product .pcw__status {
  font-size: 0.625rem;
  font-weight: 500;
  line-height: 1.15;
  opacity: 0.92;
}

/* In stock = green */
.pcw--product .pcw__item:not(.is-out) .pcw__link {
  color: #15803d;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.pcw--product .pcw__item:not(.is-out) .pcw__link:hover {
  border-color: #86efac;
  background: #dcfce7;
  color: #14532d;
}

.pcw--product .pcw__item:not(.is-out) .pcw__status {
  color: #16a34a;
}

/* Out of stock = red */
.pcw--product .pcw__item.is-out .pcw__link {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fef2f2;
  font-weight: 550;
}

.pcw--product .pcw__item.is-out .pcw__link:hover {
  border-color: #fca5a5;
  background: #fee2e2;
  color: #991b1b;
}

.pcw--product .pcw__item.is-out .pcw__status {
  color: #dc2626;
}

/* Selected: stronger green/red — no black/neutral ring */
.pcw--product .pcw__item.is-selected:not(.is-out) .pcw__link {
  font-weight: 700;
  border-width: 2px;
  border-color: #16a34a;
  background: #dcfce7;
  box-shadow: none;
  text-decoration: none;
}

.pcw--product .pcw__item.is-selected:not(.is-out) .pcw__link:hover {
  border-color: #15803d;
  background: #bbf7d0;
  box-shadow: none;
}

.pcw--product .pcw__item.is-selected.is-out .pcw__link {
  font-weight: 700;
  border-width: 2px;
  border-color: #dc2626;
  background: #fee2e2;
  box-shadow: none;
  text-decoration: none;
}

.pcw--product .pcw__item.is-selected.is-out .pcw__link:hover {
  border-color: #b91c1c;
  background: #fecaca;
  box-shadow: none;
}

.pcw--product .pcw__dot,
.pcw--product .pcw__summary {
  display: none !important;
}

.pcw--product .pcw__name {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}
