.wa-order-module {
  margin: 10px 0 15px;
}

.wa-order-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.wa-order-btn .fa {
  font-size: 16px;
}

.wa-order-btn:hover {
  transform: translateY(-1px);
  filter: brightness(0.97);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
  color: inherit;
}

.wa-order-btn-cart {
  margin-top: 8px;
}

.wa-floating {
  position: fixed;
  bottom: 22px;
  right: 18px;
  z-index: 9999;
  max-width: 340px;
}

.wa-floating-left {
  left: 18px;
  right: auto;
}

.wa-fab {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 16px;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.wa-fab:hover {
  transform: translateY(-2px);
  filter: brightness(0.96);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25);
  color: inherit;
}

.wa-fab__icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  margin-right: 12px;
  flex-shrink: 0;
}

.wa-fab__icon .fa {
  font-size: 20px;
}

.wa-fab__title {
  font-weight: 700;
  margin-bottom: 2px;
}

.wa-fab__body {
  font-size: 12px;
  line-height: 1.4;
  opacity: 0.92;
}

@media (max-width: 767px) {
  .wa-floating {
    bottom: 16px;
    right: 12px;
    left: 12px;
    max-width: none;
  }

  .wa-floating-left {
    left: 12px;
  }

  .wa-fab {
    padding: 12px 14px;
  }
}

/* Reusable grid badge styling (so-emarket overlays and similar) */
.wa-grid-icon {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 36px;
  padding: 0;
  text-decoration: none;
  /*box-shadow: 0 6px 12px rgba(0, 0, 0, 0.18);*/
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
  z-index: 1;
  pointer-events: auto;
}
.wa-grid-icon-top_left { top: 8px; left: 8px; }
.wa-grid-icon-top_right { top: 8px; right: 8px; }
.wa-grid-icon-bottom_left { bottom: 8px; left: 8px; }
.wa-grid-icon-bottom_right { bottom: 8px; right: 8px; }

.wa-grid-icon .fa {
  font-size: 16px;
  line-height: 1;
}

.wa-product-page-icon {
  z-index: 1;
}

.wa-grid-icon:hover {
  transform: translateY(-1px);
  filter: brightness(0.96);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.22);
  color: inherit;
}

/* Tippy (WhatsApp tooltip) theme */
.tippy-box[data-theme~='wa-order'] {
  background: var(--wa-order-tooltip-bg, rgba(18, 18, 18, 0.98));
  color: var(--wa-order-tooltip-color, #fff);
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.2;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}

.tippy-box[data-theme~='wa-order'] .tippy-content {
  padding: 10px 12px;
}

.tippy-box[data-theme~='wa-order'][data-placement^='top'] > .tippy-arrow::before {
  border-top-color: var(--wa-order-tooltip-bg, rgba(18, 18, 18, 0.98));
}
.tippy-box[data-theme~='wa-order'][data-placement^='bottom'] > .tippy-arrow::before {
  border-bottom-color: var(--wa-order-tooltip-bg, rgba(18, 18, 18, 0.98));
}
.tippy-box[data-theme~='wa-order'][data-placement^='left'] > .tippy-arrow::before {
  border-left-color: var(--wa-order-tooltip-bg, rgba(18, 18, 18, 0.98));
}
.tippy-box[data-theme~='wa-order'][data-placement^='right'] > .tippy-arrow::before {
  border-right-color: var(--wa-order-tooltip-bg, rgba(18, 18, 18, 0.98));
}

/* Customer details modal (WhatsApp Order Pro) */
.wa-order-modal-open {
  overflow: hidden;
}
.wa-order-modal-open body {
  overflow: hidden;
}

.wa-order-modal-backdrop[hidden] {
  display: none;
}

.wa-order-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.wa-order-modal {
  width: min(520px, 100%);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.32);
  overflow: hidden;
  font-size: 14px;
  color: #151515;
  --wa-order-accent-1: #c51d38;
  --wa-order-accent-2: #8f0f24;
  --wa-order-accent-shadow: rgba(143, 15, 36, 0.22);
  --wa-order-accent-soft: rgba(143, 15, 36, 0.15);
}

.wa-order-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: #C92127;
  color: #ffffff;
}

.wa-order-modal__title {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.3px;
}

.wa-order-modal__subtitle {
  margin-top: 2px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.35;
}

.wa-order-modal__close {
  border: 0;
  background: transparent;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 26px;
  line-height: 1;
  color: #ffffff;
  transition: background 0.15s ease, transform 0.15s ease;
}

.wa-order-modal__close:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.wa-order-modal__body {
  padding: 16px 18px 10px;
}

.wa-order-summary {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  padding: 14px 14px 10px;
  margin-bottom: 12px;
}

.wa-order-summary__title {
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 8px;
}

.wa-order-summary__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
}

.wa-order-summary__label {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.65);
}

.wa-order-summary__value {
  font-size: 13px;
  font-weight: 800;
  color: rgba(0, 0, 0, 0.9);
  text-align: right;
}

.wa-order-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(0, 0, 0, 0.10);
  background: rgba(255, 255, 255, 0.85);
  height: 34px;
}

.wa-order-qty__btn {
  width: 34px;
  height: 34px;
  border: 0;
  background: #C92127;
  font-weight: 900;
  color: #ffffff;
  border-radius: 0;
}

