/**
 * Small add-to-cart quantity popup (catalogue product cards).
 */

/* Hide inline qty on cards — quantity is chosen in the popup */
.ocmono-product-card .ocmono-product-card__buy-row > .field--name-quantity,
.ocmono-product-card .ocmono-product-card__buy-row > .form-wrapper.field--name-quantity,
.views-view-grid .ocmono-product-card__buy-row > .field--name-quantity {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.ocmono-product-card .ocmono-product-card__buy-row,
.views-view-grid .ocmono-product-card__buy-row {
  justify-content: center;
}

.ocmono-atc-popup {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ocmono-atc-popup.active {
  opacity: 1;
  visibility: visible;
}

.ocmono-atc-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(18, 18, 18, 0.65);
  cursor: pointer;
}

.ocmono-atc-popup__dialog {
  position: relative;
  z-index: 1;
  width: min(360px, 100%);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  padding: 20px 18px 18px;
  transform: translateY(10px);
  transition: transform 0.25s ease;
}

.ocmono-atc-popup.active .ocmono-atc-popup__dialog {
  transform: translateY(0);
}

.ocmono-atc-popup__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--ogenix-extra, #f5f5f5);
  color: var(--ogenix-black, #1a1a1a);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.ocmono-atc-popup__close:hover {
  background: var(--ogenix-base, #63238E);
  color: #fff;
}

.ocmono-atc-popup__media {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  width: 110px;
  height: 110px;
  background: #f7f7f7;
  border-radius: 10px;
  overflow: hidden;
}

.ocmono-atc-popup__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.ocmono-atc-popup__body {
  text-align: center;
}

.ocmono-atc-popup__title {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.35;
  color: var(--ogenix-black, #1a1a1a);
  font-weight: 700;
}

.ocmono-atc-popup__price {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ogenix-base, #63238E);
}

.ocmono-atc-popup__qty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.ocmono-atc-popup__qty-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ogenix-gray, #666);
}

.ocmono-atc-popup__stepper {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--ogenix-bdr-color, #e5e5e5);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.ocmono-atc-popup__stepper .ocmono-qty-stepper__btn {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--ogenix-extra, #f5f5f5);
  color: var(--ogenix-black, #1a1a1a);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.ocmono-atc-popup__stepper .ocmono-qty-stepper__btn:hover {
  background: var(--ogenix-base, #63238E);
  color: #fff;
}

.ocmono-atc-popup__stepper .ocmono-qty-stepper__input,
.ocmono-atc-popup__qty-input {
  width: 52px;
  height: 36px;
  border: none;
  border-left: 1px solid var(--ogenix-bdr-color, #e5e5e5);
  border-right: 1px solid var(--ogenix-bdr-color, #e5e5e5);
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--ogenix-black, #1a1a1a);
  appearance: textfield;
  -moz-appearance: textfield;
}

.ocmono-atc-popup__qty-input::-webkit-outer-spin-button,
.ocmono-atc-popup__qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ocmono-atc-popup__confirm {
  width: 100%;
  min-height: 44px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

@media only screen and (max-width: 575px) {
  .ocmono-atc-popup__dialog {
    width: min(320px, 100%);
    padding: 18px 14px 14px;
  }

  .ocmono-atc-popup__media {
    width: 96px;
    height: 96px;
  }

  .ocmono-atc-popup__title {
    font-size: 15px;
  }
}
