Card.module.scss 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. @import "styles/_variables.scss";
  2. .card {
  3. width: calc(100% / 6);
  4. padding: 0.5rem;
  5. .content {
  6. display: flex;
  7. flex-direction: column;
  8. justify-content: space-between;
  9. width: 100%;
  10. height: 100%;
  11. border: 1px solid rgba($color: $dark-gray, $alpha: 0.1);
  12. border-radius: $border-radius;
  13. transition: all 0.5s;
  14. .img {
  15. width: 100%;
  16. height: 155px;
  17. padding: 10px;
  18. > img {
  19. width: 100%;
  20. height: 100%;
  21. object-fit: contain;
  22. object-position: center;
  23. transition: all 0.5s;
  24. }
  25. }
  26. .info {
  27. .title {
  28. padding: 10px;
  29. border-top: 1px solid rgba($color: $dark-gray, $alpha: 0.1);
  30. h3 {
  31. font-weight: 500;
  32. font-size: 0.9rem;
  33. display: -webkit-box;
  34. -webkit-box-orient: vertical;
  35. -webkit-line-clamp: 1;
  36. overflow: hidden;
  37. }
  38. }
  39. .footer {
  40. display: flex;
  41. align-items: center;
  42. padding: 10px;
  43. .price {
  44. flex: 1;
  45. display: flex;
  46. flex-direction: row;
  47. align-items: baseline;
  48. font-weight: 500;
  49. small {
  50. margin-left: 5px;
  51. }
  52. }
  53. .btn {
  54. width: auto;
  55. }
  56. }
  57. }
  58. &:hover {
  59. > .img {
  60. > img {
  61. transition: all 0.5s;
  62. transform: scale(1.05);
  63. }
  64. }
  65. transition: all 0.5s;
  66. border-color: $dark-gray;
  67. }
  68. }
  69. }
  70. @media (max-width: 1366px) {
  71. .card {
  72. width: calc(100% / 4);
  73. }
  74. }
  75. @media (max-width: 1200px) {
  76. .card {
  77. width: calc(100% / 3);
  78. }
  79. }
  80. @media (max-width: 900px) {
  81. .card {
  82. width: calc(100% / 2);
  83. }
  84. }
  85. @media (max-width: 768px) {
  86. .card {
  87. .content {
  88. .footer {
  89. flex-direction: column;
  90. .btn {
  91. min-width: 100%;
  92. margin-top: 10px;
  93. & > * {
  94. width: 100%;
  95. }
  96. }
  97. }
  98. }
  99. }
  100. }
  101. @media (max-width: 450px) {
  102. .card {
  103. width: 100%;
  104. }
  105. }