.photo-order-form-wrap {
  width: 100%;
  margin: 0;
  padding: 0;
}

.photo-order-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pof-topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.pof-class-field {
  min-width: 280px;
  flex: 1;
}

.pof-admin-summary-line {
    margin-top: 12px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #dcdcde;
    line-height: 1.6;
}

.pof-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pof-field label {
  font-size: 14px;
  font-weight: 600;
  color: #222;
}

.pof-field select {
  height: 50px;
  padding: 0 14px;
  border: 1px solid #d9d9d9;
  border-radius: 12px;
  background: #fff;
  font-size: 15px;
  color: #222;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.pof-form-intro {
  font-size: 16px;
  line-height: 1.5;
  color: #222;
}

/* CAMPI SOPRA LE CARD */

.pof-pre-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  width: 100%;
}

.pof-pre-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pof-pre-field label {
  font-size: 14px;
  font-weight: 600;
  color: #222;
}

.pof-pre-field input,
.pof-pre-field select {
  height: 50px;
  padding: 0 14px;
  border: 1px solid #d9d9d9;
  border-radius: 12px;
  background: #fff;
  font-size: 15px;
  color: #222;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.pof-pre-field input::placeholder {
  color: #9a9a9a;
  
  .pof-settings-form {
  max-width: 900px;
}

.pof-settings-card {
  margin-top: 20px;
  padding: 24px;
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 14px;
}

.pof-settings-card h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 22px;
  line-height: 1.2;
}

.pof-settings-card .form-table th {
  width: 180px;
}

.pof-settings-card .regular-text {
  width: 100%;
  max-width: 480px;
}
  
  
  
}

/* FIX MIRATI CAMPI SOPRA LE CARD */

