/* Trang con của art.27biggroup.com: dat-tuong.php (gửi ảnh đặt tượng), don.php (đơn + đặt cọc), da-lam.php (sản phẩm đã làm).
   Nạp SAU art.css — dùng chung biến màu, nút, menu, chân trang, lưới tác phẩm. */

.sub {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(96px, 12vh, 128px) var(--gutter) clamp(48px, 7vw, 88px);
}

.sub--narrow {
  max-width: 860px;
}

.sub__head {
  margin-bottom: clamp(28px, 4vw, 44px);
}

.sub__head--center {
  text-align: center;
}

.sub__title {
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  font-weight: 700;
  line-height: 1.15;
  text-wrap: balance;
}

.sub__lead {
  max-width: 40em;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: clamp(15.5px, 1.2vw, 17px);
}

.sub__head--center .sub__lead {
  margin-right: auto;
  margin-left: auto;
}

.sub__head--center .btn {
  margin-top: 18px;
}

.sub__help {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 15px;
  text-align: center;
}

.sub__help a {
  color: var(--brand-text);
  font-weight: 600;
}

.req {
  color: var(--brand-text);
}

/* ── các bước đặt tượng ── */
.order-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  color: var(--faint);
  font-size: 14px;
  font-weight: 500;
}

.order-steps li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.order-steps span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  font-size: 13px;
}

.order-steps .is-on {
  color: var(--ink);
}

.order-steps .is-on span {
  border-color: transparent;
  background: var(--button-grad);
  color: #fff;
}

/* ── bố cục form: cột chính + cột tóm tắt dính ── */
.order {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: clamp(20px, 3vw, 36px);
}

.order__main {
  display: grid;
  gap: 18px;
}

.order__side {
  position: sticky;
  top: 92px;
}

.panel {
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}

.panel + .panel {
  margin-top: 0;
}

.sub--narrow .panel {
  margin-top: 18px;
}

.panel__head {
  margin-bottom: 20px;
}

.panel__head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.panel__head h2 .icon {
  width: 22px;
  height: 22px;
  color: var(--brand);
}

.panel__head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14.5px;
}

.panel__no {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff1f0;
  color: var(--brand-text);
  font-size: 14px;
}

/* ── 4 ô ảnh góc chụp ── */
.angles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.angle__box {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1.5px dashed rgba(253, 71, 98, 0.35);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff8f7, #fff);
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.angle__box:hover,
.angle__box:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(253, 71, 98, 0.1);
}

.angle__box input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.angle__guide {
  position: absolute;
  inset: 12% 14% 22%;
  color: rgba(253, 71, 98, 0.45);
}

.angle__guide svg {
  width: 100%;
  height: 100%;
}

.angle__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.angle__add {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand-text);
  font-size: 13.5px;
  font-weight: 600;
  pointer-events: none;
  box-shadow: 0 6px 16px -10px rgba(27, 21, 23, 0.4);
}

.angle__add .icon {
  width: 16px;
  height: 16px;
}

.angle.has-image .angle__box {
  border-style: solid;
  border-color: transparent;
}

.angle.has-image .angle__guide {
  display: none;
}

.angle.has-image .angle__add {
  right: auto;
  left: 50%;
  padding: 6px 12px;
  background: rgba(27, 21, 23, 0.66);
  color: #fff;
  transform: translateX(-50%);
  backdrop-filter: blur(6px);
}

.angle.is-missing .angle__box {
  border-color: var(--brand-strong);
  animation: shake 0.5s;
}

.angle__text {
  display: flex;
  flex-direction: column;
  padding: 10px 2px 0;
  line-height: 1.35;
}

.angle__text strong {
  font-size: 15px;
}

.angle__text small {
  margin-top: 2px;
  color: var(--faint);
  font-size: 12.5px;
}

@keyframes shake {
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* ── ảnh bổ sung ── */
.extras {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.extras__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.extras__head > div {
  display: flex;
  flex-direction: column;
  max-width: 34em;
}

.extras__head strong small {
  color: var(--faint);
  font-weight: 400;
}

.extras__head > div > small {
  color: var(--muted);
  font-size: 13.5px;
}

.extras__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 10px;
}

.extras__grid:not(:empty) {
  margin-top: 14px;
}

.extra {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  background: var(--bg-soft);
}

.extra img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.extra button {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(27, 21, 23, 0.7);
  color: #fff;
  cursor: pointer;
}

.extra button .icon {
  width: 14px;
  height: 14px;
}

/* ── ô nhập ── */
.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 14px;
  font-weight: 600;
}

