550 lines
20 KiB
HTML
550 lines
20 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="vi">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Sản phẩm - EuroTile Worker</title>
|
|
<link rel="stylesheet" href="assets/css/style.css">
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
|
<style>
|
|
/* Custom styles for product cards */
|
|
.product-card {
|
|
background: var(--white);
|
|
border-radius: 12px;
|
|
overflow: hidden;
|
|
box-shadow: var(--shadow-light);
|
|
transition: all 0.3s ease;
|
|
cursor: pointer;
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
}
|
|
|
|
.product-card:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: var(--shadow-medium);
|
|
}
|
|
|
|
.product-image-container {
|
|
position: relative;
|
|
width: 100%;
|
|
padding-bottom: 100%; /* 1:1 Aspect Ratio */
|
|
overflow: hidden;
|
|
background: var(--background-gray);
|
|
}
|
|
|
|
.product-image {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
transition: transform 0.3s ease;
|
|
}
|
|
|
|
.product-card:hover .product-image {
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
.product-badge {
|
|
position: absolute;
|
|
top: 8px;
|
|
right: 8px;
|
|
padding: 4px 8px;
|
|
background: var(--danger-color);
|
|
color: var(--white);
|
|
border-radius: 12px;
|
|
font-size: 10px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.product-info {
|
|
padding: 12px;
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.product-name {
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
color: var(--text-dark);
|
|
margin-bottom: 6px;
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 2;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
line-height: 1.4;
|
|
min-height: 40px;
|
|
}
|
|
|
|
.product-price {
|
|
font-size: 16px;
|
|
font-weight: 700;
|
|
color: var(--primary-blue);
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.product-price-old {
|
|
font-size: 13px;
|
|
color: var(--text-light);
|
|
text-decoration: line-through;
|
|
margin-left: 8px;
|
|
}
|
|
|
|
/* Product Actions - Horizontal Layout */
|
|
.product-actions {
|
|
display: flex;
|
|
gap: 6px;
|
|
margin-top: auto;
|
|
}
|
|
|
|
.btn-360 {
|
|
flex: 0 0 auto;
|
|
padding: 8px 12px !important;
|
|
background: var(--background-gray) !important;
|
|
color: var(--text-dark) !important;
|
|
border: 1px solid var(--border-color) !important;
|
|
border-radius: 8px;
|
|
font-size: 12px !important;
|
|
font-weight: 500;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.btn-360:hover {
|
|
background: var(--white) !important;
|
|
border-color: var(--primary-blue) !important;
|
|
color: var(--primary-blue) !important;
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
.btn-360 i {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.btn-add-cart {
|
|
flex: 1;
|
|
padding: 8px 12px !important;
|
|
background: var(--primary-blue) !important;
|
|
color: var(--white) !important;
|
|
border: none;
|
|
border-radius: 8px;
|
|
font-size: 12px !important;
|
|
font-weight: 500;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 6px;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.btn-add-cart:hover {
|
|
background: var(--light-blue) !important;
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 4px 12px rgba(0, 91, 154, 0.3);
|
|
}
|
|
|
|
.btn-add-cart i {
|
|
font-size: 14px;
|
|
}
|
|
|
|
/* Search Bar Enhancements */
|
|
.search-bar {
|
|
background: var(--white);
|
|
border-radius: 12px;
|
|
padding: 12px 16px;
|
|
display: flex;
|
|
align-items: center;
|
|
box-shadow: var(--shadow-light);
|
|
margin-bottom: 16px;
|
|
border: 1px solid var(--border-color);
|
|
}
|
|
|
|
.search-input {
|
|
flex: 1;
|
|
border: none;
|
|
outline: none;
|
|
font-size: 14px;
|
|
color: var(--text-dark);
|
|
background: transparent;
|
|
padding-left: 8px;
|
|
}
|
|
|
|
.search-icon {
|
|
color: var(--primary-blue);
|
|
font-size: 18px;
|
|
}
|
|
|
|
/* Filter Pills Enhancement */
|
|
.filter-container {
|
|
display: flex;
|
|
gap: 8px;
|
|
overflow-x: auto;
|
|
padding: 4px 0;
|
|
margin-bottom: 16px;
|
|
-webkit-overflow-scrolling: touch;
|
|
scrollbar-width: none;
|
|
}
|
|
|
|
.filter-pill {
|
|
padding: 8px 16px;
|
|
background: var(--white);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 20px;
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
color: var(--text-dark);
|
|
white-space: nowrap;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.filter-pill:hover {
|
|
background: var(--background-gray);
|
|
}
|
|
|
|
.filter-pill.active {
|
|
background: var(--primary-blue);
|
|
color: var(--white);
|
|
border-color: var(--primary-blue);
|
|
}
|
|
|
|
/* Product Grid */
|
|
.product-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, 1fr);
|
|
gap: 12px;
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
/* Load More Button */
|
|
.load-more-container {
|
|
text-align: center;
|
|
padding: 16px 0;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.btn-load-more {
|
|
padding: 12px 32px;
|
|
background: var(--white);
|
|
color: var(--primary-blue);
|
|
border: 2px solid var(--primary-blue);
|
|
border-radius: 24px;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.btn-load-more:hover {
|
|
background: var(--primary-blue);
|
|
color: var(--white);
|
|
transform: translateY(-2px);
|
|
box-shadow: var(--shadow-medium);
|
|
}
|
|
|
|
/* Header Enhancement */
|
|
.header {
|
|
background: var(--white);
|
|
padding: 16px;
|
|
box-shadow: var(--shadow-light);
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 100;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.cart-button {
|
|
position: relative;
|
|
width: 32px;
|
|
height: 32px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: transparent;
|
|
border: none;
|
|
color: var(--text-dark);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.cart-badge {
|
|
position: absolute;
|
|
top: -4px;
|
|
right: -4px;
|
|
background: var(--danger-color);
|
|
color: var(--white);
|
|
font-size: 10px;
|
|
font-weight: 700;
|
|
padding: 2px 6px;
|
|
border-radius: 10px;
|
|
min-width: 18px;
|
|
text-align: center;
|
|
}
|
|
|
|
/* Responsive adjustments */
|
|
@media (max-width: 360px) {
|
|
.product-actions {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.btn-360 {
|
|
width: 100%;
|
|
justify-content: center;
|
|
}
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
.product-grid {
|
|
grid-template-columns: repeat(3, 1fr);
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="page-wrapper">
|
|
<!-- Header -->
|
|
<div class="header">
|
|
<a href="index.html" class="back-button">
|
|
<i class="fas fa-arrow-left"></i>
|
|
</a>
|
|
<h1 class="header-title">Sản phẩm</h1>
|
|
<a href="cart.html" class="cart-button">
|
|
<i class="fas fa-shopping-cart"></i>
|
|
<span class="cart-badge">3</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="container">
|
|
<!-- Search Bar -->
|
|
<div class="search-bar">
|
|
<i class="fas fa-search search-icon"></i>
|
|
<input type="text" class="search-input" placeholder="Tìm kiếm sản phẩm...">
|
|
</div>
|
|
|
|
<!-- Filter Pills -->
|
|
<div class="filter-container">
|
|
<button class="filter-pill active" onclick="filterProducts('all')">Tất cả</button>
|
|
<button class="filter-pill" onclick="filterProducts('floor')">Gạch lát nền</button>
|
|
<button class="filter-pill" onclick="filterProducts('wall')">Gạch ốp tường</button>
|
|
<button class="filter-pill" onclick="filterProducts('decorative')">Gạch trang trí</button>
|
|
<button class="filter-pill" onclick="filterProducts('outdoor')">Gạch ngoài trời</button>
|
|
<button class="filter-pill" onclick="filterProducts('accessories')">Phụ kiện</button>
|
|
</div>
|
|
|
|
<!-- Product Grid -->
|
|
<div class="product-grid">
|
|
<!-- Product 1 -->
|
|
<div class="product-card">
|
|
<div class="product-image-container" onclick="window.location.href='product-detail.html'">
|
|
<img src="https://images.unsplash.com/photo-1615971677499-5467cbab01c0?w=300&h=300&fit=crop" alt="Gạch men" class="product-image">
|
|
<span class="product-badge">-10%</span>
|
|
</div>
|
|
<div class="product-info">
|
|
<div class="product-name">Gạch men cao cấp 60x60</div>
|
|
<div class="product-price">
|
|
450.000đ/m²
|
|
<span class="product-price-old">500.000đ</span>
|
|
</div>
|
|
<div class="product-actions">
|
|
<button class="btn-360" onclick="event.stopPropagation(); view360('#')">
|
|
<i class="fas fa-cube"></i>
|
|
<span>360°</span>
|
|
</button>
|
|
<button class="btn-add-cart" onclick="event.stopPropagation(); addToCart('Product 1')">
|
|
<i class="fas fa-cart-plus"></i>
|
|
<span>Thêm vào giỏ</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Product 2 -->
|
|
<div class="product-card">
|
|
<div class="product-image-container" onclick="window.location.href='product-detail.html'">
|
|
<img src="https://images.unsplash.com/photo-1565193566173-7a0ee3dbe261?w=300&h=300&fit=crop" alt="Gạch granite" class="product-image">
|
|
</div>
|
|
<div class="product-info">
|
|
<div class="product-name">Gạch granite nhập khẩu</div>
|
|
<div class="product-price">680.000đ/m²</div>
|
|
<div class="product-actions">
|
|
<button class="btn-360" onclick="event.stopPropagation(); view360('#')">
|
|
<i class="fas fa-cube"></i>
|
|
<span>360°</span>
|
|
</button>
|
|
<button class="btn-add-cart" onclick="event.stopPropagation(); addToCart('Product 2')">
|
|
<i class="fas fa-cart-plus"></i>
|
|
<span>Thêm vào giỏ</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Product 3 -->
|
|
<div class="product-card">
|
|
<div class="product-image-container" onclick="window.location.href='product-detail.html'">
|
|
<img src="https://images.unsplash.com/photo-1600607687644-aac4c3eac7f4?w=300&h=300&fit=crop" alt="Gạch mosaic" class="product-image">
|
|
<span class="product-badge">Mới</span>
|
|
</div>
|
|
<div class="product-info">
|
|
<div class="product-name">Gạch mosaic trang trí</div>
|
|
<div class="product-price">320.000đ/m²</div>
|
|
<div class="product-actions">
|
|
<button class="btn-360" onclick="event.stopPropagation(); view360('#')">
|
|
<i class="fas fa-cube"></i>
|
|
<span>360°</span>
|
|
</button>
|
|
<button class="btn-add-cart" onclick="event.stopPropagation(); addToCart('Product 3')">
|
|
<i class="fas fa-cart-plus"></i>
|
|
<span>Thêm vào giỏ</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Product 4 -->
|
|
<div class="product-card">
|
|
<div class="product-image-container" onclick="window.location.href='product-detail.html'">
|
|
<img src="https://images.unsplash.com/photo-1600566753190-17f0baa2a6c3?w=300&h=300&fit=crop" alt="Gạch 3D" class="product-image">
|
|
</div>
|
|
<div class="product-info">
|
|
<div class="product-name">Gạch 3D họa tiết độc đáo</div>
|
|
<div class="product-price">750.000đ/m²</div>
|
|
<div class="product-actions">
|
|
<button class="btn-360" onclick="event.stopPropagation(); view360('#')">
|
|
<i class="fas fa-cube"></i>
|
|
<span>360°</span>
|
|
</button>
|
|
<button class="btn-add-cart" onclick="event.stopPropagation(); addToCart('Product 4')">
|
|
<i class="fas fa-cart-plus"></i>
|
|
<span>Thêm vào giỏ</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Product 5 -->
|
|
<div class="product-card">
|
|
<div class="product-image-container" onclick="window.location.href='product-detail.html'">
|
|
<img src="https://images.unsplash.com/photo-1615874694520-474822394e73?w=300&h=300&fit=crop" alt="Gạch ceramic" class="product-image">
|
|
<span class="product-badge">-15%</span>
|
|
</div>
|
|
<div class="product-info">
|
|
<div class="product-name">Gạch ceramic chống trượt</div>
|
|
<div class="product-price">
|
|
380.000đ/m²
|
|
<span class="product-price-old">447.000đ</span>
|
|
</div>
|
|
<div class="product-actions">
|
|
<button class="btn-360" onclick="event.stopPropagation(); view360('#')">
|
|
<i class="fas fa-cube"></i>
|
|
<span>360°</span>
|
|
</button>
|
|
<button class="btn-add-cart" onclick="event.stopPropagation(); addToCart('Product 5')">
|
|
<i class="fas fa-cart-plus"></i>
|
|
<span>Thêm vào giỏ</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Product 6 -->
|
|
<div class="product-card">
|
|
<div class="product-image-container" onclick="window.location.href='product-detail.html'">
|
|
<img src="https://images.unsplash.com/photo-1564013799919-ab600027ffc6?w=300&h=300&fit=crop" alt="Gạch terrazzo" class="product-image">
|
|
</div>
|
|
<div class="product-info">
|
|
<div class="product-name">Gạch terrazzo đá mài cao cấp</div>
|
|
<div class="product-price">890.000đ/m²</div>
|
|
<div class="product-actions">
|
|
<button class="btn-360" onclick="event.stopPropagation(); view360('#')">
|
|
<i class="fas fa-cube"></i>
|
|
<span>360°</span>
|
|
</button>
|
|
<button class="btn-add-cart" onclick="event.stopPropagation(); addToCart('Product 6')">
|
|
<i class="fas fa-cart-plus"></i>
|
|
<span>Thêm vào giỏ</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Load More -->
|
|
<div class="load-more-container">
|
|
<button class="btn-load-more" onclick="loadMore()">
|
|
<i class="fas fa-sync-alt"></i>
|
|
<span>Tải thêm sản phẩm</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
// View 360 function
|
|
function view360(url) {
|
|
console.log('Opening 360 view:', url);
|
|
// In real app, this would open 360 view modal or page
|
|
alert('Xem sản phẩm 360°');
|
|
}
|
|
|
|
// Add to cart function
|
|
function addToCart(productName) {
|
|
console.log('Adding to cart:', productName);
|
|
// Update cart badge
|
|
const badge = document.querySelector('.cart-badge');
|
|
const currentCount = parseInt(badge.textContent);
|
|
badge.textContent = currentCount + 1;
|
|
|
|
// Show feedback
|
|
alert('Đã thêm sản phẩm vào giỏ hàng!');
|
|
}
|
|
|
|
// Filter products
|
|
function filterProducts(category) {
|
|
// Update active pill
|
|
document.querySelectorAll('.filter-pill').forEach(pill => {
|
|
pill.classList.remove('active');
|
|
});
|
|
event.target.classList.add('active');
|
|
|
|
// In real app, this would filter the product grid
|
|
console.log('Filtering by:', category);
|
|
}
|
|
|
|
// Load more products
|
|
function loadMore() {
|
|
console.log('Loading more products...');
|
|
// In real app, this would load additional products
|
|
alert('Đang tải thêm sản phẩm...');
|
|
}
|
|
|
|
// Search functionality
|
|
document.querySelector('.search-input').addEventListener('input', function(e) {
|
|
const searchTerm = e.target.value.toLowerCase();
|
|
console.log('Searching for:', searchTerm);
|
|
// In real app, this would filter products based on search
|
|
});
|
|
|
|
// Prevent card click when clicking buttons
|
|
document.querySelectorAll('.product-actions button').forEach(button => {
|
|
button.addEventListener('click', function(e) {
|
|
e.stopPropagation();
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |