﻿* {
  box-sizing: border-box;
}

/* 2026-08 docx pass: align generated product/admin previews. */
.detail-preview-image,
.detail-editor-preview.is-standard-preview .detail-preview-image,
.detail-editor-preview.is-hero-preview .detail-preview-image {
  align-items: center !important;
  background: #fff !important;
  display: flex !important;
  justify-content: center !important;
}

.detail-preview-image img,
.detail-editor-preview.is-standard-preview .detail-preview-image img,
.detail-editor-preview.is-hero-preview .detail-preview-image img {
  height: 100% !important;
  inset: auto !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  position: static !important;
  top: auto !important;
  transform: none !important;
  width: 100% !important;
}

.detail-editor-preview {
  border: 0 !important;
  border-radius: 4px !important;
  grid-template-columns: minmax(0, 44%) minmax(0, 56%) !important;
  min-height: clamp(520px, 31.8vw, 610px) !important;
  width: 100% !important;
}

.detail-editor-preview .detail-preview-copy,
.detail-editor-preview .detail-preview-image {
  min-height: clamp(520px, 31.8vw, 610px) !important;
}

.detail-editor-preview .detail-preview-image {
  align-items: stretch !important;
  background: #111820 !important;
  display: block !important;
  justify-content: stretch !important;
  position: relative !important;
}

.detail-editor-preview .detail-preview-image img {
  display: block !important;
  height: 100% !important;
  inset: 0 !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  position: absolute !important;
  top: 0 !important;
  transform: none !important;
  width: 100% !important;
}

.parameter-editor-preview,
.parameter-preview-copy {
  background: #fff !important;
}

.parameter-preview-copy {
  gap: 10px !important;
  padding-top: clamp(14px, 1.5vw, 24px) !important;
}

.parameter-preview-line {
  margin: 0 0 8px !important;
}

.spec-toolbar {
  align-items: center !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  overflow-x: auto !important;
}

.spec-toolbar .admin-button.secondary,
.spec-toolbar .color-control {
  flex: 0 0 112px !important;
  height: 44px !important;
  min-height: 44px !important;
  min-width: 112px !important;
  padding: 0 8px !important;
  white-space: nowrap !important;
}

.spec-toolbar input[type="number"],
.spec-toolbar .admin-input {
  min-width: 58px !important;
  width: 58px !important;
}

.spec-toolbar-gallery-add,
.merged-gallery-add {
  height: 44px !important;
  min-height: 44px !important;
  width: 112px !important;
}

.merged-gallery-row:not(:empty),
.spec-image-row .gallery-editor:not(:empty),
.gallery-editor {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  gap: 14px !important;
  padding: 0 !important;
}

