initial commit
This commit is contained in:
336
src/pages/ProductDetail/ProductPage.module.scss
Normal file
336
src/pages/ProductDetail/ProductPage.module.scss
Normal file
@@ -0,0 +1,336 @@
|
||||
// ProductPage.module.scss
|
||||
|
||||
.container {
|
||||
max-width: 1366px;
|
||||
margin: 0 auto;
|
||||
padding: 20px 1.375rem 15px 1.375rem;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.breadcrumb {
|
||||
margin-bottom: 15px;
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
|
||||
.separator {
|
||||
margin: 0 8px;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
.productSection {
|
||||
display: flex;
|
||||
gap: 24px;
|
||||
background-color: rgb(255, 255, 255);
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
border-radius: 4px;
|
||||
padding: 1.25rem;
|
||||
box-sizing: border-box;
|
||||
@media screen and (max-width: 639px) {
|
||||
flex-direction: column;
|
||||
padding: 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
.productImage {
|
||||
background: #fff;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
width: 40%;
|
||||
@media screen and (max-width: 900px) {
|
||||
padding: 5px;
|
||||
}
|
||||
@media screen and (max-width: 639px) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 99%;
|
||||
height: auto;
|
||||
object-fit: contain;
|
||||
border: 1px solid #eee;
|
||||
@media screen and (max-width: 900px) {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.productInfo {
|
||||
width: 60%;
|
||||
@media screen and (max-width: 639px) {
|
||||
width: 100%;
|
||||
}
|
||||
@media screen and (max-width: 520px) {
|
||||
border-bottom: 1px solid #e5e7eb;
|
||||
}
|
||||
.productTitle {
|
||||
font-size: 30px;
|
||||
font-weight: 600;
|
||||
margin-bottom: 12px;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.productDescription {
|
||||
font-size: 14px;
|
||||
color: #000;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.productMeta {
|
||||
background: #f5f5f5;
|
||||
// padding: 16px;
|
||||
border-radius: 8px;
|
||||
margin-bottom: 24px;
|
||||
|
||||
.metaItem {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 8px 16px;
|
||||
border-bottom: 2px solid #ffffff;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
|
||||
.metaLabel {
|
||||
color: #000;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.metaValue {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
.Btn {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
@media screen and (max-width: 639px) {
|
||||
width: 65%;
|
||||
}
|
||||
}
|
||||
.priceContainer {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 10px;
|
||||
@media screen and (max-width: 639px) {
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
width: 35%;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.productActions {
|
||||
@media screen and (max-width: 639px) {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
.productActionsMobile {
|
||||
@media screen and (min-width: 639px) {
|
||||
background-color: #fff;
|
||||
display: none !important;
|
||||
position: sticky !important;
|
||||
bottom: 60px !important;
|
||||
}
|
||||
}
|
||||
.productActions,
|
||||
.productActionsMobile {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #e5e7eb;
|
||||
border-top: 1px solid #e5e7eb;
|
||||
background-color: #fff;
|
||||
padding: 15px 16px;
|
||||
@media screen and (max-width: 520px) {
|
||||
border-bottom: none;
|
||||
border-top: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.price {
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
color: #000;
|
||||
@media screen and (max-width: 520px) {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
.oldPrice {
|
||||
font-size: 16px;
|
||||
color: #d32824;
|
||||
text-decoration: line-through;
|
||||
font-weight: 600;
|
||||
@media screen and (max-width: 520px) {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.favoriteButton {
|
||||
height: 36px;
|
||||
display: flex;
|
||||
// margin-right: 0.5rem;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 0.375rem;
|
||||
background-color: rgb(255 255 255);
|
||||
border: 1px solid rgb(237 228 255);
|
||||
svg {
|
||||
fill: #888888;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.wishlistButton {
|
||||
background: #fff;
|
||||
border: 1px solid #ddd;
|
||||
|
||||
&:hover {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.productGrid {
|
||||
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
.similarProducts {
|
||||
margin-top: 48px;
|
||||
|
||||
.sectionTitle {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.productsGrid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
|
||||
gap: 24px;
|
||||
@media screen and (max-width: 1230px) {
|
||||
grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
|
||||
}
|
||||
@media screen and (max-width: 1023px) {
|
||||
grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
|
||||
}
|
||||
@media screen and (max-width: 768px) {
|
||||
grid-template-columns: repeat(auto-fill, minmax(234px, 1fr));
|
||||
gap: 10px;
|
||||
}
|
||||
@media screen and (max-width: 767px) {
|
||||
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
|
||||
}
|
||||
@media screen and (max-width: 510px) {
|
||||
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.productSection {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
.addToCartButton {
|
||||
// height: 40px;
|
||||
display: flex;
|
||||
padding-left: 0.5rem;
|
||||
padding-right: 0.5rem;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 0.25rem;
|
||||
border-width: 1px;
|
||||
width: 100%;
|
||||
min-width: 158px;
|
||||
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
||||
transition-duration: 300ms;
|
||||
transition-duration: 150ms;
|
||||
background-color: #d32824;
|
||||
border: none;
|
||||
@media screen and (max-width: 639px) {
|
||||
min-width: auto;
|
||||
}
|
||||
svg {
|
||||
fill: #fff;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: #e86064;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.quantityControls {
|
||||
min-width: 158px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2.5rem;
|
||||
background-color: #d32824;
|
||||
// width: 10rem;
|
||||
// justify-content: center;
|
||||
border-radius: 5px;
|
||||
width: 100%;
|
||||
@media screen and (max-width: 520px) {
|
||||
min-width: auto;
|
||||
gap: 0;
|
||||
}
|
||||
span {
|
||||
color: #fff;
|
||||
font-weight: 700;
|
||||
font-size: 16px;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.quantityBtn {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: none;
|
||||
background: transparent;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
svg {
|
||||
fill: #fff;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: #e86064;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.outOfStock {
|
||||
background-color: #ff4d4f;
|
||||
}
|
||||
|
||||
.disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.modalButton {
|
||||
// Style for modal buttons
|
||||
padding: 6px 15px;
|
||||
background-color: #1890ff;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
Reference in New Issue
Block a user