.photo-order-form-wrap .pof-pre-field input[type="email"] {
  border: 1px solid #d9d9d9 !important;
  border-style: solid !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: #222 !important;
  box-shadow: none !important;
  outline: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.photo-order-form-wrap .pof-pre-field input[type="email"]::placeholder {
  color: #9a9a9a !important;
  opacity: 1 !important;
}

.photo-order-form-wrap .pof-field select,
.photo-order-form-wrap .pof-pre-field select {
  box-shadow: none !important;
  background-color: #fff !important;
  background-clip: padding-box !important;
}

/* CARD */

.pof-grid-container {
  width: 100%;
}

.pof-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.pof-card {
  border: 1px solid #e1e1e1;
  border-radius: 18px;
  background: #fff;
  padding: 18px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.pof-card.active {
  border-color: #111;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.pof-card-header {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pof-photo-title {
  font-size: 16px;
  font-weight: 700;
  color: #111;
  text-align: center;
}

.pof-photo-preview {
  width: 100%;
  height: 320px;
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
  overflow: hidden;
  cursor: zoom-in;
}

.pof-photo-preview:focus {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.pof-photo-preview img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.pof-card-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pof-format-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pof-format-label {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  min-width: 170px;
}

.pof-qty-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.pof-qty-btn {
  width: 34px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  background: #fff;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  padding: 0;
  margin: 0;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.pof-qty-btn:hover {
  background: #f5f5f5;
  border-color: #cfcfcf;
}

.pof-qty-input {
  width: 60px;
  height: 40px;
  border: 1px solid #dcdcdc;
  border-radius: 8px;
  background: #fff;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 0 6px;
  margin: 0;
  box-sizing: border-box;
  appearance: textfield;
  -moz-appearance: textfield;
}

.pof-qty-input::-webkit-outer-spin-button,
.pof-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* RIEPILOGO */

.pof-order-summary {
  width: 100%;
  padding: 24px;
  border: 1px solid #e1e1e1;
  border-radius: 18px;
  background: #fafafa;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pof-order-summary__title {
  font-size: 24px;
  font-weight: 800;
  color: #111;
  line-height: 1.1;
}

.pof-order-summary__spacer {
  height: 14px;
}

.pof-bonus-message {
  font-size: 16px;
  font-weight: 700;
  color: #b14b4b;
  line-height: 1.4;
}

.pof-free-standard-message {
  font-size: 16px;
  font-weight: 700;
  color: #163a70;
  line-height: 1.4;
  margin-bottom: 8px;
}

.pof-bonus-message.is-unlocked {
  color: #15803d;
  animation: pof-pop 0.4s ease;
}

@keyframes pof-pop {
  0% { transform: scale(0.9); }
  60% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.pof-order-summary__rows {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

.pof-order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.pof-order-row__left {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.pof-order-row__label {
  font-size: 18px;
  font-weight: 700;
  color: #222;
  line-height: 1.3;
}

.pof-order-row__qty {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: #111;
}

.pof-order-row__meta {
  font-size: 13px;
  color: #666;
  line-height: 1.3;
}

.pof-order-row__amount {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
  text-align: right;
  font-size: 22px;
  font-weight: 800;
  color: #111;
  line-height: 1.1;
  white-space: nowrap;
}

.pof-order-row--photos-total {
  padding-top: 2px;
}

.pof-order-divider {
  margin: 4px 0 0;
  border-top: 1px solid #dddddd;
}

.pof-order-row--grand-total {
  padding-top: 6px;
}

.pof-order-row--grand-total .pof-order-row__label {
  font-size: 22px;
  font-weight: 800;
}

.pof-order-row__amount--grand {
  font-size: 22px;
  font-weight: 800;
}

.pof-old-price {
  color: #9a9a9a;
  text-decoration: line-through;
  font-weight: 500;
  margin-right: 4px;
}

/* FOOTER */

.pof-footer {
  display: none;
  justify-content: right;
}

.pof-submit {
  width: 320px;
  max-width: 100%;
  min-height: 64px;
  padding: 18px 28px;
  border: none;
  border-radius: 16px;
  background: #111;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.pof-submit:hover:not(:disabled) {
  opacity: 0.96;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.pof-submit:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: none;
}

.pof-submit:disabled {
  background: #bdbdbd;
  color: #f5f5f5;
  cursor: not-allowed;
  box-shadow: none;
  opacity: 1;
}

/* MODALE ANTEPRIMA */

.pof-modal-open {
  overflow: hidden;
}

.pof-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
}

.pof-modal.is-open {
  display: block;
}

.pof-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.pof-modal-dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(94vw, 1120px);
  max-width: 1120px;
  max-height: 92vh;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 18px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.25);
  padding-top: 18px;
  padding-right: 10px;
  padding-bottom: 10px;
  padding-left: 10px;
}

.pof-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  color: #111;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pof-modal-close:hover {
  background: rgba(0, 0, 0, 0.14);
}

.pof-modal-title {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  color: #111;
  text-align: center;
  padding: 0 58px 2px;
}

.pof-modal-image-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pof-modal-image {
  max-width: 100%;
  max-height: calc(92vh - 90px);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 10px;
}

/* MODALE CONFERMA ORDINE */

.pof-confirm-open {
  overflow: hidden;
}

.pof-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
}

.pof-confirm-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
}

.pof-confirm-modal__dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(92vw, 640px);
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  box-sizing: border-box;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.24);
}

.pof-confirm-modal__title {
  font-size: 28px;
  font-weight: 800;
  color: #111;
  line-height: 1.1;
  margin-bottom: 16px;
}

.pof-confirm-modal__text {
  font-size: 17px;
  line-height: 1.6;
  color: #222;
}

.pof-confirm-modal__actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 28px;
}

