main.css 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. .main-container {
  2. display: flex;
  3. width: 100%;
  4. height: 100vh;
  5. }
  6. #aside {
  7. display: flex;
  8. flex-direction: column;
  9. background-color: #eb0000;
  10. padding: 10px;
  11. width: 15%;
  12. position: fixed;
  13. }
  14. #aside a {
  15. text-decoration: none;
  16. color: white;
  17. margin: 10px 0;
  18. transition: all 0.5s;
  19. }
  20. #main {
  21. display: flex;
  22. flex-direction: column;
  23. width: 85%;
  24. margin-left: 20%;
  25. }
  26. #main h2 {
  27. margin-left: 20px;
  28. }
  29. .cards {
  30. display: flex;
  31. flex-wrap: wrap;
  32. justify-content: flex-start;
  33. width: 100%;
  34. padding: 20px;
  35. text-align: center;
  36. }
  37. .cards a {
  38. text-decoration: none;
  39. color: #000;
  40. margin: 15px;
  41. border-radius: 10px;
  42. width: 25%;
  43. transition: all 0.5s;
  44. box-shadow: 0 0 2px rgb(8, 8, 8);
  45. }
  46. .cards a:hover {
  47. transform: scale(1.05);
  48. }
  49. .card img {
  50. max-width: 80%;
  51. margin: 10px 0;
  52. }
  53. .card {
  54. display: flex;
  55. flex-direction: column;
  56. align-items: center;
  57. justify-content: space-between;
  58. height: 100%;
  59. padding: 15px;
  60. }
  61. button {
  62. box-sizing: border-box;
  63. background-color: transparent;
  64. border: 2px solid #e74c3c;
  65. border-radius: 0.6em;
  66. color: #e74c3c;
  67. cursor: pointer;
  68. line-height: 1;
  69. margin: 10px;
  70. padding: 0.5em;
  71. text-decoration: none;
  72. text-align: center;
  73. text-transform: uppercase;
  74. transition: box-shadow 0.3s ease-in-out, color 0.3s ease-in-out;
  75. }
  76. button:hover {
  77. color: #fff;
  78. outline: 0;
  79. box-shadow: 0 0 40px 40px #e74c3c inset;
  80. }
  81. input {
  82. width: 40px;
  83. height: 35px;
  84. text-align: center;
  85. border: 2px solid #e74c3c;
  86. border-radius: 0.6em;
  87. }
  88. #cart {
  89. position: absolute;
  90. top: 10px;
  91. right: 10%;
  92. }
  93. #cart span {
  94. position: absolute;
  95. top: 0;
  96. right: -5px;
  97. border: 1px solid #000;
  98. background-color: #fff;
  99. border-radius: 10px;
  100. padding: 0 4px;
  101. font-size: 12px;
  102. text-align: center;
  103. }
  104. .cart-item {
  105. display: flex;
  106. align-items: center;
  107. font-size: 18px;
  108. border-bottom: 1px solid #8d8d8d;
  109. }
  110. .btn-plus,
  111. .btn-minus,
  112. .btn-del {
  113. position: relative;
  114. width: 25px;
  115. height: 25px;
  116. border-radius: 55%;
  117. border: none;
  118. }
  119. .btn-plus::before,
  120. .btn-plus::after,
  121. .btn-minus::before,
  122. .btn-del::before,
  123. .btn-del::after {
  124. content: "";
  125. display: block;
  126. position: absolute;
  127. width: 2px;
  128. height: 12px;
  129. background-color: #e74c3c;
  130. top: 50%;
  131. left: 50%;
  132. margin-right: -50%;
  133. transition: background-color 0.3s;
  134. }
  135. .btn-plus::before,
  136. .btn-minus::before {
  137. transform: translate(-50%, -50%) rotate(90deg);
  138. }
  139. .btn-plus::after {
  140. transform: translate(-50%, -50%);
  141. }
  142. .btn-del::before {
  143. transform: translate(-50%, -50%) rotate(45deg);
  144. }
  145. .btn-del::after {
  146. transform: translate(-50%, -50%) rotate(-45deg);
  147. }
  148. .btn-plus:hover::after,
  149. .btn-plus:hover::before,
  150. .btn-minus:hover::before,
  151. .btn-del:hover::after,
  152. .btn-del:hover::before {
  153. background-color: #fff;
  154. }
  155. .btn-plus:active,
  156. .btn-minus:active,
  157. .btn-del:active {
  158. transform: scale(0.95);
  159. }
  160. .btn-minus:disabled {
  161. border-color: grey;
  162. cursor: default;
  163. box-shadow: none;
  164. }
  165. .btn-minus:disabled::before {
  166. background-color: grey;
  167. }
  168. .cart-item-count {
  169. color: #e74c3c;
  170. width: 30px;
  171. height: 30px;
  172. }
  173. .btn-clear {
  174. color: #706e6e;
  175. border-color: #706e6e;
  176. }
  177. .btn-clear:hover {
  178. box-shadow: 0 0 40px 40px #706e6e inset;
  179. }