/* ==========================================================================
   PLACE ORDER HERO - STRICT SIDE-BY-SIDE LAYOUT
   ========================================================================== */

/* Full-width breakout */
.place-order-hero-align-full {
    width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #eaeaea;
}

.place-order-hero {
    padding: 80px 20px;
    width: 100%;
    min-height: 50vh;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

/* Enforce strict horizontal Flexbox row on desktop */
.place-order-hero__container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important; /* Forces side-by-side */
    align-items: start !important;
    justify-content: space-between !important;
    max-width: 1100px !important; 
    margin: 0 auto !important;
    width: 100% !important;
    gap: 5% !important;
}

/* Left side text constraints */
.place-order-hero__content {
    flex: 1 1 50% !important;
    text-align: left !important;
}

.place-order-hero__title {
    font-size: 3rem !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    margin: 0 0 20px 0 !important;
    color: #111827 !important;
}

.place-order-hero__description {
    font-size: 1.1rem !important;
    color: #6b7280 !important;
    margin-bottom: 30px !important;
    line-height: 1.6 !important;
}

.place-order-hero__trust {
    display: flex !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
}

.trust-badge {
    background: #e5e7eb;
    color: #374151;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

/* Right side form card constraints */
.place-order-hero__form-wrapper {
    flex: 0 0 450px !important; /* Locks form width */
    max-width: 450px !important;
    width: 100% !important;
    padding: 40px !important;
    border-radius: 20px !important;
    box-sizing: border-box !important;
}

/* Mobile responsive break (Stacks blocks when screen is smaller) */
@media (max-width: 992px) {
    .place-order-hero { 
        padding: 50px 20px !important; 
    }
    .place-order-hero__container {
        flex-direction: column !important; /* Stacks vertically */
        gap: 40px !important;
        
    }
    .place-order-hero__content,
    .place-order-hero__form-wrapper {
        flex: 1 1 100% !important;
        max-width: 100% !important;
    }
    .place-order-hero__title { 
        font-size: 2.2rem !important; 
    }
    .place-order-hero__form-wrapper { 
        padding: 25px !important; 
    }
}

* ==========================================================================
   POPUP MODAL (homepage hero + product page)
   ========================================================================== */

.place-order-popup[hidden] {
  display: none;
}

.place-order-popup {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.place-order-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.place-order-popup__panel {
  position: relative;
  background: var(--color-white);
  border-radius: 16px; /* Refined radius alignment */
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  width: min(92vw, 480px); /* Slightly streamlined width profile */
  max-width: 100%;
  max-height: 90vh;
  overflow: hidden;
  padding: 0;
  box-sizing: border-box;
  z-index: 1;
  pointer-events: auto;
}

.place-order-popup__content {
  position: relative;
  height: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 28px 24px 24px;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(193, 191, 191, 0.25) var(--color-bg);
  scrollbar-gutter: stable;
}

.place-order-popup__content::-webkit-scrollbar {
  width: 8px;
}

.place-order-popup__content::-webkit-scrollbar-track {
  background: var(--color-bg);
  border-radius: 999px;
}

.place-order-popup__content::-webkit-scrollbar-thumb {
  background-color: rgba(128, 128, 128, 0.25);
  border-radius: 999px;
}

.place-order-popup__content::-webkit-scrollbar-thumb:hover {
  background-color: rgba(128, 128, 128, 0.45);
}

.place-order-popup__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  border: 1px solid var(--color-border-strong);
  background: var(--color-white);
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.place-order-popup__close:hover {
  background: var(--color-bg);
  border-color: var(--color-primary);
  color: var(--color-text);
}

.place-order-form__category-badges {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.place-order-form__category-badges::-webkit-scrollbar {
  height: 4px;
}

.place-order-form__category-badges::-webkit-scrollbar-track {
  background: transparent;
}

.place-order-form__category-badges::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 999px;
}

.place-order-form__category-badge {
  border: 1px solid var(--color-border-strong);
  background: var(--color-white);
  color: var(--color-text);
  border-radius: 6px; /* Sleeker crisp button frame edges */
  padding: 4px 10px;
  font-family: var(--font-base);
  font-size: 11px;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.place-order-form__category-badge:hover,
.place-order-form__category-badge--active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}

.place-order-popup__title {
  font-family: var(--font-base);
  font-size: 18px; /* Clean size step integration */
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 16px;
  padding-right: 32px;
}

body.place-order-popup-open {
  overflow: hidden;
}

/* ==========================================================================
   PLACE ORDER PAGE — card container around the embedded form
   ========================================================================== */

.place-order-page-wrapper {
  max-width: 460px; /* Streamlined to prevent dynamic stretching on wide views */
  margin: 40px auto;
  background: var(--color-white);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  padding: 24px;
}

@media (max-width: 600px) {
  .place-order-page-wrapper {
    margin: 20px auto;
    padding: 20px;
    border-radius: 12px;
  }

  .place-order-popup__panel {
    padding: 0;
  }
}



/* Full-width breakout — swap to dark gradient */
.place-order-hero-align-full {
    width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    background: linear-gradient(135deg, var(--color-primary, #000) 0%, #333 100%);
    color: #fff;
    border-bottom: 1px solid #eaeaea;
}

/* Title — was #111827, needs to be light now */
.place-order-hero__title {
    font-size: 3rem !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    margin: 0 0 20px 0 !important;
    color: #ffffff !important;
}

/* Description — was #6b7280, too dim on a dark bg */
.place-order-hero__description {
    font-size: 1.1rem !important;
    color: rgba(255, 255, 255, 0.75) !important;
    margin-bottom: 30px !important;
    line-height: 1.6 !important;
}

/* Trust badges — was light gray on light bg, now semi-transparent on dark */
.trust-badge {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

/* Form card — needs its own explicit background now that the section behind it is dark */
.place-order-hero__form-wrapper {
    flex: 0 0 450px !important;
    max-width: 450px !important;
    width: 100% !important;
    padding: 40px !important;
    border-radius: 20px !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}