Header.module.scss 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. @import "styles/_variables.scss";
  2. .header {
  3. background-color: $silver;
  4. display: flex;
  5. padding: 0 1rem;
  6. position: sticky;
  7. top: 0;
  8. z-index: 1;
  9. .logo {
  10. flex: 1;
  11. display: flex;
  12. align-items: center;
  13. h2 {
  14. text-transform: uppercase;
  15. font-weight: 500;
  16. }
  17. }
  18. .navContainer {
  19. nav {
  20. height: 75px;
  21. position: relative;
  22. > ul {
  23. height: 100%;
  24. display: flex;
  25. > li {
  26. height: 100%;
  27. .subMenu {
  28. position: absolute;
  29. width: 600px;
  30. top: calc(5px + 100%);
  31. left: auto;
  32. right: 0;
  33. display: flex;
  34. flex-wrap: wrap;
  35. padding: 5px;
  36. border: 1px solid rgba($color: $dark-gray, $alpha: 0.25);
  37. border-radius: $border-radius;
  38. margin-top: -20px;
  39. transition: all 0.1s;
  40. background-color: $white;
  41. visibility: hidden;
  42. opacity: 0;
  43. &::before {
  44. content: "";
  45. background-color: transparent;
  46. position: absolute;
  47. width: 100%;
  48. height: 5px;
  49. top: -5px;
  50. left: 0;
  51. }
  52. }
  53. .a {
  54. height: 100%;
  55. display: flex;
  56. align-items: center;
  57. justify-content: center;
  58. font-weight: 500;
  59. text-transform: capitalize;
  60. color: $dark-gray;
  61. padding: 0 12px;
  62. }
  63. &:not(:last-of-type) {
  64. margin-right: 5px;
  65. }
  66. .basketBtn {
  67. background-color: $red;
  68. position: relative;
  69. .basketLength {
  70. position: absolute;
  71. background-color: $white;
  72. top: 15px;
  73. right: 5px;
  74. width: 18px;
  75. height: 18px;
  76. display: flex;
  77. align-items: center;
  78. justify-content: center;
  79. border-radius: 100%;
  80. color: $dark-gray;
  81. font-size: 13px;
  82. }
  83. }
  84. &:hover {
  85. & > .subMenu {
  86. transition: all 0.1s;
  87. visibility: visible;
  88. opacity: 1;
  89. margin-top: 0;
  90. }
  91. }
  92. }
  93. }
  94. }
  95. }
  96. }
  97. @media (max-width: 768px) {
  98. .header {
  99. padding: 1rem;
  100. .navContainer {
  101. display: none;
  102. }
  103. }
  104. }