Add user auth, cart, checkout and personal account for guests and registered users
This commit is contained in:
@@ -0,0 +1,263 @@
|
||||
.shop-page {
|
||||
padding: 40px 24px 80px;
|
||||
min-height: 60vh;
|
||||
}
|
||||
|
||||
.shop-card {
|
||||
background: #fff;
|
||||
border-radius: 16px;
|
||||
padding: 32px;
|
||||
border: 1px solid #e5e7eb;
|
||||
max-width: 480px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.shop-card h1 {
|
||||
font-size: 1.75rem;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.shop-card--empty,
|
||||
.shop-card--success {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.shop-card--success h1 {
|
||||
color: #059669;
|
||||
}
|
||||
|
||||
.shop-form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.shop-form label {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.shop-form input,
|
||||
.shop-form textarea {
|
||||
padding: 12px 14px;
|
||||
border: 1px solid #e5e7eb;
|
||||
border-radius: 10px;
|
||||
font-family: inherit;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.shop-form input:focus,
|
||||
.shop-form textarea:focus {
|
||||
outline: none;
|
||||
border-color: #4f46e5;
|
||||
}
|
||||
|
||||
.shop-alert {
|
||||
padding: 12px 16px;
|
||||
border-radius: 10px;
|
||||
margin-bottom: 16px;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.shop-alert--error {
|
||||
background: #fef2f2;
|
||||
color: #b91c1c;
|
||||
}
|
||||
|
||||
.shop-alert--ok {
|
||||
background: #d1fae5;
|
||||
color: #065f46;
|
||||
}
|
||||
|
||||
.shop-hint {
|
||||
font-size: 0.875rem;
|
||||
color: #6b7280;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.shop-hint a {
|
||||
color: #4f46e5;
|
||||
}
|
||||
|
||||
.shop-actions {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
justify-content: center;
|
||||
margin-top: 24px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.cart-layout,
|
||||
.checkout-layout,
|
||||
.account-layout {
|
||||
display: grid;
|
||||
gap: 24px;
|
||||
margin-top: 24px;
|
||||
}
|
||||
|
||||
.cart-layout {
|
||||
grid-template-columns: 1fr 300px;
|
||||
}
|
||||
|
||||
.checkout-layout {
|
||||
grid-template-columns: 1fr 320px;
|
||||
}
|
||||
|
||||
.account-layout {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
max-width: 1000px;
|
||||
}
|
||||
|
||||
.account-layout .shop-card {
|
||||
max-width: none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.account-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.cart-items {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.cart-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
background: #fff;
|
||||
padding: 16px;
|
||||
border-radius: 12px;
|
||||
border: 1px solid #e5e7eb;
|
||||
}
|
||||
|
||||
.cart-item__img {
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
object-fit: cover;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.cart-item__info {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.cart-item__info h3 {
|
||||
font-size: 1rem;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.cart-item__price {
|
||||
color: #4f46e5;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.cart-item__qty {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.cart-item__qty input {
|
||||
width: 60px;
|
||||
padding: 8px;
|
||||
border: 1px solid #e5e7eb;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.cart-summary {
|
||||
background: #fff;
|
||||
padding: 24px;
|
||||
border-radius: 16px;
|
||||
border: 1px solid #e5e7eb;
|
||||
height: fit-content;
|
||||
position: sticky;
|
||||
top: 88px;
|
||||
}
|
||||
|
||||
.cart-summary h2 {
|
||||
font-size: 1.1rem;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.cart-summary__total {
|
||||
font-size: 1.5rem;
|
||||
font-weight: 700;
|
||||
margin: 16px 0;
|
||||
color: #1a1a2e;
|
||||
}
|
||||
|
||||
.checkout-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 8px 0;
|
||||
border-bottom: 1px solid #f3f4f6;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.order-card {
|
||||
border: 1px solid #e5e7eb;
|
||||
border-radius: 12px;
|
||||
padding: 16px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.order-card__head {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 12px;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.order-card__items {
|
||||
list-style: none;
|
||||
font-size: 0.875rem;
|
||||
color: #6b7280;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.order-card__total {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.order-card .admin-badge,
|
||||
.order-badge {
|
||||
display: inline-block;
|
||||
padding: 4px 10px;
|
||||
border-radius: 100px;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
background: #d1fae5;
|
||||
color: #065f46;
|
||||
}
|
||||
|
||||
.btn--danger {
|
||||
background: #fef2f2;
|
||||
color: #b91c1c;
|
||||
border: 1px solid #fecaca;
|
||||
}
|
||||
|
||||
.product-card__footer form {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.cart-layout,
|
||||
.checkout-layout,
|
||||
.account-layout {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.cart-item {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user