258 lines
4 KiB
SCSS
258 lines
4 KiB
SCSS
/* Cart Drawer Styles */
|
|
.cart-drawer {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
z-index: 9999;
|
|
pointer-events: none;
|
|
opacity: 0;
|
|
transition: opacity 0.3s ease;
|
|
color: #000;
|
|
|
|
&.is-open {
|
|
pointer-events: auto;
|
|
opacity: 1;
|
|
|
|
.cart-drawer__panel {
|
|
transform: translateX(0);
|
|
}
|
|
}
|
|
|
|
&__overlay {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
cursor: pointer;
|
|
}
|
|
|
|
&__panel {
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
width: 100%;
|
|
max-width: 420px;
|
|
background-color: #ffffff;
|
|
box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
|
|
display: flex;
|
|
flex-direction: column;
|
|
transform: translateX(100%);
|
|
transition: transform 0.3s ease;
|
|
|
|
@media (max-width: 768px) {
|
|
max-width: 100%;
|
|
}
|
|
}
|
|
|
|
&__header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 1.5rem;
|
|
border-bottom: 1px solid #e0e0e0;
|
|
|
|
h3 {
|
|
margin: 0;
|
|
font-size: 1.5rem;
|
|
font-weight: bold;
|
|
}
|
|
}
|
|
|
|
&__close {
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
padding: 0.5rem;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: opacity 0.2s;
|
|
|
|
&:hover {
|
|
opacity: 0.7;
|
|
}
|
|
|
|
svg {
|
|
stroke: #000;
|
|
}
|
|
}
|
|
|
|
&__content {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 1.5rem;
|
|
|
|
&.is-loading {
|
|
opacity: 0.5;
|
|
pointer-events: none;
|
|
}
|
|
}
|
|
|
|
&__empty {
|
|
text-align: center;
|
|
padding: 3rem 1rem;
|
|
color: #666;
|
|
|
|
&.hidden {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
&__items {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
|
|
&.hidden {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
&__footer {
|
|
border-top: 1px solid #e0e0e0;
|
|
padding: 1.5rem;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
}
|
|
|
|
&__total {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
font-size: 1.125rem;
|
|
font-weight: bold;
|
|
|
|
&-label {
|
|
color: #000;
|
|
}
|
|
|
|
&-amount {
|
|
color: #000;
|
|
font-size: 1.25rem;
|
|
}
|
|
}
|
|
|
|
&__checkout-btn {
|
|
width: 100%;
|
|
font-family: "Open Sans", sans-serif;
|
|
font-weight: bold;
|
|
font-size: 1rem;
|
|
color: #000000;
|
|
background-color: #00ff00;
|
|
border: none;
|
|
border-radius: 40px;
|
|
padding: 14px 34px;
|
|
cursor: pointer;
|
|
transition: background-color 0.3s ease;
|
|
|
|
&:hover:not(:disabled) {
|
|
background-color: #00e600;
|
|
}
|
|
|
|
&:disabled {
|
|
opacity: 0.6;
|
|
cursor: not-allowed;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Cart Item
|
|
.cart-item {
|
|
display: flex;
|
|
gap: 1rem;
|
|
padding: 1rem;
|
|
border: 1px solid #e0e0e0;
|
|
border-radius: 8px;
|
|
|
|
&__image {
|
|
width: 80px;
|
|
height: 80px;
|
|
object-fit: cover;
|
|
border-radius: 4px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
&__details {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
&__title {
|
|
font-weight: 600;
|
|
margin: 0;
|
|
font-size: 1rem;
|
|
}
|
|
|
|
&__variant {
|
|
font-size: 0.875rem;
|
|
color: #666;
|
|
margin: 0;
|
|
}
|
|
|
|
&__price {
|
|
font-weight: bold;
|
|
color: #000;
|
|
}
|
|
|
|
&__quantity {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
margin-top: auto;
|
|
}
|
|
|
|
&__qty-btn {
|
|
width: 28px;
|
|
height: 28px;
|
|
border: 1px solid #000;
|
|
background: #fff;
|
|
color: #000;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 1rem;
|
|
font-weight: bold;
|
|
transition: all 0.2s;
|
|
|
|
&:hover:not(:disabled) {
|
|
background-color: #000;
|
|
color: #fff;
|
|
}
|
|
|
|
&:disabled {
|
|
opacity: 0.4;
|
|
cursor: not-allowed;
|
|
}
|
|
}
|
|
|
|
&__qty-value {
|
|
min-width: 30px;
|
|
text-align: center;
|
|
font-weight: 600;
|
|
}
|
|
|
|
&__remove {
|
|
background: none;
|
|
border: none;
|
|
color: #ff3333;
|
|
cursor: pointer;
|
|
padding: 0.25rem 0.5rem;
|
|
font-size: 0.875rem;
|
|
text-decoration: underline;
|
|
align-self: flex-start;
|
|
|
|
&:hover {
|
|
color: #cc0000;
|
|
}
|
|
}
|
|
}
|