.gp-preorder-note {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.4;
  color: #555;
}

.gp-preorder-note.is-visible {
  display: block !important;
}

.gp-preorder-action,
.gp-listing-preorder-action,
.gp-listing-choose-action {
  cursor: pointer;
}

.gp-preorder-action {
  white-space: nowrap;
}


.gp-listing-preorder-action,
.gp-listing-choose-action {
  text-decoration: none !important;
}


/* Availability: always keep one native Warehouse badge with deterministic styling. */
#product-availability.gp-availability-managed,
.product-availability.gp-availability-managed {
  display: inline-flex !important;
  align-items: center !important;
  width: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 2px 5px !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  white-space: nowrap !important;
}

#product-availability.gp-availability-preorder,
.product-availability.gp-availability-preorder {
  background: #d8c858 !important;
  color: #253127 !important;
}

#product-availability.gp-availability-available,
.product-availability.gp-availability-available {
  background: #58a778 !important;
  color: #fff !important;
}

/* Native and request catalogue CTAs share one responsive width. */
.product-miniature .product-add-cart .btn-product-list,
.product-miniature .gp-listing-action-size {
  width: 150px !important;
  max-width: 100% !important;
  box-sizing: border-box;
  text-align: center !important;
  white-space: nowrap !important;
  justify-content: center;
}

.gp-listing-label-mobile {
  display: none;
}

@media (max-width: 767.98px) {
  .gp-listing-label-desktop {
    display: none;
  }

  .gp-listing-label-mobile {
    display: inline;
  }
}

@media (max-width: 767.98px) {
  .gp-preorder-note {
    font-size: 12px;
  }
}

/* During a rare AJAX fallback keep the native Warehouse action from flashing
   before the real preorder state is known. */
#add-to-cart-or-refresh.gp-preorder-resolving .product-add-to-cart [data-button-action="add-to-cart"],
#add-to-cart-or-refresh.gp-preorder-resolving .product-add-to-cart button.add-to-cart {
  visibility: hidden !important;
}

/* Contact chooser for preorder requests */
body.gp-contact-modal-open {
  overflow: hidden;
}

.gp-contact-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.38);
}

.gp-contact-overlay.is-open {
  display: flex;
}

.gp-contact-dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 24px;
  background: #f3f4f1;
  border-radius: 18px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.2);
}

.gp-contact-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #555;
  font-size: 25px;
  line-height: 32px;
  cursor: pointer;
}

.gp-contact-title {
  margin: 0 46px 18px 0;
  color: #2b2b2b;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
}

.gp-contact-section {
  margin: 0;
}

.gp-contact-product-section {
  margin-bottom: 18px;
}

.gp-contact-product-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: #fff;
  border: 1px solid #e0e3dc;
  border-radius: 14px;
}

.gp-contact-product-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  overflow: hidden;
  background: #fafafa;
  border-radius: 10px;
}

.gp-contact-product-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gp-contact-product-info {
  min-width: 0;
}

.gp-contact-product-name {
  color: #2a2a2a;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
}

.gp-contact-product-variant,
.gp-contact-product-meta {
  margin-top: 5px;
  color: #717171;
  font-size: 13px;
  line-height: 1.35;
}

.gp-contact-product-price {
  margin-top: 9px;
  color: #293b2a;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 700;
}

.gp-contact-intro {
  margin: 10px 2px 0;
  color: #676767;
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 767.98px) {
  .gp-contact-overlay {
    padding: 12px;
  }

  .gp-contact-dialog {
    width: 100%;
    max-height: calc(100vh - 24px);
    padding: 20px 16px calc(18px + env(safe-area-inset-bottom));
    border-radius: 16px;
  }

  .gp-contact-title {
    margin-bottom: 14px;
    font-size: 21px;
  }

  .gp-contact-product-card {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .gp-contact-product-image-wrap {
    width: 76px;
    height: 76px;
  }

  .gp-contact-product-name {
    font-size: 14px;
  }

  .gp-contact-product-price {
    font-size: 16px;
  }

}


/* Native PrestaShop customer-service request form */
.gp-request-section,
.gp-request-success {
  margin-top: 2px;
}

.gp-request-title {
  margin: 0 0 12px;
  color: #333;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 700;
}

.gp-request-form {
  display: grid;
  gap: 11px;
}

.gp-request-field {
  display: block;
  margin: 0;
}

.gp-request-field[hidden] {
  display: none !important;
}

.gp-request-label {
  display: block;
  margin: 0 0 5px;
  color: #474747;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 600;
}

.gp-request-input {
  display: block;
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #d7dbd4;
  border-radius: 9px;
  background: #fff;
  color: #242424;
  font-size: 14px;
  line-height: 1.35;
  box-shadow: none;
}

.gp-request-input:focus {
  border-color: #8da08a;
  outline: none;
  box-shadow: 0 0 0 2px rgba(54, 76, 54, 0.08);
}

.gp-request-input[readonly] {
  background: #f4f5f2;
  color: #666;
}

.gp-request-textarea {
  min-height: 84px;
  resize: vertical;
}

.gp-request-consent {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: start;
  color: #555;
  font-size: 12px;
  line-height: 1.4;
}

.gp-request-consent input {
  margin: 2px 0 0;
}

.gp-request-consent .gp-request-field-error {
  grid-column: 2;
}

.gp-request-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.gp-request-error {
  padding: 9px 11px;
  border: 1px solid #d9a0a0;
  border-radius: 9px;
  background: #fff3f3;
  color: #8f2f2f;
  font-size: 12px;
  line-height: 1.4;
}

.gp-request-submit,
.gp-request-close-success {
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 10px;
  background: #364c36;
  color: #fff;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 700;
  cursor: pointer;
}

.gp-request-submit:hover,
.gp-request-submit:focus,
.gp-request-close-success:hover,
.gp-request-close-success:focus {
  background: #293b2a;
  outline: none;
}

.gp-request-submit:disabled {
  opacity: .65;
  cursor: wait;
}

.gp-request-success {
  padding: 12px 4px 2px;
  text-align: center;
}

.gp-request-success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #d1ddcd;
  color: #293b2a;
  font-size: 25px;
  font-weight: 700;
}

.gp-request-success-title {
  margin: 0 0 8px;
  color: #293b2a;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
}

.gp-request-success-text {
  margin: 0 0 16px;
  color: #626262;
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 767.98px) {
  .gp-request-form {
    gap: 9px;
  }

  .gp-request-input {
    min-height: 40px;
    font-size: 16px; /* prevents iOS zoom */
  }
}

/* Precise request-form validation */
.gp-request-field.has-error .gp-request-input {
  border-color: #d9534f !important;
  box-shadow: 0 0 0 1px rgba(217,83,79,.12);
}

.gp-request-field-error {
  display: block;
  margin-top: 5px;
  color: #b52b27;
  font-size: 12px;
  line-height: 1.35;
}

.gp-request-field-error[hidden] {
  display: none !important;
}

.gp-request-counter {
  display: block;
  margin-top: 4px;
  color: #888;
  font-size: 11px;
  text-align: right;
}
