/* Galería de producto: miniaturas visibles en DxGrid + cabecera (foto completa). */

/* Filas del grid: alto suficiente para miniatura 100px. */
.cicumba-producto-galeria-grid .dxbl-grid-table tbody tr.dxbl-grid-data-row > td {
  vertical-align: middle !important;
  min-height: 120px !important;
  height: 120px !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

/* Forzar tamaño en celda: CSS global a veces comprime img en grids. */
html body .cicumba-producto-galeria-grid .c-gal-thumb,
html body .cicumba-producto-galeria-grid .c-gal-thumb--list {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100px !important;
  height: 100px !important;
  min-width: 100px !important;
  min-height: 100px !important;
  max-width: 100px !important;
  max-height: 100px !important;
  margin: 0 auto !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  border: 1px solid #e2e8f0 !important;
  background: #eef2f5 !important;
  overflow: hidden !important;
}

/* ListView / galería anidada: cover gana a reglas globales con contain. */
html body .cicumba-producto-list-grid .c-gal-thumb img,
html body .cicumba-producto-galeria-grid .c-gal-thumb img,
html body .c-gal-thumb--list img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block !important;
}

.cicumba-producto-cabecera {
  align-items: flex-start;
}

.cicumba-producto-cabecera-foto {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding-top: 4px;
  padding-left: 12px;
}

/* Cabecera: marco alto + contain = foto completa (como popup). */
html body .cicumba-producto-cabecera-foto .c-gal-thumb,
html body .cicumba-producto-cabecera-foto .c-gal-thumb--detail {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 160px !important;
  height: 216px !important;
  min-width: 140px !important;
  min-height: 180px !important;
  max-width: 180px !important;
  max-height: 240px !important;
  box-shadow: 0 2px 8px rgba(45, 90, 69, 0.12);
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

html body .cicumba-producto-cabecera-foto .c-gal-thumb img {
  width: auto !important;
  height: auto !important;
  max-width: 152px !important;
  max-height: 208px !important;
  object-fit: contain !important;
  object-position: center center !important;
  display: block !important;
}

/* QR de la URL junto al Link en Marketing → Links. */
.cicumba-store-link-qr {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 1.35rem;
  padding-left: 4px;
  max-height: 10rem;
  overflow: hidden;
}

html body .cicumba-store-link-qr img,
html body .cicumba-store-link-qr .dx-image {
  width: 140px !important;
  height: 140px !important;
  max-width: 140px !important;
  max-height: 140px !important;
  object-fit: contain !important;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(45, 90, 69, 0.12);
}

/* Preview compacto junto al Link en Marketing → Links (no estira filas). */
.cicumba-store-link-producto-foto {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 1.35rem;
  padding-left: 4px;
  max-height: 4.5rem;
  overflow: hidden;
}

html body .cicumba-store-link-producto-foto .c-gal-thumb,
html body .cicumba-store-link-producto-foto .c-gal-thumb--detail {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 56px !important;
  height: 56px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  max-width: 56px !important;
  max-height: 56px !important;
  border-radius: 8px !important;
  box-shadow: 0 1px 4px rgba(45, 90, 69, 0.12);
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

html body .cicumba-store-link-producto-foto .c-gal-thumb img {
  width: auto !important;
  height: auto !important;
  max-width: 50px !important;
  max-height: 50px !important;
  object-fit: contain !important;
  object-position: center center !important;
  display: block !important;
}

/* Popup imagen: un solo editor de foto. */
.cicumba-producto-imagen-popup .c-logo {
  max-width: 220px;
}

.cicumba-producto-imagen-popup .c-logo__img {
  object-fit: contain !important;
}

.cicumba-hide-producto-url {
  display: none !important;
}

/* ListView productos: columna MiniaturaUrl (primera tras el lápiz). */
.cicumba-producto-list-grid .dxbl-grid-table tbody tr.dxbl-grid-data-row > td {
  vertical-align: middle !important;
  min-height: 88px !important;
  height: 88px !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}

html body .cicumba-producto-list-grid .c-gal-thumb,
html body .cicumba-producto-list-grid .c-gal-thumb--list {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 72px !important;
  height: 72px !important;
  min-width: 72px !important;
  min-height: 72px !important;
  max-width: 72px !important;
  max-height: 72px !important;
  margin: 0 auto !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  border: 1px solid #e2e8f0 !important;
  background: #eef2f5 !important;
  overflow: hidden !important;
}

html body .cicumba-producto-list-grid .c-gal-thumb img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block !important;
}

/* Móvil: maestros con foto + texto legibles */
@media (max-width: 768px) {
  .cicumba-producto-list-grid .dxbl-grid-table tbody tr.dxbl-grid-data-row > td {
    min-height: 92px !important;
    height: 92px !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }

  html body .cicumba-producto-list-grid .c-gal-thumb,
  html body .cicumba-producto-list-grid .c-gal-thumb--list,
  html body .cicumba-grid-adaptive-narrow .c-gal-thumb,
  html body .cicumba-grid-adaptive-narrow .c-gal-thumb--list,
  html body .cicumba-grid-adaptive-narrow .c-gal-thumb--person,
  html body #main-view-content .dxbl-grid .c-gal-thumb,
  html body #main-view-content .dxbl-grid .c-gal-thumb--list,
  html body #main-view-content .dxbl-grid .c-gal-thumb--person {
    width: 80px !important;
    height: 80px !important;
    min-width: 80px !important;
    min-height: 80px !important;
    max-width: 80px !important;
    max-height: 80px !important;
  }
}
