/* Quote CTA */
.mc-quote {
  margin-top: 1.25rem;
}
.mc-quote__open {
  width: 100%;
  max-width: 100%;
  border-radius: 0.3rem !important;
  background: #c7007e !important;
  border: 0 !important;
  padding: 0.95rem 1.5rem !important;
  font-weight: 600 !important;
}
.mc-quote__hint {
  margin: 0.75rem 0 0;
  color: #5c5c5c;
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 28rem;
}

/* Hide buy / cart chrome */
body.mc-theme .product-add-to-cart,
body.mc-theme .product-quantity,
body.mc-theme .add-to-cart,
body.mc-theme button[data-button-action="add-to-cart"],
body.mc-theme .product-actions .product-minimal-quantity,
body.mc-theme .js-product-actions form#add-to-cart-or-refresh .product-add-to-cart,
body#cart .cart-summary__actions,
body#cart .checkout,
body#cart a[href*="commande"],
.mc-header-nav a[href*="panier"],
.mc-header-mobile .mc-cart-pill,
.mc-mobile-menu a[href*="panier"],
.product-miniature__add,
.product-miniature button.add-to-cart {
  display: none !important;
}

/* Modal — desktop centered card */
.mc-quote-modal[hidden] { display: none !important; }
.mc-quote-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}
.mc-quote-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 18, 18, 0.55);
}
.mc-quote-modal__panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(90vh, 900px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border-radius: 1.25rem;
  border: 1px solid #e8d8e2;
  padding: 1.5rem 1.35rem 1.35rem;
  box-shadow: 0 24px 60px rgba(18, 18, 18, 0.18);
  box-sizing: border-box;
}
.mc-quote-modal__x {
  position: absolute;
  top: 0.35rem;
  right: 0.5rem;
  border: 0;
  background: transparent;
  font-size: 2rem;
  line-height: 1;
  color: #121212;
  cursor: pointer;
  width: 44px;
  height: 44px;
  z-index: 2;
}
.mc-quote-modal__panel h2 {
  font-family: "Syne", system-ui, sans-serif;
  font-size: clamp(1.25rem, 4vw, 1.5rem);
  margin: 0 2.5rem 0.5rem 0;
  padding-right: 0.5rem;
}
.mc-quote-modal__product {
  margin: 0 0 1.25rem;
  color: #5c5c5c;
  font-size: 0.95rem;
  line-height: 1.5;
  word-break: break-word;
}
.mc-quote-form__sizes {
  border: 1px solid #e8d8e2;
  border-radius: 1rem;
  padding: 1rem;
  margin: 0 0 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  box-sizing: border-box;
}
.mc-quote-form__sizes legend {
  font-weight: 600;
  padding: 0 0.35rem;
  float: none;
  width: auto;
  font-size: 0.9rem;
}
.mc-quote-form__sizes label,
.mc-quote-form__grid label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #121212;
  min-width: 0;
}
.mc-quote-form input,
.mc-quote-form textarea {
  width: 100%;
  max-width: 100%;
  border: 1px solid #e8d8e2;
  border-radius: 0.75rem;
  padding: 0.75rem 0.85rem;
  font: inherit;
  font-size: 16px; /* prevents iOS zoom */
  font-weight: 400;
  color: #121212;
  background: #faf7f9;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}
.mc-quote-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.mc-quote-form__full { grid-column: 1 / -1; }
.mc-quote-form__error {
  color: #b00020;
  font-size: 0.9rem;
  margin: 0.75rem 0 0;
}
.mc-quote-form__ok {
  color: #1b5e20;
  font-size: 0.95rem;
  margin: 0.75rem 0 0;
}
.mc-quote-form__submit {
  margin-top: 1rem;
  width: 100%;
  border-radius: 0.3rem !important;
  background: #c7007e !important;
  border: 0 !important;
  padding: 0.95rem 1.25rem !important;
  font-size: 1rem !important;
}
.mc-quote-form__submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

body.mc-quote-open { overflow: hidden !important; }

/* Mobile: full-screen sheet */
@media (max-width: 767px) {
  .mc-quote__open {
    max-width: none;
  }

  .mc-quote-modal {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
  }

  .mc-quote-modal__panel {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: 100%;
    min-height: 100%;
    border-radius: 0;
    border: 0;
    padding:
      max(1rem, env(safe-area-inset-top))
      max(1rem, env(safe-area-inset-right))
      max(1rem, env(safe-area-inset-bottom))
      max(1rem, env(safe-area-inset-left));
    display: flex;
    flex-direction: column;
    box-shadow: none;
  }

  .mc-quote-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }

  .mc-quote-form__grid {
    grid-template-columns: 1fr;
  }

  .mc-quote-form__sizes {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    padding: 0.85rem;
  }

  .mc-quote-form__submit {
    margin-top: auto;
    position: sticky;
    bottom: 0;
    padding-top: 1rem !important;
    padding-bottom: max(0.95rem, env(safe-area-inset-bottom)) !important;
  }

  .mc-quote-modal__x {
    top: max(0.25rem, env(safe-area-inset-top));
    right: max(0.25rem, env(safe-area-inset-right));
  }
}

@media (max-width: 380px) {
  .mc-quote-form__sizes {
    grid-template-columns: 1fr;
  }
}
