/* ==========================================================
   DRAWER PRODUCTO
========================================================== */

.productos-drawer-section {
  margin-bottom: 16px;
}

.productos-drawer-section:last-child {
  margin-bottom: 0;
}

/* ==========================================================
   GRID
========================================================== */

.productos-drawer-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

/* ==========================================================
   SWITCHES
========================================================== */

.productos-drawer-switch-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.productos-drawer-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

.productos-drawer-switch-row:not(:last-child) {
  border-bottom: 1px solid var(--color-border);
}

.productos-drawer-switch-row .global-switch {
  flex-shrink: 0;
}

.productos-drawer-switch-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 2px;
}

.productos-drawer-switch-description {
  font-size: 12px;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

/* ==========================================================
   QR
========================================================== */

#productoCodigoQr[readonly] {
  background: var(--color-background);
  color: var(--color-text-secondary);
  cursor: not-allowed;
}

/* ==========================================================
   FORM HELP
========================================================== */

.global-form-help {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

/* ==========================================================
   CARDS INTERNAS
========================================================== */

.productos-drawer-section .global-card-header {
  padding-bottom: 10px;
}

.productos-drawer-section .global-card-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ==========================================================
   FOOTER
========================================================== */

.global-drawer-footer {
  position: sticky;
  bottom: 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  z-index: 10;
}

.productos-drawer-readonly {
  background: var(--color-background);
  color: var(--color-text-secondary);
  cursor: not-allowed;
  user-select: none;
  pointer-events: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

.productos-drawer-readonly:focus {
  outline: none;
  box-shadow: none;
}

.productos-barcode-preview {
  margin-top: 12px;
  padding: 6px 12px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 20px;
}

.productos-qr-preview {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 180px;
}

.productos-qr-preview img,
.productos-qr-preview canvas {
  max-width: 160px;
  max-height: 160px;
}

.productos-barcode-preview-container {
  width: 100%;
  min-height: 35px;

  display: flex;
  justify-content: center;
  align-items: center;

  border: 1px solid var(--color-border);
  border-radius: 12px;

  background: #fff;

  padding: 8px 16px;

  margin-top: 12px;
}

.productos-barcode-preview-container svg {
  width: 100%;
  max-width: 420px;
  height: 50px;
}

.grupos-drawer-switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.grupos-drawer-switch-row > div:first-child {
  flex: 1;
}

.grupos-drawer-switch-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.grupos-drawer-switch-description {
  margin-top: 4px;
  font-size: 12px;
  color: var(--color-text-secondary);
}

.grupos-drawer-switch-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 768px) {
  .productos-drawer-grid-2 {
    grid-template-columns: 1fr;
  }

  .productos-drawer-switch-row {
    align-items: flex-start;
  }
}