.field--wide {
  grid-column: 1 / -1;
}

fieldset.field {
  margin-bottom: 16px;
}

.field legend {
  margin-bottom: 8px;
  padding: 0;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: 400 15.5px/1.45 var(--font);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 4px rgba(253, 71, 98, 0.12);
}

.hp {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  position: relative;
}

.pill input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
}

.pill span {
  display: flex;
  flex-direction: column;
  min-width: 104px;
  padding: 10px 14px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.3;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.pill b {
  color: var(--ink);
  font-size: 15px;
}

.pill input:checked + span {
  border-color: var(--brand);
  background: #fff5f4;
  box-shadow: inset 0 0 0 1px var(--brand);
}

.pill input:focus-visible + span {
  outline: 2px solid var(--brand-text);
  outline-offset: 2px;
}

.ref {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-soft);
}

.ref img {
  width: 52px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
}

.ref > div {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.ref small {
  color: var(--faint);
}

.ref__x {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.ref__x:hover {
  background: #fff;
}

/* ── cột tóm tắt ── */
.summary {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 30px 60px -48px rgba(27, 21, 23, 0.5);
}

.summary h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.checklist {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14.5px;
}

.checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checklist li::before {
  content: '';
  flex: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--line-2);
  border-radius: 50%;
}

.checklist li.is-done {
  color: var(--ink);
}

.checklist li.is-done::before {
  border-color: transparent;
  background: var(--button-grad) center / 12px no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"), var(--button-grad);
}

.summary__deposit {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 14px;
  background: #fff5f4;
}

.summary__deposit .icon {
  width: 22px;
  height: 22px;
  color: var(--brand);
}

.summary__deposit div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.summary__deposit small,
.summary__note,
.summary__privacy {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}

.summary__note {
  margin: 0 0 16px;
}

.summary__submit {
  width: 100%;
}

.summary__submit[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.summary__privacy {
  margin: 12px 0 0;
  text-align: center;
}

.form-error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff0f2;
  color: #b4122f;
  font-size: 14px;
}

/* ── lớp phủ "đang gửi" ── */
.sending {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(6px);
}

.sending[hidden] {
  display: none;
}

.sending__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: min(360px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  text-align: center;
  box-shadow: 0 40px 80px -40px rgba(27, 21, 23, 0.45);
}

.sending__card .loader__ring {
  animation: spin 1s linear infinite;
}

.sending__card small {
  color: var(--faint);
}

.sending__bar {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bg-soft);
}

.sending__bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--button-grad);
  transition: width 0.3s;
}

/* ── trang đơn ── */
.done-badge {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--button-grad);
  color: #fff;
  box-shadow: 0 18px 34px -16px rgba(244, 58, 91, 0.8);
}

.done-badge .icon {
  width: 30px;
  height: 30px;
}

.track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  color: var(--faint);
  font-size: 13.5px;
  text-align: center;
}

.track li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.track li::before {
  content: '';
  position: absolute;
  top: 8px;
  right: 50%;
  left: -50%;
  height: 2px;
  background: var(--line);
}

.track li:first-child::before {
  display: none;
}

.track span {
  position: relative;
  width: 18px;
  height: 18px;
  border: 2px solid var(--line-2);
  border-radius: 50%;
  background: #fff;
}

.track .is-done {
  color: var(--ink);
}

.track .is-done::before {
  background: var(--brand);
}

.track .is-done span {
  border-color: var(--brand);
  background: var(--brand);
}

.track .is-now span {
  box-shadow: 0 0 0 5px rgba(253, 71, 98, 0.18);
}

.track .is-now {
  font-weight: 600;
}

.deposit {
  border-color: rgba(253, 71, 98, 0.3);
  background: linear-gradient(180deg, #fff7f6, #fff 50%);
}

.deposit__body {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
}

.deposit__qr {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.deposit__wait {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.pulse {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  50% { box-shadow: 0 0 0 6px rgba(253, 71, 98, 0.15); opacity: 0.6; }
}

.kv {
  display: grid;
  gap: 2px;
  margin: 0;
}

.kv > div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.kv > div:last-child {
  border-bottom: 0;
}

.kv dt {
  color: var(--faint);
  font-size: 14px;
}

.kv dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  overflow-wrap: anywhere;
}

.kv__code {
  color: var(--brand-text);
  letter-spacing: 0.02em;
}

.kv__pre {
  white-space: pre-line;
}

.copy {
  padding: 3px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font-size: 12.5px;
  cursor: pointer;
}

.copy:hover {
  border-color: var(--brand);
  color: var(--brand-text);
}

.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 0;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--bg-soft);
  color: var(--ink-2);
  font-size: 15px;
}

