.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-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;
}

.photo-order-form-wrap .pof-field select {
  box-shadow: none !important;
  background-color: #fff !important;
  background-clip: padding-box !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.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:hover {
  border-color: #111;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.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;
}

.pgc-card-body {
  gap: 8px;
}

.pgc-photo-code {
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  text-align: center;
}

.pgc-empty-state {
  width: 100%;
  padding: 20px 22px;
  border: 1px solid #e1e1e1;
  border-radius: 16px;
  background: #fafafa;
  color: #444;
  box-sizing: border-box;
}

.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;
}

@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-cards {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .pof-card {
    padding: 16px;
  }

  .pof-photo-preview {
    height: 260px;
  }

  .pof-modal-dialog {
    width: min(96vw, 1120px);
    max-height: 88vh;
  }

  .pof-modal-title {
    font-size: 22px;
    padding: 0 48px 2px;
  }

  .pof-modal-image {
    max-height: calc(88vh - 84px);
  }
}
