.pod-stock-options {
  display: grid;
  gap: 16px;
  margin: 18px 0;
}

.pod-stock-field {
  display: grid;
  gap: 8px;
}

.pod-stock-field label,
.pod-stock-label {
  color: #111827;
  font-weight: 600;
}

.pod-stock-field select {
  min-height: 44px;
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
}

.pod-stock-colours {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, 1fr);
  align-items: flex-start;
  width: 100%;
}

.pod-stock-colour {
  appearance: none;
  display: flex;
  flex-direction: column;
  justify-items: center;
  align-items: center !important;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  height: 118px;
  min-height: 118px;
  box-sizing: border-box;
  padding: 9px 8px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  cursor: pointer;
  font: inherit;
  line-height: 1.2;
  text-align: center;
  text-transform: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  white-space: normal;
}

.pod-stock-colour:hover {
  border-color: #9ca3af;
  background: #f9fafb;
}

.pod-stock-colour.is-selected {
  border-color: rgb(198,27,27) !important;
  background: #f9fafb;
  box-shadow: inset 0 0 0 2px rgb(198,27,27);
}

.pod-stock-colour.is-selected:hover {
  border-color: rgb(198,27,27) !important;
  box-shadow: inset 0 0 0 2px rgb(198,27,27);
}

.pod-stock-colour:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.pod-stock-colour-figure {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  overflow: hidden;
}

.pod-stock-colour-thumbnail {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.pod-stock-garment-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
}

.pod-stock-garment-icon svg {
  display: block;
  width: 60px;
  height: 60px;
}

.pod-stock-colour-figure-missing {
  background: #f3f4f6;
  border: 1px dashed #d1d5db;
  border-radius: 6px;
}

.pod-stock-colour-image-pending {
  color: #6b7280;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
}


.pod-stock-colour-name {
  display: block;
  flex: 0 0 auto;
  width: 100%;
  color: #111827;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.15;
  text-align: center;
  max-height: 25px;
  overflow: visible;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: normal;
  hyphens: none;
}

.pod-stock-options [hidden] {
  display: none !important;
}

/* Keep POD option fields full-width inside themes that use flex for add-to-cart forms.
   Do not restyle the theme quantity, Add to cart, or Buy now buttons. */
form.cart .pod-stock-options {
  clear: both;
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
}

.pod-stock-upgrades {
  display: grid;
  gap: 12px;
  width: 100%;
}

.pod-stock-upgrade-field select {
  width: 100%;
}

.pod-stock-upgrade-price-preview {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #f9fafb;
  color: #111827;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  padding: 10px 12px;
}

.pod-stock-measurements {
  display: grid;
  gap: 18px;
  margin: 24px 0;
}

.pod-stock-measurements-heading,
.pod-stock-measurements-title {
  color: #111827;
  letter-spacing: 0;
  margin: 0;
}

.pod-stock-measurements-heading {
  font-size: 24px;
  line-height: 1.2;
}

.pod-stock-measurements-section {
  display: grid;
  gap: 10px;
}

.pod-stock-measurements-title {
  font-size: 18px;
  line-height: 1.3;
}

.pod-stock-measurements-scroll {
  overflow-x: auto;
  width: 100%;
}

.pod-stock-measurements-table {
  border-collapse: collapse;
  min-width: 520px;
  width: 100%;
}

.pod-stock-measurements-table th,
.pod-stock-measurements-table td {
  border: 1px solid #d1d5db;
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
}

.pod-stock-measurements-table thead th {
  background: #111827;
  color: #fff;
  font-weight: 700;
}

.pod-stock-measurements-table tbody th {
  background: #f9fafb;
  color: #111827;
  font-weight: 700;
}

@media (max-width: 768px) {
  .pod-stock-colours {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    padding-bottom: 8px;
    padding-right: 20px;
    mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent 100%);
  }
  .pod-stock-colour {
    flex: 0 0 112px;
    min-width: 112px;
    width: 112px;
    scroll-snap-align: start;
  }
}
