*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f5f5f0;
  --surface: #ffffff;
  --surface-2: #f0f0eb;
  --border: #e0e0d8;
  --accent: #e8ff47;
  --accent-dark: #c8df1f;
  --text: #111111;
  --text-muted: #777777;
  --error: #dc2626;
  --success: #16a34a;
  --radius: 12px;
  --radius-sm: 8px;
}

html {
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  padding: 24px 16px 48px;
  line-height: 1.5;
}

.container {
  max-width: 480px;
  margin: 0 auto;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 28px;
}

.brand {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #1a2744;
  text-transform: uppercase;
}

.subtitle {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
}

.tagline {
  color: var(--text-muted);
  margin-top: 6px;
  font-size: 0.9rem;
}

.price {
  margin-top: 10px;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.deadline {
  margin-top: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--error);
  letter-spacing: 0.02em;
}

/* T-shirt image */
.tshirt-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.image-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.tshirt-image {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.tshirt-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}

.placeholder-text {
  display: none;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  padding: 24px;
}

.tshirt-image.missing img {
  display: none;
}

.tshirt-image.missing .placeholder-text {
  display: block;
}

/* Payment block */
.payment-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.payment-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.payment-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.payment-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 4px;
}

.payment-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.wa-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25D366;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
  transition: background 0.15s, transform 0.1s;
}

.wa-button::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z'/%3E%3C/svg%3E") no-repeat center/contain;
}

.wa-button:hover {
  background: #1ebe5a;
}

.wa-button:active {
  transform: scale(0.98);
}

/* WA number bar */
.wa-number-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.wa-number-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.wa-number-link {
  font-size: 1.05rem;
  font-weight: 700;
  color: #25D366;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.wa-number-link:hover {
  text-decoration: underline;
}

/* Notice */
.notice {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.notice-icon {
  flex-shrink: 0;
  font-size: 1rem;
}

/* Form */
form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

input[type="text"],
input[type="tel"],
select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

input[type="text"]::placeholder {
  color: var(--text-muted);
}

input[type="text"]:focus,
select:focus {
  border-color: var(--accent);
}

.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: '▾';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.9rem;
}

select option {
  background: var(--surface);
  color: var(--text);
}

/* File upload */
input[type="file"] {
  display: none;
}

.file-label {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.file-label:hover,
.file-label:active {
  border-color: var(--accent);
  background: var(--surface-2);
  color: var(--text);
}

.file-label.has-file {
  border-style: solid;
  border-color: var(--accent);
  color: var(--accent);
}

.file-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.file-text {
  flex: 1;
  word-break: break-all;
  line-height: 1.3;
}

/* Errors */
.error {
  font-size: 0.78rem;
  color: var(--error);
  display: none;
}

.field.invalid input,
.field.invalid select,
.field.invalid .file-label {
  border-color: var(--error);
}

.field.invalid .error {
  display: block;
}

/* Submit */
button[type="submit"] {
  background: #1a2744;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  padding: 16px;
  width: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.15s, transform 0.1s;
  margin-top: 4px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

button[type="submit"]:hover {
  background: #0f1a33;
}

button[type="submit"]:active {
  transform: scale(0.98);
}

button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0,0,0,0.3);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hidden {
  display: none !important;
}

/* Messages */
.message {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border-radius: var(--radius);
  padding: 18px;
  margin-top: 24px;
  font-size: 0.9rem;
}

.message span:first-child {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.message strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
}

.message p {
  color: var(--text-muted);
  margin: 0;
}

.message.success {
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.message.error-msg {
  background: rgba(255, 95, 95, 0.1);
  border: 1px solid rgba(255, 95, 95, 0.3);
}

/* Footer */
.footer-link {
  color: #25D366;
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
}

.footer {
  text-align: center;
  margin-top: 40px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
