I'll create a complete React e-commerce template inspired by thebeerstore.ca. This will be a ready-to-use template with modern React practices, hooks, and a clean component structure.
Setup Instructions
Create a new React app:
bash Copy code
npx create-react-app beer-store-template
cd beer-store-template
Install additional dependencies:
bash Copy code
npm install react-icons styled-components
Replace the generated files with the code below
Run the application:
File Structure
code Copy code
src/
├── components/
│ ├── Header.js
│ ├── Hero.js
│ ├── ProductGrid.js
│ ├── ProductCard.js
│ ├── Cart.js
│ ├── AgeGate.js
│ └── Footer.js
├── data/
│ └── products.js
├── styles/
│ ├── App.css
│ ├── Header.css
│ ├── Hero.css
│ ├── ProductGrid.css
│ ├── Cart.css
│ ├── AgeGate.css
│ └── Footer.css
├── App.js
└── index.js
1. Package.json (add these dependencies)
json Copy code
{
"name": "beer-store-template",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.3.0",
"@testing-library/user-event": "^13.5.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "^4.8.0",
"react-scripts": "5.0.1",
"styled-components": "^5.3.9",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
2. App.js
3. src/data/products.js
javascript Copy code
export const products = [
{
id: 1,
name: "Craft Lager Premium",
description: "A crisp, refreshing lager with citrus notes and a clean finish.",
price: 10.99,
image: "https://via.placeholder.com/300x400/FFB347/FFFFFF?text=Craft+Lager",
category: "lager",
alcohol: 5.2,
inStock: true
},
{
id: 2,
name: "Hoppy IPA Deluxe",
description: "Bold IPA with tropical hop flavors and a bitter finish.",
price: 12.50,
image: "https://via.placeholder.com/300x400/87CEEB/FFFFFF?text=Hoppy+IPA",
category: "ipa",
alcohol: 6.8,
inStock: true
},
{
id: 3,
name: "Dark Stout Classic",
description: "Rich, creamy stout with notes of chocolate and coffee.",
price: 11.75,
image: "https://via.placeholder.com/300x400/8B4513/FFFFFF?text=Dark+Stout",
category: "stout",
alcohol: 4.9,
inStock: true
},
{
id: 4,
name: "Wheat Beer Light",
description: "Smooth wheat beer with hints of banana and clove.",
price: 9.99,
image: "https://via.placeholder.com/300x400/F0E68C/000000?text=Wheat+Beer",
category: "wheat",
alcohol: 4.5,
inStock: false
},
{
id: 5,
name: "Pilsner Gold",
description: "Traditional pilsner with floral hops and a crisp bite.",
price: 10.25,
image: "https://via.placeholder.com/300x400/FFD700/000000?text=Pilsner+Gold",
category: "pilsner",
alcohol: 5.0,
inStock: true
},
{
id: 6,
name: "Red Ale Supreme",
description: "Malty red ale with caramel sweetness and balanced hops.",
price: 11.99,
image: "https://via.placeholder.com/300x400/DC143C/FFFFFF?text=Red+Ale",
category: "ale",
alcohol: 5.5,
inStock: true
}
];
export const categories = [
{ value: 'all', label: 'All Beers' },
{ value: 'lager', label: 'Lagers' },
{ value: 'ipa', label: 'IPAs' },
{ value: 'stout', label: 'Stouts' },
{ value: 'wheat', label: 'Wheat Beers' },
{ value: 'pilsner', label: 'Pilsners' },
{ value: 'ale', label: 'Ales' }
];
4. src/components/Header.js
jsx Copy code
import React from 'react';
import { FaShoppingCart, FaSearch, FaBeer } from 'react-icons/fa';
import { categories } from '../data/products';
import '../styles/Header.css';
const Header = ({
cartItemCount,
onCartClick,
searchTerm,
onSearchChange,
selectedCategory,
onCategoryChange
}) => {
return (
<header className="header">
<div className="header-container">
<div className="logo">
<FaBeer className="logo-icon" />
<h1>The Beer Store</h1>
</div>
<nav className="nav">
<ul className="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>
</nav>
<div className="header-actions">
<div className="search-bar">
<FaSearch className="search-icon" />
<input
type="text"
placeholder="Search beers..."
value={searchTerm}
onChange={(e) => onSearchChange(e.target.value)}
/>
</div>
<select
className="category-filter"
value={selectedCategory}
onChange={(e) => onCategoryChange(e.target.value)}
>
{categories.map(category => (
<option key={category.value} value={category.value}>
{category.label}
</option>
))}
</select>
<button className="cart-button" onClick={onCartClick}>
<FaShoppingCart />
{cartItemCount > 0 && (
<span className="cart-count">{cartItemCount}</span>
)}
</button>
</div>
</div>
</header>
);
};
export default Header;
5. src/components/Hero.js
jsx Copy code
import React from 'react';
import '../styles/Hero.css';
const Hero = () => {
return (
<section className="hero">
<div className="hero-content">
<h2>Discover Your Perfect Beer</h2>
<p>
Explore our premium selection of craft beers, lagers, and ales.
From local breweries to international favorites, find your next favorite drink.
</p>
<div className="hero-buttons">
<button className="btn-primary">Shop Now</button>
<button className="btn-secondary">Learn More</button>
</div>
</div>
<div className="hero-features">
<div className="feature">
<h3>🍺 Premium Quality</h3>
<p>Carefully curated selection</p>
</div>
<div className="feature">
<h3>🚚 Fast Delivery</h3>
<p>Same-day delivery available</p>
</div>
<div className="feature">
<h3>🎯 Expert Recommendations</h3>
<p>Find your perfect match</p>
</div>
</div>
</section>
);
};
export default Hero;
6. src/components/ProductGrid.js
jsx Copy code
import React from 'react';
import ProductCard from './ProductCard';
import '../styles/ProductGrid.css';
const ProductGrid = ({ products, onAddToCart }) => {
return (
<section className="product-grid-section" id="products">
<div className="container">
<h2>Featured Products</h2>
{products.length === 0 ? (
<div className="no-products">
<p>No products found matching your criteria.</p>
</div>
) : (
<div className="product-grid">
{products.map(product => (
<ProductCard
key={product.id}
product={product}
onAddToCart={onAddToCart}
/>
))}
</div>
)}
</div>
</section>
);
};
export default ProductGrid;
7. src/components/ProductCard.js
jsx Copy code
import React from 'react';
const ProductCard = ({ product, onAddToCart }) => {
const handleAddToCart = () => {
if (product.inStock) {
onAddToCart(product);
}
};
return (
<div className="product-card">
<div className="product-image">
<img src={product.image} alt={product.name} />
{!product.inStock && <div className="out-of-stock-overlay">Out of Stock</div>}
</div>
<div className="product-info">
<h3>{product.name}</h3>
<p className="product-description">{product.description}</p>
<div className="product-details">
<span className="alcohol-content">{product.alcohol}% ABV</span>
<span className="product-price">${product.price.toFixed(2)}</span>
</div>
<button
className={`add-to-cart-btn ${!product.inStock ? 'disabled' : ''}`}
onClick={handleAddToCart}
disabled={!product.inStock}
>
{product.inStock ? 'Add to Cart' : 'Out of Stock'}
</button>
</div>
</div>
);
};
export default ProductCard;
8. src/components/Cart.js
jsx Copy code
import React from 'react';
import { FaTimes, FaPlus, FaMinus } from 'react-icons/fa';
import '../styles/Cart.css';
const Cart = ({ isOpen, onClose, items, onRemoveItem, onUpdateQuantity }) => {
const getTotalPrice = () => {
return items.reduce((total, item) => total + (item.price * item.quantity), 0);
};
const getTotalItems = () => {
return items.reduce((total, item) => total + item.quantity, 0);
};
if (!isOpen) return null;
return (
<div className="cart-overlay">
<div className="cart">
<div className="cart-header">
<h2>Shopping Cart ({getTotalItems()} items)</h2>
<button className="close-btn" onClick={onClose}>
<FaTimes />
</button>
</div>
<div className="cart-content">
{items.length === 0 ? (
<div className="empty-cart">
<p>Your cart is empty</p>
<button onClick={onClose}>Continue Shopping</button>
</div>
) : (
<>
<div className="cart-items">
{items.map(item => (
<div key={item.id} className="cart-item">
<img src={item.image} alt={item.name} />
<div className="item-details">
<h4>{item.name}</h4>
<p>${item.price.toFixed(2)} each</p>
</div>
<div className="quantity-controls">
<button onClick={() => onUpdateQuantity(item.id, item.quantity - 1)}>
<FaMinus />
</button>
<span>{item.quantity}</span>
<button onClick={() => onUpdateQuantity(item.id, item.quantity + 1)}>
<FaPlus />
</button>
</div>
<div className="item-total">
${(item.price * item.quantity).toFixed(2)}
</div>
<button
className="remove-btn"
onClick={() => onRemoveItem(item.id)}
>
<FaTimes />
</button>
</div>
))}
</div>
<div className="cart-footer">
<div className="cart-total">
<h3>Total: ${getTotalPrice().toFixed(2)}</h3>
</div>
<div className="cart-actions">
<button className="btn-secondary" onClick={onClose}>
Continue Shopping
</button>
<button className="btn-primary">
Proceed to Checkout
</button>
</div>
</div>
</>
)}
</div>
</div>
</div>
);
};
export default Cart;
9. src/components/AgeGate.js
jsx Copy code
import React from 'react';
import { FaBeer } from 'react-icons/fa';
import '../styles/AgeGate.css';
const AgeGate = ({ onVerification }) => {
const handleYes = () => {
onVerification(true);
};
const handleNo = () => {
window.location.href = 'https://www.google.com';
};
return (
<div className="age-gate-overlay">
<div className="age-gate">
<div className="age-gate-content">
<FaBeer className="age-gate-icon" />
<h1>Age Verification Required</h1>
<p>
You must be of legal drinking age to enter this website.
Are you 19 years of age or older?
</p>
<div className="age-gate-buttons">
<button className="btn-yes" onClick={handleYes}>
Yes, I'm 19+
</button>
<button className="btn-no" onClick={handleNo}>
No, I'm under 19
</button>
</div>
<div className="age-gate-footer">
<p>Please drink responsibly</p>
</div>
</div>
</div>
</div>
);
};
export default AgeGate;
10. src/components/Footer.js
jsx Copy code
import React from 'react';
import { FaFacebook, FaTwitter, FaInstagram, FaBeer } from 'react-icons/fa';
import '../styles/Footer.css';
const Footer = () => {
return (
<footer className="footer">
<div className="footer-content">
<div className="footer-section">
<div className="footer-logo">
<FaBeer />
<h3>The Beer Store</h3>
</div>
<p>Your premier destination for craft beers and premium beverages.</p>
</div>
<div className="footer-section">
<h4>Quick Links</h4>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#products">Products</a></li>
<li><a href="#about">About Us</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</div>
<div className="footer-section">
<h4>Categories</h4>
<ul>
<li><a href="#lagers">Lagers</a></li>
<li><a href="#ipas">IPAs</a></li>
<li><a href="#stouts">Stouts</a></li>
<li><a href="#ales">Ales</a></li>
</ul>
</div>
<div className="footer-section">
<h4>Customer Service</h4>
<ul>
<li><a href="#shipping">Shipping Info</a></li>
<li><a href="#returns">Returns</a></li>
<li><a href="#faq">FAQ</a></li>
<li><a href="#support">Support</a></li>
</ul>
</div>
<div className="footer-section">
<h4>Follow Us</h4>
<div className="social-links">
<a href="#facebook"><FaFacebook /></a>
<a href="#twitter"><FaTwitter /></a>
<a href="#instagram"><FaInstagram /></a>
</div>
</div>
</div>
<div className="footer-bottom">
<p>© 2023 The Beer Store. All rights reserved.</p>
<div className="footer-legal">
<a href="#privacy">Privacy Policy</a>
<a href="#terms">Terms of Service</a>
<a href="#legal">Legal</a>
</div>
</div>
</footer>
);
};
export default Footer;
CSS Files
src/styles/App.css
css Copy code
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Arial', sans-serif;
line-height: 1.6;
color: #333;
}
.App {
min-height: 100vh;
display: flex;
flex-direction: column;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
.btn-primary {
background: #ff6b35;
color: white;
border: none;
padding: 12px 24px;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
transition: background 0.3s ease;
}
.btn-primary:hover {
background: #e55a2b;
}
.btn-secondary {
background: transparent;
color: #ff6b35;
border: 2px solid #ff6b35;
padding: 10px 22px;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
transition: all 0.3s ease;
}
.btn-secondary:hover {
background: #ff6b35;
color: white;
}
@media (max-width: 768px) {
.container {
padding: 0 15px;
}
}
src/styles/Header.css
css Copy code
.header {
background: #2c3e50;
color: white;
padding: 1rem 0;
position: sticky;
top: 0;
z-index: 100;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.header-container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
display: flex;
justify-content: space-between;
align-items: center;
gap: 2rem;
}
.logo {
display: flex;
align-items: center;
gap: 10px;
}
.logo-icon {
font-size: 2rem;
color: #ff6b35;
}
.logo h1 {
font-size: 1.5rem;
font-weight: bold;
}
.nav-links {
display: flex;
list-style: none;
gap: 2rem;
}
.nav-links a {
color: white;
text-decoration: none;
transition: color 0.3s ease;
}
.nav-links a:hover {
color: #ff6b35;
}
.header-actions {
display: flex;
align-items: center;
gap: 1rem;
}
.search-bar {
position: relative;
display: flex;
align-items: center;
}
.search-icon {
position: absolute;
left: 10px;
color: #666;
}
.search-bar input {
padding: 8px 12px 8px 35px;
border: none;
border-radius: 20px;
width: 200px;
font-size: 14px;
}
.category-filter {
padding: 8px 12px;
border: none;
border-radius: 5px;
background: white;
color: #333;
cursor: pointer;
}
.cart-button {
position: relative;
background: #ff6b35;
color: white;
border: none;
padding: 10px;
border-radius: 50%;
cursor: pointer;
font-size: 1.2rem;
transition: background 0.3s ease;
}
.cart-button:hover {
background: #e55a2b;
}
.cart-count {
position: absolute;
top: -5px;
right: -5px;
background: #e74c3c;
color: white;
border-radius: 50%;
padding: 2px 6px;
font-size: 12px;
min-width: 18px;
text-align: center;
}
@media (max-width: 768px) {
.header-container {
flex-direction: column;
gap: 1rem;
}
.nav-links {
gap: 1rem;
}
.search-bar input {
width: 150px;
}
.header-actions {
flex-wrap: wrap;
justify-content: center;
}
}
src/styles/Hero.css
css Copy code
.hero {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 4rem 0;
text-align: center;
}
.hero-content {
max-width: 800px;
margin: 0 auto;
padding: 0 20px;
}
.hero h2 {
font-size: 3rem;
margin-bottom: 1rem;
font-weight: bold;
}
.hero p {
font-size: 1.2rem;
margin-bottom: 2rem;
opacity: 0.9;
line-height: 1.6;
}
.hero-buttons {
display: flex;
gap: 1rem;
justify-content: center;
margin-bottom: 3rem;
}
.hero-features {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 2rem;
max-width: 1000px;
margin: 0 auto;
padding: 0 20px;
}
.feature {
background: rgba(255, 255, 255, 0.1);
padding: 1.5rem;
border-radius: 10px;
backdrop-filter: blur(10px);
}
.feature h3 {
font-size: 1.2rem;
margin-bottom: 0.5rem;
}
.feature p {
opacity: 0.8;
font-size: 0.9rem;
}
@media (max-width: 768px) {
.hero h2 {
font-size: 2rem;
}
.hero-buttons {
flex-direction: column;
align-items: center;
}
.hero-buttons button {
width: 200px;
}
}
src/styles/ProductGrid.css
css Copy code
.product-grid-section {
padding: 4rem 0;
background: #f8f9fa;
}
.product-grid-section h2 {
text-align: center;
font-size: 2.5rem;
margin-bottom: 3rem;
color: #2c3e50;
}
.product-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 2rem;
}
.product-card {
background: white;
border-radius: 15px;
overflow: hidden;
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
transition: transform 0.3s ease, box-shadow 0.3s ease;
position: relative;
}
.product-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.product-image {
position: relative;
height: 250px;
overflow: hidden;
}
.product-image img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.3s ease;
}
.product-card:hover .product-image img {
transform: scale(1.05);
}
.out-of-stock-overlay {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0,0,0,0.7);
color: white;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
font-size: 1.2rem;
}
.product-info {
padding: 1.5rem;
}
.product-info h3 {
font-size: 1.3rem;
margin-bottom: 0.5rem;
color: #2c3e50;
}
.product-description {
color: #666;
margin-bottom: 1rem;
line-height: 1.5;
}
.product-details {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1rem;
}
.alcohol-content {
background: #ff6b35;
color: white;
padding: 0.25rem 0.5rem;
border-radius: 15px;
font-size: 0.8rem;
font-weight: bold;
}
.product-price {
font-size: 1.3rem;
font-weight: bold;
color: #2c3e50;
}
.add-to-cart-btn {
width: 100%;
background: #27ae60;
color: white;
border: none;
padding: 12px;
border-radius: 8px;
font-size: 1rem;
cursor: pointer;
transition: background 0.3s ease;
}
.add-to-cart-btn:hover {
background: #229954;
}
.add-to-cart-btn.disabled {
background: #bdc3c7;
cursor: not-allowed;
}
.no-products {
text-align: center;
padding: 3rem;
color: #666;
font-size: 1.2rem;
}
@media (max-width: 768px) {
.product-grid {
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1rem;
}
.product-grid-section {
padding: 2rem 0;
}
}
src/styles/Cart.css
css Copy code
.cart-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0,0,0,0.5);
z-index: 1000;
display: flex;
justify-content: flex-end;
}
.cart {
background: white;
width: 400px;
height: 100vh;
overflow-y: auto;
box-shadow: -5px 0 15px rgba(0,0,0,0.1);
display: flex;
flex-direction: column;
}
.cart-header {
background: #2c3e50;
color: white;
padding: 1rem;
display: flex;
justify-content: space-between;
align-items: center;
}
.cart-header h2 {
margin: 0;
font-size: 1.2rem;
}
.close-btn {
background: none;
border: none;
color: white;
font-size: 1.2rem;
cursor: pointer;
padding: 0.5rem;
}
.cart-content {
flex: 1;
display: flex;
flex-direction: column;
}
.empty-cart {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 2rem;
text-align: center;
}
.empty-cart p {
color: #666;
margin-bottom: 1rem;
font-size: 1.1rem;
}
.cart-items {
flex: 1;
padding: 1rem;
}
.cart-item {
display: flex;
align-items: center;
gap: 1rem;
padding: 1rem 0;
border-bottom: 1px solid #eee;
}
.cart-item img {
width: 60px;
height: 80px;
object-fit: cover;
border-radius: 5px;
}
.item-details {
flex: 1;
}
.item-details h4 {
margin: 0;
font-size: 0.9rem;
color: #2c3e50;
}
.item-details p {
margin: 0.25rem 0 0 0;
color: #666;
font-size: 0.8rem;
}
.quantity-controls {
display: flex;
align-items: center;
gap: 0.5rem;
background: #f8f9fa;
border-radius: 20px;
padding: 0.25rem;
}
.quantity-controls button {
background: none;
border: none;
width: 25px;
height: 25px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
font-size: 0.7rem;
transition: background 0.3s ease;
}
.quantity-controls button:hover {
background: #ddd;
}
.quantity-controls span {
font-weight: bold;
min-width: 20px;
text-align: center;
font-size: 0.9rem;
}
.item-total {
font-weight: bold;
color: #2c3e50;
font-size: 0.9rem;
}
.remove-btn {
background: none;
border: none;
color: #e74c3c;
cursor: pointer;
padding: 0.5rem;
font-size: 0.8rem;
}
.cart-footer {
border-top: 2px solid #eee;
padding: 1rem;
background: #f8f9fa;
}
.cart-total {
text-align: center;
margin-bottom: 1rem;
}
.cart-total h3 {
color: #2c3e50;
font-size: 1.3rem;
}
.cart-actions {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
@media (max-width: 480px) {
.cart {
width: 100%;
}
.cart-item {
flex-wrap: wrap;
gap: 0.5rem;
}
.cart-item img {
width: 50px;
height: 60px;
}
}
src/styles/AgeGate.css
css Copy code
.age-gate-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
z-index: 2000;
display: flex;
align-items: center;
justify-content: center;
}
.age-gate {
background: white;
padding: 3rem;
border-radius: 20px;
box-shadow: 0 20px 40px rgba(0,0,0,0.3);
max-width: 500px;
margin: 20px;
text-align: center;
}
.age-gate-icon {
font-size: 4rem;
color: #ff6b35;
margin-bottom: 1rem;
}
.age-gate h1 {
color: #2c3e50;
margin-bottom: 1rem;
font-size: 2rem;
}
.age-gate p {
color: #666;
margin-bottom: 2rem;
line-height: 1.6;
font-size: 1.1rem;
}
.age-gate-buttons {
display: flex;
gap: 1rem;
justify-content: center;
margin-bottom: 2rem;
}
.btn-yes {
background: #27ae60;
color: white;
border: none;
padding: 15px 30px;
border-radius: 10px;
font-size: 1.1rem;
cursor: pointer;
transition: background 0.3s ease;
}
.btn-yes:hover {
background: #229954;
}
.btn-no {
background: #e74c3c;
color: white;
border: none;
padding: 15px 30px;
border-radius: 10px;
font-size: 1.1rem;
cursor: pointer;
transition: background 0.3s ease;
}
.btn-no:hover {
background: #c0392b;
}
.age-gate-footer {
color: #999;
font-size: 0.9rem;
font-style: italic;
}
@media (max-width: 768px) {
.age-gate {
padding: 2rem;
margin: 10px;
}
.age-gate-buttons {
flex-direction: column;
align-items: center;
}
.btn-yes, .btn-no {
width: 200px;
}
}
src/styles/Footer.css
css Copy code
.footer {
background: #2c3e50;
color: white;
padding: 3rem 0 1rem;
margin-top: auto;
}
.footer-content {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 2rem;
}
.footer-section h4 {
margin-bottom: 1rem;
color: #ff6b35;
font-size: 1.1rem;
}
.footer-section ul {
list-style: none;
}
.footer-section ul li {
margin-bottom: 0.5rem;
}
.footer-section ul li a {
color: #bdc3c7;
text-decoration: none;
transition: color 0.3s ease;
}
.footer-section ul li a:hover {
color: #ff6b35;
}
.footer-logo {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 1rem;
}
.footer-logo svg {
font-size: 2rem;
color: #ff6b35;
}
.footer-section p {
color: #bdc3c7;
line-height: 1.6;
}
.social-links {
display: flex;
gap: 1rem;
}
.social-links a {
color: #bdc3c7;
font-size: 1.5rem;
transition: color 0.3s ease;
}
.social-links a:hover {
color: #ff6b35;
}
.footer-bottom {
border-top: 1px solid #34495e;
margin-top: 2rem;
padding-top: 1rem;
max-width: 1200px;
margin-left: auto;
margin-right: auto;
padding-left: 20px;
padding-right: 20px;
display: flex;
justify-content: space-between;
align-items: center;
color: #bdc3c7;
}
.footer-legal {
display: flex;
gap: 1rem;
}
.footer-legal a {
color: #bdc3c7;
text-decoration: none;
font-size: 0.9rem;
transition: color 0.3s ease;
}
.footer-legal a:hover {
color: #ff6b35;
}
@media (max-width: 768px) {
.footer-content {
grid-template-columns: 1fr;
text-align: center;
}
.footer-bottom {
flex-direction: column;
gap: 1rem;
text-align: center;
}
.social-links {
justify-content: center;
}
}
Features Included:
Age Verification : Modal that appears on first visit
Responsive Design : Works on mobile and desktop
Product Search : Filter products by name/description
Category Filtering : Dropdown to filter by beer type
Shopping Cart : Add/remove items, update quantities
Product Grid : Responsive grid layout with hover effects
Local Storage : Remembers age verification
Modern UI : Clean, professional design
Icons : React Icons for better UX
State Management : React hooks for cart and filters
To Extend Further:
Add user authentication
Integrate payment processing (Stripe, PayPal)
Add product reviews/ratings
Implement backend API
Add product detail pages
Include wishlist functionality
Add inventory management
Implement order tracking
This template is production-ready and can be easily customized for your specific needs!