/**
 * PR10-B — Post add-to-cart Engine recommendations (namespaced).
 */

.bressol-engine-post-atc[hidden] {
  display: none !important;
}

.bressol-engine-post-atc {
  position: fixed;
  inset: 0;
  z-index: 100090;
  pointer-events: none;
}

.bressol-engine-post-atc__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  pointer-events: auto;
}

.bressol-engine-post-atc__panel {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 520px);
  max-height: min(70vh, 420px);
  overflow: auto;
  background: #fff;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.18);
  padding: 16px 18px 20px;
  pointer-events: auto;
}

@media (min-width: 600px) {
  .bressol-engine-post-atc__panel {
    bottom: 24px;
    border-radius: 12px;
    max-height: min(80vh, 480px);
  }

  .bressol-engine-post-atc__backdrop {
    background: rgba(15, 23, 42, 0.25);
  }
}

.bressol-engine-post-atc__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.bressol-engine-post-atc__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  color: #1e293b;
}

.bressol-engine-post-atc__close {
  flex-shrink: 0;
  margin: -4px -4px 0 0;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
}

.bressol-engine-post-atc__close:hover,
.bressol-engine-post-atc__close:focus-visible {
  background: #f1f5f9;
  color: #0f172a;
  outline: 2px solid #94a3b8;
  outline-offset: 2px;
}

.bressol-engine-post-atc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bressol-engine-post-atc__item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: start;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.bressol-engine-post-atc__item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.bressol-engine-post-atc__thumb {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
}

.bressol-engine-post-atc__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bressol-engine-post-atc__meta {
  min-width: 0;
}

.bressol-engine-post-atc__name {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
}

.bressol-engine-post-atc__name a {
  color: #0f172a;
  text-decoration: none;
}

.bressol-engine-post-atc__name a:hover {
  text-decoration: underline;
}

.bressol-engine-post-atc__price {
  font-size: 0.875rem;
  color: #334155;
  margin-bottom: 8px;
}

.bressol-engine-post-atc__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bressol-engine-post-atc__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
}

.bressol-engine-post-atc__btn:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.bressol-engine-post-atc__btn--primary {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}

.bressol-engine-post-atc__btn--primary:hover {
  background: #1e293b;
  border-color: #1e293b;
}

.bressol-engine-post-atc__btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
