- Change strategy for content fetching - Add a route per page instead of using __layout for all - Change the behaviors of the posters section (add a carousel on small screens) - Change Poster buttons styling and make interactions only for desktop
242 lines
5.4 KiB
SCSS
242 lines
5.4 KiB
SCSS
.cart {
|
|
position: fixed;
|
|
z-index: 202;
|
|
top: 80px;
|
|
right: 0;
|
|
width: 100%;
|
|
height: calc(100vh - 80px);
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: auto;
|
|
padding: 20px 20px 24px;
|
|
background-color: $color-cream;
|
|
border-radius: 8px 8px 0 0;
|
|
|
|
@include bp (sm) {
|
|
top: 24px;
|
|
right: 24px;
|
|
width: clamp(320px, 45vw, 500px);
|
|
height: calc(100vh - 48px);
|
|
max-height: 1000px;
|
|
border-radius: 8px;
|
|
padding: 24px 32px 32px;
|
|
}
|
|
|
|
// Heading
|
|
&__heading {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-bottom: 24px;
|
|
padding-bottom: 8px;
|
|
border-bottom: 1px solid #E1D0C0;
|
|
|
|
@include bp (sm) {
|
|
padding-bottom: 12px;
|
|
margin-bottom: 32px;
|
|
}
|
|
|
|
// Title
|
|
h2 {
|
|
font-size: rem(32px);
|
|
font-family: $font-serif;
|
|
color: $color-secondary;
|
|
|
|
@include bp (sm) {
|
|
font-size: rem(48px);
|
|
}
|
|
}
|
|
// Close button
|
|
button {
|
|
display: block;
|
|
padding: 8px 12px;
|
|
margin-top: 8px;
|
|
margin-right: -12px;
|
|
color: $color-gray;
|
|
text-decoration: none;
|
|
transition: color 0.4s;
|
|
|
|
&:hover {
|
|
color: $color-secondary-bright;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Content
|
|
&__content {
|
|
position: relative;
|
|
flex: 1;
|
|
margin-bottom: 32px;
|
|
}
|
|
|
|
// Total
|
|
&__total {
|
|
margin-top: auto;
|
|
color: $color-gray;
|
|
|
|
// Sum
|
|
&--sum {
|
|
display: flex;
|
|
align-items: baseline;
|
|
margin-bottom: 16px;
|
|
padding-bottom: 10px;
|
|
border-bottom: 1px solid #E1D0C0;
|
|
|
|
@include bp (sm) {
|
|
margin-bottom: 32px;
|
|
padding-bottom: 12px;
|
|
}
|
|
|
|
h3 {
|
|
color: $color-text;
|
|
font-size: rem(26px);
|
|
font-family: $font-serif;
|
|
|
|
@include bp (sm) {
|
|
font-size: rem(32px);
|
|
}
|
|
}
|
|
span {
|
|
margin-left: 12px;
|
|
font-size: rem(12px);
|
|
|
|
@include bp (sm) {
|
|
margin-bottom: 20px;
|
|
font-size: rem(13px);
|
|
}
|
|
}
|
|
p {
|
|
margin-left: auto;
|
|
color: $color-secondary;
|
|
font-family: $font-serif;
|
|
font-size: rem(26px);
|
|
|
|
@include bp (sm) {
|
|
font-size: rem(32px);
|
|
}
|
|
}
|
|
}
|
|
|
|
// Checkout
|
|
&--checkout {
|
|
@include bp (md) {
|
|
display: flex;
|
|
}
|
|
|
|
p {
|
|
margin-right: auto;
|
|
margin-bottom: 16px;
|
|
padding-right: 12px;
|
|
font-size: rem(11px);
|
|
line-height: 1.5;
|
|
color: $color-gray;
|
|
|
|
@include bp (sm) {
|
|
font-size: rem(12px);
|
|
line-height: 1.6;
|
|
}
|
|
@include bp (md) {
|
|
max-width: 304px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
// Empty content
|
|
&__empty {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
height: 100%;
|
|
padding: 24px;
|
|
font-size: rem(16px);
|
|
font-weight: 200;
|
|
background: #fff;
|
|
color: $color-gray;
|
|
border-radius: 6px;
|
|
|
|
@include bp (sm) {
|
|
font-size: rem(20px);
|
|
}
|
|
|
|
// Icon
|
|
.icon {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 3.6em;
|
|
height: 3.6em;
|
|
margin-bottom: 16px;
|
|
color: #FF6C89;
|
|
background: $color-cream;
|
|
border-radius: 100%;
|
|
|
|
svg {
|
|
display: block;
|
|
width: auto;
|
|
height: 50%;
|
|
object-fit: contain;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Updating message
|
|
&__update {
|
|
position: absolute;
|
|
z-index: -1;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: rem(20px);
|
|
color: $color-secondary;
|
|
transition: opacity 0.6s var(--ease-quart), transform 0.6s var(--ease-quart);
|
|
opacity: 0;
|
|
transform: translate3d(0, -8px, 0);
|
|
}
|
|
|
|
|
|
// Updating state
|
|
&.is-updating {
|
|
.cart-item {
|
|
opacity: 0.1;
|
|
pointer-events: none;
|
|
user-select: none;
|
|
}
|
|
.cart__update {
|
|
opacity: 1;
|
|
transform: translate3d(0,0,0);
|
|
}
|
|
}
|
|
|
|
// Location switcher
|
|
&-switcher {
|
|
position: fixed;
|
|
z-index: 202;
|
|
top: 20px;
|
|
left: 20px;
|
|
will-change: transform, opacity;
|
|
|
|
@include bp (sm) {
|
|
top: 32px;
|
|
left: 32px;
|
|
}
|
|
}
|
|
|
|
// Overlay
|
|
&-overlay {
|
|
position: fixed;
|
|
z-index: 201;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: rgba($color-primary, 0.9);
|
|
}
|
|
}
|