/* Container */
.bp-atc-widget {
  border-radius: 16px;
  padding: 16px 18px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.3);
  max-width: 640px;
  margin: 12px auto;
}

/* Layout */
.bp-atc-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Mobile first */
@media (max-width: 768px) {
  .bp-atc-main {
    flex-direction: column;
    align-items: stretch;
  }

  .bp-atc-right {
    width: 100%;
  }
}

.bp-atc-left {
  flex: 1 1 auto;
  min-width: 0;
}

.bp-atc-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

/* Title */
.bp-atc-title {
  font-size: 1.05rem;
  line-height: 1.3;
  margin: 0 0 6px;
  font-weight: 600;
  color: #0f172a;
}

/* Price + stock pill row */
.bp-atc-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.bp-atc-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
}

/* Stock pill */
.bp-atc-stock-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.bp-atc-stock-in {
  background: rgba(16, 185, 129, 0.08);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.bp-atc-stock-low {
  background: rgba(234, 179, 8, 0.08);
  color: #b45309;
  border: 1px solid rgba(234, 179, 8, 0.25);
}

.bp-atc-stock-out {
  background: rgba(248, 113, 113, 0.08);
  color: #b91c1c;
  border: 1px solid rgba(248, 113, 113, 0.25);
}

/* Chips */
.bp-atc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.bp-atc-chip {
  font-size: 0.72rem;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.06);
  color: #1d4ed8;
  border: 1px solid rgba(37, 99, 235, 0.12);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* Quantity control */
.bp-atc-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

@media (max-width: 768px) {
  .bp-atc-form {
    width: 100%;
    justify-content: space-between;
  }
}

.bp-atc-qty {
  display: inline-flex;
  align-items: stretch;
  border-radius: 999px;
  background: #f9fafb;
  border: 1px solid rgba(148, 163, 184, 0.7);
  overflow: hidden; /* Important: hides any inner rounding */
}

/* Stepper variant */
.bp-atc-qty-stepper {
  padding: 0;
}

.bp-atc-qty-btn {
  border: none;
  background: #22c55e;
  color: #ffffff;
  padding: 0 16px;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0; /* no inner rounding at all */
}

.bp-atc-qty-btn.bp-atc-qty-minus {
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
  border-bottom-right-radius: 0px;
  border-top-right-radius: 0px;
}

.bp-atc-qty-btn.bp-atc-qty-plus {
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
  border-top-left-radius: 0px;
  border-bottom-left-radius: 0px;
}

.bp-atc-qty-input {
  width: 72px;
  text-align: center;
  border: none;
  background: #f3f4f6;
  font-size: 0.95rem;
  padding: 10px 6px;
  margin: 0;
  -moz-appearance: textfield;
}

.bp-atc-qty-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.bp-atc-qty-input:focus {
  outline: none;
}

/* Remove spin buttons */
.bp-atc-qty-input::-webkit-outer-spin-button,
.bp-atc-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Remove spin buttons on number field */
.bp-atc-qty-input::-webkit-outer-spin-button,
.bp-atc-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Button */
.bp-atc-button {
  border-radius: 999px !important;
  padding: 10px 20px !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.bp-atc-button .bp-atc-button-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Unavailable text */
.bp-atc-unavailable {
  font-size: 0.85rem;
  color: #b91c1c;
  font-weight: 500;
}

/* Mobile tweaks */
@media (max-width: 480px) {
  .bp-atc-button {
    flex: 1 1 auto;
    width: 100%;
  }

  .bp-atc-form {
    flex-direction: column;
    align-items: stretch;
  }

  .bp-atc-qty {
    justify-content: space-between;
  }
}
