/* ONJ Primeur V78 — UI fixes only */

/* Header always visible while scrolling. */
.onj-navbar.sticky-top {
  top: 0;
  z-index: 1040;
}

/* Cart preview dropdown */
.onj-cart-preview-wrap {
  z-index: 1100;
}

.onj-cart-preview-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(390px, calc(100vw - 24px));
  max-height: min(520px, 70vh);
  overflow-y: auto;
  padding: 14px;
  border: 1px solid rgba(0, 0, 0, .10);
  border-radius: 14px;
  background: #fff;
  color: #1f2933;
}

.onj-cart-preview-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e9ecef;
}

.onj-cart-preview-item:last-of-type {
  border-bottom: 0;
}

.onj-cart-preview-name {
  font-weight: 600;
}

.onj-cart-preview-meta {
  color: #6c757d;
  font-size: .875rem;
}

.onj-cart-preview-price {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  font-weight: 700;
  white-space: nowrap;
}

.onj-cart-toast-layer {
  margin-top: 68px;
}

/* Preserve a readable quantity field on small smartphones. */
.onj-cart-quantity-input {
  width: 92px !important;
  min-width: 92px !important;
  max-width: 92px !important;
}

.onj-cart-update-form .btn {
  white-space: nowrap;
}

@media (max-width: 575.98px) {
  .onj-cart-table {
    min-width: 700px;
  }

  .onj-cart-quantity-input {
    width: 86px !important;
    min-width: 86px !important;
    max-width: 86px !important;
  }

  .onj-cart-preview-panel {
    position: fixed;
    top: 72px;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: calc(100vh - 90px);
  }

  .onj-cart-toast-layer {
    width: 100%;
    margin-top: 72px;
  }
}
