/* overriding the booqable product item list display cards */
body .booqable-product-inner,
.booqable-component .booqable-product-wrapper .booqable-product-inner,
.booqable-component .booqable-product-inner,
body .booqable-product-inner[style],
body .booqable-product-inner.bq-branded,
body .booqable-product-inner.bq-branded[style] {
  box-shadow: none !important;
}

.booqable-product-inner {
  background: transparent !important;
  box-shadow: 0 0 5px rgb(0 0 0 / 0%) !important;
  border: none !important;
}

.booqable-product-inner .bq-details {
  padding: 1rem;
  background: transparent !important;
  box-shadow: 0 0 5px rgb(0 0 0 / 0%) !important;
}

/* our modal styling for the popup when clicking on a product */
#bwp-modal {
  position: fixed;
  inset: 0;
  z-index: 999999 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: sans-serif;
  opacity: 1;
  transition: opacity 0.2s;
  background: rgba(0,0,0,0.32);
  padding: 0;
}

.bwp-modal-content {
  position: relative;
  background: #fdfbf8;
  border-radius: 1.25rem;
  width: 100%;
  max-width: 1000px;
  min-width: 320px;
  max-height: 600px;
  height: auto;
  box-shadow: 0 8px 32px rgba(159,129,112,0.13), 0 2px 8px rgba(185,200,173,0.09);
  display: block;
  padding: 0;
  overflow-y: auto;
}

#bwp-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}


.bwp-modal-grid {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  /* Remove height: 100% and min-height: 0 */
}

#bwp-modal {
  align-items: center !important;
  justify-content: center !important;
}

.bwp-modal-grid {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  height: 100%;
}

.bwp-image-wrapper {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff8f3;
  border-radius: 1rem 0 0 1rem;
  box-shadow: 0 2px 12px rgba(159,129,112,0.07);
  padding: 0.5rem;
  max-width: 50%;
  overflow: hidden;
}

.bwp-main-image {
  width: 100%;
  max-width: 380px;
  height: auto;
  border-radius: 1rem;
  cursor: pointer;
  transition: box-shadow 0.2s;
  box-shadow: 0 2px 6px rgba(185,200,173,0.07);
}

.bwp-details {
  flex: 1 1 auto;
  min-width: 0;
  padding: 2.5rem 2.5rem 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: auto;
}

.bwp-title {
  color: #9f8170;
  margin-bottom: 1rem;
  font-size: 2.1rem;
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1.1;
}
.bwp-description {
  color: #5f5f5f;
  margin-bottom: 1.5rem;
  font-size: 1.08rem;
  line-height: 1.5;
}
.bwp-add-button {
  background-color: #b9c8ad;
  color: #fff;
  border: none;
  padding: 0.85rem 2rem;
  border-radius: 0.65rem;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(185,200,173,0.08);
  transition: background 0.2s, box-shadow 0.2s;
  margin-top: 2rem;
  align-self: flex-start;
}
.bwp-add-button:hover {
  background-color: #9f8170;
  box-shadow: 0 4px 16px rgba(159,129,112,0.15);
}

.bwp-close-btn {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: none;
  border: none;
  font-size: 2.2rem;
  cursor: pointer;
  color: #9f8170;
  line-height: 1;
  transition: color 0.2s;
  z-index: 10;
}
.bwp-close-btn:hover {
  color: #b9c8ad;
}

@media (max-width: 900px) {
  .bwp-modal-content {
    max-width: 98vw;
    min-width: 0;
    min-height: unset;
    height: auto;
    border-radius: 1rem;
  }
  .bwp-modal-grid {
    flex-direction: column;
    height: auto;
  }
  .bwp-image-wrapper {
    max-width: 100%;
    border-radius: 1rem 1rem 0 0;
    padding: 1.2rem 0.5rem 0.5rem 0.5rem;
  }
  .bwp-details {
    padding: 1.2rem 1.2rem 1.6rem 1.2rem;
  }
}

