.root { @apply relative max-h-full w-full box-border overflow-hidden bg-no-repeat bg-center bg-cover transition ease-linear cursor-pointer; height: 100% !important; &:hover { & .squareBg:before { transform: scale(0.98); } & .product-image { transform: scale(1.05); } & .productTitle > span, & .productPrice, & .wishlistButton { @apply bg-secondary text-secondary; } &:nth-child(6n + 1) .productTitle > span, &:nth-child(6n + 1) .productPrice, &:nth-child(6n + 1) .wishlistButton { @apply bg-violet text-white; } &:nth-child(6n + 5) .productTitle > span, &:nth-child(6n + 5) .productPrice, &:nth-child(6n + 5) .wishlistButton { @apply bg-blue text-white; } &:nth-child(6n + 3) .productTitle > span, &:nth-child(6n + 3) .productPrice, &:nth-child(6n + 3) .wishlistButton { @apply bg-pink text-white; } &:nth-child(6n + 6) .productTitle > span, &:nth-child(6n + 6) .productPrice, &:nth-child(6n + 6) .wishlistButton { @apply bg-cyan text-white; } } & .product-image { @apply transform transition-transform duration-500; } &:nth-child(6n + 1) .squareBg { @apply bg-violet; } &:nth-child(6n + 5) .squareBg { @apply bg-blue; } &:nth-child(6n + 3) .squareBg { @apply bg-pink; } &:nth-child(6n + 6) .squareBg { @apply bg-cyan; } } .squareBg, .productTitle > span, .productPrice, .wishlistButton { @apply transition ease-in-out duration-500; } .squareBg { @apply transform absolute inset-0 z-0; background-color: #212529; } .squareBg:before { @apply transition ease-in-out duration-500 bg-repeat-space w-full h-full block; content: ''; background-image: url("data:image/svg+xml,%3Csvg width='48' height='46' viewBox='0 0 48 46' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cline opacity='0.1' x1='9.41421' y1='8' x2='21' y2='19.5858' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cline opacity='0.1' x1='1' y1='-1' x2='17.3848' y2='-1' transform='matrix(-0.707107 0.707107 0.707107 0.707107 40 8)' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cline opacity='0.1' x1='1' y1='-1' x2='17.3848' y2='-1' transform='matrix(0.707107 -0.707107 -0.707107 -0.707107 8 38)' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cline opacity='0.1' x1='38.5858' y1='38' x2='27' y2='26.4142' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); } .simple { & .squareBg { @apply bg-accents-0 !important; background-image: url("data:image/svg+xml,%3Csvg width='48' height='46' viewBox='0 0 48 46' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cline opacity='0.05' x1='9.41421' y1='8' x2='21' y2='19.5858' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cline opacity='0.05' x1='1' y1='-1' x2='17.3848' y2='-1' transform='matrix(-0.707107 0.707107 0.707107 0.707107 40 8)' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cline opacity='0.05' x1='1' y1='-1' x2='17.3848' y2='-1' transform='matrix(0.707107 -0.707107 -0.707107 -0.707107 8 38)' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cline opacity='0.05' x1='38.5858' y1='38' x2='27' y2='26.4142' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); } & .productTitle { @apply pt-2; font-size: 1rem; & span { @apply leading-extra-loose; } } & .productPrice { @apply text-sm; } } .productTitle { @apply pt-0 max-w-full w-full leading-extra-loose; font-size: 2rem; letter-spacing: 0.4px; & span { @apply py-4 px-6 bg-primary text-primary font-bold; font-size: inherit; letter-spacing: inherit; box-decoration-break: clone; -webkit-box-decoration-break: clone; } } .productPrice { @apply py-4 px-6 bg-primary text-primary font-semibold inline-block text-sm leading-6; letter-spacing: 0.4px; } .wishlistButton { @apply w-10 h-10 flex ml-auto items-center justify-center bg-primary text-primary font-semibold text-xs leading-6 cursor-pointer; } .imageContainer { & > div { & > div { height: 100%; margin: 0 auto; } } } .product-image { height: 120% !important; top: -10% !important; }