@@ -8,45 +8,55 @@ $animLength: 0.2s;
88 $block : &;
99
1010 position : fixed ;
11- width : 100 % ;
11+ right : 0 ;
1212 bottom : -100% ;
13- background-color : white ;
14- box-shadow : 0 0 10px hsla (0 , 0 , 0 , 0.3 );
1513 transition : bottom 0.1s ease-out ;
16- padding : 10px 15px ;
1714 z-index : 10 ;
18- display : flex ;
19- align-items : center ;
20- flex-direction : row ;
15+
16+ #{$block } __content {
17+ background-color : white ;
18+ box-shadow : 0 0 10px hsla (0 , 0 , 0 , 0.3 );
19+ padding : 0 25px 25px ;
20+ }
2121
2222 & --visible {
2323 bottom : 0 ;
2424 }
2525
26+ .productmainimage {
27+ width : 100% ;
28+ }
29+
2630 #{$block } __products {
27- flex : 1 ;
2831 display : flex ;
2932 flex-direction : row ;
3033 justify-content : center ;
3134 flex-wrap : wrap ;
35+ padding-top : 50px ;
36+ margin-bottom : 10px ;
3237
3338 #{$block } __product {
34- display : flex ;
35- flex-direction : row ;
36- margin : 5px 20px 5px 0 ;
37- height : 50px ;
38- width : 175px ;
39+ position : relative ;
40+ margin : 5px 0 5px ;
41+ width : 160px ;
3942 box-shadow : 0 0 2px hsla (0 , 0 , 0 , 0.3 );
4043
44+ + #{$block } __product {
45+ margin-left : 20px ;
46+ }
47+
4148 #{$block } __productimg {
42- flex : 0 0 50px ;
49+ height : 160px ;
50+ width : 160px ;
51+ margin-bottom : 10px ;
4352 }
4453
4554 #{$block } __productdetails {
4655 flex : 1 ;
4756 margin-left : 10px ;
48- font-size : smaller ;
57+ font-size : $sizeInitial ;
4958 align-self : center ;
59+ margin-bottom : 10px ;
5060
5161 #{$block } __productname {
5262 font-weight : bold ;
@@ -61,45 +71,110 @@ $animLength: 0.2s;
6171 }
6272
6373 #{$block } __removeproduct {
64- flex : 0 0 20px ;
74+ position : absolute ;
75+ top : -32px ;
76+ right : -3px ;
6577
6678 button {
79+ padding : 0 ;
6780 color : hsl (0 , 0 , 30% );
6881 height : 100% ;
6982
83+ & :hover {
84+ background-color : transparent ;
85+ }
86+
7087 svg {
7188 width : 20px ;
7289 height : 20px ;
90+ fill : $buttonActiveColor ;
7391 }
7492 }
7593 }
7694 }
7795 }
7896
7997 #{$block } __btns {
80- flex : 0 0 auto ;
98+ min-height : 38 px ;
8199 display : flex ;
82- flex-direction : column ;
100+ flex-direction : row ;
101+ justify-content : flex-end ;
102+ padding-right : 160px ;
83103
84104 button {
85- margin-bottom : 10px ;
105+ min-width : 160px ;
106+ }
107+ }
108+
109+ #{$block } __removebtn {
110+ margin-right : 20px ;
111+ }
112+
113+ #{$block } __comparebtn {
114+ min-width : 160px ;
115+ position : fixed ;
116+ right : 25px ;
117+ bottom : -100% ;
118+ }
119+
120+ & --visible {
121+ #{$block } __comparebtn {
122+ bottom : 25px ;
123+ }
124+ }
125+
126+ & --fadeout {
127+ & :not (:hover ) {
128+ #{$block } __content {
129+ display : none ;
130+ }
86131
87- & :last-child {
88- margin-bottom : 0 ;
132+ #{ $block } __ btns {
133+ display : none ;
89134 }
90135 }
91136 }
92137
93- @media (min-width : 576 px ) {
138+ @media (min-width : $tabletSmallWidth ) {
94139 #{$block } __products {
95140 #{$block } __product {
96- width : 200px ;
141+ width : 180px ;
142+
143+ #{$block } __productimg {
144+ height : 180px ;
145+ width : 180px ;
146+ }
147+
148+ + #{$block } __product {
149+ margin-left : 40px ;
150+ }
151+ }
152+ }
153+
154+ #{$block } __btns {
155+ padding-right : 180px ;
156+
157+ button {
158+ min-width : 180px ;
97159 }
98160 }
161+
162+ #{$block } __removebtn {
163+ margin-right : 40px ;
164+ }
165+
166+ #{$block } __comparebtn {
167+ min-width : 180px ;
168+ }
99169 }
100170
101- @media (min-width : 768px ) {
102- padding-left : $maxScrollWidth ;
103- padding-right : calc (#{$maxScrollWidth } - 100vw + 100% );
171+ @media (max-width : $mobileWidth - 1px ) {
172+ #{$block } __content {
173+ display : none ;
174+ }
175+
176+ #{$block } __btns {
177+ display : none ;
178+ }
104179 }
105180}
0 commit comments