.gallery-thumb {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.gallery-thumb img {
  background: transparent !important;
  object-fit: contain !important;
}

body {
  margin: 0;
  background: #f4f7f9;
  color: #111820;
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.admin-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 28px 56px;
}

.admin-topbar {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 26px;
}

.admin-title {
  font-size: 34px;
  font-weight: 800;
  margin: 0;
}

.admin-card {
  background: #fff;
  border: 1px solid #dfe6eb;
  border-radius: 8px;
  box-shadow: 0 14px 35px rgba(20, 34, 45, 0.08);
  max-width: 100%;
  min-width: 0;
  padding: 28px;
}

.admin-grid {
  display: grid;
  gap: 14px;
  max-width: 100%;
  min-width: 0;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-button {
  align-items: center;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  font-size: 16px;
  font-weight: 800;
  justify-content: center;
  padding: 14px 22px;
}

.admin-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.admin-button.primary {
  background: #f4bf26;
  color: #111820;
}

.admin-button.secondary {
  background: #e6eaee;
  color: #111820;
}

.admin-button.danger {
  background: #b3261e;
  color: #fff;
}

.admin-field {
  display: grid;
  gap: 10px;
}

.admin-field label {
  color: #34424f;
  font-size: 15px;
  font-weight: 800;
}

.admin-section-label {
  color: #111820 !important;
  font-size: 26px !important;
  font-weight: 800 !important;
  line-height: 1.15;
}

.admin-check {
  align-items: center;
  color: #34424f;
  display: flex;
  font-size: 15px;
  font-weight: 800;
  gap: 10px;
}

.admin-check input {
  height: 18px;
  width: 18px;
}

.admin-input,
.admin-textarea {
  border: 1px solid #ccd6dd;
  border-radius: 4px;
  font: inherit;
  padding: 13px 14px;
  width: 100%;
}

.admin-textarea {
  min-height: 150px;
  resize: vertical;
}

.admin-message {
  color: #b3261e;
  font-weight: 700;
  min-height: 22px;
}

.hero-layout-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.hero-layout-grid label {
  color: #34424f;
  display: grid;
  font-size: 14px;
  font-weight: 800;
  gap: 6px;
}

.admin-help {
  color: #63707a;
  font-size: 13px;
  font-weight: 700;
}

.admin-empty {
  color: #63707a;
  margin: 20px 0 4px;
}

.admin-current-image {
  background: #fff;
  border: 1px solid #dfe6eb;
  max-height: 320px;
  max-width: 420px;
  object-fit: cover;
  width: 100%;
}

.product-row {
  align-items: center;
  border-bottom: 1px solid #e5eaee;
  display: grid;
  gap: 16px;
  grid-template-columns: 96px 1fr auto;
  padding: 14px 0;
}

.product-row img {
  aspect-ratio: 4 / 3;
  background: #fff;
  border: 1px solid #e1e7ec;
  object-fit: cover;
  width: 96px;
}

.detail-editor-preview {
  align-items: stretch;
  background: #111820;
  border: 1px solid #dfe6eb;
  display: grid;
  grid-template-columns: minmax(0, 44%) minmax(0, 56%);
  min-height: clamp(430px, 30vw, 520px);
  overflow: hidden;
}

.detail-preview-image {
  background: #fff;
  display: block;
  min-height: clamp(430px, 30vw, 520px);
  overflow: hidden;
  padding: 0;
  position: relative;
}

.detail-preview-image img {
  display: block;
  height: 200%;
  inset: 0;
  min-height: 0;
  object-fit: cover;
  object-position: center center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
}

.detail-preview-image img[hidden] {
  display: none;
}

.detail-preview-copy {
  align-items: stretch;
  background: #111820;
  color: #fff;
  display: grid;
  gap: 32px;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  min-height: clamp(430px, 30vw, 520px);
  padding: clamp(20px, 2.2vw, 46px) clamp(48px, 5vw, 92px) clamp(32px, 3.2vw, 66px);
  text-align: center;
}

.detail-editor-preview.is-standard-preview .detail-preview-copy {
  align-items: stretch;
  background: #111820;
  color: #fff;
  display: grid;
  gap: 32px;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  min-height: clamp(430px, 30vw, 520px);
  padding: clamp(20px, 2.2vw, 46px) clamp(48px, 5vw, 92px) clamp(32px, 3.2vw, 66px);
  text-align: center;
}

.detail-editor-preview.is-standard-preview .detail-preview-image {
  background: #fff;
  display: block;
  min-height: clamp(430px, 30vw, 520px);
  overflow: hidden;
  padding: 0;
  position: relative;
}

.detail-editor-preview.is-standard-preview .detail-preview-image img {
  height: 200%;
  inset: 0;
  min-height: 0;
  object-fit: cover;
  object-position: center center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
}

.detail-editor-preview.is-hero-preview .detail-preview-copy {
  align-items: stretch;
  background: #111820;
  color: #fff;
  display: grid;
  gap: 32px;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  min-height: clamp(430px, 30vw, 520px);
  padding: clamp(20px, 2.2vw, 46px) clamp(48px, 5vw, 92px) clamp(32px, 3.2vw, 66px);
  text-align: center;
}

.detail-editor-preview.is-hero-preview .detail-preview-image {
  background: #fff;
  display: block;
  min-height: clamp(430px, 30vw, 520px);
  overflow: hidden;
  padding: 0;
  position: relative;
}

.detail-editor-preview.is-hero-preview .detail-preview-image img {
  height: 200%;
  inset: 0;
  min-height: 0;
  object-fit: cover;
  object-position: center center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
}

.detail-preview-copy {
  justify-content: center;
}

.detail-preview-copy h2 {
  align-self: start;
  color: #f4bf26;
  font-size: clamp(36px, 4vw, 64px);
  font-weight: 800;
  grid-row: 1;
  line-height: 1.05;
  margin: 0;
  text-align: center;
}

.detail-preview-line {
  background: transparent;
  height: 4px;
  margin: 10px 0;
  max-width: 560px;
  width: 100%;
}

.detail-preview-copy p {
  align-self: end;
  color: #dce2e7;
  font-size: 16px;
  grid-row: 3;
  line-height: 1.45;
  margin: 0;
  max-width: 460px;
  white-space: pre-wrap;
}

.detail-info-preview {
  background: transparent;
  grid-template-columns: minmax(0, 56%) minmax(0, 44%);
}

.detail-info-preview .detail-preview-image {
  background: #fff;
}

.detail-info-preview .detail-preview-image img {
  height: 100%;
  object-fit: contain;
  position: static;
  transform: none;
}

.detail-info-preview .detail-preview-copy {
  align-content: start;
  background: transparent;
  color: #34424f;
  gap: 16px;
  grid-template-rows: auto auto auto;
  justify-items: stretch;
  padding: clamp(18px, 2vw, 34px) clamp(28px, 4vw, 74px);
  text-align: left;
}

.detail-info-preview .detail-preview-copy h2 {
  color: #f4bf26;
  font-size: clamp(46px, 4.5vw, 84px);
  font-weight: 900;
  text-align: left;
}

.detail-info-preview .detail-preview-line {
  background: #111820;
  height: 5px;
  margin: 0;
  max-width: none;
}

.detail-info-preview .detail-preview-copy p {
  align-self: start;
  color: #34424f;
  font-size: clamp(20px, 1.65vw, 28px);
  line-height: 1.5;
  max-width: none;
  text-align: left;
}

.parameter-editor-preview {
  background: #f4f7f9;
  border: 1px solid #dfe6eb;
  display: grid;
  grid-template-columns: minmax(0, 56%) minmax(0, 44%);
  min-height: clamp(430px, 30vw, 520px);
  overflow: hidden;
}

.parameter-preview-image {
  align-items: center;
  background: #fff;
  display: flex;
  justify-content: center;
  min-height: clamp(430px, 30vw, 520px);
  overflow: hidden;
}

.parameter-preview-image img {
  display: block;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  width: 100%;
}

.parameter-preview-image img[hidden] {
  display: none;
}

.parameter-preview-copy {
  align-content: start;
  background: #f4f7f9;
  color: #34424f;
  display: grid;
  gap: 16px;
  grid-template-rows: auto auto auto;
  min-height: clamp(430px, 30vw, 520px);
  padding: clamp(18px, 2vw, 34px) clamp(28px, 4vw, 74px);
  text-align: left;
}

.parameter-preview-copy h2 {
  color: #f4bf26;
  font-size: clamp(46px, 4.5vw, 84px);
  font-weight: 900;
  line-height: 1.05;
  margin: 0;
  text-align: left;
}

.parameter-preview-line {
  background: #111820;
  height: 5px;
  width: 100%;
}

.parameter-preview-copy p {
  color: #34424f;
  font-size: clamp(20px, 1.65vw, 28px);
  line-height: 1.5;
  margin: 0;
  white-space: pre-wrap;
}

.position-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.homepage-editor-preview {
  background: #111820;
  border: 1px solid #dfe6eb;
  border-radius: 6px;
  display: grid;
  grid-template-columns: minmax(0, 46%) minmax(0, 54%);
  min-height: 360px;
  overflow: hidden;
}

.homepage-preview-copy {
  align-content: space-between;
  color: #fff;
  display: grid;
  gap: 28px;
  padding: 52px 54px;
}

.homepage-preview-copy .label {
  color: #f4bf26;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0;
  text-transform: uppercase;
}

.homepage-preview-copy h2 {
  color: #f4bf26;
  font-size: clamp(38px, 4vw, 66px);
  line-height: 1.05;
  margin: 0;
}

.homepage-preview-copy p:not(.label) {
  color: #dce2e7;
  font-size: 18px;
  line-height: 1.55;
  margin: 0;
  max-width: 460px;
  white-space: pre-wrap;
}

.homepage-preview-image {
  background: #fff;
  min-height: 360px;
}

.homepage-preview-image img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.detail-editor-section {
  display: grid;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

.admin-spec-heading {
  color: #111820;
  font-size: 26px;
  font-weight: 800;
  margin: 0;
}

.gallery-editor {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.merged-gallery-row {
  border: 0;
  margin-top: 0;
  min-height: 0;
  padding: 0;
}

.merged-gallery-row:not(:empty) {
  padding: 12px;
}

.merged-gallery-add {
  background: #e6eaee;
  border: 0;
  border-radius: 0;
  min-height: 54px;
  width: 100%;
}

.spec-toolbar-gallery-add {
  flex: 0 0 112px !important;
  height: 44px !important;
  margin-top: 0;
  min-width: 112px !important;
  width: 112px !important;
}

.spec-table-wrap {
  background: #fff;
  border: 1px solid #b9c2c9;
  display: grid;
  gap: 0;
  overflow: hidden;
}

.spec-table-wrap[hidden] {
  display: none;
}

.gallery-thumb {
  aspect-ratio: 1;
  background: #f4f6f8;
  border: 1px solid #d9e0e6;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.gallery-thumb img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.gallery-thumb-remove {
  align-items: center;
  background: rgba(17, 24, 32, 0.72);
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 18px;
  height: 26px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 6px;
  top: 6px;
  width: 26px;
}

.spec-toolbar,
.cell-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  max-width: 100%;
  overflow: visible;
  padding-bottom: 6px;
  scrollbar-width: none;
  width: 100%;
}

.spec-toolbar {
  background: #f4f6f8;
  border-bottom: 1px solid #d9e0e6;
  box-shadow: 0 8px 18px rgba(17, 24, 32, 0.08);
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  padding-top: 8px;
}

.spec-toolbar-full-row {
  flex: 1 1 100%;
  width: 100%;
}

.spec-toolbar::-webkit-scrollbar,
.cell-toolbar::-webkit-scrollbar {
  display: none;
}

.spec-toolbar .admin-button.secondary {
  flex: 1 1 0;
  height: 44px;
  min-width: 88px;
  width: 100%;
}

.history-button {
  flex: 0 0 52px;
  height: 44px;
  max-width: 52px;
  min-width: 52px;
  width: auto;
}

.row-count-control {
  align-items: center;
  background: #fff;
  border: 1px solid #c7d0d7;
  border-radius: 4px;
  color: #111820;
  display: inline-flex;
  flex: 0 0 120px;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  height: 44px;
  justify-content: center;
  min-width: 120px;
  padding: 0 10px;
}

.row-count-control input {
  border: 0;
  color: #111820;
  font: inherit;
  min-width: 48px;
  outline: 0;
  text-align: center;
  width: 52px;
}

.spec-toolbar .color-control {
  flex: 1 1 0;
  height: 44px;
  min-width: 108px;
  width: 100%;
}

.spec-toolbar .admin-button.secondary {
  font-size: 13px;
  font-weight: 700;
  padding: 0 6px;
}

.spec-toolbar input[type="color"] {
  height: 50px;
  padding: 4px;
  width: 54px;
}

.history-button {
  align-items: center;
  background: #e6eaee;
  border: 1px solid #c7d0d7;
  border-radius: 4px;
  color: #7f8b94;
  display: inline-flex;
  justify-content: center;
  padding: 0;
}

.history-button svg {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
  width: 18px;
}

.history-button:disabled {
  background: #eef1f4;
  border-color: #d8dee3;
  color: #b8c0c7;
  cursor: not-allowed;
}

.history-button:not(:disabled):hover {
  background: #dce2e7;
  border-color: #aeb8c0;
  color: #5f6870;
}

.color-control {
  align-items: center;
  background: #e6eaee;
  border: 1px solid #b9c2c9;
  display: inline-flex;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.color-trigger {
  align-items: center;
  background: transparent;
  border: 0;
  display: inline-flex;
  font-size: 14px;
  gap: 5px;
  height: 100%;
  justify-content: center;
  padding: 3px 5px;
  pointer-events: auto;
  position: relative;
  z-index: 3;
  width: 100%;
}

.current-color {
  border: 1px solid #7f8b94;
  display: inline-block;
  height: 16px;
  width: 16px;
}

.color-menu {
  background: #fff;
  border: 1px solid #b9c2c9;
  display: none;
  left: -1px;
  min-width: 0;
  padding: 8px;
  position: absolute;
  bottom: auto;
  top: calc(100% + 6px);
  width: 252px;
  z-index: 5;
}

.color-control.open .color-menu {
  display: grid;
  gap: 8px;
}

.color-menu-label {
  color: #34424f;
  font-size: 12px;
  font-weight: 700;
}

.color-auto {
  align-items: center;
  background: transparent;
  border: 0;
  color: #1f2d3a;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  gap: 10px;
  padding: 0 2px 2px;
  text-align: left;
}

.color-control input[type="color"] {
  border: 0;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  padding: 0;
  width: 1px;
}

.color-icon {
  display: inline-grid;
  font-weight: 800;
  height: 24px;
  place-items: center;
  width: 24px;
}

.text-color-icon {
  border-bottom: 4px solid #111820;
}

.fill-color-icon {
  background: #f4bf26;
  border: 2px solid #111820;
  box-shadow: inset 0 -5px 0 rgba(255, 255, 255, 0.35);
}

.color-swatches {
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(10, 20px);
}

.color-swatch {
  background: var(--swatch);
  border: 2px solid #8b969e;
  height: 20px;
  padding: 0;
  width: 20px;
}

.color-menu-divider {
  background: #d4d9de;
  height: 1px;
  margin: 2px 0;
  width: 100%;
}

.color-more {
  background: transparent;
  border: 0;
  color: #1f2d3a;
  cursor: pointer;
  font: inherit;
  padding: 6px 2px 2px;
  text-align: left;
}

.spec-table {
  background: #fff;
  border-collapse: separate;
  border-spacing: 0;
  box-sizing: border-box;
  display: block;
  margin: 0;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  user-select: none;
  width: 100%;
}

.spec-table[hidden] {
  display: none;
}

.spec-table tbody {
  /* Compatibility marker: grid-template-columns: repeat(var(--table-units), minmax(0, 1fr)); */
  background: #fff;
  border: 0;
  box-sizing: border-box;
  display: grid;
  gap: 0;
  grid-auto-rows: minmax(62px, auto);
  grid-template-columns: repeat(var(--table-grid-units, var(--table-units)), minmax(0, 1fr));
  min-width: 0;
  width: 100%;
}

.spec-image-row {
  background: #fff;
  border-top: 1px solid #b9c2c9;
  display: grid;
  gap: 0;
  min-height: 62px;
}

.spec-image-row[hidden] {
  display: none;
}

.spec-image-row .gallery-editor:not(:empty) {
  border-bottom: 1px solid #d9e0e6;
  padding: 12px;
}

.spec-table tr {
  display: contents;
}

.spec-table td {
  /* Compatibility marker: grid-column: span var(--cell-span); */
  border: 1px solid #b9c2c9;
  display: grid;
  grid-column: span var(--cell-grid-span, var(--cell-span));
  grid-row: span var(--cell-row-span);
  min-width: 0;
  padding: 0;
  place-items: stretch;
  position: relative;
  z-index: 1;
}

.spec-cell {
  align-content: center;
  background: transparent;
  border: 0;
  box-sizing: border-box;
  color: inherit;
  font: inherit;
  height: 100%;
  min-height: 62px;
  max-width: 100%;
  overflow: hidden !important;
  overflow-y: hidden !important;
  padding: 12px;
  resize: none;
  scrollbar-width: none;
  text-align: center;
  width: 100%;
}

.spec-cell::-webkit-scrollbar {
  display: none;
}

.spec-table td.selected {
  outline: 3px solid #f4bf26;
  outline-offset: -3px;
  z-index: 2;
}

.spec-table td.empty-slot .spec-cell {
  pointer-events: none;
  resize: none;
}

@media (max-width: 720px) {
  .admin-shell {
    padding: 22px 16px 38px;
  }

  .admin-topbar,
  .product-row {
    align-items: stretch;
  }

  .admin-topbar {
    flex-direction: column;
  }

  .product-row {
    grid-template-columns: 1fr;
  }

  .detail-editor-preview {
    grid-template-columns: 1fr;
  }

  .parameter-editor-preview,
  .position-grid {
    grid-template-columns: 1fr;
  }

  .detail-preview-copy {
    padding: 34px 28px;
  }

  .spec-toolbar,
  .cell-toolbar {
    flex-wrap: wrap;
  }
}

/* 2026-08 document review adjustments. */
.detail-preview-image,
.detail-editor-preview.is-standard-preview .detail-preview-image,
.detail-editor-preview.is-hero-preview .detail-preview-image {
  align-items: center;
  display: flex;
  justify-content: center;
}

.detail-preview-image img,
.detail-editor-preview.is-standard-preview .detail-preview-image img,
.detail-editor-preview.is-hero-preview .detail-preview-image img {
  height: 100%;
  inset: auto;
  object-fit: contain;
  object-position: center center;
  position: static;
  top: auto;
  transform: none;
  width: 100%;
}

.spec-toolbar {
  gap: 8px;
}

.spec-toolbar .admin-button.secondary,
.spec-toolbar .color-control,
.row-count-control {
  box-sizing: border-box;
  flex: 0 0 112px;
  height: 44px;
  min-width: 112px;
  width: 112px;
}

.row-count-control {
  gap: 4px;
  padding: 0 8px;
}

.row-count-control input {
  min-width: 52px;
  padding: 0 2px;
  width: 52px;
}

.spec-toolbar-gallery-add {
  flex: 0 0 112px !important;
  height: 44px !important;
  margin-top: 0;
  min-height: 44px !important;
  min-width: 112px !important;
  width: 112px !important;
}

.gallery-editor {
  background: transparent;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.merged-gallery-row:not(:empty),
.spec-image-row .gallery-editor:not(:empty) {
  background: transparent;
  padding: 14px;
}

.gallery-thumb {
  aspect-ratio: 4 / 3;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.gallery-thumb img {
  object-fit: contain;
}

.parameter-editor-preview,
.parameter-preview-copy {
  background: #fff !important;
}

.parameter-preview-copy {
  gap: 10px !important;
  padding-top: clamp(14px, 1.5vw, 24px) !important;
}

.parameter-preview-line {
  margin: 0 0 8px !important;
}

@media (max-width: 720px) {
  .spec-toolbar .admin-button.secondary,
  .spec-toolbar .color-control,
  .row-count-control {
    flex: 1 1 112px;
  }

  .gallery-editor {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Keep the Product Details backend preview the same CSS height as the generated frontend module. */
.detail-editor-preview {
  height: clamp(485px, 32vw, 575px) !important;
  max-height: 575px !important;
  min-height: 485px !important;
}

.detail-editor-preview .detail-preview-copy,
.detail-editor-preview .detail-preview-image {
  height: clamp(485px, 32vw, 575px) !important;
  max-height: 575px !important;
  min-height: 485px !important;
}

.detail-editor-preview .detail-preview-image {
  align-items: stretch !important;
  background: #fff !important;
  display: block !important;
  justify-content: stretch !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: relative !important;
}

.detail-editor-preview .detail-preview-image img {
  display: block !important;
  height: 100% !important;
  inset: 0 !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: var(--detail-preview-object-position, center center) !important;
  position: absolute !important;
  top: 0 !important;
  transform: none !important;
  transform-origin: center center !important;
  width: 100% !important;
}

@media (max-width: 720px) {
  .detail-editor-preview,
  .detail-editor-preview .detail-preview-copy,
  .detail-editor-preview .detail-preview-image {
    height: auto !important;
    max-height: none !important;
    min-height: 320px !important;
  }

  .detail-editor-preview .detail-preview-image img {
    height: 100% !important;
  }
}

/* Restore the Product Details backend title/description layout; only the image fill should differ. */
.detail-editor-preview .detail-preview-copy {
  align-items: stretch !important;
  align-content: normal !important;
  background: #111820 !important;
  display: grid !important;
  gap: 32px !important;
  grid-template-rows: auto 1fr auto !important;
  justify-items: center !important;
  padding: clamp(20px, 2.2vw, 46px) clamp(48px, 5vw, 92px) clamp(32px, 3.2vw, 66px) !important;
  text-align: center !important;
}

.detail-editor-preview .detail-preview-copy h2 {
  align-self: start !important;
  grid-row: 1 !important;
  margin: 0 !important;
}

.detail-editor-preview .detail-preview-copy p {
  align-self: end !important;
  grid-row: 3 !important;
  margin: 0 !important;
}



