From 0f08e5c32c106d3947f276023b3fbc631937f4f4 Mon Sep 17 00:00:00 2001 From: atomkiv Date: Thu, 2 Oct 2025 14:48:48 +0200 Subject: [PATCH] Add styles.less Quick-View styles --- styles.less | 603 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 603 insertions(+) create mode 100644 styles.less diff --git a/styles.less b/styles.less new file mode 100644 index 0000000..43dd59c --- /dev/null +++ b/styles.less @@ -0,0 +1,603 @@ +// Variables +@idm_color_light: #fff; +@idm_color_dark: #111; +@idm_bg_dark: #111; +@idm_bg_light: #fff; +@idm_border_radius: 3rem; +@idm_transition_default: 0.3s; +@idm_transition_fast: 0.2s; +@idm_black: #000; +@idm_border_color: #e7e7e7; +@idm_font_base: 1.4rem; +@idm_font_large: 1.8rem; +@idm_bg_blur_overlay: rgba(0, 0, 0, 0.5); + +// Mixins +.idm_hover_effect(@bg, @color, @duration) { + &:hover { + background: @bg; + color: @color; + border: none; + transition: background @duration ease-in, color @duration ease-in; + } +} + +.idm_button_style(@width, @height, @border_color, @border_radius, @bg, @font_size, @color) { + width: @width; + height: @height; + border: 1px solid @border_color; + border-radius: @border_radius; + background: @bg; + font-size: @font_size; + color: @color; + letter-spacing: 0.2rem; + transition: all @idm_transition_default ease; + cursor: pointer; +} + +// Styles +html.activeAside { + overflow: hidden !important; + padding-right: 0px !important; +} + +.product { + .hover-btn { + position: static; + .idm_button_style(70%, 5rem, @idm_color_dark, @idm_border_radius, @idm_bg_light, @idm_font_base, @idm_color_dark); + .idm_hover_effect(@idm_color_dark, @idm_color_light, @idm_transition_fast); + + @media (max-width: 978px) { + width: 100% !important; + height: 3.5rem !important; + margin-top: 1.8rem !important; + } + + @media (min-width: 979px) { + display: none; + } + } + + &:hover .hover-btn { + pointer-events: auto; + } +} + +.card__picture-container { + position: relative; + + .hover-btn { + position: absolute; + bottom: -2rem; + left: 50%; + transform: translateX(-50%) translateY(0); + opacity: 0; + pointer-events: none; + .idm_button_style(70%, 5rem, @idm_color_dark, @idm_border_radius, @idm_bg_light, @idm_font_base, @idm_color_dark); + transition: all @idm_transition_default ease; + .idm_hover_effect(@idm_color_dark, @idm_color_light, @idm_transition_fast); + + @media (max-width: 978px) { + display: none !important; + } + } + + &:hover .hover-btn { + display: block; + opacity: 1; + pointer-events: auto; + transform: translateX(-50%) translateY(-4rem); + } +} + +.right-aside { + position: fixed; + top: 0; + z-index: 1099; + pointer-events: none; + width: 100vw; + height: 100vh; + transition: all @idm_transition_default cubic-bezier(0.12, 0.67, 0.53, 1); + + &.active { + pointer-events: auto; + + .right-aside__prod-info { + transform: translateX(0); + } + + .right-aside__bg-blur { + opacity: 1; + } + } + + &__bg-blur { + position: fixed; + top: 0; + left: 0; + z-index: 1099; + width: 100vw; + height: 100vh; + background: @idm_bg_blur_overlay; + backdrop-filter: blur(4px); + opacity: 0; + transition: all @idm_transition_default cubic-bezier(0.12, 0.67, 0.53, 1); + } + + &__prod-info { + position: fixed; + background: @idm_bg_light; + height: 100vh; + max-width: 50rem; + width: 100%; + top: 0; + right: 0; + z-index: 1100; + overflow-y: auto; + transform: translateX(100%); + transition: transform @idm_transition_default cubic-bezier(0.12, 0.67, 0.53, 1); + + .right-aside__nav { + max-width: 50rem; + width: 100%; + padding: 1.6rem; + display: flex; + justify-content: flex-end; + + .right-aside__close { + cursor: pointer; + display: block; + height: 2.8rem; + width: 2.8rem; + + svg { + width: 100%; + height: 100%; + } + } + } + + .prod-info__container { + display: flex; + flex-direction: column; + align-items: center; + padding: 0 3.5rem 1rem; + + .img__container { + width: 100%; + height: 37rem; + + img { + width: 100%; + height: 100%; + object-fit: cover; + } + } + + .product-info__part { + width: 100%; + display: flex; + flex-direction: column; + align-items: flex-start; + padding-top: 1rem; + + .names-info { + .producer-name { + font-size: 1.4rem; + color: #717171; + } + + .product-name { + font-size: 1.8rem; + letter-spacing: 0.1rem; + } + } + + .price-info { + margin-top: 1rem; + + .price__container { + .idm__quick-view-price { + font-size: 1.8rem; + + .price-crossed { + text-decoration: line-through; + color: #333; + font-weight: 500; + } + } + } + + .price-note { + font-size: 1.4rem; + font-weight: 500; + color: #333; + } + + .availability__container { + display: flex; + flex-direction: row; + align-items: center; + margin: 0.5rem 0 1rem; + + .availability { + font-size: 1.4rem; + margin: 0; + } + } + } + + p { + margin-top: 1rem; + + .size-choose, + .version-choose { + font-weight: 700; + } + } + + .idm-sizes, + .idm-versions { + margin-top: 0.5rem; + + .product-size, + .product-version { + padding: 0.7rem 1.6rem; + border: 1px solid @idm_border_color; + border-radius: @idm_border_radius; + margin-left: 0.5rem; + + &:first-child { + margin-left: 0; + } + + &.active { + border-color: @idm_color_dark; + } + } + + .product-version { + padding: 0.2rem; + border-radius: 50%; + width: 4rem; + height: 4rem; + min-height: 4rem; + min-width: 4rem; + display: flex; + align-items: center; + justify-content: center; + + img { + border-radius: 50%; + width: 100%; + height: 100%; + object-fit: cover; + } + } + } + + .idm-versions { + display: flex; + align-items: center; + flex-direction: row; + } + + .view-details__container { + width: 100%; + text-align: center; + + .view-details { + width: fit-content; + } + } + } + } + } +} + +@media (max-width: 978px) { + .product .hover-btn { + width: 100%; + height: 3.5rem; + margin-top: 1.8rem; + } + + .card__picture-container .hover-btn { + display: none; + } +} + +@media (min-width: 979px) { + .product .hover-btn { + display: none; + } +} + +.idm-products-banner__qty { + display: flex; + justify-content: space-between; + align-items: center; + border-radius: 3rem; + border: 1px solid #ccc; + max-width: 100%; + width: 100%; + min-width: 8rem; +} + +.idm-products-banner__qty-input { + height: 4rem; + text-align: center; + border: none; + min-width: 2rem !important; + width: 100%; +} + +.idm-products-banner__qty button { + height: 4rem; + width: 4rem; + color: #111; + border-radius: 0.5rem; + min-width: 3rem; +} + +.idm-products-banner__qty-increase { + right: 0; +} + +.idm-products-banner__add-to-basket { + display: flex; + align-items: flex-end; + flex-direction: column; + width: 100%; + margin: 1.5rem 0 0.7rem; + + .idm-products-banner__add-to-basket-form { + width: 100%; + display: flex; + flex-direction: column; + align-items: center; + gap: 1.3rem; + justify-content: space-between; + } +} + +.btn.--solid.--medium.idm-products-banner__add-to-basket-button { + height: 4.2rem; + background: #000; + display: flex; + align-items: center; + justify-content: center; + border: 1px solid #000; + border-radius: 3rem; + width: 100%; + max-width: 100%; + min-width: 8rem; + + &.inactive { + pointer-events: none; + background: #666666; + border-color: #666666; + } +} + +.btn.--solid.--medium.idm-products-banner__add-to-basket-link { + width: 100%; + height: 4rem; + display: flex; + align-items: center; + justify-content: center; + background: #000; + border: 1px solid #000; + margin-top: auto; + + &.inactive { + pointer-events: none; + background: #2B2B2B; + } +} + +.right-aside { + .added { + display: block; + padding: 0 2.5rem 2.5rem; + + .added__button-custom{ + background: #000; + + &:hover{ + color: #000; + border: 2px solid #000; + } + } + + &.hidden { + display: none !important; + } + + &__blocks { + @media (min-width: 979px) { + overflow: auto; + max-height: 300px; + scrollbar-color: #000 #f1f1f1; + scrollbar-width: thin; + padding: 0 2rem 0 0; + } + } + + &__product { + margin-top: 3rem; + display: grid; + grid-column-gap: 2rem; + grid-template-columns: 114px 1fr; + color: #000; + } + + &__icon { + height: auto; + min-height: auto !important; + + @media (min-width: 570px) { + max-height: none; + align-items: start !important; + } + + img { + max-height: 114px; + + @media (min-width: 570px) { + max-height: none; + } + } + } + + &__name_h3 { + align-items: flex-end; + } + + &__name { + display: block; + margin-bottom: 1rem; + text-decoration: none; + font-size: 1.6rem !important; + font-weight: 400; + } + + &__prices { + display: flex; + flex-direction: column; + } + + &__info { + grid-column: 2 / 3; + } + + .price { + margin: 0.5rem 0; + + &.--value { + font-size: 1.4rem; + } + + &__unit { + font-size: 1.8rem; + font-weight: 600; + } + } + + &__buttons { + grid-column: 1 / span 2; + margin-top: 6rem; + gap: 1rem; + display: flex; + flex-direction: column; + } + + &__button { + &.--close { + color: #000; + text-decoration: none; + font-size: 1.6rem; + font-weight: 600; + cursor: pointer; + + &::before { + content: "\F104"; + font-family: FontAwesome; + margin-right: 1rem; + } + + &:hover { + color: #000; + } + } + + &.--basket { + font-size: 1.6rem; + font-weight: 600; + + &::after { + content: "\F105"; + font-family: FontAwesome; + margin-left: 1rem; + } + } + } + + &__hotspot { + margin-top: 3rem; + } + + &__loader { + display: flex; + justify-content: center; + + &:has(+ .hotspot) { + display: none !important; + } + } + } + + @media (max-width: 978px) { + .added { + &__headline { + justify-content: start; + text-transform: none; + letter-spacing: 0; + font-weight: 600; + margin: 1.5rem 0; + + svg { + width: 2.4rem; + height: 2.4rem; + margin-right: 1rem; + } + + &_name { + font-size: 2rem; + } + } + } + } +} +@media (min-width: 979px) { + .right-aside .added__headline { + justify-content: start; + text-transform: none; + letter-spacing: 0; + font-weight: 600; + margin: 1.5rem 0; + } +} + +.added__shippingfree_bar { + display: inline-block; + height: 6px; + width: 100%; + background: #e7e7e7; + position: relative; + overflow: hidden; + + &.enough { + background: #27c252; + } +} + +.added__shippingfree_completion { + display: inline-block; + position: absolute; + left: 0; + top: 0; + z-index: 1; + background: #000; + height: 100%; + transform: skewX(-30deg); + margin-left: -2px; +} + +.added__shippingfree_text{ + display: flex; + align-items: center; + flex-direction: row; + gap: 1rem; +} +