.item-row.is-removed {
  display: none !important;
}

.m2-fields {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: end;
  gap: 10px;
  padding: 14px;
  border: 1px solid #cfe0da;
  border-radius: 12px;
  background: #f2f8f5;
}

.m2-fields[hidden] {
  display: none !important;
}

.dimension-sign {
  align-self: center;
  padding-top: 18px;
  color: #55736a;
  font-weight: 800;
}

.m2-total {
  display: block;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #a9c3ba;
  border-radius: 9px;
  background: #fff;
  color: #123b34;
  font-weight: 800;
  text-align: right;
}

@media (max-width: 760px) {
  .m2-fields {
    grid-template-columns: 1fr;
  }

  .dimension-sign {
    display: none;
  }
}

.view-product-gallery {
  margin-top: 7px;
  border: 0;
  border-radius: 8px;
  background: #e5f1ed;
  color: #123b34;
  padding: 7px 10px;
  font-weight: 700;
  cursor: pointer;
}

.view-product-gallery[hidden],
.product-gallery-modal[hidden] {
  display: none !important;
}

.product-gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 24, 20, .76);
  backdrop-filter: blur(5px);
}

.product-gallery-dialog {
  width: min(900px, 100%);
  max-height: 92vh;
  overflow: auto;
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 25px 80px rgba(0, 0, 0, .28);
}

.product-gallery-dialog header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.product-gallery-dialog header h3 { margin: 0; }
.product-gallery-dialog header button {
  border: 0;
  background: none;
  color: #123b34;
  font-size: 2rem;
  cursor: pointer;
}

.product-gallery-stage {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  min-height: 420px;
  overflow: hidden;
  border-radius: 14px;
  background: #edf3f0;
}

.product-gallery-stage img {
  width: 100%;
  height: min(62vh, 580px);
  object-fit: contain;
}

.product-gallery-stage button {
  height: 60px;
  border: 0;
  background: rgba(255,255,255,.75);
  color: #123b34;
  font-size: 2rem;
  cursor: pointer;
}

.product-gallery-dialog > p {
  min-height: 20px;
  margin: 10px 0;
  color: #687872;
  text-align: center;
}

.product-gallery-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px;
}

.product-gallery-thumbs button {
  flex: 0 0 72px;
  width: 72px;
  height: 58px;
  padding: 2px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.product-gallery-thumbs button.active { border-color: #123b34; }
.product-gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; border-radius: 5px; }

@media (max-width: 600px) {
  .product-gallery-stage { min-height: 280px; grid-template-columns: 36px minmax(0,1fr) 36px; }
  .product-gallery-stage img { height: 50vh; }
}
