/* Just Been Laid — cart + product modal */

.jbl-cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 999px;
  background: #C9A84C;
  color: #1E2420;
  font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

.jbl-cart-badge:empty,
.jbl-cart-badge[data-count="0"] {
  display: none;
}

.produce-v1__item.jbl-product,
.merch-v1__item.jbl-product {
  cursor: pointer;
  padding-left: 18px;
  padding-right: 18px;
  box-sizing: border-box;
}

.produce-v1__item.jbl-product:focus,
.produce-v1__item.jbl-product:focus-visible,
.produce-v1__item.jbl-product:focus-within,
.merch-v1__item.jbl-product:focus,
.merch-v1__item.jbl-product:focus-visible,
.merch-v1__item.jbl-product:focus-within,
.produce-v1__btn:focus,
.produce-v1__btn:focus-visible,
.merch-v1__btn:focus,
.merch-v1__btn:focus-visible {
  outline: none;
}

.jbl-product-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.jbl-product-modal.is-open {
  display: flex;
}

.jbl-product-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 31, 28, 0.82);
}

.jbl-product-modal__panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(88vh, 820px);
  overflow: auto;
  background: #FFFFFF;
  color: #1E2420;
  border-top: 3px solid #C9A84C;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.jbl-product-modal__media {
  background: #F5F0E8;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.jbl-product-modal__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 260px;
}

.jbl-product-modal__body {
  padding: 32px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.jbl-product-modal__eyebrow {
  margin: 0;
  font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #C9A84C;
}

.jbl-product-modal__title {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  font-weight: 700;
  line-height: 1.15;
  color: #1E2420;
  padding-right: 28px;
}

.jbl-product-modal__meta {
  margin: 0;
  font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
  font-size: 0.975rem;
  line-height: 1.55;
  color: #6B6560;
}

.jbl-product-modal__price {
  margin: 4px 0 0;
  font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #C9A84C;
}

.jbl-product-modal__qty-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

.jbl-product-modal__qty-label {
  font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1E2420;
}

.jbl-product-modal__qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(30, 36, 32, 0.2);
}

.jbl-product-modal__qty button {
  width: 40px;
  height: 40px;
  border: 0;
  background: #F5F0E8;
  color: #1E2420;
  font-size: 1.15rem;
  cursor: pointer;
  line-height: 1;
}

.jbl-product-modal__qty button:hover {
  background: #E8E0D0;
}

.jbl-product-modal__qty span {
  min-width: 44px;
  text-align: center;
  font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: 1rem;
}

.jbl-product-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
}

.jbl-product-modal__add {
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  background: #1E2420;
  color: #FFFFFF;
  font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid #1E2420;
  padding: 14px 20px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.jbl-product-modal__add:hover {
  background: #C9A84C;
  border-color: #C9A84C;
}

.jbl-product-modal__secondary {
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  background: transparent;
  color: #1E2420;
  font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid #1E2420;
  padding: 12px 18px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.jbl-product-modal__secondary:hover {
  background: #1E2420;
  color: #FFFFFF;
}

.jbl-product-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 1px solid #E8E0D0;
  background: #F5F0E8;
  color: #1E2420;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.jbl-product-modal__close:hover {
  background: #1E2420;
  border-color: #1E2420;
  color: #FFFFFF;
}

.jbl-product-modal__toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  z-index: 1300;
  background: #1E2420;
  color: #E8E0D0;
  border: 0;
  outline: none;
  box-shadow: none;
  padding: 14px 22px;
  font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  max-width: min(420px, calc(100% - 32px));
  text-align: center;
}

.jbl-product-modal__toast:focus,
.jbl-product-modal__toast:focus-visible {
  outline: none;
}

.jbl-product-modal__toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.jbl-product-modal__toast a {
  color: #C9A84C;
  font-weight: 700;
  text-decoration: none;
}

body.jbl-modal-open {
  overflow: hidden;
}

.cart-v1__empty {
  padding: 40px 0;
  border-top: 1px solid rgba(30, 36, 32, 0.12);
  border-bottom: 1px solid rgba(30, 36, 32, 0.12);
}

.cart-v1__empty p {
  font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: #1E2420;
  margin: 0 0 16px;
}

.cart-v1__empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cart-v1__media img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.cart-v1__btn[disabled],
.cart-v1__btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .jbl-product-modal__panel {
    grid-template-columns: 1fr;
  }

  .jbl-product-modal__media,
  .jbl-product-modal__media img {
    min-height: 200px;
    max-height: 240px;
  }
}
