Skip to content

Commit

Permalink
css for collections page
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruv8433 committed May 20, 2024
1 parent dc28c79 commit 5da6781
Showing 1 changed file with 132 additions and 0 deletions.
132 changes: 132 additions & 0 deletions src/Pages/CSS/Collections.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
/* collectionPage.css */
.collection-page {
font-family: Arial, sans-serif;
color: #333;
padding: 0 160px;
}

.collection-header {
background-color: #f8d7da;
padding: 20px;
text-align: center;
}

.collection-container {
display: flex;
padding: 20px;
gap: 20px;
justify-content: space-between;
flex-wrap: wrap;
}

.collection-filters {
flex: 1;
min-width: 200px;
margin-right: 20px;
}

.collection-filters h2,
.collection-filters h3 {
margin-bottom: 10px;
}

.collection-filters label {
display: block;
margin-bottom: 10px;
}

.collection-products {
flex: 3;
display: flex;
flex-wrap: wrap;
gap: 20px;
border-left: 1px solid #ddd;
padding-left: 20px;
}

.product-card {
background: #fff;
border: 1px solid #ddd;
border-radius: 8px;
padding: 10px;
text-align: center;
width: calc(33.333% - 20px);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
height: 500px;
}

.product-card img {
max-width: 100%;
height: 300px;
object-fit: cover;
border-radius: 10px;
border-bottom: 1px solid #ddd;
margin-bottom: 15px;
}

.product-card h3 {
font-size: 1.2em;
margin: 10px 0;
}

.product-card p {
color: #e74c3c;
}

.product-card .original-price {
text-decoration: line-through;
color: #999;
}

.product-card .product-tag {
display: inline-block;
margin-top: 10px;
padding: 5px 10px;
background-color: #e74c3c;
color: #fff;
border-radius: 3px;
font-size: 0.8em;
}

@media (max-width: 1200px) {
.collection-page {
margin-inline: 50px;
padding: 0px 0px;
}

.product-card {
width: calc(50% - 20px);
}
}

@media (max-width: 768px) {
.collection-container {
flex-direction: column;
}

.collection-filters {
margin-right: 0;
border-right: none;
border-bottom: 1px solid #ddd;
padding-bottom: 20px;
}

.collection-products {
border-left: none;
padding-left: 0;
}

.product-card {
width: calc(50% - 20px);
}
}

@media (max-width: 480px) {
.collection-page {
padding: 0 10px;
}

.product-card {
width: calc(100% - 20px);
}
}

0 comments on commit 5da6781

Please sign in to comment.