Responsive Product Slider Html Css Codepen ✦ Genuine

/* Swiper custom styling */ .product-swiper width: 100%; padding: 0.5rem 0.2rem 2rem 0.2rem;

.swiper-button-next:after, .swiper-button-prev:after font-size: 1.2rem; font-weight: bold; color: #2c4e6e;

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> <title>Responsive Product Slider | Pure HTML/CSS + Swiper (Lightweight)</title> <!-- Google Fonts & simple reset --> <link href="https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600;14..32,700&display=swap" rel="stylesheet"> <!-- Swiper CSS (modern, touch-optimized, responsive slider) --> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css" /> <style> * margin: 0; padding: 0; box-sizing: border-box;

.swiper-button-next:hover, .swiper-button-prev:hover background: #ffffff; box-shadow: 0 10px 20px rgba(0,0,0,0.12); transform: scale(1.02); Responsive Product Slider Html Css Codepen

.btn-add:hover background: #1f6392; border-color: #1f6392; color: white; box-shadow: 0 6px 12px -6px rgba(31,99,146,0.3);

/* product card design */ .product-card background: white; border-radius: 1.75rem; overflow: hidden; width: 100%; display: flex; flex-direction: column; transition: all 0.3s cubic-bezier(0.2, 0, 0, 1); box-shadow: 0 12px 26px -8px rgba(0, 0, 0, 0.08); border: 1px solid rgba(255,255,255,0.5); backdrop-filter: blur(2px);

.section-head p color: #5b6f82; font-weight: 500; margin-top: 0.5rem; font-size: 1rem; /* Swiper custom styling */

/* extra small devices: hide navigation if needed but still touch swipe works */ @media (max-width: 480px) .swiper-button-next, .swiper-button-prev display: none; .product-card border-radius: 1.25rem;

<!-- Product 4 --> <div class="swiper-slide"> <div class="product-card"> <div class="product-img"> <span class="badge">−15%</span> <img src="https://cdn-icons-png.flaticon.com/512/3584/3584575.png" alt="Wireless Charger" loading="lazy"> </div> <div class="product-info"> <div class="product-category">Tech</div> <div class="product-title">MagFlow 3in1</div> <div class="product-desc">Fast charge for phone, watch, earbuds</div> <div class="price-row"> <span class="current-price">$59</span> <span class="old-price">$69</span> </div> <button class="btn-add" aria-label="Add to cart">+ Add to Cart</button> </div> </div> </div>

<!-- navigation arrows (optional but nice) --> <div class="swiper-button-next"></div> <div class="swiper-button-prev"></div> <div class="swiper-pagination"></div> </div> </div> padding: 0.5rem 0.2rem 2rem 0.2rem

<!-- Product 6 --> <div class="swiper-slide"> <div class="product-card"> <div class="product-img"> <span class="badge new">Limited</span> <img src="https://cdn-icons-png.flaticon.com/512/1223/1223324.png" alt="Smart Speaker" loading="lazy"> </div> <div class="product-info"> <div class="product-category">Smart Home</div> <div class="product-title">EchoDot Sphere</div> <div class="product-desc">Voice assistant, rich sound, multi-room sync</div> <div class="price-row"> <span class="current-price">$79</span> <span class="old-price">$109</span> </div> <button class="btn-add" aria-label="Add to cart">+ Add to Cart</button> </div> </div> </div>

/* section header */ .section-head text-align: center; margin-bottom: 2rem;