.notice--ok {
  background: #ecfbf2;
  color: #12693b;
}

.notice--ok .icon {
  color: #16a34a;
}

.notice--muted {
  color: var(--muted);
}

.sent-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.sent-photos figure {
  margin: 0;
}

.sent-photos img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  background: var(--bg-soft);
  object-fit: cover;
}

.sent-photos figcaption {
  margin-top: 6px;
  color: var(--faint);
  font-size: 12.5px;
  text-align: center;
}

.empty {
  padding: 40px 0;
}

.empty__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

/* ── sản phẩm đã làm ── */
.works--page {
  padding: 0;
}

.filters--page {
  margin-bottom: 28px;
}

.chip small {
  margin-left: 4px;
  opacity: 0.6;
}

.cta--sub {
  padding: clamp(48px, 7vw, 88px) 0 0;
}

@media (max-width: 1000px) {
  .order {
    grid-template-columns: minmax(0, 1fr);
  }

  .order__side {
    position: static;
  }
}

@media (max-width: 760px) {
  .angles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .panel {
    border-radius: 18px;
  }

  .deposit__body {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .deposit__qr {
    max-width: 260px;
  }

  .kv > div {
    grid-template-columns: 100px minmax(0, 1fr);
  }

  .track {
    font-size: 12px;
  }

  .filters--page {
    flex-wrap: nowrap;
    margin-right: calc(var(--gutter) * -1);
    margin-left: calc(var(--gutter) * -1);
    padding: 0 var(--gutter) 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }
}

/* ═════════════ 2026-11-03: loại đơn (ảnh / file 3D), danh sách file, bảng giá ═════════════ */
[data-mode][hidden] {
  display: none !important;
}

.modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.mode {
  position: relative;
}

.mode input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.mode__card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 2px 14px;
  height: 100%;
  padding: 16px 18px;
  border: 1px solid var(--line-2);
  border-radius: 20px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.mode__icon {
  grid-row: span 2;
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 14px;
  background: var(--bg-soft);
  color: var(--brand-text);
}

.mode__card b {
  font-size: 15.5px;
  line-height: 1.35;
}

.mode__card small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.mode input:checked + .mode__card {
  border-color: var(--brand);
  background: #fff8f7;
  box-shadow: inset 0 0 0 1px var(--brand), 0 14px 30px -22px rgba(216, 27, 69, 0.6);
}

.mode input:checked + .mode__card .mode__icon {
  background: var(--button-grad);
  color: #fff;
}

.mode input:focus-visible + .mode__card {
  outline: 2px solid var(--brand-text);
  outline-offset: 2px;
}

.files__drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 30px 18px;
  border: 1.5px dashed var(--line-2);
  border-radius: 18px;
  background: var(--bg-soft);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.files__drop:hover,
.files__drop:focus-within,
.files__drop.is-over {
  border-color: var(--brand);
  background: #fff5f4;
}

.files__drop.is-missing {
  border-color: var(--brand-strong);
  animation: shake 0.4s;
}

.files__drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.files__drop .icon {
  width: 34px;
  height: 34px;
  margin-bottom: 4px;
  color: var(--brand-text);
}

.files__drop small {
  color: var(--muted);
  font-size: 13px;
}

.files__list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.files__list:not(:empty) {
  margin-top: 12px;
}

.files__list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.files__list li > .icon {
  color: var(--brand-text);
}

.files__list span {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.files__list b {
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.files__list small {
  color: var(--muted);
  font-size: 12.5px;
}

.files__list button,
.files__list a.files__dl {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--ink);
  cursor: pointer;
}

.field legend small {
  color: var(--faint);
  font-weight: 400;
}

.pill em {
  margin-top: 2px;
  color: var(--brand-text);
  font-size: 12.5px;
  font-style: normal;
  font-weight: 600;
}

@media (max-width: 640px) {
  .modes {
    grid-template-columns: minmax(0, 1fr);
  }
}

.price-notes {
  margin: 18px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
}

.price-notes li + li {
  margin-top: 4px;
}
