/* TPM Form Design System — shared across all product form pages */
:root { color-scheme: light only; }
* { margin: 0; padding: 0; box-sizing: border-box; }

@font-face { font-family: 'Recoleta'; src: url('https://cdn.shopify.com/s/files/1/0945/0759/8154/files/Recoleta_Bold.woff2?v=1758843792') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Recoleta'; src: url('https://cdn.shopify.com/s/files/1/0945/0759/8154/files/Recoleta_Regular.otf?v=1758843292') format('opentype'); font-weight: 400; font-display: swap; }

body { font-family: 'Inter', -apple-system, sans-serif; background: #fff; color: #121212; min-height: 100vh; -webkit-font-smoothing: antialiased; }
.container { max-width: 560px; margin: 0 auto; padding: 1.25rem 1.25rem 2rem; }

/* Header */
header { text-align: center; padding: 1.5rem 0 0.75rem; }
header h1 { font-family: 'Recoleta', serif; font-size: 1.6rem; font-weight: 700; color: #121212; margin-bottom: 0.3rem; letter-spacing: -0.01em; }
header p { color: #888; font-size: 0.85rem; }

/* Progress */
.progress-bar { display: flex; gap: 0.5rem; margin-bottom: 1.75rem; }
.progress-dot { flex: 1; height: 3px; border-radius: 3px; background: #e8e8e8; transition: background 0.3s; }
.progress-dot.active { background: #FF8F8F; }
.progress-dot.completed { background: #FF8F8F; }

/* Steps */
.form-step { display: none; animation: fadeIn 0.3s ease; }
.form-step.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.step-title { font-family: 'Recoleta', serif; font-size: 1.1rem; font-weight: 700; color: #121212; margin-bottom: 1rem; }

/* Form inputs */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; color: #444; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 0.8rem 1rem; border: 1.5px solid #e0e0e0; border-radius: 12px; font-size: 0.95rem; font-family: inherit; transition: border-color 0.2s, box-shadow 0.2s; background: #fff; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: #FF8F8F; outline: none; box-shadow: 0 0 0 3px rgba(255,143,143,0.1); }

/* Upload */
.upload-area { border: 2px dashed #ddd; border-radius: 16px; padding: 2rem; text-align: center; cursor: pointer; transition: all 0.2s; background: #fafafa; }
.upload-area:hover { border-color: #FF8F8F; background: #fff5f5; }
.upload-area.has-image { border-style: solid; border-color: #FF8F8F; }
.upload-area img { max-width: 100%; max-height: 280px; border-radius: 10px; margin-top: 0.5rem; }

/* Style grid */
.style-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-bottom: 1.5rem; }
.style-option { border: 1.5px solid #e8e8e8; border-radius: 12px; padding: 0.75rem; text-align: center; cursor: pointer; transition: all 0.2s; background: #fff; }
.style-option:hover { border-color: #FF8F8F; }
.style-option.selected { border-color: #FF8F8F; background: #fff5f5; box-shadow: 0 0 0 3px rgba(255,143,143,0.12); }
.style-option .style-name { font-size: 0.8rem; font-weight: 500; margin-top: 0.25rem; }
.style-option .style-emoji { font-size: 1.5rem; }

/* Buttons */
.btn { display: block; width: 100%; padding: 0.9rem; border: none; border-radius: 12px; font-size: 1rem; font-weight: 700; cursor: pointer; transition: all 0.2s; font-family: inherit; }
.btn-primary { background: #FF8F8F; color: #fff; box-shadow: 0 2px 8px rgba(255,143,143,0.25); letter-spacing: 0.3px; }
.btn-primary:hover { background: #ff7a7a; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,143,143,0.35); }
.btn-primary:disabled { background: #ddd; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-back { background: transparent; color: #888; border: 1px solid #e0e0e0; margin-top: 0.75rem; border-radius: 12px; }

/* Consent */
.consent-group { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.75rem; }
.consent-group input[type="checkbox"] { margin-top: 3px; width: 18px; height: 18px; accent-color: #FF8F8F; }
.consent-group label { font-size: 0.8rem; color: #666; line-height: 1.4; cursor: pointer; }

/* Loading */
.loading-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); z-index: 100; justify-content: center; align-items: center; flex-direction: column; color: #fff; }
.loading-overlay.active { display: flex; }
.loading-spinner { width: 44px; height: 44px; border: 3px solid rgba(255,255,255,0.2); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; margin-bottom: 1rem; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Success (legacy, kept for fallback) */
.success-page { display: none; text-align: center; padding: 3rem 1rem; }
.success-page.active { display: block; }
.success-page h2 { font-family: 'Recoleta', serif; font-size: 1.5rem; margin-bottom: 0.75rem; }
.success-page p { color: #666; line-height: 1.6; }

/* Format selector (storybook) */
.format-grid { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.5rem; }
.format-option { display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 1rem; border: 1.5px solid #e8e8e8; border-radius: 12px; cursor: pointer; transition: all 0.2s; }
.format-option:hover { border-color: #FF8F8F; }
.format-option.selected, .format-option:has(input:checked) { border-color: #FF8F8F; background: #fff5f5; }
.format-option input[type="radio"] { accent-color: #FF8F8F; }
.format-option .format-name { font-weight: 600; font-size: 0.9rem; }
.format-option .format-price { font-size: 0.85rem; color: #888; }
