.templates-container{max-width:1400px;margin:0 auto;padding:24px}.templates-header{margin-bottom:32px;display:flex;justify-content:space-between;align-items:center}.templates-header h1{font-size:28px;font-weight:600;color:#1a1a1a;margin:0 0 4px}.templates-header p{font-size:14px;color:#666;margin:0}.templates-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:24px;margin-top:24px}.template-card{background:#fff;border-radius:16px;border:1px solid #e5e7eb;overflow:hidden;transition:all .3s ease;cursor:pointer;position:relative}.template-card:hover{transform:translateY(-4px);box-shadow:0 12px 24px -12px #00000026;border-color:#06f}.template-card-preview{height:160px;background:linear-gradient(135deg,#667eea,#764ba2);position:relative;overflow:hidden}.template-card-preview img{width:100%;height:100%;object-fit:cover}.template-card-preview-placeholder{display:flex;align-items:center;justify-content:center;height:100%;background:linear-gradient(135deg,#f5f7fa,#e4e8f0);color:#9ca3af;font-size:48px}.template-card-content{padding:20px}.template-card-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:12px}.template-card-title{font-size:18px;font-weight:600;color:#1f2937;margin:0;flex:1}.template-card-badge{background:#eff6ff;color:#06f;padding:4px 10px;border-radius:20px;font-size:12px;font-weight:500}.template-card-type{font-size:13px;color:#6b7280;margin-bottom:12px;display:flex;align-items:center;gap:6px}.template-card-stats{display:flex;gap:16px;margin:16px 0;padding-top:12px;border-top:1px solid #f0f0f0}.template-stat{display:flex;align-items:center;gap:6px;font-size:13px;color:#6b7280}.template-card-actions{display:flex;gap:12px;margin-top:16px;padding-top:12px;border-top:1px solid #f0f0f0}.template-btn{padding:8px 16px;border-radius:8px;font-size:13px;font-weight:500;cursor:pointer;transition:all .2s;border:none;flex:1}.template-btn-primary{background:#06f;color:#fff}.template-btn-primary:hover{background:#0052cc}.template-btn-secondary{background:#f3f4f6;color:#374151;border:1px solid #e5e7eb}.template-btn-secondary:hover{background:#e5e7eb}.template-btn-danger{background:#fee2e2;color:#dc2626}.template-btn-danger:hover{background:#fecaca}.empty-state{text-align:center;padding:80px 20px;background:#f9fafb;border-radius:24px;border:2px dashed #e5e7eb}.empty-state-icon{font-size:64px;margin-bottom:20px}.empty-state-title{font-size:20px;font-weight:600;color:#1f2937;margin-bottom:8px}.empty-state-text{color:#6b7280;margin-bottom:24px}.template-form-page{max-width:1400px;margin:0 auto;padding:24px}.template-form-header{margin-bottom:32px}.template-form-header h1{font-size:28px;font-weight:600;color:#1f2937;margin:0 0 8px}.template-form-header p{font-size:14px;color:#6b7280;margin:0}.template-two-column{display:grid;grid-template-columns:1fr 400px;gap:32px;align-items:start}.template-builder-left{background:#fff;border-radius:16px;border:1px solid #e5e7eb;overflow:hidden}.template-section{padding:24px;border-bottom:1px solid #e5e7eb}.template-section:last-child{border-bottom:none}.template-section-title{font-size:16px;font-weight:600;color:#1f2937;margin:0 0 16px;display:flex;align-items:center;gap:8px}.template-input{width:100%;padding:12px 16px;border:1px solid #e5e7eb;border-radius:10px;font-size:14px;transition:all .2s}.template-input:focus{outline:none;border-color:#06f;box-shadow:0 0 0 3px #0066ff1a}.options-list{margin-top:16px}.option-item{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border:1px solid #e5e7eb;border-radius:10px;margin-bottom:10px;cursor:pointer;transition:all .2s;background:#fff}.option-item:hover{border-color:#06f;background:#f8faff}.option-item.selected{border:2px solid #0066ff;background:#f8faff}.option-info{flex:1}.option-label{font-weight:500;color:#1f2937;margin-bottom:4px}.option-type{font-size:11px;color:#9ca3af;text-transform:uppercase}.option-required{font-size:11px;color:#ef4444;margin-left:8px}.option-actions{display:flex;gap:8px}.add-option-btn{width:100%;padding:12px;background:#f9fafb;border:1px dashed #d1d5db;border-radius:10px;color:#06f;font-size:14px;font-weight:500;cursor:pointer;transition:all .2s;margin-top:12px}.add-option-btn:hover{background:#eff6ff;border-color:#06f}.option-editor{padding:20px;background:#f9fafb;border-radius:12px;margin-top:20px}.option-editor-title{font-size:14px;font-weight:600;margin-bottom:16px;color:#374151}.editor-field{margin-bottom:16px}.editor-field label{display:block;font-size:13px;font-weight:500;color:#4b5563;margin-bottom:6px}.editor-input{width:100%;padding:10px 12px;border:1px solid #e5e7eb;border-radius:8px;font-size:14px}.editor-checkbox{display:flex;align-items:center;gap:10px;margin-top:12px}.template-preview-right{position:sticky;top:24px}.product-selector-card{background:#fff;border-radius:16px;border:1px solid #e5e7eb;overflow:hidden;margin-bottom:24px}.product-selector-header{padding:20px;background:#f9fafb;border-bottom:1px solid #e5e7eb}.product-selector-header h3{margin:0;font-size:16px;font-weight:600}.product-search{padding:16px;border-bottom:1px solid #e5e7eb}.product-list{max-height:300px;overflow-y:auto;padding:8px}.product-item{display:flex;align-items:center;gap:12px;padding:12px;border-radius:10px;cursor:pointer;transition:all .2s;margin-bottom:4px}.product-item:hover{background:#f9fafb}.product-item.selected{background:#eff6ff;border:1px solid #0066ff}.product-item-image{width:48px;height:48px;border-radius:8px;object-fit:cover;background:#f3f4f6}.product-item-info{flex:1}.product-item-title{font-weight:500;font-size:14px;color:#1f2937;margin-bottom:4px}.product-item-price{font-size:12px;color:#6b7280}.product-preview-card{background:#fff;border-radius:16px;border:1px solid #e5e7eb;overflow:hidden}.preview-header{padding:20px;background:#f9fafb;border-bottom:1px solid #e5e7eb;display:flex;justify-content:space-between;align-items:center}.preview-header h3{margin:0;font-size:16px;font-weight:600}.preview-content{padding:20px}.selected-product-image{width:100%;height:200px;object-fit:cover;border-radius:12px;margin-bottom:16px}.selected-product-title{font-size:18px;font-weight:600;margin-bottom:8px}.selected-product-price{font-size:24px;font-weight:600;color:#06f;margin-bottom:16px}.template-preview-options{margin-top:20px;padding-top:20px;border-top:1px solid #e5e7eb}.template-preview-option{margin-bottom:20px}.template-preview-option label{display:block;font-size:14px;font-weight:500;margin-bottom:8px;color:#374151}.template-preview-option input,.template-preview-option select{width:100%;padding:10px 12px;border:1px solid #e5e7eb;border-radius:8px;font-size:14px}.form-actions{display:flex;gap:16px;justify-content:flex-end;margin-top:32px;padding-top:24px;border-top:1px solid #e5e7eb}.btn{padding:10px 24px;border-radius:10px;font-size:14px;font-weight:500;cursor:pointer;transition:all .2s;border:none}.btn-primary{background:#06f;color:#fff}.btn-primary:hover{background:#0052cc;transform:translateY(-1px)}.btn-secondary{background:#f3f4f6;color:#374151;border:1px solid #e5e7eb}.btn-secondary:hover{background:#e5e7eb}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:1000}.modal{background:#fff;border-radius:20px;width:500px;max-width:90%;max-height:80vh;overflow:auto}.modal-header{padding:20px;border-bottom:1px solid #e5e7eb;display:flex;justify-content:space-between;align-items:center}.modal-header h3{margin:0;font-size:18px}.modal-close{background:none;border:none;font-size:24px;cursor:pointer;color:#9ca3af}.modal-body{padding:20px}.option-type-card{padding:16px;border:1px solid #e5e7eb;border-radius:12px;margin-bottom:12px;cursor:pointer;transition:all .2s}.option-type-card:hover{border-color:#06f;background:#f8faff}.option-type-name{font-weight:600;margin-bottom:4px}.option-type-desc{font-size:12px;color:#6b7280}.modal-footer{padding:20px;border-top:1px solid #e5e7eb;display:flex;justify-content:flex-end}@media(max-width:1024px){.template-two-column{grid-template-columns:1fr}.template-preview-right{position:static}}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.loading{animation:pulse 1.5s ease-in-out infinite}.draggable-text{-webkit-user-select:none;user-select:none;transition:all .2s ease}.draggable-text:hover{transform:scale(1.02);box-shadow:0 2px 8px #00000026}.product-item{cursor:pointer;transition:all .2s}.product-item.selected{background:#eff6ff;border-left:3px solid #0066ff}