@media (max-width: 600px) {
  .bwp-modal-content {
    max-width: 99vw;
    border-radius: 0.7rem;
    min-width: 0;
    min-height: unset;
    height: auto;
    padding: 0;
  }
  .bwp-title {
    font-size: 1.3rem;
  }
  .bwp-details {
    padding: 1rem 0.7rem 1.2rem 0.7rem;
  }
  .bwp-add-button {
    font-size: 1rem;
    padding: 0.7rem 1.2rem;
    margin-top: 1.2rem;
  }
  .bwp-image-wrapper {
    padding: 0.7rem 0.7rem 0.3rem 0.7rem;
    border-radius: 0.7rem 0.7rem 0 0;
  }
}

  
  .bwp-hidden {
    display: none !important;
  }

  /* Modal fade-in / fade-out animation */
  .bwp-fade-in {
    animation: bwpFadeIn 0.35s cubic-bezier(0.4,0,0.2,1);
  }
  .bwp-fade-out {
    animation: bwpFadeOut 0.35s cubic-bezier(0.4,0,0.2,1);
  }
  @keyframes bwpFadeIn {
    from { opacity: 0; transform: translateY(40px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
  }
  @keyframes bwpFadeOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to   { opacity: 0; transform: translateY(40px) scale(0.98); }
  }

  /* Lightbox zoom-in / zoom-out */
  .bwp-lightbox-zoom-in {
    animation: bwpLightboxZoomIn 0.35s cubic-bezier(0.4,0,0.2,1);
  }
  .bwp-lightbox-zoom-out {
    animation: bwpLightboxZoomOut 0.35s cubic-bezier(0.4,0,0.2,1);
  }
  @keyframes bwpLightboxZoomIn {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
  }
  @keyframes bwpLightboxZoomOut {
    from { opacity: 1; transform: scale(1); }
    to   { opacity: 0; transform: scale(0.85); }
  }
  
  .bwp-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
  }
  
  .bwp-modal-content {
    position: relative;
    background: #fdfbf8;
    border-radius: 1.25rem;
    max-width: 900px;
    width: 95%;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    box-shadow: 0 8px 32px rgba(159,129,112,0.13), 0 2px 8px rgba(185,200,173,0.09);
    z-index: 1;
    transition: box-shadow 0.2s;
  }
  
  .bwp-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2.2rem;
    cursor: pointer;
    color: #9f8170;
    line-height: 1;
    transition: color 0.2s;
  }
  .bwp-close-btn:hover {
    color: #b9c8ad;
  }
  
  .bwp-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff8f3;
    border-radius: 1rem;
    box-shadow: 0 2px 12px rgba(159,129,112,0.07);
    overflow: hidden;
    padding: 0.5rem;
  }
  .bwp-main-image {
    width: 100%;
    max-width: 380px;
    height: auto;
    border-radius: 1rem;
    cursor: pointer;
    transition: box-shadow 0.2s;
    box-shadow: 0 2px 6px rgba(185,200,173,0.07);
  }
  .bwp-main-image:hover {
    box-shadow: 0 4px 16px rgba(159,129,112,0.15);
  }
  
  .bwp-title {
    color: #9f8170;
    margin-bottom: 1rem;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.5px;
  }
  .bwp-description {
    color: #5f5f5f;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.5;
  }
  
  .bwp-add-button {
    background-color: #b9c8ad;
    color: #fff;
    border: none;
    padding: 0.85rem 2rem;
    border-radius: 0.65rem;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(185,200,173,0.08);
    transition: background 0.2s, box-shadow 0.2s;
  }
  .bwp-add-button:hover {
    background-color: #9f8170;
    box-shadow: 0 4px 16px rgba(159,129,112,0.15);
  }
  
  @media (max-width: 900px) {
    .bwp-modal-content {
      grid-template-columns: 1fr;
      padding: 1.25rem;
      gap: 1.1rem;
    }
    .bwp-main-image {
      max-width: 100%;
    }
  }
  @media (max-width: 600px) {
    .bwp-modal-content {
      width: 99%;
      padding: 0.5rem;
      border-radius: 0.7rem;
    }
    .bwp-title {
      font-size: 1.3rem;
    }
    .bwp-add-button {
      font-size: 1rem;
      padding: 0.7rem 1.2rem;
    }
  }
  
#bwp-modal {
  opacity: 0;
  transform: scale(0.96);
  transition: all 0.3s ease;
  pointer-events: none;
}

#bwp-modal.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* Ultra-specific override for Booqable box-shadow */
.booqable-component .booqable-product-wrapper .booqable-product-inner,
.booqable-component .booqable-product-inner,
body .booqable-component .booqable-product-inner,
body .booqable-component .booqable-product-wrapper .booqable-product-inner {
  box-shadow: none !important;
}

/* Nuclear modal height fix */
#bwp-modal.bwp-modal-overlay.active > .bwp-modal-content {
  max-height: 600px !important;
  overflow-y: auto !important;
  display: block !important; /* Or flex, if you prefer */
  box-sizing: border-box !important;
  margin: 0 auto !important;
  width: 100%;
  min-width: 320px;
  max-width: 1000px;
  border-radius: 18px;
  background: #fff;
  padding: 36px;
}

/* Prevent children from forcing height */
#bwp-modal.bwp-modal-overlay.active > .bwp-modal-content > * {
  max-height: 100%;
  overflow: auto;
}