PowerCell Battery Template
Preview
Edit
Download
Run
Download Options
HTML File
Download as .html file
CSS File
Download as .css file
JavaScript File
Download as .js file
Combined HTML
All code in one HTML file
Project ZIP
All files in a ZIP archive
Cancel
HTML
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>PowerCell - Modern Battery Solutions</title> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> </head> <body> <!-- Header --> <header id="header"> <div class="container"> <nav class="navbar"> <a href="#" class="logo"> <i class="fas fa-battery-full"></i> PowerCell </a> <ul class="nav-links"> <li><a href="#home">Home</a></li> <li><a href="#products">Products</a></li> <li><a href="#about">About</a></li> <li><a href="#contact">Contact</a></li> </ul> <div class="nav-btns"> <!-- <a href="#" class="btn btn-outline">Login</a> --> <button class="mobile-menu-btn"> <i class="fas fa-bars"></i> </button> </div> </nav> </div> </header> <!-- Hero Section --> <section class="hero" id="home"> <div class="container"> <div class="hero-content"> <h1 class="hero-title">Power Your World With Our Premium Batteries</h1> <p class="hero-subtitle">Discover our wide range of high-performance batteries for all your devices. Long-lasting power solutions for home, business, and industry.</p> <div class="hero-btns"> <a href="#products" class="btn">Shop Now</a> <a href="#about" class="btn btn-outline">Learn More</a> </div> </div> </div> </section> <!-- Features Section --> <section class="section features" id="features"> <div class="container"> <div class="text-center"> <h2 class="section-title">Why Choose Our Batteries</h2> <p class="section-subtitle">We provide the best battery solutions with cutting-edge technology and exceptional performance.</p> </div> <div class="features-grid"> <div class="feature-card"> <div class="feature-icon"> <i class="fas fa-bolt"></i> </div> <h3 class="feature-title">High Performance</h3> <p class="feature-desc">Our batteries deliver consistent power output and longer runtime for all your devices.</p> </div> <div class="feature-card"> <div class="feature-icon"> <i class="fas fa-shield-alt"></i> </div> <h3 class="feature-title">Safe & Reliable</h3> <p class="feature-desc">Built with advanced safety features to prevent overheating and leakage.</p> </div> <div class="feature-card"> <div class="feature-icon"> <i class="fas fa-leaf"></i> </div> <h3 class="feature-title">Eco-Friendly</h3> <p class="feature-desc">Environmentally conscious design with recyclable materials and reduced carbon footprint.</p> </div> </div> </div> </section> <!-- Products Section --> <section class="section products" id="products"> <div class="container"> <div class="text-center"> <h2 class="section-title">Our Popular Products</h2> <p class="section-subtitle">Browse our selection of premium batteries for all your needs.</p> </div> <div class="products-grid"> <div class="product-card"> <img src="https://images.unsplash.com/photo-1603732551681-2e91159b9dc2?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80" alt="AA Batteries" class="product-img"> <div class="product-info"> <span class="product-category">Alkaline</span> <h3 class="product-title">Premium AA Batteries</h3> <p class="product-desc">Long-lasting power for your everyday devices with 10-year shelf life.</p> <div class="product-footer"> <span class="product-price">$9.99</span> <a href="#" class="btn">Add to Cart</a> </div> </div> </div> <div class="product-card"> <img src="https://plus.unsplash.com/premium_photo-1681433401553-589104846604?q=80&w=1160&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" alt="Car Battery" class="product-img"> <div class="product-info"> <span class="product-category">Automotive</span> <h3 class="product-title">Heavy-Duty Car Battery</h3> <p class="product-desc">Reliable starting power even in extreme weather conditions.</p> <div class="product-footer"> <span class="product-price">$129.99</span> <a href="#" class="btn">Add to Cart</a> </div> </div> </div> <div class="product-card"> <img src="https://images.unsplash.com/photo-1598128558393-70ff21433be0?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1588&q=80" alt="Power Bank" class="product-img"> <div class="product-info"> <span class="product-category">Portable</span> <h3 class="product-title">20,000mAh Power Bank</h3> <p class="product-desc">Fast-charging portable power for your mobile devices on the go.</p> <div class="product-footer"> <span class="product-price">$39.99</span> <a href="#" class="btn">Add to Cart</a> </div> </div> </div> <div class="product-card"> <img src="https://images.unsplash.com/photo-1603775020644-eb8decd79994?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1587&q=80" alt="Solar Battery" class="product-img"> <div class="product-info"> <span class="product-category">Solar</span> <h3 class="product-title">Solar Energy Storage</h3> <p class="product-desc">Efficient energy storage solution for your solar power systems.</p> <div class="product-footer"> <span class="product-price">$299.99</span> <a href="#" class="btn">Add to Cart</a> </div> </div> </div> </div> </div> </section> <!-- About Section --> <section class="section about" id="about"> <div class="container"> <div class="about-content"> <div class="about-img"> <img src="https://plus.unsplash.com/premium_photo-1681433401553-589104846604?q=80&w=1160&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" alt="About PowerCell"> </div> <div class="about-text"> <h2 class="about-title">About PowerCell</h2> <p class="about-desc">Founded in 2010, PowerCell has been at the forefront of battery technology innovation, providing reliable power solutions to millions of customers worldwide.</p> <p class="about-desc">Our mission is to deliver high-quality, sustainable energy storage solutions that power people's lives while minimizing environmental impact.</p> <div class="about-features"> <div class="about-feature"> <i class="fas fa-check-circle"></i> <div> <h4>15+ Years of Experience</h4> <p>Industry leaders in battery technology</p> </div> </div> <div class="about-feature"> <i class="fas fa-check-circle"></i> <div> <h4>1M+ Happy Customers</h4> <p>Trusted by individuals and businesses</p> </div> </div> <div class="about-feature"> <i class="fas fa-check-circle"></i> <div> <h4>Global Distribution</h4> <p>Available in 50+ countries worldwide</p> </div> </div> </div> <a href="#" class="btn">Learn More</a> </div> </div> </div> </section> <!-- Testimonials Section --> <section class="section testimonials" id="testimonials"> <div class="container"> <div class="text-center"> <h2 class="section-title">What Our Customers Say</h2> <p class="section-subtitle">Hear from our satisfied customers about their experience with PowerCell products.</p> </div> <div class="testimonials-slider"> <div class="testimonials-container"> <div class="testimonial-card"> <img src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1587&q=80" alt="Sarah Johnson" class="testimonial-img"> <p class="testimonial-text">"I've been using PowerCell AA batteries for all my home devices and they last significantly longer than other brands I've tried. Highly recommended!"</p> <h4 class="testimonial-author">Sarah Johnson</h4> <p class="testimonial-role">Home User</p> </div> </div> <div class="slider-dots"> <div class="dot active"></div> <div class="dot"></div> <div class="dot"></div> </div> </div> </div> </section> <!-- Stats Section --> <section class="stats"> <div class="container"> <div class="stats-grid"> <div class="stat-item"> <div class="stat-number">10M+</div> <div class="stat-text">Batteries Sold</div> </div> <div class="stat-item"> <div class="stat-number">50+</div> <div class="stat-text">Countries Served</div> </div> <div class="stat-item"> <div class="stat-number">98%</div> <div class="stat-text">Customer Satisfaction</div> </div> <div class="stat-item"> <div class="stat-number">24/7</div> <div class="stat-text">Customer Support</div> </div> </div> </div> </section> <!-- FAQ Section --> <section class="section faq" id="faq"> <div class="container"> <div class="text-center"> <h2 class="section-title">Frequently Asked Questions</h2> <p class="section-subtitle">Find answers to common questions about our products and services.</p> </div> <div class="faq-container"> <div class="faq-item"> <div class="faq-question"> <span>What types of batteries do you offer?</span> <i class="fas fa-chevron-down"></i> </div> <div class="faq-answer"> <p>We offer a wide range of batteries including alkaline (AA, AAA, C, D, 9V), lithium, rechargeable NiMH, car batteries, solar batteries, and specialty batteries for various devices.</p> </div> </div> <div class="faq-item"> <div class="faq-question"> <span>How long do your batteries last?</span> <i class="fas fa-chevron-down"></i> </div> <div class="faq-answer"> <p>Our alkaline batteries typically last 2-3 times longer than standard batteries in high-drain devices. Rechargeable batteries can last for hundreds of charge cycles when properly maintained.</p> </div> </div> <div class="faq-item"> <div class="faq-question"> <span>Do you offer international shipping?</span> <i class="fas fa-chevron-down"></i> </div> <div class="faq-answer"> <p>Yes, we ship to over 50 countries worldwide. Shipping costs and delivery times vary depending on your location.</p> </div> </div> <div class="faq-item"> <div class="faq-question"> <span>What is your return policy?</span> <i class="fas fa-chevron-down"></i> </div> <div class="faq-answer"> <p>We offer a 30-day money-back guarantee on all our products. If you're not satisfied with your purchase, you can return it for a full refund or exchange.</p> </div> </div> </div> </div> </section> <!-- CTA Section --> <section class="cta" id="cta"> <div class="container"> <h2 class="cta-title">Ready to Power Your Devices?</h2> <p class="cta-subtitle">Join thousands of satisfied customers who trust PowerCell for their energy needs.</p> <div class="cta-btns"> <a href="#products" class="btn">Shop Now</a> <a href="#contact" class="btn btn-outline">Contact Us</a> </div> </div> </section> <!-- Footer --> <footer id="contact"> <div class="container"> <div class="footer-grid"> <div class="footer-col"> <h3>PowerCell</h3> <p>Providing premium battery solutions since 2010. Powering your world with reliable, safe, and eco-friendly energy storage.</p> <div class="social-links"> <a href="#"><i class="fab fa-facebook-f"></i></a> <a href="#"><i class="fab fa-twitter"></i></a> <a href="#"><i class="fab fa-instagram"></i></a> <a href="#"><i class="fab fa-linkedin-in"></i></a> </div> </div> <div class="footer-col"> <h3>Quick Links</h3> <ul class="footer-links"> <li><a href="#home">Home</a></li> <li><a href="#products">Products</a></li> <li><a href="#features">Features</a></li> <li><a href="#about">About Us</a></li> <li><a href="#testimonials">Testimonials</a></li> <li><a href="#faq">FAQ</a></li> </ul> </div> <div class="footer-col"> <h3>Products</h3> <ul class="footer-links"> <li><a href="#">Alkaline Batteries</a></li> <li><a href="#">Rechargeable Batteries</a></li> <li><a href="#">Car Batteries</a></li> <li><a href="#">Solar Batteries</a></li> <li><a href="#">Power Banks</a></li> <li><a href="#">Specialty Batteries</a></li> </ul> </div> <div class="footer-col"> <h3>Contact Us</h3> <ul class="footer-contact"> <li> <i class="fas fa-map-marker-alt"></i> <span>123 Battery Street, Power City, PC 12345</span> </li> <li> <i class="fas fa-phone-alt"></i> <span>+1 (555) 123-4567</span> </li> <li> <i class="fas fa-envelope"></i> <span>info@powercell.com</span> </li> <li> <i class="fas fa-clock"></i> <span>Mon-Fri: 9AM - 6PM</span> </li> </ul> </div> </div> <div class="footer-bottom"> <p>© 2023 PowerCell. All Rights Reserved. | <a href="#">Privacy Policy</a> | <a href="#">Terms of Service</a></p> </div> </div> </footer> </body> </html>
CSS
:root { --primary-color: #2563eb; --primary-dark: #1d4ed8; --primary-light: #3b82f6; --secondary-color: #f8fafc; --text-color: #1e293b; --light-text: #64748b; --white: #ffffff; --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); --transition: all 0.3s ease; } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Poppins', sans-serif; color: var(--text-color); line-height: 1.6; overflow-x: hidden; } a { text-decoration: none; color: inherit; } ul { list-style: none; } img { max-width: 100%; height: auto; display: block; } .container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; } .btn { display: inline-block; padding: 12px 24px; background-color: var(--primary-color); color: var(--white); border-radius: 4px; font-weight: 500; transition: var(--transition); border: none; cursor: pointer; font-size: 16px; } .btn:hover { background-color: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow); } .btn-outline { background-color: transparent; border: 2px solid var(--primary-color); color: var(--primary-color); } .btn-outline:hover { background-color: var(--primary-color); color: var(--white); } .section { padding: 80px 0; } .section-title { font-size: 36px; font-weight: 700; margin-bottom: 20px; color: var(--primary-dark); position: relative; display: inline-block; } .section-title::after { content: ''; position: absolute; bottom: -10px; left: 0; width: 60px; height: 4px; background-color: var(--primary-color); border-radius: 2px; } .section-subtitle { font-size: 18px; color: var(--light-text); margin-bottom: 40px; /* max-width: 600px; */ } .text-center { text-align: center; } .text-center .section-title::after { left: 50%; transform: translateX(-50%); } /* Header */ header { background-color: var(--white); box-shadow: var(--shadow); position: fixed; width: 100%; top: 0; z-index: 1000; transition: var(--transition); } header.scrolled { background-color: rgba(255, 255, 255, 0.95); backdrop-filter: blur(5px); } .navbar { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; } .logo { font-size: 24px; font-weight: 700; color: var(--primary-dark); display: flex; align-items: center; } .logo i { margin-right: 10px; color: var(--primary-color); } .nav-links { display: flex; gap: 30px; } .nav-links a { font-weight: 500; transition: var(--transition); position: relative; } .nav-links a::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px; background-color: var(--primary-color); transition: var(--transition); } .nav-links a:hover::after { width: 100%; } .nav-links a:hover { color: var(--primary-color); } .nav-btns { display: flex; gap: 15px; } .mobile-menu-btn { display: none; background: none; border: none; font-size: 24px; color: var(--primary-color); cursor: pointer; } /* Hero Section */ .hero { background: linear-gradient(135deg, #e0f2fe 0%, #bfdbfe 100%); padding: 180px 0 100px; position: relative; overflow: hidden; } .hero::before { content: ''; position: absolute; top: 0; /* right: 0; */ width: 100%; height: 100%; background: url('https://plus.unsplash.com/premium_photo-1681433401553-589104846604?q=80&w=1160&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D') no-repeat center/cover; /* clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%); */ z-index: 1; opacity: 0.5; animation: fadeIn 1s ease-in-out; } .hero-content { position: relative; z-index: 2; max-width: 600px; } .hero-title { font-size: 48px; font-weight: 700; margin-bottom: 20px; color: var(--primary-dark); animation: slideInLeft 0.8s ease-out; } .hero-subtitle { font-size: 18px; color: var(--primary-dark); margin-bottom: 30px; animation: slideInLeft 1s ease-out; } .hero-btns { display: flex; gap: 20px; animation: fadeIn 1.2s ease-out; } /* Features Section */ .features { background-color: var(--white); } .features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 50px; } .feature-card { background-color: var(--secondary-color); border-radius: 8px; padding: 30px; text-align: center; transition: var(--transition); box-shadow: var(--shadow); opacity: 0; transform: translateY(20px); animation: fadeInUp 0.6s ease-out forwards; } .feature-card:nth-child(1) { animation-delay: 0.2s; } .feature-card:nth-child(2) { animation-delay: 0.4s; } .feature-card:nth-child(3) { animation-delay: 0.6s; } .feature-card:hover { transform: translateY(-10px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); } .feature-icon { width: 80px; height: 80px; background-color: var(--primary-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; color: var(--white); font-size: 32px; } .feature-title { font-size: 22px; font-weight: 600; margin-bottom: 15px; color: var(--primary-dark); } .feature-desc { color: var(--light-text); } /* Products Section */ .products { background-color: var(--secondary-color); } .products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-top: 50px; } .product-card { background-color: var(--white); border-radius: 8px; overflow: hidden; transition: var(--transition); box-shadow: var(--shadow); opacity: 0; transform: translateY(20px); animation: fadeInUp 0.6s ease-out forwards; } .product-card:nth-child(1) { animation-delay: 0.2s; } .product-card:nth-child(2) { animation-delay: 0.4s; } .product-card:nth-child(3) { animation-delay: 0.6s; } .product-card:nth-child(4) { animation-delay: 0.8s; } .product-card:hover { transform: translateY(-10px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); } .product-img { height: 200px; width: 100%; object-fit: cover; } .product-info { padding: 20px; } .product-category { display: inline-block; padding: 4px 10px; background-color: var(--primary-light); color: var(--white); border-radius: 4px; font-size: 12px; margin-bottom: 10px; } .product-title { font-size: 20px; font-weight: 600; margin-bottom: 10px; } .product-desc { color: var(--light-text); margin-bottom: 15px; font-size: 14px; } .product-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 15px; } .product-price { font-size: 20px; font-weight: 700; color: var(--primary-dark); } .product-btn { padding: 8px 16px; font-size: 14px; } /* About Section */ .about { background-color: var(--white); } .about-content { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; } .about-img { border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); animation: fadeInLeft 0.8s ease-out; } .about-img img { width: 100%; height: auto; transition: var(--transition); } .about-img:hover img { transform: scale(1.05); } .about-text { animation: fadeInRight 0.8s ease-out; } .about-title { font-size: 36px; font-weight: 700; margin-bottom: 20px; color: var(--primary-dark); } .about-desc { color: var(--light-text); margin-bottom: 20px; } .about-features { margin: 30px 0; } .about-feature { display: flex; align-items: flex-start; margin-bottom: 15px; } .about-feature i { color: var(--primary-color); font-size: 20px; margin-right: 15px; margin-top: 3px; } /* Testimonials Section */ .testimonials { background-color: var(--secondary-color); } .testimonials-slider { margin-top: 50px; position: relative; overflow: hidden; } .testimonials-container { display: flex; transition: transform 0.5s ease; } .testimonial-card { min-width: 100%; padding: 30px; background-color: var(--white); border-radius: 8px; box-shadow: var(--shadow); text-align: center; } .testimonial-img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin: 0 auto 20px; border: 3px solid var(--primary-light); } .testimonial-text { font-style: italic; color: var(--light-text); margin-bottom: 20px; } .testimonial-author { font-weight: 600; color: var(--primary-dark); } .testimonial-role { color: var(--light-text); font-size: 14px; } .slider-dots { display: flex; justify-content: center; margin-top: 30px; gap: 10px; } .dot { width: 12px; height: 12px; border-radius: 50%; background-color: #cbd5e1; cursor: pointer; transition: var(--transition); } .dot.active { background-color: var(--primary-color); width: 30px; border-radius: 6px; } /* Stats Section */ .stats { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%); color: var(--white); padding: 60px 0; } .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; text-align: center; } .stat-item { opacity: 0; transform: translateY(20px); animation: fadeInUp 0.6s ease-out forwards; } .stat-item:nth-child(1) { animation-delay: 0.2s; } .stat-item:nth-child(2) { animation-delay: 0.4s; } .stat-item:nth-child(3) { animation-delay: 0.6s; } .stat-item:nth-child(4) { animation-delay: 0.8s; } .stat-number { font-size: 48px; font-weight: 700; margin-bottom: 10px; } .stat-text { font-size: 18px; opacity: 0.9; } /* FAQ Section */ .faq { background-color: var(--white); } .faq-container { max-width: 800px; margin: 50px auto 0; } .faq-item { margin-bottom: 15px; border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); opacity: 0; transform: translateY(20px); animation: fadeInUp 0.6s ease-out forwards; } .faq-item:nth-child(1) { animation-delay: 0.2s; } .faq-item:nth-child(2) { animation-delay: 0.4s; } .faq-item:nth-child(3) { animation-delay: 0.6s; } .faq-item:nth-child(4) { animation-delay: 0.8s; } .faq-question { background-color: var(--secondary-color); padding: 20px; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: var(--transition); } .faq-question:hover { background-color: #e2e8f0; } .faq-question i { transition: var(--transition); } .faq-answer { padding: 0 20px; max-height: 0; overflow: hidden; transition: max-height 0.3s ease; background-color: var(--white); } .faq-item.active .faq-question { background-color: var(--primary-light); color: var(--white); } .faq-item.active .faq-question i { transform: rotate(180deg); } .faq-item.active .faq-answer { padding: 20px; max-height: 300px; } /* CTA Section */ .cta { background: linear-gradient(rgba(37, 99, 235, 0.9), rgba(37, 99, 235, 0.9)), url('https://images.unsplash.com/photo-1523961131990-5ea7c61b2107?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1374&q=80') no-repeat center/cover; color: var(--white); text-align: center; padding: 100px 0; } .cta-title { font-size: 36px; font-weight: 700; margin-bottom: 20px; } .cta-subtitle { font-size: 18px; margin-bottom: 40px; max-width: 600px; margin-left: auto; margin-right: auto; opacity: 0.9; } .cta-btns { display: flex; justify-content: center; gap: 20px; } .cta .btn-outline { border-color: var(--white); color: var(--white); } .cta .btn-outline:hover { background-color: var(--white); color: var(--primary-color); } /* Footer */ footer { background-color: #0f172a; color: var(--white); padding: 80px 0 30px; } .footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; margin-bottom: 50px; } .footer-col h3 { font-size: 20px; font-weight: 600; margin-bottom: 20px; position: relative; padding-bottom: 10px; } .footer-col h3::after { content: ''; position: absolute; bottom: 0; left: 0; width: 40px; height: 2px; background-color: var(--primary-color); } .footer-links li { margin-bottom: 10px; } .footer-links a { color: #94a3b8; transition: var(--transition); } .footer-links a:hover { color: var(--white); padding-left: 5px; } .footer-contact li { display: flex; align-items: flex-start; margin-bottom: 15px; color: #94a3b8; } .footer-contact i { margin-right: 10px; color: var(--primary-light); } .social-links { display: flex; gap: 15px; margin-top: 20px; } .social-links a { width: 40px; height: 40px; border-radius: 50%; background-color: #1e293b; display: flex; align-items: center; justify-content: center; transition: var(--transition); } .social-links a:hover { background-color: var(--primary-color); transform: translateY(-3px); } .footer-bottom { text-align: center; padding-top: 30px; border-top: 1px solid #1e293b; color: #94a3b8; font-size: 14px; } /* Animations */ @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } @keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } @keyframes slideInLeft { from { opacity: 0; transform: translateX(-50px); } to { opacity: 1; transform: translateX(0); } } @keyframes fadeInRight { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } } /* Responsive Styles */ @media (max-width: 992px) { .hero::before { width: 50%; } .about-content { grid-template-columns: 1fr; gap: 30px; } .about-img { order: -1; } } @media (max-width: 768px) { .section { padding: 60px 0; } .section-title { font-size: 30px; } .hero-title { font-size: 36px; } .hero::before { display: none; } .hero-content { max-width: 100%; text-align: center; } .hero-btns { justify-content: center; } .nav-links { position: fixed; top: 80px; left: -100%; width: 100%; height: calc(100vh - 80px); background-color: var(--white); flex-direction: column; align-items: center; padding: 40px 0; gap: 30px; transition: var(--transition); } .nav-links.active { left: 0; } .mobile-menu-btn { display: block; } .cta-btns { flex-direction: column; align-items: center; } .cta-btns .btn { width: 100%; max-width: 300px; } } @media (max-width: 576px) { .section-title { font-size: 28px; } .hero-title { font-size: 32px; } .hero-btns { flex-direction: column; gap: 15px; } .hero-btns .btn { width: 100%; } .stats-grid { grid-template-columns: 1fr 1fr; } .footer-grid { grid-template-columns: 1fr; } }
JavaScript
// Mobile Menu Toggle const mobileMenuBtn = document.querySelector('.mobile-menu-btn'); const navLinks = document.querySelector('.nav-links'); mobileMenuBtn.addEventListener('click', () => { navLinks.classList.toggle('active'); mobileMenuBtn.innerHTML = navLinks.classList.contains('active') ? '<i class="fas fa-times"></i>' : '<i class="fas fa-bars"></i>'; }); // Close mobile menu when clicking on a link document.querySelectorAll('.nav-links a').forEach(link => { link.addEventListener('click', () => { navLinks.classList.remove('active'); mobileMenuBtn.innerHTML = '<i class="fas fa-bars"></i>'; }); }); // Header scroll effect const header = document.getElementById('header'); window.addEventListener('scroll', () => { if (window.scrollY > 100) { header.classList.add('scrolled'); } else { header.classList.remove('scrolled'); } }); // FAQ Accordion const faqItems = document.querySelectorAll('.faq-item'); faqItems.forEach(item => { const question = item.querySelector('.faq-question'); question.addEventListener('click', () => { // Close all other items faqItems.forEach(otherItem => { if (otherItem !== item) { otherItem.classList.remove('active'); } }); // Toggle current item item.classList.toggle('active'); }); }); // Testimonial Slider let currentSlide = 0; const slides = [ { img: "https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1587&q=80", name: "Sarah Johnson", role: "Home User", text: "I've been using PowerCell AA batteries for all my home devices and they last significantly longer than other brands I've tried. Highly recommended!" }, { img: "https://images.unsplash.com/photo-1560250097-0b93528c311a?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1587&q=80", name: "Michael Chen", role: "Small Business Owner", text: "The solar batteries from PowerCell have been a game-changer for my off-grid cabin. Reliable power even during long winter nights." }, { img: "https://images.unsplash.com/photo-1573497019940-1c28c88b4f3e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1587&q=80", name: "Emily Rodriguez", role: "Tech Enthusiast", text: "Their power banks are my go-to for traveling. Fast charging and compact design - perfect for my needs!" } ]; const dots = document.querySelectorAll('.dot'); const testimonialContainer = document.querySelector('.testimonials-container'); function showSlide(index) { currentSlide = index; const slide = slides[index]; testimonialContainer.innerHTML = ` <div class="testimonial-card"> <img src="${slide.img}" alt="${slide.name}" class="testimonial-img"> <p class="testimonial-text">"${slide.text}"</p> <h4 class="testimonial-author">${slide.name}</h4> <p class="testimonial-role">${slide.role}</p> </div> `; dots.forEach((dot, i) => { dot.classList.toggle('active', i === index); }); } dots.forEach((dot, i) => { dot.addEventListener('click', () => showSlide(i)); }); // Auto slide change setInterval(() => { currentSlide = (currentSlide + 1) % slides.length; showSlide(currentSlide); }, 5000); // Initialize first slide showSlide(0); // Animation on scroll const animateOnScroll = () => { const elements = document.querySelectorAll('.feature-card, .product-card, .stat-item, .faq-item'); elements.forEach(element => { const elementPosition = element.getBoundingClientRect().top; const screenPosition = window.innerHeight / 1.3; if (elementPosition < screenPosition) { element.style.animationPlayState = 'running'; } }); }; window.addEventListener('scroll', animateOnScroll); window.addEventListener('load', animateOnScroll);
Output Preview
Desktop
Mobile
Fullscreen