/* BABOO WEB DETAILS V9.1 COMPACT */
/* Sólo la información comercial del modal, sin modificar la galería o la compra. */
#product-modal #modal-rich-details[hidden],
#product-modal #modal-description-section[hidden],
#product-modal #modal-characteristics-section[hidden] {
  display: none !important;
}
#product-modal .baboo-product-details {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  margin: 13px 0 0;
  padding: 12px 1px 0;
  border: 0;
  border-top: 1px solid #d9d9d6;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #222;
}
#product-modal .baboo-product-detail-section {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  min-width: 0;
}
#product-modal .baboo-product-detail-section h3 {
  margin: 0 0 7px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: .065em;
  text-transform: uppercase;
  color: #262626;
}
#product-modal .baboo-product-details .modal-description {
  margin: 0;
  padding: 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
  color: #545454;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
#product-modal #modal-description-section:not([hidden]) +
#modal-characteristics-section:not([hidden]) {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid #e2e2df;
}
#product-modal .baboo-product-characteristics {
  display: block;
  margin: 0;
  padding: 0;
  min-width: 0;
}
#product-modal .baboo-product-characteristic {
  display: grid;
  grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px solid rgba(0,0,0,.085);
  font-size: 12px;
  line-height: 1.4;
}
#product-modal .baboo-product-characteristic:last-child {
  border-bottom: 0;
  padding-bottom: 1px;
}
#product-modal .baboo-product-characteristic dt {
  min-width: 0;
  margin: 0;
  color: #777;
  font-weight: 550;
  overflow-wrap: anywhere;
}
#product-modal .baboo-product-characteristic dd {
  min-width: 0;
  margin: 0;
  color: #242424;
  font-weight: 650;
  text-align: right;
  overflow-wrap: anywhere;
}
@media (max-width:700px) {
  #product-modal .baboo-product-details {
    margin-top: 11px;
    padding: 11px 0 0;
  }
  #product-modal .baboo-product-detail-section h3 { font-size: 11px; }
  #product-modal .baboo-product-characteristic { gap: 8px; font-size: 12px; }
}


/* BABOO MODAL ALIGNMENT V9.2 */

/* Mantener la informacion de compra alineada arriba */
#product-modal .modal-copy {
    justify-content: flex-start !important;
    margin-top: 0 !important;
}

/* Permitir desplazamiento cuando el contenido crece */
#product-modal .modal-panel {
    max-height: calc(100vh - 24px) !important;
    max-height: calc(100dvh - 24px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
}

/* Conservar la distribucion original de las columnas */
#product-modal .modal-gallery {
    align-self: stretch !important;
}

/* Desplazamiento comodo en dispositivos moviles */
@media (max-width: 800px) {
    #product-modal .modal-panel {
        max-height: calc(100dvh - 12px) !important;
    }
}

/* BABOO PRODUCT ACCORDIONS V9.3
   Presentación independiente de datos comerciales; SIN tocar inventario/carrito. */
#product-modal .baboo-product-details {
  margin-top: 12px;
  padding-top: 0;
}
#product-modal .baboo-product-detail-section {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid #dcdcd9 !important;
  background: transparent !important;
}
#product-modal .baboo-product-detail-section[hidden] { display:none !important; }
#product-modal .baboo-product-detail-section:not([hidden]) +
#modal-characteristics-section:not([hidden]) {
  margin:0 !important;
  padding:0 !important;
  border-top:0 !important;
}
#product-modal .baboo-product-detail-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 43px;
  padding: 11px 3px;
  list-style: none;
  cursor: pointer;
  user-select: none;
  color: #272727;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
}
#product-modal .baboo-product-detail-section > summary::-webkit-details-marker { display: none; }
#product-modal .baboo-product-detail-section > summary::marker { content: ''; }
#product-modal .baboo-product-detail-section > summary::after {
  content: '';
  display: block;
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-right: 1.6px solid #333;
  border-bottom: 1.6px solid #333;
  transform: rotate(45deg);
  transition: transform .16s ease;
  margin: -4px 3px 0 0;
}
#product-modal .baboo-product-detail-section[open] > summary::after {
  transform: rotate(225deg);
  margin-top: 4px;
}
#product-modal .baboo-product-detail-section > summary:focus-visible {
  outline: 2px solid #333;
  outline-offset: -2px;
  border-radius: 4px;
}
#product-modal .baboo-product-detail-body {
  box-sizing: border-box;
  max-height: 190px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 5px 13px 3px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
#product-modal .baboo-product-detail-body .modal-description {
  margin: 0 !important;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
#product-modal .baboo-product-characteristic {
  grid-template-columns: minmax(0,42%) minmax(0,1fr);
}
@media (min-width: 801px) {
  /* El contenido desplegado usa desplazamiento interno; altura exterior uniforme. */
  #product-modal .modal-panel {
    height: min(760px, calc(100dvh - 24px)) !important;
    max-height: calc(100dvh - 24px) !important;
    overflow-y: auto !important;
    align-items: flex-start !important;
  }
  #product-modal .modal-copy {
    align-self: flex-start !important;
    justify-content: flex-start !important;
  }
  #product-modal .modal-gallery { align-self: stretch !important; }
}
@media (max-width: 800px) {
  #product-modal .modal-panel {
    height: auto !important;
    max-height: calc(100dvh - 12px) !important;
    overflow-y: auto !important;
  }
  #product-modal .baboo-product-detail-body { max-height: 180px; }
}
@media (prefers-reduced-motion: reduce) {
  #product-modal .baboo-product-detail-section > summary::after { transition: none; }
}
