AssenavGnuj commited on
Commit
ea33485
·
verified ·
1 Parent(s): d1e0ee6

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +1326 -19
  3. prompts.txt +0 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Cachimbos Space
3
- emoji: 😻
4
- colorFrom: indigo
5
- colorTo: gray
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: cachimbos-space
3
+ emoji: 🐳
4
+ colorFrom: purple
5
+ colorTo: yellow
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,1326 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="pt-BR">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Cachimbos & Tabacos</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ .dropdown:hover .dropdown-menu {
11
+ display: block;
12
+ }
13
+ .image-container {
14
+ width: 1080px;
15
+ height: 1080px;
16
+ overflow: hidden;
17
+ display: flex;
18
+ justify-content: center;
19
+ align-items: center;
20
+ }
21
+ .image-container img {
22
+ max-width: 100%;
23
+ max-height: 100%;
24
+ object-fit: contain;
25
+ }
26
+ .pipe-gallery {
27
+ display: grid;
28
+ grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
29
+ gap: 20px;
30
+ }
31
+ .pipe-card {
32
+ transition: transform 0.3s ease;
33
+ }
34
+ .pipe-card:hover {
35
+ transform: translateY(-5px);
36
+ }
37
+ .comment-section {
38
+ max-height: 400px;
39
+ overflow-y: auto;
40
+ }
41
+ .admin-panel {
42
+ transition: all 0.3s ease;
43
+ transform: translateX(-100%);
44
+ }
45
+ .admin-panel.open {
46
+ transform: translateX(0);
47
+ }
48
+ /* Custom scrollbar */
49
+ .comment-section::-webkit-scrollbar {
50
+ width: 8px;
51
+ }
52
+ .comment-section::-webkit-scrollbar-track {
53
+ background: #f1f1f1;
54
+ }
55
+ .comment-section::-webkit-scrollbar-thumb {
56
+ background: #888;
57
+ border-radius: 4px;
58
+ }
59
+ .comment-section::-webkit-scrollbar-thumb:hover {
60
+ background: #555;
61
+ }
62
+ </style>
63
+ </head>
64
+ <body class="bg-gray-100 font-sans">
65
+ <!-- Admin Panel Toggle -->
66
+ <button id="admin-toggle" class="fixed top-4 left-4 bg-amber-800 text-white p-3 rounded-full shadow-lg z-50">
67
+ <i class="fas fa-user-cog"></i>
68
+ </button>
69
+
70
+ <!-- Admin Panel -->
71
+ <div id="admin-panel" class="admin-panel fixed top-0 left-0 h-full w-80 bg-gray-800 text-white shadow-xl z-40 p-4 overflow-y-auto">
72
+ <div class="flex justify-between items-center mb-6 border-b border-gray-700 pb-4">
73
+ <h2 class="text-xl font-bold">Painel de Administração</h2>
74
+ <button id="close-admin" class="text-gray-400 hover:text-white">
75
+ <i class="fas fa-times"></i>
76
+ </button>
77
+ </div>
78
+
79
+ <div class="space-y-4">
80
+ <div class="admin-section">
81
+ <h3 class="font-semibold mb-2 flex items-center justify-between cursor-pointer" onclick="toggleAdminSection(this)">
82
+ <span>Cachimbos</span>
83
+ <i class="fas fa-chevron-down"></i>
84
+ </h3>
85
+ <div class="admin-content hidden pl-4 space-y-2">
86
+ <button class="admin-btn w-full text-left" onclick="showAdminContent('add-pipe')">
87
+ <i class="fas fa-plus mr-2"></i> Adicionar Cachimbo
88
+ </button>
89
+ <button class="admin-btn w-full text-left" onclick="showAdminContent('manage-pipes')">
90
+ <i class="fas fa-edit mr-2"></i> Gerenciar Cachimbos
91
+ </button>
92
+ <button class="admin-btn w-full text-left" onclick="showAdminContent('pipe-categories')">
93
+ <i class="fas fa-tags mr-2"></i> Categorias
94
+ </button>
95
+ </div>
96
+ </div>
97
+
98
+ <div class="admin-section">
99
+ <h3 class="font-semibold mb-2 flex items-center justify-between cursor-pointer" onclick="toggleAdminSection(this)">
100
+ <span>Acessórios</span>
101
+ <i class="fas fa-chevron-down"></i>
102
+ </h3>
103
+ <div class="admin-content hidden pl-4 space-y-2">
104
+ <button class="admin-btn w-full text-left" onclick="showAdminContent('add-accessory')">
105
+ <i class="fas fa-plus mr-2"></i> Adicionar Acessório
106
+ </button>
107
+ <button class="admin-btn w-full text-left" onclick="showAdminContent('manage-accessories')">
108
+ <i class="fas fa-edit mr-2"></i> Gerenciar Acessórios
109
+ </button>
110
+ </div>
111
+ </div>
112
+
113
+ <div class="admin-section">
114
+ <h3 class="font-semibold mb-2 flex items-center justify-between cursor-pointer" onclick="toggleAdminSection(this)">
115
+ <span>Materiais para Restauração</span>
116
+ <i class="fas fa-chevron-down"></i>
117
+ </h3>
118
+ <div class="admin-content hidden pl-4 space-y-2">
119
+ <button class="admin-btn w-full text-left" onclick="showAdminContent('add-restoration')">
120
+ <i class="fas fa-plus mr-2"></i> Adicionar Material
121
+ </button>
122
+ <button class="admin-btn w-full text-left" onclick="showAdminContent('manage-restorations')">
123
+ <i class="fas fa-edit mr-2"></i> Gerenciar Materiais
124
+ </button>
125
+ </div>
126
+ </div>
127
+
128
+ <div class="admin-section">
129
+ <h3 class="font-semibold mb-2 flex items-center justify-between cursor-pointer" onclick="toggleAdminSection(this)">
130
+ <span>Tabacos</span>
131
+ <i class="fas fa-chevron-down"></i>
132
+ </h3>
133
+ <div class="admin-content hidden pl-4 space-y-2">
134
+ <button class="admin-btn w-full text-left" onclick="showAdminContent('add-tobacco')">
135
+ <i class="fas fa-plus mr-2"></i> Adicionar Tabaco
136
+ </button>
137
+ <button class="admin-btn w-full text-left" onclick="showAdminContent('manage-tobaccos')">
138
+ <i class="fas fa-edit mr-2"></i> Gerenciar Tabacos
139
+ </button>
140
+ <button class="admin-btn w-full text-left" onclick="showAdminContent('tobacco-categories')">
141
+ <i class="fas fa-tags mr-2"></i> Categorias
142
+ </button>
143
+ </div>
144
+ </div>
145
+
146
+ <div class="admin-section">
147
+ <h3 class="font-semibold mb-2 flex items-center justify-between cursor-pointer" onclick="toggleAdminSection(this)">
148
+ <span>Comentários</span>
149
+ <i class="fas fa-chevron-down"></i>
150
+ </h3>
151
+ <div class="admin-content hidden pl-4 space-y-2">
152
+ <button class="admin-btn w-full text-left" onclick="showAdminContent('manage-comments')">
153
+ <i class="fas fa-comments mr-2"></i> Gerenciar Comentários
154
+ </button>
155
+ </div>
156
+ </div>
157
+
158
+ <div class="admin-section">
159
+ <h3 class="font-semibold mb-2 flex items-center justify-between cursor-pointer" onclick="toggleAdminSection(this)">
160
+ <span>Configurações</span>
161
+ <i class="fas fa-chevron-down"></i>
162
+ </h3>
163
+ <div class="admin-content hidden pl-4 space-y-2">
164
+ <button class="admin-btn w-full text-left" onclick="showAdminContent('site-settings')">
165
+ <i class="fas fa-cog mr-2"></i> Configurações do Site
166
+ </button>
167
+ <button class="admin-btn w-full text-left" onclick="showAdminContent('user-management')">
168
+ <i class="fas fa-users mr-2"></i> Gerenciar Usuários
169
+ </button>
170
+ </div>
171
+ </div>
172
+ </div>
173
+
174
+ <!-- Admin Content Area -->
175
+ <div id="admin-content-area" class="mt-8 hidden">
176
+ <!-- Content will be loaded here dynamically -->
177
+ </div>
178
+ </div>
179
+
180
+ <!-- Header -->
181
+ <header class="bg-amber-900 text-white shadow-lg">
182
+ <div class="container mx-auto px-4 py-6">
183
+ <h1 class="text-4xl font-bold text-center mb-6">Cachimbos & Tabacos</h1>
184
+
185
+ <!-- Navigation -->
186
+ <nav class="relative">
187
+ <ul class="flex justify-center space-x-8">
188
+ <li>
189
+ <a href="#home" class="hover:text-amber-200 font-medium">Home</a>
190
+ </li>
191
+
192
+ <!-- Cachimbos Dropdown -->
193
+ <li class="dropdown relative">
194
+ <button class="hover:text-amber-200 font-medium flex items-center">
195
+ Cachimbos <i class="fas fa-chevron-down ml-1 text-xs"></i>
196
+ </button>
197
+ <ul class="dropdown-menu absolute hidden bg-white text-gray-800 shadow-lg rounded mt-2 w-48 z-10">
198
+ <li><a href="#dinamarqueses" class="block px-4 py-2 hover:bg-amber-100">Dinamarqueses</a></li>
199
+ <li><a href="#franceses" class="block px-4 py-2 hover:bg-amber-100">Franceses</a></li>
200
+ <li><a href="#holandeses" class="block px-4 py-2 hover:bg-amber-100">Holandeses</a></li>
201
+ <li><a href="#ingleses" class="block px-4 py-2 hover:bg-amber-100">Ingleses</a></li>
202
+ <li><a href="#irlandeses" class="block px-4 py-2 hover:bg-amber-100">Irlandeses</a></li>
203
+ <li><a href="#italianos" class="block px-4 py-2 hover:bg-amber-100">Italianos</a></li>
204
+ <li><a href="#norte-americanos" class="block px-4 py-2 hover:bg-amber-100">Norte-americanos</a></li>
205
+ <li><a href="#outros-paises" class="block px-4 py-2 hover:bg-amber-100">Outros Países</a></li>
206
+ </ul>
207
+ </li>
208
+
209
+ <!-- Acessórios Dropdown -->
210
+ <li class="dropdown relative">
211
+ <button class="hover:text-amber-200 font-medium flex items-center">
212
+ Acessórios <i class="fas fa-chevron-down ml-1 text-xs"></i>
213
+ </button>
214
+ <ul class="dropdown-menu absolute hidden bg-white text-gray-800 shadow-lg rounded mt-2 w-48 z-10">
215
+ <li><a href="#tampers" class="block px-4 py-2 hover:bg-amber-100">Tampers</a></li>
216
+ <li><a href="#diversos-acessorios" class="block px-4 py-2 hover:bg-amber-100">Diversos</a></li>
217
+ </ul>
218
+ </li>
219
+
220
+ <!-- Materiais para Restauração Dropdown -->
221
+ <li class="dropdown relative">
222
+ <button class="hover:text-amber-200 font-medium flex items-center">
223
+ Materiais para Restauração <i class="fas fa-chevron-down ml-1 text-xs"></i>
224
+ </button>
225
+ <ul class="dropdown-menu absolute hidden bg-white text-gray-800 shadow-lg rounded mt-2 w-48 z-10">
226
+ <li><a href="#polimento" class="block px-4 py-2 hover:bg-amber-100">Polimento</a></li>
227
+ <li><a href="#diversos-materiais" class="block px-4 py-2 hover:bg-amber-100">Diversos</a></li>
228
+ </ul>
229
+ </li>
230
+
231
+ <!-- Tabacos Dropdown -->
232
+ <li class="dropdown relative">
233
+ <button class="hover:text-amber-200 font-medium flex items-center">
234
+ Tabacos <i class="fas fa-chevron-down ml-1 text-xs"></i>
235
+ </button>
236
+ <ul class="dropdown-menu absolute hidden bg-white text-gray-800 shadow-lg rounded mt-2 w-48 z-10">
237
+ <li><a href="#aromaticos" class="block px-4 py-2 hover:bg-amber-100">Aromáticos</a></li>
238
+ <li><a href="#misturas-inglesas" class="block px-4 py-2 hover:bg-amber-100">Misturas Inglesas</a></li>
239
+ <li><a href="#orientais" class="block px-4 py-2 hover:bg-amber-100">Orientais</a></li>
240
+ <li><a href="#diversos-tabacos" class="block px-4 py-2 hover:bg-amber-100">Diversos</a></li>
241
+ </ul>
242
+ </li>
243
+ </ul>
244
+ </nav>
245
+ </div>
246
+ </header>
247
+
248
+ <!-- Main Content -->
249
+ <main class="container mx-auto px-4 py-8">
250
+ <!-- Home Section -->
251
+ <section id="home" class="mb-12">
252
+ <div class="bg-white rounded-lg shadow-md p-8">
253
+ <h2 class="text-3xl font-bold text-amber-900 mb-6">Bem-vindo à Minha Coleção</h2>
254
+ <p class="text-gray-700 mb-4">
255
+ Esta é a minha coleção pessoal de cachimbos e tabacos, acumulada ao longo de muitos anos de paixão por essa arte. Aqui você encontrará peças de diversas origens, estilos e períodos históricos.
256
+ </p>
257
+ <p class="text-gray-700 mb-4">
258
+ Cada cachimbo tem sua própria história e características únicas. Explore a coleção navegando pelas categorias acima e descubra as maravilhas do mundo dos cachimbos.
259
+ </p>
260
+ <p class="text-gray-700">
261
+ Se você também é um entusiasta, sinta-se à vontade para deixar seus comentários e compartilhar suas experiências!
262
+ </p>
263
+ </div>
264
+ </section>
265
+
266
+ <!-- Pipe Collection Section (Dynamically loaded based on selection) -->
267
+ <section id="pipe-collection" class="hidden">
268
+ <div class="flex justify-between items-center mb-6">
269
+ <h2 id="collection-title" class="text-3xl font-bold text-amber-900"></h2>
270
+ <div class="flex space-x-4">
271
+ <button id="add-pipe-btn" class="bg-amber-700 hover:bg-amber-800 text-white px-4 py-2 rounded-lg flex items-center">
272
+ <i class="fas fa-plus mr-2"></i> Novo Cachimbo
273
+ </button>
274
+ <div class="relative">
275
+ <input type="text" id="search-pipes" placeholder="Buscar cachimbos..." class="border border-gray-300 rounded-lg px-4 py-2 pl-10 focus:outline-none focus:ring-2 focus:ring-amber-500">
276
+ <i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
277
+ </div>
278
+ </div>
279
+ </div>
280
+
281
+ <!-- Pipe Gallery -->
282
+ <div id="pipe-gallery" class="pipe-gallery">
283
+ <!-- Pipes will be loaded here dynamically -->
284
+ </div>
285
+ </section>
286
+
287
+ <!-- Pipe Detail Modal -->
288
+ <div id="pipe-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
289
+ <div class="bg-white rounded-lg shadow-xl w-11/12 max-w-6xl max-h-screen overflow-y-auto">
290
+ <div class="p-6">
291
+ <div class="flex justify-between items-start mb-6">
292
+ <h3 id="pipe-modal-title" class="text-2xl font-bold text-amber-900"></h3>
293
+ <button id="close-modal" class="text-gray-500 hover:text-gray-700">
294
+ <i class="fas fa-times"></i>
295
+ </button>
296
+ </div>
297
+
298
+ <div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
299
+ <!-- Pipe Images -->
300
+ <div>
301
+ <div class="image-container bg-gray-200 rounded-lg mb-4">
302
+ <img id="main-pipe-image" src="" alt="Cachimbo" class="w-full h-auto">
303
+ </div>
304
+ <div class="grid grid-cols-5 gap-2">
305
+ <div class="image-thumbnail cursor-pointer border-2 border-transparent hover:border-amber-500">
306
+ <img src="" alt="Thumbnail 1" class="w-full h-20 object-cover">
307
+ </div>
308
+ <div class="image-thumbnail cursor-pointer border-2 border-transparent hover:border-amber-500">
309
+ <img src="" alt="Thumbnail 2" class="w-full h-20 object-cover">
310
+ </div>
311
+ <div class="image-thumbnail cursor-pointer border-2 border-transparent hover:border-amber-500">
312
+ <img src="" alt="Thumbnail 3" class="w-full h-20 object-cover">
313
+ </div>
314
+ <div class="image-thumbnail cursor-pointer border-2 border-transparent hover:border-amber-500">
315
+ <img src="" alt="Thumbnail 4" class="w-full h-20 object-cover">
316
+ </div>
317
+ <div class="image-thumbnail cursor-pointer border-2 border-transparent hover:border-amber-500">
318
+ <img src="" alt="Thumbnail 5" class="w-full h-20 object-cover">
319
+ </div>
320
+ </div>
321
+ </div>
322
+
323
+ <!-- Pipe Details -->
324
+ <div>
325
+ <div class="mb-6">
326
+ <h4 class="text-lg font-semibold text-amber-800 mb-2">Detalhes do Cachimbo</h4>
327
+ <div class="space-y-4">
328
+ <div>
329
+ <label class="block text-sm font-medium text-gray-700">Marca</label>
330
+ <p id="pipe-brand" class="mt-1 text-gray-900"></p>
331
+ </div>
332
+ <div>
333
+ <label class="block text-sm font-medium text-gray-700">Nome</label>
334
+ <p id="pipe-name" class="mt-1 text-gray-900"></p>
335
+ </div>
336
+ <div>
337
+ <label class="block text-sm font-medium text-gray-700">Stem (Piteira)</label>
338
+ <p id="pipe-stem" class="mt-1 text-gray-900"></p>
339
+ </div>
340
+ <div>
341
+ <label class="block text-sm font-medium text-gray-700">Filter (Filtro)</label>
342
+ <p id="pipe-filter" class="mt-1 text-gray-900"></p>
343
+ </div>
344
+ <div>
345
+ <label class="block text-sm font-medium text-gray-700">Shape (Forma)</label>
346
+ <p id="pipe-shape" class="mt-1 text-gray-900"></p>
347
+ </div>
348
+ <div>
349
+ <label class="block text-sm font-medium text-gray-700">Texture (Textura)</label>
350
+ <p id="pipe-texture" class="mt-1 text-gray-900"></p>
351
+ </div>
352
+ <div>
353
+ <label class="block text-sm font-medium text-gray-700">Condition (Condição)</label>
354
+ <p id="pipe-condition" class="mt-1 text-gray-900"></p>
355
+ </div>
356
+ <div>
357
+ <label class="block text-sm font-medium text-gray-700">Level of Restoration</label>
358
+ <p id="pipe-restoration" class="mt-1 text-gray-900"></p>
359
+ </div>
360
+ <div>
361
+ <label class="block text-sm font-medium text-gray-700">Country (País)</label>
362
+ <p id="pipe-country" class="mt-1 text-gray-900"></p>
363
+ </div>
364
+ <div>
365
+ <label class="block text-sm font-medium text-gray-700">Observações</label>
366
+ <p id="pipe-notes" class="mt-1 text-gray-900"></p>
367
+ </div>
368
+ </div>
369
+ </div>
370
+
371
+ <div class="flex space-x-4">
372
+ <button id="edit-pipe-btn" class="bg-amber-600 hover:bg-amber-700 text-white px-4 py-2 rounded-lg flex items-center">
373
+ <i class="fas fa-edit mr-2"></i> Editar
374
+ </button>
375
+ <button id="delete-pipe-btn" class="bg-red-600 hover:bg-red-700 text-white px-4 py-2 rounded-lg flex items-center">
376
+ <i class="fas fa-trash mr-2"></i> Excluir
377
+ </button>
378
+ </div>
379
+ </div>
380
+ </div>
381
+
382
+ <!-- Comments Section -->
383
+ <div class="mt-8 border-t pt-6">
384
+ <h4 class="text-lg font-semibold text-amber-800 mb-4">Comentários</h4>
385
+
386
+ <div id="comments-container" class="comment-section mb-6 space-y-4">
387
+ <!-- Comments will be loaded here -->
388
+ </div>
389
+
390
+ <div class="bg-gray-50 p-4 rounded-lg">
391
+ <h5 class="font-medium text-gray-800 mb-3">Deixe seu comentário</h5>
392
+ <form id="comment-form" class="space-y-3">
393
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
394
+ <div>
395
+ <label for="comment-name" class="block text-sm font-medium text-gray-700">Nome *</label>
396
+ <input type="text" id="comment-name" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-amber-500 focus:border-amber-500">
397
+ </div>
398
+ <div>
399
+ <label for="comment-email" class="block text-sm font-medium text-gray-700">E-mail *</label>
400
+ <input type="email" id="comment-email" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-amber-500 focus:border-amber-500">
401
+ </div>
402
+ </div>
403
+ <div>
404
+ <label for="comment-phone" class="block text-sm font-medium text-gray-700">Telefone (opcional)</label>
405
+ <input type="tel" id="comment-phone" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-amber-500 focus:border-amber-500">
406
+ </div>
407
+ <div>
408
+ <label for="comment-text" class="block text-sm font-medium text-gray-700">Comentário *</label>
409
+ <textarea id="comment-text" rows="3" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-amber-500 focus:border-amber-500"></textarea>
410
+ </div>
411
+ <div class="flex justify-end">
412
+ <button type="submit" class="bg-amber-700 hover:bg-amber-800 text-white px-4 py-2 rounded-lg">
413
+ Enviar Comentário
414
+ </button>
415
+ </div>
416
+ </form>
417
+ </div>
418
+ </div>
419
+ </div>
420
+ </div>
421
+ </div>
422
+
423
+ <!-- Add/Edit Pipe Form Modal -->
424
+ <div id="pipe-form-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
425
+ <div class="bg-white rounded-lg shadow-xl w-11/12 max-w-4xl max-h-screen overflow-y-auto">
426
+ <div class="p-6">
427
+ <div class="flex justify-between items-start mb-6">
428
+ <h3 id="pipe-form-title" class="text-2xl font-bold text-amber-900">Adicionar Novo Cachimbo</h3>
429
+ <button id="close-form-modal" class="text-gray-500 hover:text-gray-700">
430
+ <i class="fas fa-times"></i>
431
+ </button>
432
+ </div>
433
+
434
+ <form id="pipe-form" class="space-y-4">
435
+ <input type="hidden" id="pipe-id">
436
+
437
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
438
+ <!-- Left Column -->
439
+ <div class="space-y-4">
440
+ <div>
441
+ <label for="pipe-brand-input" class="block text-sm font-medium text-gray-700">Marca *</label>
442
+ <div class="mt-1 flex">
443
+ <input type="text" id="pipe-brand-input" required class="flex-1 border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-amber-500 focus:border-amber-500">
444
+ <button type="button" id="add-brand-btn" class="ml-2 bg-gray-200 hover:bg-gray-300 text-gray-800 px-3 py-2 rounded-md">
445
+ <i class="fas fa-plus"></i>
446
+ </button>
447
+ </div>
448
+ </div>
449
+
450
+ <div>
451
+ <label for="pipe-name-input" class="block text-sm font-medium text-gray-700">Nome *</label>
452
+ <input type="text" id="pipe-name-input" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-amber-500 focus:border-amber-500">
453
+ </div>
454
+
455
+ <div>
456
+ <label for="pipe-stem-input" class="block text-sm font-medium text-gray-700">Stem (Piteira) *</label>
457
+ <select id="pipe-stem-input" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-amber-500 focus:border-amber-500">
458
+ <option value="">Selecione...</option>
459
+ <option value="acrylic">Acrylic</option>
460
+ <option value="vulcanite">Vulcanite</option>
461
+ <option value="cumberland">Cumberland</option>
462
+ </select>
463
+ </div>
464
+
465
+ <div>
466
+ <label for="pipe-filter-input" class="block text-sm font-medium text-gray-700">Filter (Filtro) *</label>
467
+ <select id="pipe-filter-input" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-amber-500 focus:border-amber-500">
468
+ <option value="">Selecione...</option>
469
+ <option value="no">No</option>
470
+ <option value="6mm">6mm</option>
471
+ <option value="9mm">9mm</option>
472
+ <option value="balsa">Balsa</option>
473
+ </select>
474
+ </div>
475
+
476
+ <div>
477
+ <label for="pipe-shape-input" class="block text-sm font-medium text-gray-700">Shape (Forma)</label>
478
+ <input type="text" id="pipe-shape-input" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-amber-500 focus:border-amber-500">
479
+ </div>
480
+ </div>
481
+
482
+ <!-- Right Column -->
483
+ <div class="space-y-4">
484
+ <div>
485
+ <label for="pipe-texture-input" class="block text-sm font-medium text-gray-700">Texture (Textura) *</label>
486
+ <select id="pipe-texture-input" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-amber-500 focus:border-amber-500">
487
+ <option value="">Selecione...</option>
488
+ <option value="smooth">Smooth</option>
489
+ <option value="rusticated">Rusticated</option>
490
+ <option value="sandblasted">Sandblasted</option>
491
+ <option value="corn cob">Corn Cob</option>
492
+ </select>
493
+ </div>
494
+
495
+ <div>
496
+ <label for="pipe-condition-input" class="block text-sm font-medium text-gray-700">Condition (Condição) *</label>
497
+ <select id="pipe-condition-input" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-amber-500 focus:border-amber-500">
498
+ <option value="">Selecione...</option>
499
+ <option value="estate">Estate</option>
500
+ <option value="new">New</option>
501
+ </select>
502
+ </div>
503
+
504
+ <div>
505
+ <label for="pipe-restoration-input" class="block text-sm font-medium text-gray-700">Level of Restoration *</label>
506
+ <select id="pipe-restoration-input" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-amber-500 focus:border-amber-500">
507
+ <option value="">Selecione...</option>
508
+ <option value="Level 1">Level 1</option>
509
+ <option value="Level 2">Level 2</option>
510
+ <option value="Level 3">Level 3</option>
511
+ <option value="Level 4">Level 4</option>
512
+ <option value="Level 5">Level 5</option>
513
+ </select>
514
+ </div>
515
+
516
+ <div>
517
+ <label for="pipe-country-input" class="block text-sm font-medium text-gray-700">Country (País) *</label>
518
+ <div class="mt-1 flex">
519
+ <input type="text" id="pipe-country-input" required class="flex-1 border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-amber-500 focus:border-amber-500">
520
+ <button type="button" id="add-country-btn" class="ml-2 bg-gray-200 hover:bg-gray-300 text-gray-800 px-3 py-2 rounded-md">
521
+ <i class="fas fa-plus"></i>
522
+ </button>
523
+ </div>
524
+ </div>
525
+
526
+ <div>
527
+ <label for="pipe-notes-input" class="block text-sm font-medium text-gray-700">Observações</label>
528
+ <textarea id="pipe-notes-input" rows="3" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-amber-500 focus:border-amber-500"></textarea>
529
+ </div>
530
+ </div>
531
+ </div>
532
+
533
+ <div class="border-t pt-4">
534
+ <h4 class="text-lg font-medium text-gray-800 mb-3">Fotos do Cachimbo</h4>
535
+ <div class="grid grid-cols-5 gap-4">
536
+ <div class="image-upload-container border-2 border-dashed border-gray-300 rounded-lg h-32 flex items-center justify-center cursor-pointer">
537
+ <input type="file" class="image-upload hidden" accept="image/*">
538
+ <div class="text-center">
539
+ <i class="fas fa-camera text-gray-400 text-2xl mb-1"></i>
540
+ <p class="text-xs text-gray-500">Foto 1</p>
541
+ </div>
542
+ </div>
543
+ <div class="image-upload-container border-2 border-dashed border-gray-300 rounded-lg h-32 flex items-center justify-center cursor-pointer">
544
+ <input type="file" class="image-upload hidden" accept="image/*">
545
+ <div class="text-center">
546
+ <i class="fas fa-camera text-gray-400 text-2xl mb-1"></i>
547
+ <p class="text-xs text-gray-500">Foto 2</p>
548
+ </div>
549
+ </div>
550
+ <div class="image-upload-container border-2 border-dashed border-gray-300 rounded-lg h-32 flex items-center justify-center cursor-pointer">
551
+ <input type="file" class="image-upload hidden" accept="image/*">
552
+ <div class="text-center">
553
+ <i class="fas fa-camera text-gray-400 text-2xl mb-1"></i>
554
+ <p class="text-xs text-gray-500">Foto 3</p>
555
+ </div>
556
+ </div>
557
+ <div class="image-upload-container border-2 border-dashed border-gray-300 rounded-lg h-32 flex items-center justify-center cursor-pointer">
558
+ <input type="file" class="image-upload hidden" accept="image/*">
559
+ <div class="text-center">
560
+ <i class="fas fa-camera text-gray-400 text-2xl mb-1"></i>
561
+ <p class="text-xs text-gray-500">Foto 4</p>
562
+ </div>
563
+ </div>
564
+ <div class="image-upload-container border-2 border-dashed border-gray-300 rounded-lg h-32 flex items-center justify-center cursor-pointer">
565
+ <input type="file" class="image-upload hidden" accept="image/*">
566
+ <div class="text-center">
567
+ <i class="fas fa-camera text-gray-400 text-2xl mb-1"></i>
568
+ <p class="text-xs text-gray-500">Foto 5</p>
569
+ </div>
570
+ </div>
571
+ </div>
572
+ </div>
573
+
574
+ <div class="flex justify-end space-x-4 pt-6">
575
+ <button type="button" id="cancel-pipe-btn" class="bg-gray-200 hover:bg-gray-300 text-gray-800 px-4 py-2 rounded-lg">
576
+ Cancelar
577
+ </button>
578
+ <button type="submit" id="save-pipe-btn" class="bg-amber-700 hover:bg-amber-800 text-white px-4 py-2 rounded-lg">
579
+ Salvar Cachimbo
580
+ </button>
581
+ </div>
582
+ </form>
583
+ </div>
584
+ </div>
585
+ </div>
586
+ </main>
587
+
588
+ <!-- Footer -->
589
+ <footer class="bg-amber-900 text-white py-8">
590
+ <div class="container mx-auto px-4 text-center">
591
+ <p>&copy; 2023 Cachimbos & Tabacos. Todos os direitos reservados.</p>
592
+ <p class="mt-2 text-amber-200">Uma coleção pessoal de cachimbos e tabacos de todo o mundo.</p>
593
+ </div>
594
+ </footer>
595
+
596
+ <!-- Admin Content Templates -->
597
+ <template id="add-pipe-template">
598
+ <div class="bg-gray-700 p-4 rounded-lg">
599
+ <h4 class="text-lg font-semibold mb-4">Adicionar Novo Cachimbo</h4>
600
+ <form id="admin-pipe-form" class="space-y-4">
601
+ <div>
602
+ <label class="block text-sm font-medium mb-1">Categoria</label>
603
+ <select class="w-full bg-gray-600 border border-gray-500 rounded px-3 py-2">
604
+ <option>Dinamarqueses</option>
605
+ <option>Franceses</option>
606
+ <option>Holandeses</option>
607
+ <option>Ingleses</option>
608
+ <option>Irlandeses</option>
609
+ <option>Italianos</option>
610
+ <option>Norte-americanos</option>
611
+ <option>Outros Países</option>
612
+ </select>
613
+ </div>
614
+ <div>
615
+ <label class="block text-sm font-medium mb-1">Marca</label>
616
+ <input type="text" class="w-full bg-gray-600 border border-gray-500 rounded px-3 py-2">
617
+ </div>
618
+ <div>
619
+ <label class="block text-sm font-medium mb-1">Nome</label>
620
+ <input type="text" class="w-full bg-gray-600 border border-gray-500 rounded px-3 py-2">
621
+ </div>
622
+ <div class="grid grid-cols-2 gap-4">
623
+ <div>
624
+ <label class="block text-sm font-medium mb-1">Stem (Piteira)</label>
625
+ <select class="w-full bg-gray-600 border border-gray-500 rounded px-3 py-2">
626
+ <option>Acrylic</option>
627
+ <option>Vulcanite</option>
628
+ <option>Cumberland</option>
629
+ </select>
630
+ </div>
631
+ <div>
632
+ <label class="block text-sm font-medium mb-1">Filter (Filtro)</label>
633
+ <select class="w-full bg-gray-600 border border-gray-500 rounded px-3 py-2">
634
+ <option>No</option>
635
+ <option>6mm</option>
636
+ <option>9mm</option>
637
+ <option>Balsa</option>
638
+ </select>
639
+ </div>
640
+ </div>
641
+ <div>
642
+ <label class="block text-sm font-medium mb-1">Fotos</label>
643
+ <div class="border-2 border-dashed border-gray-500 rounded p-4 text-center">
644
+ <i class="fas fa-camera text-gray-400 text-2xl mb-2"></i>
645
+ <p class="text-sm text-gray-300">Arraste e solte fotos aqui ou clique para selecionar</p>
646
+ <input type="file" multiple class="hidden">
647
+ </div>
648
+ </div>
649
+ <div class="flex justify-end">
650
+ <button type="submit" class="bg-amber-600 hover:bg-amber-700 px-4 py-2 rounded">Salvar</button>
651
+ </div>
652
+ </form>
653
+ </div>
654
+ </template>
655
+
656
+ <template id="manage-pipes-template">
657
+ <div class="bg-gray-700 p-4 rounded-lg">
658
+ <h4 class="text-lg font-semibold mb-4">Gerenciar Cachimbos</h4>
659
+ <div class="mb-4 flex justify-between items-center">
660
+ <div class="relative w-64">
661
+ <input type="text" placeholder="Buscar cachimbos..." class="w-full bg-gray-600 border border-gray-500 rounded px-3 py-2 pl-8">
662
+ <i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
663
+ </div>
664
+ <select class="bg-gray-600 border border-gray-500 rounded px-3 py-2">
665
+ <option>Todas categorias</option>
666
+ <option>Dinamarqueses</option>
667
+ <option>Franceses</option>
668
+ <option>Holandeses</option>
669
+ <option>Ingleses</option>
670
+ <option>Irlandeses</option>
671
+ <option>Italianos</option>
672
+ <option>Norte-americanos</option>
673
+ <option>Outros Países</option>
674
+ </select>
675
+ </div>
676
+ <div class="overflow-x-auto">
677
+ <table class="w-full text-sm">
678
+ <thead>
679
+ <tr class="border-b border-gray-600">
680
+ <th class="text-left py-2">Marca</th>
681
+ <th class="text-left py-2">Nome</th>
682
+ <th class="text-left py-2">Categoria</th>
683
+ <th class="text-left py-2">Ações</th>
684
+ </tr>
685
+ </thead>
686
+ <tbody>
687
+ <tr class="border-b border-gray-600 hover:bg-gray-600">
688
+ <td class="py-3">Stanwell</td>
689
+ <td>Hans Christian Andersen</td>
690
+ <td>Dinamarqueses</td>
691
+ <td>
692
+ <button class="text-amber-400 hover:text-amber-300 mr-2"><i class="fas fa-edit"></i></button>
693
+ <button class="text-red-400 hover:text-red-300"><i class="fas fa-trash"></i></button>
694
+ </td>
695
+ </tr>
696
+ <tr class="border-b border-gray-600 hover:bg-gray-600">
697
+ <td class="py-3">Nording</td>
698
+ <td>Signature Freehand</td>
699
+ <td>Dinamarqueses</td>
700
+ <td>
701
+ <button class="text-amber-400 hover:text-amber-300 mr-2"><i class="fas fa-edit"></i></button>
702
+ <button class="text-red-400 hover:text-red-300"><i class="fas fa-trash"></i></button>
703
+ </td>
704
+ </tr>
705
+ <tr class="border-b border-gray-600 hover:bg-gray-600">
706
+ <td class="py-3">Chacom</td>
707
+ <td>Gravat</td>
708
+ <td>Franceses</td>
709
+ <td>
710
+ <button class="text-amber-400 hover:text-amber-300 mr-2"><i class="fas fa-edit"></i></button>
711
+ <button class="text-red-400 hover:text-red-300"><i class="fas fa-trash"></i></button>
712
+ </td>
713
+ </tr>
714
+ <tr class="border-b border-gray-600 hover:bg-gray-600">
715
+ <td class="py-3">Dunhill</td>
716
+ <td>Shell Briar</td>
717
+ <td>Ingleses</td>
718
+ <td>
719
+ <button class="text-amber-400 hover:text-amber-300 mr-2"><i class="fas fa-edit"></i></button>
720
+ <button class="text-red-400 hover:text-red-300"><i class="fas fa-trash"></i></button>
721
+ </td>
722
+ </tr>
723
+ <tr class="hover:bg-gray-600">
724
+ <td class="py-3">Peterson</td>
725
+ <td>System Standard 307</td>
726
+ <td>Irlandeses</td>
727
+ <td>
728
+ <button class="text-amber-400 hover:text-amber-300 mr-2"><i class="fas fa-edit"></i></button>
729
+ <button class="text-red-400 hover:text-red-300"><i class="fas fa-trash"></i></button>
730
+ </td>
731
+ </tr>
732
+ </tbody>
733
+ </table>
734
+ </div>
735
+ <div class="mt-4 flex justify-between items-center">
736
+ <div class="text-sm text-gray-400">Mostrando 1 a 5 de 15 itens</div>
737
+ <div class="flex space-x-1">
738
+ <button class="bg-gray-600 hover:bg-gray-500 px-3 py-1 rounded"><i class="fas fa-chevron-left"></i></button>
739
+ <button class="bg-amber-600 px-3 py-1 rounded">1</button>
740
+ <button class="bg-gray-600 hover:bg-gray-500 px-3 py-1 rounded">2</button>
741
+ <button class="bg-gray-600 hover:bg-gray-500 px-3 py-1 rounded">3</button>
742
+ <button class="bg-gray-600 hover:bg-gray-500 px-3 py-1 rounded"><i class="fas fa-chevron-right"></i></button>
743
+ </div>
744
+ </div>
745
+ </div>
746
+ </template>
747
+
748
+ <template id="pipe-categories-template">
749
+ <div class="bg-gray-700 p-4 rounded-lg">
750
+ <h4 class="text-lg font-semibold mb-4">Categorias de Cachimbos</h4>
751
+ <div class="mb-4 flex justify-between items-center">
752
+ <div class="relative w-64">
753
+ <input type="text" placeholder="Buscar categorias..." class="w-full bg-gray-600 border border-gray-500 rounded px-3 py-2 pl-8">
754
+ <i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
755
+ </div>
756
+ <button class="bg-amber-600 hover:bg-amber-700 px-4 py-2 rounded flex items-center">
757
+ <i class="fas fa-plus mr-2"></i> Nova Categoria
758
+ </button>
759
+ </div>
760
+ <div class="overflow-x-auto">
761
+ <table class="w-full text-sm">
762
+ <thead>
763
+ <tr class="border-b border-gray-600">
764
+ <th class="text-left py-2">Nome</th>
765
+ <th class="text-left py-2">Itens</th>
766
+ <th class="text-left py-2">Ações</th>
767
+ </tr>
768
+ </thead>
769
+ <tbody>
770
+ <tr class="border-b border-gray-600 hover:bg-gray-600">
771
+ <td class="py-3">Dinamarqueses</td>
772
+ <td>12</td>
773
+ <td>
774
+ <button class="text-amber-400 hover:text-amber-300 mr-2"><i class="fas fa-edit"></i></button>
775
+ <button class="text-red-400 hover:text-red-300"><i class="fas fa-trash"></i></button>
776
+ </td>
777
+ </tr>
778
+ <tr class="border-b border-gray-600 hover:bg-gray-600">
779
+ <td class="py-3">Franceses</td>
780
+ <td>8</td>
781
+ <td>
782
+ <button class="text-amber-400 hover:text-amber-300 mr-2"><i class="fas fa-edit"></i></button>
783
+ <button class="text-red-400 hover:text-red-300"><i class="fas fa-trash"></i></button>
784
+ </td>
785
+ </tr>
786
+ <tr class="border-b border-gray-600 hover:bg-gray-600">
787
+ <td class="py-3">Holandeses</td>
788
+ <td>5</td>
789
+ <td>
790
+ <button class="text-amber-400 hover:text-amber-300 mr-2"><i class="fas fa-edit"></i></button>
791
+ <button class="text-red-400 hover:text-red-300"><i class="fas fa-trash"></i></button>
792
+ </td>
793
+ </tr>
794
+ <tr class="border-b border-gray-600 hover:bg-gray-600">
795
+ <td class="py-3">Ingleses</td>
796
+ <td>15</td>
797
+ <td>
798
+ <button class="text-amber-400 hover:text-amber-300 mr-2"><i class="fas fa-edit"></i></button>
799
+ <button class="text-red-400 hover:text-red-300"><i class="fas fa-trash"></i></button>
800
+ </td>
801
+ </tr>
802
+ <tr class="hover:bg-gray-600">
803
+ <td class="py-3">Irlandeses</td>
804
+ <td>7</td>
805
+ <td>
806
+ <button class="text-amber-400 hover:text-amber-300 mr-2"><i class="fas fa-edit"></i></button>
807
+ <button class="text-red-400 hover:text-red-300"><i class="fas fa-trash"></i></button>
808
+ </td>
809
+ </tr>
810
+ </tbody>
811
+ </table>
812
+ </div>
813
+ </div>
814
+ </template>
815
+
816
+ <template id="add-accessory-template">
817
+ <div class="bg-gray-700 p-4 rounded-lg">
818
+ <h4 class="text-lg font-semibold mb-4">Adicionar Acessório</h4>
819
+ <form class="space-y-4">
820
+ <div>
821
+ <label class="block text-sm font-medium mb-1">Tipo</label>
822
+ <select class="w-full bg-gray-600 border border-gray-500 rounded px-3 py-2">
823
+ <option>Tampers</option>
824
+ <option>Diversos</option>
825
+ </select>
826
+ </div>
827
+ <div>
828
+ <label class="block text-sm font-medium mb-1">Nome</label>
829
+ <input type="text" class="w-full bg-gray-600 border border-gray-500 rounded px-3 py-2">
830
+ </div>
831
+ <div>
832
+ <label class="block text-sm font-medium mb-1">Descrição</label>
833
+ <textarea class="w-full bg-gray-600 border border-gray-500 rounded px-3 py-2"></textarea>
834
+ </div>
835
+ <div>
836
+ <label class="block text-sm font-medium mb-1">Foto</label>
837
+ <div class="border-2 border-dashed border-gray-500 rounded p-4 text-center">
838
+ <i class="fas fa-camera text-gray-400 text-2xl mb-2"></i>
839
+ <p class="text-sm text-gray-300">Arraste e solte a foto aqui ou clique para selecionar</p>
840
+ <input type="file" class="hidden">
841
+ </div>
842
+ </div>
843
+ <div class="flex justify-end">
844
+ <button type="submit" class="bg-amber-600 hover:bg-amber-700 px-4 py-2 rounded">Salvar</button>
845
+ </div>
846
+ </form>
847
+ </div>
848
+ </template>
849
+
850
+ <template id="manage-comments-template">
851
+ <div class="bg-gray-700 p-4 rounded-lg">
852
+ <h4 class="text-lg font-semibold mb-4">Gerenciar Comentários</h4>
853
+ <div class="mb-4">
854
+ <div class="relative w-full">
855
+ <input type="text" placeholder="Buscar comentários..." class="w-full bg-gray-600 border border-gray-500 rounded px-3 py-2 pl-8">
856
+ <i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
857
+ </div>
858
+ </div>
859
+ <div class="space-y-4">
860
+ <div class="bg-gray-600 p-3 rounded">
861
+ <div class="flex justify-between items-start">
862
+ <div>
863
+ <h5 class="font-medium">João Silva</h5>
864
+ <p class="text-sm text-gray-300">joao@email.com</p>
865
+ </div>
866
+ <span class="text-xs text-gray-400">2023-05-15</span>
867
+ </div>
868
+ <p class="mt-2 text-sm">Adoro este cachimbo! A textura sandblasted é incrível.</p>
869
+ <div class="mt-3 flex justify-end space-x-2">
870
+ <button class="text-green-400 hover:text-green-300 text-sm"><i class="fas fa-check mr-1"></i> Aprovar</button>
871
+ <button class="text-red-400 hover:text-red-300 text-sm"><i class="fas fa-trash mr-1"></i> Excluir</button>
872
+ </div>
873
+ </div>
874
+ <div class="bg-gray-600 p-3 rounded">
875
+ <div class="flex justify-between items-start">
876
+ <div>
877
+ <h5 class="font-medium">Carlos Mendes</h5>
878
+ <p class="text-sm text-gray-300">carlos@email.com</p>
879
+ </div>
880
+ <span class="text-xs text-gray-400">2023-06-02</span>
881
+ </div>
882
+ <p class="mt-2 text-sm">Tenho um similar. Excelente para tabacos aromáticos.</p>
883
+ <div class="mt-3 flex justify-end space-x-2">
884
+ <button class="text-green-400 hover:text-green-300 text-sm"><i class="fas fa-check mr-1"></i> Aprovar</button>
885
+ <button class="text-red-400 hover:text-red-300 text-sm"><i class="fas fa-trash mr-1"></i> Excluir</button>
886
+ </div>
887
+ </div>
888
+ <div class="bg-gray-600 p-3 rounded">
889
+ <div class="flex justify-between items-start">
890
+ <div>
891
+ <h5 class="font-medium">Ana Paula</h5>
892
+ <p class="text-sm text-gray-300">ana@email.com</p>
893
+ </div>
894
+ <span class="text-xs text-gray-400">2023-04-20</span>
895
+ </div>
896
+ <p class="mt-2 text-sm">Lindíssimo trabalho de freehand! Parabéns pela aquisição.</p>
897
+ <div class="mt-3 flex justify-end space-x-2">
898
+ <button class="text-green-400 hover:text-green-300 text-sm"><i class="fas fa-check mr-1"></i> Aprovar</button>
899
+ <button class="text-red-400 hover:text-red-300 text-sm"><i class="fas fa-trash mr-1"></i> Excluir</button>
900
+ </div>
901
+ </div>
902
+ </div>
903
+ </div>
904
+ </template>
905
+
906
+ <script>
907
+ // Sample data for demonstration
908
+ const pipeData = {
909
+ 'dinamarqueses': [
910
+ {
911
+ id: 1,
912
+ brand: 'Stanwell',
913
+ name: 'Hans Christian Andersen',
914
+ stem: 'vulcanite',
915
+ filter: '9mm',
916
+ shape: 'Bent Apple',
917
+ texture: 'sandblasted',
918
+ condition: 'estate',
919
+ restoration: 'Level 2',
920
+ country: 'Dinamarca',
921
+ notes: 'Excelente cachimbo para fumar tabacos aromáticos. Adquirido em 2018.',
922
+ images: [
923
+ 'https://via.placeholder.com/1080x1080/cccccc/999999?text=Stanwell+HCA+1',
924
+ 'https://via.placeholder.com/1080x1080/cccccc/999999?text=Stanwell+HCA+2',
925
+ 'https://via.placeholder.com/1080x1080/cccccc/999999?text=Stanwell+HCA+3',
926
+ '',
927
+ ''
928
+ ]
929
+ },
930
+ {
931
+ id: 2,
932
+ brand: 'Nording',
933
+ name: 'Signature Freehand',
934
+ stem: 'acrylic',
935
+ filter: 'no',
936
+ shape: 'Freehand',
937
+ texture: 'rusticated',
938
+ condition: 'new',
939
+ restoration: 'Level 1',
940
+ country: 'Dinamarca',
941
+ notes: 'Presente de aniversário em 2020. Lindo cachimbo esculpido à mão.',
942
+ images: [
943
+ 'https://via.placeholder.com/1080x1080/cccccc/999999?text=Nording+Freehand+1',
944
+ 'https://via.placeholder.com/1080x1080/cccccc/999999?text=Nording+Freehand+2',
945
+ 'https://via.placeholder.com/1080x1080/cccccc/999999?text=Nording+Freehand+3',
946
+ 'https://via.placeholder.com/1080x1080/cccccc/999999?text=Nording+Freehand+4',
947
+ 'https://via.placeholder.com/1080x1080/cccccc/999999?text=Nording+Freehand+5'
948
+ ]
949
+ }
950
+ ],
951
+ 'franceses': [
952
+ {
953
+ id: 3,
954
+ brand: 'Chacom',
955
+ name: 'Gravat',
956
+ stem: 'cumberland',
957
+ filter: '6mm',
958
+ shape: 'Bent Billiard',
959
+ texture: 'smooth',
960
+ condition: 'estate',
961
+ restoration: 'Level 3',
962
+ country: 'França',
963
+ notes: 'Restaurado em 2019. Excelente fumada.',
964
+ images: [
965
+ 'https://via.placeholder.com/1080x1080/cccccc/999999?text=Chacom+Gravat+1',
966
+ 'https://via.placeholder.com/1080x1080/cccccc/999999?text=Chacom+Gravat+2',
967
+ '',
968
+ '',
969
+ ''
970
+ ]
971
+ }
972
+ ],
973
+ 'ingleses': [
974
+ {
975
+ id: 4,
976
+ brand: 'Dunhill',
977
+ name: 'Shell Briar',
978
+ stem: 'vulcanite',
979
+ filter: 'no',
980
+ shape: 'Straight Billiard',
981
+ texture: 'sandblasted',
982
+ condition: 'estate',
983
+ restoration: 'Level 4',
984
+ country: 'Inglaterra',
985
+ notes: 'Peça vintage dos anos 60. Requer cuidados especiais.',
986
+ images: [
987
+ 'https://via.placeholder.com/1080x1080/cccccc/999999?text=Dunhill+Shell+1',
988
+ 'https://via.placeholder.com/1080x1080/cccccc/999999?text=Dunhill+Shell+2',
989
+ 'https://via.placeholder.com/1080x1080/cccccc/999999?text=Dunhill+Shell+3',
990
+ 'https://via.placeholder.com/1080x1080/cccccc/999999?text=Dunhill+Shell+4',
991
+ ''
992
+ ]
993
+ },
994
+ {
995
+ id: 5,
996
+ brand: 'Peterson',
997
+ name: 'System Standard 307',
998
+ stem: 'acrylic',
999
+ filter: '9mm',
1000
+ shape: 'Bent Billiard',
1001
+ texture: 'smooth',
1002
+ condition: 'new',
1003
+ restoration: 'Level 1',
1004
+ country: 'Irlanda',
1005
+ notes: 'Adquirido novo em 2021. Excelente para viagens.',
1006
+ images: [
1007
+ 'https://via.placeholder.com/1080x1080/cccccc/999999?text=Peterson+307+1',
1008
+ 'https://via.placeholder.com/1080x1080/cccccc/999999?text=Peterson+307+2',
1009
+ '',
1010
+ '',
1011
+ ''
1012
+ ]
1013
+ }
1014
+ ]
1015
+ };
1016
+
1017
+ // Comments data
1018
+ const commentsData = {
1019
+ 1: [
1020
+ { name: 'João Silva', email: 'joao@email.com', phone: '', text: 'Adoro este cachimbo! A textura sandblasted é incrível.', date: '2023-05-15' },
1021
+ { name: 'Carlos Mendes', email: 'carlos@email.com', phone: '(11) 98765-4321', text: 'Tenho um similar. Excelente para tabacos aromáticos.', date: '2023-06-02' }
1022
+ ],
1023
+ 2: [
1024
+ { name: 'Ana Paula', email: 'ana@email.com', phone: '', text: 'Lindíssimo trabalho de freehand! Parabéns pela aquisição.', date: '2023-04-20' }
1025
+ ],
1026
+ 3: [
1027
+ { name: 'Pierre Dubois', email: 'pierre@email.com', phone: '', text: 'Classic French pipe! Beautiful grain.', date: '2023-07-10' }
1028
+ ],
1029
+ 4: [
1030
+ { name: 'Robert Smith', email: 'robert@email.com', phone: '(44) 1234-5678', text: 'Vintage Dunhills are the best. Great restoration work!', date: '3/15/2023' }
1031
+ ],
1032
+ 5: [
1033
+ { name: 'Miguel Torres', email: 'miguel@email.com', phone: '(21) 99876-5432', text: 'Peterson System é meu favorito. Boa escolha!', date: '8/5/2023' }
1034
+ ]
1035
+ };
1036
+
1037
+ // Current state
1038
+ let currentCollection = '';
1039
+ let currentPipeId = null;
1040
+ let editingPipe = false;
1041
+
1042
+ // DOM elements
1043
+ const homeSection = document.getElementById('home');
1044
+ const pipeCollectionSection = document.getElementById('pipe-collection');
1045
+ const collectionTitle = document.getElementById('collection-title');
1046
+ const pipeGallery = document.getElementById('pipe-gallery');
1047
+ const pipeModal = document.getElementById('pipe-modal');
1048
+ const pipeModalTitle = document.getElementById('pipe-modal-title');
1049
+ const mainPipeImage = document.getElementById('main-pipe-image');
1050
+ const pipeFormModal = document.getElementById('pipe-form-modal');
1051
+ const pipeFormTitle = document.getElementById('pipe-form-title');
1052
+ const pipeForm = document.getElementById('pipe-form');
1053
+ const pipeIdInput = document.getElementById('pipe-id');
1054
+ const searchPipesInput = document.getElementById('search-pipes');
1055
+ const commentsContainer = document.getElementById('comments-container');
1056
+ const commentForm = document.getElementById('comment-form');
1057
+ const adminPanel = document.getElementById('admin-panel');
1058
+ const adminToggle = document.getElementById('admin-toggle');
1059
+ const closeAdmin = document.getElementById('close-admin');
1060
+ const adminContentArea = document.getElementById('admin-content-area');
1061
+
1062
+ // Admin Panel Functions
1063
+ function toggleAdminPanel() {
1064
+ adminPanel.classList.toggle('open');
1065
+ }
1066
+
1067
+ function toggleAdminSection(sectionHeader) {
1068
+ const sectionContent = sectionHeader.nextElementSibling;
1069
+ sectionContent.classList.toggle('hidden');
1070
+ const icon = sectionHeader.querySelector('i');
1071
+ icon.classList.toggle('fa-chevron-down');
1072
+ icon.classList.toggle('fa-chevron-up');
1073
+ }
1074
+
1075
+ function showAdminContent(contentType) {
1076
+ const template = document.getElementById(`${contentType}-template`);
1077
+ if (template) {
1078
+ adminContentArea.innerHTML = '';
1079
+ adminContentArea.appendChild(template.content.cloneNode(true));
1080
+ adminContentArea.classList.remove('hidden');
1081
+ }
1082
+ }
1083
+
1084
+ // Admin Panel Event Listeners
1085
+ adminToggle.addEventListener('click', toggleAdminPanel);
1086
+ closeAdmin.addEventListener('click', toggleAdminPanel);
1087
+
1088
+ // Navigation event listeners
1089
+ document.querySelectorAll('nav a[href^="#"]').forEach(anchor => {
1090
+ anchor.addEventListener('click', function(e) {
1091
+ e.preventDefault();
1092
+
1093
+ const targetId = this.getAttribute('href').substring(1);
1094
+
1095
+ if (targetId === 'home') {
1096
+ showHomeSection();
1097
+ } else if (['dinamarqueses', 'franceses', 'holandeses', 'ingleses', 'irlandeses', 'italianos', 'norte-americanos', 'outros-paises'].includes(targetId)) {
1098
+ showPipeCollection(targetId);
1099
+ }
1100
+ });
1101
+ });
1102
+
1103
+ // Show home section
1104
+ function showHomeSection() {
1105
+ homeSection.classList.remove('hidden');
1106
+ pipeCollectionSection.classList.add('hidden');
1107
+ currentCollection = '';
1108
+ }
1109
+
1110
+ // Show pipe collection
1111
+ function showPipeCollection(collectionId) {
1112
+ homeSection.classList.add('hidden');
1113
+ pipeCollectionSection.classList.remove('hidden');
1114
+
1115
+ currentCollection = collectionId;
1116
+
1117
+ // Set collection title based on ID
1118
+ const titles = {
1119
+ 'dinamarqueses': 'Cachimbos Dinamarqueses',
1120
+ 'franceses': 'Cachimbos Franceses',
1121
+ 'holandeses': 'Cachimbos Holandeses',
1122
+ 'ingleses': 'Cachimbos Ingleses',
1123
+ 'irlandeses': 'Cachimbos Irlandeses',
1124
+ 'italianos': 'Cachimbos Italianos',
1125
+ 'norte-americanos': 'Cachimbos Norte-americanos',
1126
+ 'outros-paises': 'Cachimbos de Outros Países'
1127
+ };
1128
+
1129
+ collectionTitle.textContent = titles[collectionId] || 'Coleção de Cachimbos';
1130
+
1131
+ // Load pipes for this collection
1132
+ loadPipes(collectionId);
1133
+ }
1134
+
1135
+ // Load pipes for a collection
1136
+ function loadPipes(collectionId, searchTerm = '') {
1137
+ pipeGallery.innerHTML = '';
1138
+
1139
+ const pipes = pipeData[collectionId] || [];
1140
+ const filteredPipes = searchTerm
1141
+ ? pipes.filter(pipe =>
1142
+ pipe.brand.toLowerCase().includes(searchTerm.toLowerCase()) ||
1143
+ pipe.name.toLowerCase().includes(searchTerm.toLowerCase()))
1144
+ : pipes;
1145
+
1146
+ if (filteredPipes.length === 0) {
1147
+ pipeGallery.innerHTML = `
1148
+ <div class="col-span-full text-center py-12">
1149
+ <i class="fas fa-pipe text-4xl text-gray-400 mb-4"></i>
1150
+ <p class="text-gray-600">Nenhum cachimbo encontrado nesta categoria.</p>
1151
+ ${searchTerm ? '<p class="text-gray-500 mt-2">Tente ajustar sua busca.</p>' : ''}
1152
+ </div>
1153
+ `;
1154
+ return;
1155
+ }
1156
+
1157
+ filteredPipes.forEach(pipe => {
1158
+ const pipeCard = document.createElement('div');
1159
+ pipeCard.className = 'pipe-card bg-white rounded-lg shadow-md overflow-hidden cursor-pointer';
1160
+ pipeCard.innerHTML = `
1161
+ <div class="h-48 bg-gray-200 flex items-center justify-center">
1162
+ <img src="${pipe.images[0] || 'https://via.placeholder.com/300x300/cccccc/999999?text=No+Image'}" alt="${pipe.brand} ${pipe.name}" class="w-full h-full object-cover">
1163
+ </div>
1164
+ <div class="p-4">
1165
+ <h3 class="font-bold text-lg text-amber-900">${pipe.brand}</h3>
1166
+ <p class="text-gray-700">${pipe.name}</p>
1167
+ <div class="mt-2 flex justify-between items-center">
1168
+ <span class="text-sm text-gray-500">${pipe.country}</span>
1169
+ <span class="text-xs px-2 py-1 rounded ${pipe.condition === 'new' ? 'bg-green-100 text-green-800' : 'bg-amber-100 text-amber-800'}">
1170
+ ${pipe.condition === 'new' ? 'Novo' : 'Usado'}
1171
+ </span>
1172
+ </div>
1173
+ </div>
1174
+ `;
1175
+
1176
+ pipeCard.addEventListener('click', () => showPipeDetails(pipe.id));
1177
+ pipeGallery.appendChild(pipeCard);
1178
+ });
1179
+ }
1180
+
1181
+ // Show pipe details
1182
+ function showPipeDetails(pipeId) {
1183
+ const collectionPipes = pipeData[currentCollection] || [];
1184
+ const pipe = collectionPipes.find(p => p.id === pipeId);
1185
+
1186
+ if (!pipe) return;
1187
+
1188
+ currentPipeId = pipeId;
1189
+ pipeModalTitle.textContent = `${pipe.brand} ${pipe.name}`;
1190
+
1191
+ // Set main image
1192
+ const firstImage = pipe.images.find(img => img) || 'https://via.placeholder.com/1080x1080/cccccc/999999?text=No+Image';
1193
+ mainPipeImage.src = firstImage;
1194
+ mainPipeImage.alt = `${pipe.brand} ${pipe.name}`;
1195
+
1196
+ // Set thumbnails
1197
+ document.querySelectorAll('.image-thumbnail img').forEach((img, index) => {
1198
+ if (pipe.images[index]) {
1199
+ img.src = pipe.images[index];
1200
+ img.alt = `${pipe.brand} ${pipe.name} ${index + 1}`;
1201
+ img.parentElement.style.display = 'block';
1202
+ } else {
1203
+ img.parentElement.style.display = 'none';
1204
+ }
1205
+ });
1206
+
1207
+ // Set details
1208
+ document.getElementById('pipe-brand').textContent = pipe.brand;
1209
+ document.getElementById('pipe-name').textContent = pipe.name;
1210
+ document.getElementById('pipe-stem').textContent = getDisplayValue('stem', pipe.stem);
1211
+ document.getElementById('pipe-filter').textContent = getDisplayValue('filter', pipe.filter);
1212
+ document.getElementById('pipe-shape').textContent = pipe.shape || 'N/A';
1213
+ document.getElementById('pipe-texture').textContent = getDisplayValue('texture', pipe.texture);
1214
+ document.getElementById('pipe-condition').textContent = getDisplayValue('condition', pipe.condition);
1215
+ document.getElementById('pipe-restoration').textContent = pipe.restoration;
1216
+ document.getElementById('pipe-country').textContent = pipe.country;
1217
+ document.getElementById('pipe-notes').textContent = pipe.notes || 'Nenhuma observação.';
1218
+
1219
+ // Load comments
1220
+ loadComments(pipeId);
1221
+
1222
+ // Show modal
1223
+ pipeModal.classList.remove('hidden');
1224
+ }
1225
+
1226
+ // Get display value for pipe properties
1227
+ function getDisplayValue(property, value) {
1228
+ const displayValues = {
1229
+ 'stem': {
1230
+ 'acrylic': 'Acrílico',
1231
+ 'vulcanite': 'Vulcanite',
1232
+ 'cumberland': 'Cumberland'
1233
+ },
1234
+ 'filter': {
1235
+ 'no': 'Sem filtro',
1236
+ '6mm': '6mm',
1237
+ '9mm': '9mm',
1238
+ 'balsa': 'Balsa'
1239
+ },
1240
+ 'texture': {
1241
+ 'smooth': 'Liso',
1242
+ 'rusticated': 'Rusticado',
1243
+ 'sandblasted': 'Jateado',
1244
+ 'corn cob': 'Milho'
1245
+ },
1246
+ 'condition': {
1247
+ 'estate': 'Usado',
1248
+ 'new': 'Novo'
1249
+ }
1250
+ };
1251
+
1252
+ return displayValues[property]?.[value] || value;
1253
+ }
1254
+
1255
+ // Load comments for a pipe
1256
+ function loadComments(pipeId) {
1257
+ commentsContainer.innerHTML = '';
1258
+
1259
+ const comments = commentsData[pipeId] || [];
1260
+
1261
+ if (comments.length === 0) {
1262
+ commentsContainer.innerHTML = `
1263
+ <div class="text-center py-4 text-gray-500">
1264
+ Nenhum comentário ainda. Seja o primeiro a comentar!
1265
+ </div>
1266
+ `;
1267
+ return;
1268
+ }
1269
+
1270
+ comments.forEach(comment => {
1271
+ const commentElement = document.createElement('div');
1272
+ commentElement.className = 'bg-gray-50 p-4 rounded-lg';
1273
+ commentElement.innerHTML = `
1274
+ <div class="flex justify-between items-start">
1275
+ <h5 class="font-medium text-gray-800">${comment.name}</h5>
1276
+ <span class="text-xs text-gray-500">${comment.date}</span>
1277
+ </div>
1278
+ ${comment.phone ? `<p class="text-xs text-gray-600 mt-1">${comment.phone}</p>` : ''}
1279
+ <p class="mt-2 text-gray-700">${comment.text}</p>
1280
+ `;
1281
+ commentsContainer.appendChild(commentElement);
1282
+ });
1283
+ }
1284
+
1285
+ // Add new pipe
1286
+ document.getElementById('add-pipe-btn').addEventListener('click', () => {
1287
+ editingPipe = false;
1288
+ pipeFormTitle.textContent = 'Adicionar Novo Cachimbo';
1289
+ pipeIdInput.value = '';
1290
+ pipeForm.reset();
1291
+
1292
+ // Reset image upload containers
1293
+ document.querySelectorAll('.image-upload-container').forEach(container => {
1294
+ container.innerHTML = `
1295
+ <input type="file" class="image-upload hidden" accept="image/*">
1296
+ <div class="text-center">
1297
+ <i class="fas fa-camera text-gray-400 text-2xl mb-1"></i>
1298
+ <p class="text-xs text-gray-500">Foto ${container.dataset.index}</p>
1299
+ </div>
1300
+ `;
1301
+ });
1302
+
1303
+ pipeFormModal.classList.remove('hidden');
1304
+ });
1305
+
1306
+ // Edit pipe
1307
+ document.getElementById('edit-pipe-btn').addEventListener('click', () => {
1308
+ const collectionPipes = pipeData[currentCollection] || [];
1309
+ const pipe = collectionPipes.find(p => p.id === currentPipeId);
1310
+
1311
+ if (!pipe) return;
1312
+
1313
+ editingPipe = true;
1314
+ pipeFormTitle.textContent = 'Editar Cachimbo';
1315
+ pipeIdInput.value = pipe.id;
1316
+
1317
+ // Fill form with pipe data
1318
+ document.getElementById('pipe-brand-input').value = pipe.brand;
1319
+ document.getElementById('pipe-name-input').value = pipe.name;
1320
+ document.getElementById('pipe-stem-input').value = pipe.stem;
1321
+ document.getElementById('pipe-filter-input').value = pipe.filter;
1322
+ document.getElementById('pipe-shape-input').value = pipe.shape || '';
1323
+ document.getElementById('pipe-texture-input').value = pipe.texture;
1324
+ document.getElementById('pipe-condition-input').value = pipe.condition;
1325
+ document.getElementById('pipe-rest
1326
+ </html>
prompts.txt ADDED
File without changes