.pof-confirm-modal__btn {
  width: calc(50% - 7px);
  min-height: 56px;
  padding: 14px 22px;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pof-confirm-modal__btn--secondary {
  border: 1px solid #d1d1d1;
  background: #fff;
  color: #111;
}

.pof-confirm-modal__btn--secondary:hover {
  background: #f6f6f6;
}

.pof-confirm-modal__btn--primary {
  border: none;
  background: #111;
  color: #fff;
}

.pof-confirm-modal__btn--primary:hover {
  opacity: 0.96;
  transform: translateY(-1px);
}

/* FLOATING BAR */

.pof-floating-bar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(18px);
  width: min(680px, calc(100vw - 24px));
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(17, 17, 17, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 100001;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.pof-floating-bar.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.pof-floating-bar.is-success {
  background: rgba(20, 20, 20, 0.88);
}

.pof-floating-bar.is-error {
  background: rgba(120, 24, 24, 0.92);
}

.pof-floating-bar.is-info {
  background: rgba(24, 24, 24, 0.88);
}

/* ESITO INVIO */

.pof-submit-result {
  width: 100%;
}

.pof-success-box {
  border: 1px solid #dbe7d6;
  background: #f6fbf4;
  border-radius: 20px;
  padding: 28px;
  box-sizing: border-box;
}

.pof-success-box__title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  color: #163a1d;
  margin-bottom: 14px;
}

.pof-success-box__text {
  font-size: 17px;
  line-height: 1.6;
  color: #26412a;
}

.pof-success-box__reload {
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.5;
  color: #26412a;
}

.pof-success-box__reload a {
  color: #163a1d;
  font-weight: 700;
  text-decoration: underline;
}

/* FIX INPUT EMAIL */

.photo-order-form-wrap .pof-pre-field input[type="email"],
.photo-order-form-wrap .pof-pre-field input[type="email"]:focus,
.photo-order-form-wrap .pof-pre-field input[type="email"]:active {
  color: #222 !important;
}

.photo-order-form-wrap .pof-field select,
.photo-order-form-wrap .pof-pre-field select {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

/* RESPONSIVE */

@media (max-width: 1100px) {
  .pof-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .photo-order-form-wrap {
    max-width: 100%;
  }

  .pof-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .pof-class-field {
    width: 100%;
    min-width: 0;
  }

  .pof-pre-fields {
    grid-template-columns: 1fr;
  }

  .pof-cards {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .pof-card {
    padding: 16px;
  }

  .pof-photo-preview {
    height: 260px;
  }

  .pof-format-block {
    flex-direction: column;
    align-items: stretch;
  }

  .pof-format-label {
    min-width: 0;
  }

  .pof-qty-box {
    justify-content: space-between;
  }

  .pof-qty-btn {
    width: 42px;
  }

  .pof-qty-input {
    flex: 1;
    max-width: none;
  }

  .pof-order-summary {
    padding: 18px 16px;
  }

  .pof-order-summary__title {
    font-size: 21px;
  }

  .pof-order-summary__spacer {
    height: 12px;
  }

  .pof-bonus-message {
    font-size: 15px;
  }

  .pof-order-summary__rows {
    margin-top: 16px;
    gap: 14px;
  }

  .pof-order-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .pof-order-row__left {
    gap: 6px;
  }

  .pof-order-row__label {
    font-size: 16px;
  }

  .pof-order-row__qty {
    font-size: 16px;
  }

  .pof-order-row__meta {
    font-size: 12px;
  }

  .pof-order-row__amount {
    justify-content: flex-start;
    text-align: left;
    font-size: 20px;
    white-space: normal;
  }

  .pof-order-row--grand-total .pof-order-row__label {
    font-size: 20px;
  }

  .pof-order-row__amount--grand {
    font-size: 20px;
  }

  .pof-footer {
    justify-content: stretch;
  }

  .pof-submit {
    width: 100%;
    min-height: 60px;
    font-size: 18px;
    padding: 16px 22px;
  }

  .pof-modal-dialog {
    width: 96vw;
    max-height: 92vh;
    padding-top: 14px;
    padding-right: 8px;
    padding-bottom: 8px;
    padding-left: 8px;
    border-radius: 16px;
  }

  .pof-modal-title {
    font-size: 22px;
    line-height: 1.1;
    padding: 0 46px 2px 8px;
    text-align: left;
  }

  .pof-modal-close {
    top: 8px;
    right: 8px;
    width: 38px;
    height: 38px;
    font-size: 24px;
  }

  .pof-modal-image {
    max-height: calc(92vh - 74px);
  }

  .pof-confirm-modal__dialog {
    width: 94vw;
    padding: 22px 18px;
    border-radius: 18px;
  }

  .pof-confirm-modal__title {
    font-size: 23px;
    margin-bottom: 14px;
  }

  .pof-confirm-modal__text {
    font-size: 16px;
    line-height: 1.55;
  }

  .pof-confirm-modal__actions {
    flex-direction: column-reverse;
    gap: 10px;
    margin-top: 22px;
  }

  .pof-confirm-modal__btn {
    width: 100%;
  }

  .pof-success-box {
    padding: 22px 18px;
    border-radius: 18px;
  }

  .pof-success-box__title {
    font-size: 22px;
  }

  .pof-success-box__text {
    font-size: 16px;
  }

  .pof-success-box__reload {
    font-size: 15px;
  }
  
    .pof-floating-bar {
    bottom: 12px;
    width: calc(100vw - 16px);
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.3;
  }
  
  
}