100+ copy-paste UI components in plain HTML and CSS: no dependencies, no build step.

0 downloads

dbbasic-web-native/demo-ecommerce-complete.html
Download zip
Clone
Clone with git
git clone https://gitstable.com/git/askrobots/dbbasic-web-native.git
HTTPS
https://gitstable.com/git/askrobots/dbbasic-web-native.git
SSH
ssh://git@gitstable.com:2222/askrobots/dbbasic-web-native.git

Cloning needs no sign-in. Pushing over HTTPS asks for your username and an access token. SSH needs your key under SSH keys.

danq9 Add canonical.html v1.0 - The single source of truth for usability standards fb6e650 1 year ago History
demo-ecommerce-complete.html · 26.8 KB · 809 lines
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <title>eCommerce Components - Complete Collection</title>
7 <style>
8 * {
9 margin: 0;
10 padding: 0;
11 box-sizing: border-box;
12 }
13
14 @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');
15
16 body {
17 font-family: 'Inter', sans-serif;
18 -webkit-font-smoothing: antialiased;
19 -moz-osx-font-smoothing: grayscale;
20 background: #ffffff;
21 color: #1a1a1a;
22 }
23
24 .section-divider {
25 background: linear-gradient(to right, #f8f9fa, #ffffff);
26 padding: 20px 48px;
27 border-bottom: 1px solid #e5e7eb;
28 font-size: 11px;
29 font-weight: 600;
30 color: #6b7280;
31 text-transform: uppercase;
32 letter-spacing: 1.5px;
33 position: sticky;
34 top: 0;
35 z-index: 100;
36 backdrop-filter: blur(10px);
37 }
38
39 .container {
40 max-width: 1400px;
41 margin: 0 auto;
42 padding: 80px 24px;
43 }
44
45 /* ========== PRODUCT GRID ========== */
46 .product-grid {
47 display: grid;
48 grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
49 gap: 32px;
50 }
51
52 .product-card {
53 background: white;
54 border-radius: 16px;
55 overflow: hidden;
56 border: 1px solid #e5e7eb;
57 transition: all 0.3s;
58 cursor: pointer;
59 }
60
61 .product-card:hover {
62 transform: translateY(-4px);
63 box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
64 border-color: #7C3AED;
65 }
66
67 .product-image {
68 width: 100%;
69 aspect-ratio: 1;
70 background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
71 display: flex;
72 align-items: center;
73 justify-content: center;
74 color: white;
75 font-size: 48px;
76 position: relative;
77 }
78
79 .product-badge {
80 position: absolute;
81 top: 16px;
82 left: 16px;
83 padding: 6px 16px;
84 background: #ef4444;
85 color: white;
86 font-size: 12px;
87 font-weight: 700;
88 border-radius: 100px;
89 text-transform: uppercase;
90 }
91
92 .product-info {
93 padding: 24px;
94 }
95
96 .product-category {
97 font-size: 12px;
98 font-weight: 600;
99 color: #7C3AED;
100 text-transform: uppercase;
101 letter-spacing: 0.05em;
102 margin-bottom: 8px;
103 }
104
105 .product-name {
106 font-size: 20px;
107 font-weight: 700;
108 color: #111827;
109 margin-bottom: 8px;
110 }
111
112 .product-description {
113 font-size: 14px;
114 color: #6b7280;
115 margin-bottom: 16px;
116 line-height: 1.5;
117 }
118
119 .product-footer {
120 display: flex;
121 justify-content: space-between;
122 align-items: center;
123 }
124
125 .product-price {
126 font-size: 24px;
127 font-weight: 800;
128 color: #111827;
129 }
130
131 .btn {
132 padding: 12px 24px;
133 border-radius: 10px;
134 font-weight: 600;
135 font-size: 14px;
136 cursor: pointer;
137 transition: all 0.3s;
138 border: none;
139 text-decoration: none;
140 }
141
142 .btn-primary {
143 background: linear-gradient(135deg, #7C3AED, #DB2777);
144 color: white;
145 }
146
147 .btn-primary:hover {
148 transform: translateY(-2px);
149 box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3);
150 }
151
152 .btn-secondary {
153 background: #f3f4f6;
154 color: #374151;
155 }
156
157 .btn-secondary:hover {
158 background: #e5e7eb;
159 }
160
161 /* ========== PRODUCT DETAIL ========== */
162 .product-detail {
163 display: grid;
164 grid-template-columns: 1fr 1fr;
165 gap: 64px;
166 align-items: start;
167 }
168
169 .product-gallery {
170 position: sticky;
171 top: 100px;
172 }
173
174 .main-image {
175 width: 100%;
176 aspect-ratio: 1;
177 background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
178 border-radius: 20px;
179 display: flex;
180 align-items: center;
181 justify-content: center;
182 color: white;
183 font-size: 120px;
184 margin-bottom: 16px;
185 }
186
187 .thumbnail-grid {
188 display: grid;
189 grid-template-columns: repeat(4, 1fr);
190 gap: 12px;
191 }
192
193 .thumbnail {
194 aspect-ratio: 1;
195 background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
196 border-radius: 10px;
197 cursor: pointer;
198 border: 2px solid transparent;
199 transition: all 0.3s;
200 }
201
202 .thumbnail:hover {
203 border-color: #7C3AED;
204 }
205
206 .product-details-info h1 {
207 font-size: 40px;
208 font-weight: 900;
209 color: #111827;
210 margin-bottom: 16px;
211 }
212
213 .rating {
214 display: flex;
215 align-items: center;
216 gap: 8px;
217 margin-bottom: 16px;
218 }
219
220 .stars {
221 color: #fbbf24;
222 font-size: 20px;
223 }
224
225 .review-count {
226 color: #6b7280;
227 font-size: 14px;
228 }
229
230 .price-section {
231 margin: 32px 0;
232 padding: 24px 0;
233 border-top: 1px solid #e5e7eb;
234 border-bottom: 1px solid #e5e7eb;
235 }
236
237 .current-price {
238 font-size: 48px;
239 font-weight: 900;
240 color: #111827;
241 }
242
243 .original-price {
244 font-size: 24px;
245 color: #9ca3af;
246 text-decoration: line-through;
247 margin-left: 16px;
248 }
249
250 .variant-selector {
251 margin: 32px 0;
252 }
253
254 .variant-label {
255 font-size: 14px;
256 font-weight: 600;
257 color: #374151;
258 margin-bottom: 12px;
259 display: block;
260 }
261
262 .variant-options {
263 display: flex;
264 gap: 12px;
265 flex-wrap: wrap;
266 }
267
268 .variant-option {
269 padding: 12px 24px;
270 border: 2px solid #e5e7eb;
271 border-radius: 10px;
272 cursor: pointer;
273 transition: all 0.3s;
274 font-weight: 600;
275 }
276
277 .variant-option:hover {
278 border-color: #7C3AED;
279 }
280
281 .variant-option.selected {
282 border-color: #7C3AED;
283 background: #f3e8ff;
284 }
285
286 .quantity-selector {
287 display: flex;
288 align-items: center;
289 gap: 16px;
290 margin: 32px 0;
291 }
292
293 .quantity-input {
294 display: flex;
295 align-items: center;
296 border: 2px solid #e5e7eb;
297 border-radius: 10px;
298 overflow: hidden;
299 }
300
301 .quantity-btn {
302 padding: 12px 20px;
303 background: #f9fafb;
304 border: none;
305 cursor: pointer;
306 font-size: 18px;
307 font-weight: 700;
308 }
309
310 .quantity-value {
311 padding: 12px 32px;
312 font-weight: 600;
313 }
314
315 .add-to-cart-section {
316 display: flex;
317 gap: 16px;
318 margin: 32px 0;
319 }
320
321 .add-to-cart-section .btn {
322 flex: 1;
323 padding: 18px;
324 font-size: 16px;
325 }
326
327 /* ========== SHOPPING CART ========== */
328 .cart-layout {
329 display: grid;
330 grid-template-columns: 2fr 1fr;
331 gap: 48px;
332 }
333
334 .cart-item {
335 display: grid;
336 grid-template-columns: 120px 1fr auto;
337 gap: 24px;
338 padding: 24px;
339 background: #f9fafb;
340 border-radius: 16px;
341 margin-bottom: 16px;
342 }
343
344 .cart-item-image {
345 width: 120px;
346 height: 120px;
347 background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
348 border-radius: 12px;
349 display: flex;
350 align-items: center;
351 justify-content: center;
352 color: white;
353 font-size: 40px;
354 }
355
356 .cart-item-info h3 {
357 font-size: 18px;
358 font-weight: 700;
359 margin-bottom: 8px;
360 }
361
362 .cart-item-meta {
363 font-size: 14px;
364 color: #6b7280;
365 margin-bottom: 16px;
366 }
367
368 .cart-item-actions {
369 display: flex;
370 align-items: center;
371 gap: 16px;
372 }
373
374 .cart-summary {
375 background: #f9fafb;
376 padding: 32px;
377 border-radius: 20px;
378 position: sticky;
379 top: 100px;
380 height: fit-content;
381 }
382
383 .cart-summary h3 {
384 font-size: 24px;
385 font-weight: 800;
386 margin-bottom: 24px;
387 }
388
389 .summary-row {
390 display: flex;
391 justify-content: space-between;
392 padding: 12px 0;
393 font-size: 16px;
394 }
395
396 .summary-row.total {
397 border-top: 2px solid #e5e7eb;
398 margin-top: 16px;
399 padding-top: 16px;
400 font-size: 24px;
401 font-weight: 800;
402 }
403
404 /* ========== CHECKOUT ========== */
405 .checkout-layout {
406 display: grid;
407 grid-template-columns: 1.5fr 1fr;
408 gap: 64px;
409 }
410
411 .checkout-form .form-group {
412 margin-bottom: 24px;
413 }
414
415 .checkout-form label {
416 display: block;
417 font-size: 14px;
418 font-weight: 600;
419 color: #374151;
420 margin-bottom: 8px;
421 }
422
423 .checkout-form input,
424 .checkout-form select {
425 width: 100%;
426 padding: 14px 16px;
427 border: 2px solid #e5e7eb;
428 border-radius: 10px;
429 font-size: 16px;
430 transition: all 0.3s;
431 }
432
433 .checkout-form input:focus,
434 .checkout-form select:focus {
435 outline: none;
436 border-color: #7C3AED;
437 }
438
439 .form-row {
440 display: grid;
441 grid-template-columns: 1fr 1fr;
442 gap: 16px;
443 }
444
445 .checkout-section {
446 margin-bottom: 40px;
447 }
448
449 .checkout-section h3 {
450 font-size: 20px;
451 font-weight: 700;
452 margin-bottom: 24px;
453 }
454
455 @media (max-width: 1024px) {
456 .product-detail,
457 .cart-layout,
458 .checkout-layout {
459 grid-template-columns: 1fr;
460 }
461
462 .cart-summary {
463 position: static;
464 }
465 }
466
467 @media (max-width: 640px) {
468 .cart-item {
469 grid-template-columns: 80px 1fr;
470 }
471
472 .cart-item-image {
473 width: 80px;
474 height: 80px;
475 }
476
477 .cart-item-actions {
478 grid-column: 1 / -1;
479 }
480 }
481 </style>
482</head>
483<body>
484 <!-- PRODUCT GRID -->
485 <div class="section-divider">01 - Product Grid / Catalog</div>
486 <div class="container">
487 <h2 style="font-size: 48px; font-weight: 900; margin-bottom: 48px;">Featured Products</h2>
488 <div class="product-grid">
489 <div class="product-card">
490 <div class="product-image">
491 <div class="product-badge">Sale</div>
492 👕
493 </div>
494 <div class="product-info">
495 <div class="product-category">Clothing</div>
496 <div class="product-name">Premium T-Shirt</div>
497 <div class="product-description">Soft, comfortable, and stylish everyday wear</div>
498 <div class="product-footer">
499 <div class="product-price">$29</div>
500 <button class="btn btn-primary">Add to Cart</button>
501 </div>
502 </div>
503 </div>
504
505 <div class="product-card">
506 <div class="product-image" style="background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);">
507 🎧
508 </div>
509 <div class="product-info">
510 <div class="product-category">Electronics</div>
511 <div class="product-name">Wireless Headphones</div>
512 <div class="product-description">Premium sound quality with noise cancellation</div>
513 <div class="product-footer">
514 <div class="product-price">$199</div>
515 <button class="btn btn-primary">Add to Cart</button>
516 </div>
517 </div>
518 </div>
519
520 <div class="product-card">
521 <div class="product-image" style="background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);">
522 👟
523 </div>
524 <div class="product-info">
525 <div class="product-category">Footwear</div>
526 <div class="product-name">Running Shoes</div>
527 <div class="product-description">Lightweight and designed for performance</div>
528 <div class="product-footer">
529 <div class="product-price">$89</div>
530 <button class="btn btn-primary">Add to Cart</button>
531 </div>
532 </div>
533 </div>
534
535 <div class="product-card">
536 <div class="product-image" style="background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);">
537 ⌚
538 </div>
539 <div class="product-info">
540 <div class="product-category">Accessories</div>
541 <div class="product-name">Smart Watch</div>
542 <div class="product-description">Track fitness and stay connected</div>
543 <div class="product-footer">
544 <div class="product-price">$299</div>
545 <button class="btn btn-primary">Add to Cart</button>
546 </div>
547 </div>
548 </div>
549 </div>
550 </div>
551
552 <!-- PRODUCT DETAIL -->
553 <div class="section-divider">02 - Product Detail Page</div>
554 <div class="container">
555 <div class="product-detail">
556 <div class="product-gallery">
557 <div class="main-image">👕</div>
558 <div class="thumbnail-grid">
559 <div class="thumbnail"></div>
560 <div class="thumbnail" style="background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);"></div>
561 <div class="thumbnail" style="background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);"></div>
562 <div class="thumbnail" style="background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);"></div>
563 </div>
564 </div>
565
566 <div class="product-details-info">
567 <h1>Premium Cotton T-Shirt</h1>
568 <div class="rating">
569 <div class="stars">★★★★★</div>
570 <span class="review-count">4.9 (128 reviews)</span>
571 </div>
572
573 <div class="price-section">
574 <span class="current-price">$29</span>
575 <span class="original-price">$49</span>
576 </div>
577
578 <p style="font-size: 16px; line-height: 1.7; color: #374151; margin-bottom: 32px;">
579 Made from 100% organic cotton, this premium t-shirt offers unmatched comfort and durability.
580 Perfect for everyday wear, it features a modern fit and comes in multiple colors.
581 </p>
582
583 <div class="variant-selector">
584 <label class="variant-label">Size</label>
585 <div class="variant-options">
586 <div class="variant-option">XS</div>
587 <div class="variant-option selected">S</div>
588 <div class="variant-option">M</div>
589 <div class="variant-option">L</div>
590 <div class="variant-option">XL</div>
591 </div>
592 </div>
593
594 <div class="variant-selector">
595 <label class="variant-label">Color</label>
596 <div class="variant-options">
597 <div class="variant-option selected">Black</div>
598 <div class="variant-option">White</div>
599 <div class="variant-option">Gray</div>
600 <div class="variant-option">Navy</div>
601 </div>
602 </div>
603
604 <div class="quantity-selector">
605 <label class="variant-label">Quantity</label>
606 <div class="quantity-input">
607 <button class="quantity-btn">−</button>
608 <span class="quantity-value">1</span>
609 <button class="quantity-btn">+</button>
610 </div>
611 </div>
612
613 <div class="add-to-cart-section">
614 <button class="btn btn-primary">Add to Cart - $29</button>
615 <button class="btn btn-secondary">♥</button>
616 </div>
617
618 <div style="padding: 24px; background: #f9fafb; border-radius: 12px; margin-top: 32px;">
619 <p style="font-size: 14px; color: #374151; line-height: 1.6;">
620 ✓ Free shipping on orders over $50<br>
621 ✓ 30-day return policy<br>
622 ✓ Secure checkout with encryption
623 </p>
624 </div>
625 </div>
626 </div>
627 </div>
628
629 <!-- SHOPPING CART -->
630 <div class="section-divider">03 - Shopping Cart</div>
631 <div class="container">
632 <h2 style="font-size: 48px; font-weight: 900; margin-bottom: 48px;">Your Cart</h2>
633 <div class="cart-layout">
634 <div class="cart-items">
635 <div class="cart-item">
636 <div class="cart-item-image">👕</div>
637 <div class="cart-item-info">
638 <h3>Premium Cotton T-Shirt</h3>
639 <div class="cart-item-meta">Size: M • Color: Black</div>
640 <div class="cart-item-actions">
641 <div class="quantity-input">
642 <button class="quantity-btn">−</button>
643 <span class="quantity-value">2</span>
644 <button class="quantity-btn">+</button>
645 </div>
646 <button class="btn btn-secondary">Remove</button>
647 </div>
648 </div>
649 <div style="font-size: 24px; font-weight: 800;">$58</div>
650 </div>
651
652 <div class="cart-item">
653 <div class="cart-item-image" style="background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);">🎧</div>
654 <div class="cart-item-info">
655 <h3>Wireless Headphones</h3>
656 <div class="cart-item-meta">Color: Midnight Black</div>
657 <div class="cart-item-actions">
658 <div class="quantity-input">
659 <button class="quantity-btn">−</button>
660 <span class="quantity-value">1</span>
661 <button class="quantity-btn">+</button>
662 </div>
663 <button class="btn btn-secondary">Remove</button>
664 </div>
665 </div>
666 <div style="font-size: 24px; font-weight: 800;">$199</div>
667 </div>
668 </div>
669
670 <div class="cart-summary">
671 <h3>Order Summary</h3>
672 <div class="summary-row">
673 <span>Subtotal</span>
674 <span>$257</span>
675 </div>
676 <div class="summary-row">
677 <span>Shipping</span>
678 <span>$10</span>
679 </div>
680 <div class="summary-row">
681 <span>Tax</span>
682 <span>$23</span>
683 </div>
684 <div class="summary-row total">
685 <span>Total</span>
686 <span>$290</span>
687 </div>
688 <button class="btn btn-primary" style="width: 100%; margin-top: 24px; padding: 16px;">Proceed to Checkout</button>
689 </div>
690 </div>
691 </div>
692
693 <!-- CHECKOUT -->
694 <div class="section-divider">04 - Checkout Process</div>
695 <div class="container">
696 <h2 style="font-size: 48px; font-weight: 900; margin-bottom: 48px;">Checkout</h2>
697 <div class="checkout-layout">
698 <div>
699 <form class="checkout-form">
700 <div class="checkout-section">
701 <h3>Shipping Information</h3>
702 <div class="form-group">
703 <label>Email</label>
704 <input type="email" placeholder="you@example.com">
705 </div>
706 <div class="form-row">
707 <div class="form-group">
708 <label>First Name</label>
709 <input type="text" placeholder="John">
710 </div>
711 <div class="form-group">
712 <label>Last Name</label>
713 <input type="text" placeholder="Doe">
714 </div>
715 </div>
716 <div class="form-group">
717 <label>Address</label>
718 <input type="text" placeholder="123 Main St">
719 </div>
720 <div class="form-row">
721 <div class="form-group">
722 <label>City</label>
723 <input type="text" placeholder="San Francisco">
724 </div>
725 <div class="form-group">
726 <label>ZIP Code</label>
727 <input type="text" placeholder="94102">
728 </div>
729 </div>
730 </div>
731
732 <div class="checkout-section">
733 <h3>Payment Information</h3>
734 <div class="form-group">
735 <label>Card Number</label>
736 <input type="text" placeholder="1234 5678 9012 3456">
737 </div>
738 <div class="form-row">
739 <div class="form-group">
740 <label>Expiration</label>
741 <input type="text" placeholder="MM/YY">
742 </div>
743 <div class="form-group">
744 <label>CVV</label>
745 <input type="text" placeholder="123">
746 </div>
747 </div>
748 </div>
749
750 <button type="submit" class="btn btn-primary" style="width: 100%; padding: 18px; font-size: 16px;">
751 Complete Purchase - $290
752 </button>
753 </form>
754 </div>
755
756 <div class="cart-summary">
757 <h3>Order Summary</h3>
758 <div style="margin: 24px 0;">
759 <div style="display: flex; gap: 16px; margin-bottom: 16px;">
760 <div style="width: 80px; height: 80px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 32px;">👕</div>
761 <div style="flex: 1;">
762 <div style="font-weight: 600;">Premium T-Shirt</div>
763 <div style="font-size: 14px; color: #6b7280;">Qty: 2</div>
764 <div style="font-weight: 700; margin-top: 4px;">$58</div>
765 </div>
766 </div>
767 <div style="display: flex; gap: 16px;">
768 <div style="width: 80px; height: 80px; background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 32px;">🎧</div>
769 <div style="flex: 1;">
770 <div style="font-weight: 600;">Wireless Headphones</div>
771 <div style="font-size: 14px; color: #6b7280;">Qty: 1</div>
772 <div style="font-weight: 700; margin-top: 4px;">$199</div>
773 </div>
774 </div>
775 </div>
776 <div class="summary-row">
777 <span>Subtotal</span>
778 <span>$257</span>
779 </div>
780 <div class="summary-row">
781 <span>Shipping</span>
782 <span>$10</span>
783 </div>
784 <div class="summary-row">
785 <span>Tax</span>
786 <span>$23</span>
787 </div>
788 <div class="summary-row total">
789 <span>Total</span>
790 <span>$290</span>
791 </div>
792 </div>
793 </div>
794 </div>
795
796 <!-- FOOTER NOTE -->
797 <div style="padding: 80px 24px; text-align: center; background: #f9fafb;">
798 <h2 style="margin-bottom: 16px; color: #111827;">Complete eCommerce Component Collection</h2>
799 <p style="color: #6b7280; max-width: 700px; margin: 0 auto 32px; font-size: 18px; line-height: 1.7;">
800 Premium eCommerce components for modern web applications.
801 Product grids, detail pages, shopping cart, and checkout - all responsive and accessible.
802 </p>
803 <div style="display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;">
804 <button class="btn btn-primary" onclick="window.location='demo-marketing-complete.html'">View Marketing Components</button>
805 <button class="btn" style="background: #f3f4f6; color: #374151;" onclick="window.location='index.html'">Component Library</button>
806 </div>
807 </div>
808</body>
809</html>