.wa-order-qty__btn[data-wa-qty-minus] {
  border-radius: 8px 0 0 8px;
}

.wa-order-qty__btn[data-wa-qty-plus] {
  border-radius: 0 8px 8px 0;
}

.wa-order-qty__btn:hover {
  filter: brightness(0.97);
}

.wa-order-qty__input {
  width: 46px;
  height: 34px;
  border: 0;
  outline: none;
  text-align: center;
  font-weight: 900;
  font-size: 13px;
  background: transparent;
  -moz-appearance: textfield;
}

.wa-order-qty__input::-webkit-outer-spin-button,
.wa-order-qty__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.wa-order-field {
  margin-bottom: 12px;
}

.wa-order-label {
  display: block;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
  color: #1a1a1a;
}

.wa-order-label__row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.wa-order-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(201, 33, 39, 0.4);
  color: #C92127;
  background: #fff;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.wa-order-info:hover,
.wa-order-info:focus {
  border-color: rgba(201, 33, 39, 0.8);
  color: #C92127;
  outline: none;
}

.wa-order-required {
  color: #d02a2a;
  font-weight: 900;
}

.wa-order-input {
  width: 100%;
  height: 48px;
  border-radius: 10px;
  border: 0;
  padding: 12px 14px;
  outline: none;
  font-size: 14px;
  background: transparent;
  transition: box-shadow 0.15s ease;
}

.wa-order-modal .wa-order-input {
  border-radius: 10px;
}

.wa-order-input::placeholder {
  color: rgba(0, 0, 0, 0.45);
}

.wa-order-inputwrap {
  position: relative;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.wa-order-inputwrap:hover {
  border-color: #C92127;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.03);
}

.wa-order-inputwrap:focus-within {
  border-color: #C92127;
  border-radius: 10px;
  box-shadow: 0 0 0 3px var(--wa-order-accent-soft);
  background: #fff;
}

.wa-order-inputicon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.55);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.06);
  pointer-events: none;
}

.wa-order-inputwrap .wa-order-input {
  padding-left: 52px;
}

.wa-order-input--invalid {
  /* Kept for backwards compatibility; wrapper is styled instead. */
}

.wa-order-inputwrap--invalid {
  border-color: rgba(208, 42, 42, 0.65);
  box-shadow: 0 0 0 3px rgba(208, 42, 42, 0.12);
  background: rgba(208, 42, 42, 0.03);
}

.wa-order-hint {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.65);
}

.wa-order-error {
  margin-top: 6px;
  font-size: 12px;
  color: #d02a2a;
  min-height: 14px;
}

.wa-order-modal__footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 18px 18px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.wa-order-modal__cancel {
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: #fff;
  color: #111;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  min-height: 46px;
}

.wa-order-modal__purchase {
  border: 0;
  background: linear-gradient(135deg, var(--wa-order-accent-1), var(--wa-order-accent-2));
  color: #fff;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 800;
  box-shadow: 0 12px 22px var(--wa-order-accent-shadow);
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.wa-order-modal__purchase[disabled] {
  opacity: 0.55;
  filter: grayscale(0.15);
  box-shadow: none;
  cursor: not-allowed;
}

.wa-order-modal__purchase:hover {
  filter: brightness(0.98);
}

@media (max-width: 520px) {
  .wa-order-modal-backdrop {
    padding: 12px;
  }

  .wa-order-modal {
    max-height: calc(100vh - 24px);
    border-radius: 12px;
    font-size: 13px;
    display: flex;
    flex-direction: column;
  }

  .wa-order-modal__header {
    padding: 14px 14px 10px;
  }

  .wa-order-modal__title {
    font-size: 16px;
  }

  .wa-order-modal__subtitle {
    font-size: 12px;
  }

  .wa-order-modal__body {
    padding: 12px 14px 8px;
    overflow-y: auto;
  }

  .wa-order-summary {
    padding: 10px 12px 8px;
    margin-bottom: 10px;
    border-radius: 12px;
  }

  .wa-order-summary__row {
    padding: 3px 0;
  }

  .wa-order-qty {
    height: 30px;
  }

  .wa-order-qty__btn {
    width: 30px;
    height: 30px;
  }

  .wa-order-qty__input {
    width: 40px;
    height: 30px;
    font-size: 12px;
  }

  .wa-order-field {
    margin-bottom: 6px;
  }

  .wa-order-label {
    font-size: 11px;
    margin-bottom: 3px;
  }

  .wa-order-input {
    height: 34px;
    font-size: 12px;
    padding: 8px 10px;
  }

  .wa-order-inputwrap .wa-order-input {
    padding-left: 40px;
  }

  .wa-order-inputicon {
    left: 8px;
    width: 20px;
    height: 20px;
    border-radius: 6px;
  }

  .wa-order-info {
    width: 16px;
    height: 16px;
    font-size: 10px;
  }

  .wa-order-hint,
  .wa-order-error {
    font-size: 10px;
  }

  .wa-order-hint {
    display: none;
  }

  .wa-order-modal__footer {
    flex-direction: column-reverse;
    align-items: stretch;
    padding: 10px 14px 14px;
    gap: 8px;
  }
  .wa-order-modal__cancel,
  .wa-order-modal__purchase {
    width: 100%;
    justify-content: center;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 10px;
  }
}