Files
hotspots/style.less

454 lines
12 KiB
Plaintext

/* add to basket*/
.idm__hotspot .add_to_basket, .idm__hotspot .add_to_basket__link{
display: flex;
justify-content: center;
flex-direction: column;
}
@media (max-width: 978px){
.idm__hotspot .add_to_basket__button.btn:not(.--error):not(.--success)::before{
position: static;
}
}
.idm__hotspot .add_to_basket.--range{
flex-direction: column;
}
.idm__hotspot .idm-products-banner__qty{
display: flex;
justify-content: space-between;
width: 100%;
align-items: center;
gap: 1rem;
}
.idm__hotspot .idm-products-banner__qty-input{
height: 3rem;
text-align: center;
border: 1px solid #ccc;
width: 60%;
max-width: unset;
min-width: unset;
}
.idm__hotspot .idm-products-banner__qty button{
background: #000;
height: 3rem;
width: 3rem;
color: #fff;
border-radius: 0.5rem;
min-width: 3rem;
}
/* SKELETON */
@keyframes idm-skeleton-loading {
to {
background-position-x: -200%;
}
}
.skeleton(@width, @height, @mobileWidth, @mobileHeight, @borderRadius) {
position: relative;
overflow: hidden;
&.idm-loading {
transition: none;
border-radius: @borderRadius;
background: #eee;
background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
background-size: 200% 100%;
animation: 1.5s idm-skeleton-loading linear infinite;
width: @width;
height: @height;
@media (max-width: 756px) {
width: @mobileWidth;
height: @mobileHeight;
}
}
}
.--hotspot-loading .products.hotspot__products.swiper-wrapper{
display: block!important;
}
.idm_hotspot__skeleton{
display: flex;
flex-wrap: nowrap;
overflow: hidden;
min-height: 30rem;
&_product{
flex-shrink: 0;
padding-right: 16px;
display: flex;
flex-direction: column;
}
&_img{
aspect-ratio: ~"1 / 1";
margin-bottom: 2.5rem;
.skeleton(100%, auto, 100%, auto, 5px);
}
&_opinions{
margin-bottom: 1rem;
.skeleton(75%, 2rem, 75%, 2rem, 0);
}
&_name{
margin-bottom: 1.6rem;
.skeleton(100%, 4.2rem, 100%, 4.2rem, 0)
}
&_price{
margin-bottom: 1.6rem;
.skeleton(50%, 2rem, 50%, 2rem, 0)
}
&_btn{
.skeleton(100%, 4.6rem, 100%, 4.6rem, 5px)
}
}
@media (max-width: 756px) {
.idm__hotspot.idm-loading{
width: 100%;
height: 50rem;
}
}
/* SWIPER PROGRESS */
.idm-scrollbar{
flex: 1;
height: 2px!important;
position: relative!important;
margin-top: 2rem;
cursor: grab;
}
.idm-scrollbar.--drag-start .idm-progress{
transition: none;
}
.idm-progress{
position: absolute;
z-index: 10;
height: calc(100% + 2px);
background-color: #0d0d0d;
left: 0;
top: -1px;
transition: all 0.3s;
border-radius: 5px;
}
/* tooltip */
.idm_tooltip{
--tooltip-background: #111;
--tooltip-border: #999;
--tooltip-color: #fff;
position: relative;
&__info_icon{
color: var(--tooltip-border);
display: inline-block;
&:before{
content: "";
display: block;
width: 1.2rem;
height: 1.2rem;
margin-left: 0.5rem;
cursor: pointer;
vertical-align: bottom;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' class='idm_tooltip__info_icon' viewBox='0 0 16 16'%3E%3Cpath d='M8,0a8,8,0,1,0,8,8A8,8,0,0,0,8,0ZM8,14.667A6.667,6.667,0,1,1,14.667,8,6.667,6.667,0,0,1,8,14.667Z' fill='currentColor'%3E%3C/path%3E%3Cpath d='M11.333,10h-.667a.667.667,0,1,0,0,1.333h.667v4a.667.667,0,0,0,1.333,0v-4A1.333,1.333,0,0,0,11.333,10Z' transform='translate(-3.333 -3.333)' fill='currentColor'%3E%3C/path%3E%3Ccircle cx='1' cy='1' r='1' transform='translate(7 3.333)' fill='currentColor'%3E%3C/circle%3E%3C/svg%3E");
background-size: cover;
}
}
&__content{
position: absolute;
opacity: 0;
pointer-events: none;
transition: opacity 0.2s;
border-radius: 5px;
background: var(--tooltip-background);
color: var(--tooltip-color);
border: 1px solid var(--tooltip-border);
bottom: 150%;
padding: 0.5rem 1rem;
@media @tablet{
&.--one-line{
white-space: nowrap;
}
}
&.--visible{
opacity: 1;
pointer-events: auto;
}
}
}
/* favorite */
.product__additional{
position: absolute;
top: 1rem;
right: 1rem;
display: flex;
gap: 0.5rem;
z-index: 1;
&> *{
cursor: pointer;
}
}
.product__favorite{
display: block;
color: #111;
&::before{
content: '\E86D';
font-family: FontAwesome;
// font-size: 2.6rem;
font-size: 3rem;
height: 2.9rem;
}
&:hover{
opacity: 0.6;
}
}
/* COMPARE */
.idm-products-banner__compare-btn{
// .idm-products-banner__compare-icon{
// height: 100%;
// }
&::before{
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 20 17' fill='none'%3E%3Cpath d='M19.3972 5.76602C19.3889 5.67435 19.3639 5.58268 19.3222 5.49102L16.5639 0.991016C16.5639 0.991016 16.5389 0.966016 16.5306 0.957682C16.4722 0.874349 16.3889 0.799349 16.2972 0.749349C16.1972 0.699349 16.0889 0.666016 16.0056 0.666016H15.9556C15.9556 0.666016 15.9139 0.666016 15.8889 0.666016C15.8472 0.666016 15.7972 0.666016 15.7472 0.682682L4.08056 4.10768C4.08056 4.10768 4.02223 4.13268 4.01389 4.14102C3.98056 4.15768 3.94723 4.17435 3.91389 4.19102C3.83889 4.24102 3.78056 4.29935 3.73889 4.35768L0.938894 8.87435C0.938894 8.87435 0.922228 8.91602 0.913894 8.93268C0.872228 9.01602 0.847228 9.10768 0.838894 9.19935V9.24935C0.788894 10.216 1.12223 11.1493 1.77223 11.866C2.42223 12.5827 3.31389 13.0077 4.29723 13.0577C5.26389 13.0077 6.15556 12.5827 6.81389 11.866C7.46389 11.1493 7.79723 10.216 7.75556 9.25768C7.75556 9.23268 7.75556 9.21602 7.74723 9.19935C7.73889 9.10768 7.71389 9.01602 7.67223 8.93268L5.40556 5.22435L9.39723 4.04935V15.5493H6.56389V16.991H13.6639V15.5493H10.8389V3.62435L14.3472 2.59102L12.5889 5.44102C12.5889 5.44102 12.5722 5.48268 12.5639 5.49935C12.5222 5.58268 12.4972 5.67435 12.4889 5.75768V5.81602C12.4306 6.78268 12.7722 7.71602 13.4222 8.43268C14.0722 9.14935 14.9639 9.57435 15.9472 9.62435C16.9139 9.57435 17.8056 9.14935 18.4639 8.43268C19.1139 7.71602 19.4472 6.78268 19.4056 5.82435V5.76602H19.3972ZM17.8806 6.54935C17.7889 6.96602 17.5639 7.35768 17.2389 7.64935C16.8806 7.97435 16.4222 8.16602 15.9472 8.19102C15.4722 8.15768 15.0139 7.96602 14.6556 7.64935C14.3389 7.35768 14.1139 6.97435 14.0139 6.54935H17.8806ZM14.4972 5.10768L15.9472 2.74935L17.3972 5.10768H14.4972ZM2.84723 8.53268L4.29723 6.17435L5.74723 8.53268H2.84723ZM6.23056 9.97435C6.13056 10.391 5.91389 10.7827 5.58889 11.0743C5.23056 11.3993 4.77223 11.591 4.29723 11.616C3.82223 11.5827 3.36389 11.391 3.00556 11.0743C2.68889 10.7827 2.46389 10.3993 2.36389 9.97435H6.23056Z' fill='%23111111'/%3E%3C/svg%3E");
width: 3rem;
height: 3rem;
}
&.--success {
&::before {
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='25' height='25' viewBox='0 0 25 25' fill='none'%3E%3Cpath d='M10.0516 18.5L4.35156 12.8L5.77656 11.375L10.0516 15.65L19.2266 6.475L20.6516 7.9L10.0516 18.5Z' fill='%23009263'/%3E%3C/svg%3E");
}
}
&.--loading:not(.--success) { }
&:not(.--success):hover {
opacity: 0.6;
}
}
.idm-products-banner__compare-btn.--success {
display: flex;
align-items: end;
}
/* opinions */
.product__opinions{
display: flex;
gap: 1rem;
align-items: center;
margin-bottom: 1rem;
}
.product__opinions .icon-star{
color: #ffbc00;
}
.product__opinions .icon-star:not(.--active)::before{
content: "\f006";
}
/* second image */
.product__image.--second{
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
.product__icon{
.product__image{
transition: opacity .25s;
}
.product__image.--second{
opacity: 0;
}
@media (max-width: 978px){
.product__image.--second{
display: none!important;
}
}
@media (min-width: 979px){
&.--toggle-icon:has(.product__image.--second){
.product__image.--first{
opacity: 0;
}
.product__image.--second{
opacity: 1;
}
}
}
}
// WERSJE
@keyframes idmPulseOpacity {
0%, 100% {
opacity: 0.4;
}
50% {
opacity: 0.6;
}
}
.idm__hotspot .product.--loading{
animation: idmPulseOpacity 3s infinite;
}
.idm__hotspot .product:has(.product__versions){
--idm-hotspot-version-height: 65px;
@media (min-width: 757px){
--idm-hotspot-version-height: 70px;
}
@media (min-width: 979px){
--idm-hotspot-version-height: 55px;
}
.product__versions{
display: grid;
grid-template-columns: repeat(var(--version-mobile-columns, 4), 1fr);
gap: 1rem;
z-index: 1;
background: #fff;
clip-path: inset(0% 0 100% 0);
position: absolute;
top: 0;
width: 100%;
padding: 0.3rem 1.5rem;
@media (min-width: 757px){
padding: 0.3rem 2.5rem;
grid-template-columns: repeat(var(--version-tablet-columns, 3), 1fr);
}
@media (min-width: 979px){
padding: 0.3rem 1rem;
grid-template-columns: repeat(var(--version-desktop-columns, 5), 1fr);
}
height: var(--idm-hotspot-version-height);
align-items: center;
}
.product__version_single, .product__version_more{
display: flex;
border-radius: 8px;
overflow: hidden;
border: 1px solid #ccc;
transition: border 0.2s;
aspect-ratio: 1 / 1;
align-items: center;
justify-content: center;
@media (max-width: 756px){
&:has(.--mobile-more:empty), .--tablet-more, .--desktop-more{
display: none;
}
}
@media (min-width: 757px) and (max-width: 978px){
&:has(.--tablet-more:empty), .--desktop-more, .--mobile-more{
display: none;
}
}
@media (min-width: 979px){
&:has(.--desktop-more:empty), .--tablet-more, .--mobile-more{
display: none;
}
}
&:hover{
border-color: #111;
}
&.--active{
border-color: var(--primary-color, #111);
box-shadow: 0 0 0 1px var(--primary-color, #111);
}
}
.product__version_more{
background: #f2f2f2;
}
.product__content_wrapper{
position: relative;
}
.label_icons, .product__versions{
transition: all 0.2s;
}
&:hover{
.product__versions, .label_icons{
transform: translateY(calc(-1 * var(--idm-hotspot-version-height)));
}
.product__versions{
clip-path: inset(0 0 0 0);
}
}
}
@media (max-width: 978px){
.idm__hotspot .product:has(.product__versions){
.product__versions, .label_icons{
transform: translateY(calc(-1 * var(--idm-hotspot-version-height)));
}
.product__versions{
clip-path: inset(0 0 0 0);
}
}
}
/* Rozmiary */
.product__select_sizes{
order: 3;
display: flex;
flex-wrap: wrap;
gap: 1rem;
padding: 0.3rem;
background: #fff;
input[type="radio"]{
display: none;
}
.product__size_select{
width: 4.5rem;
height: 4.5rem;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
border: 1px solid #ccc;
transition: border 0.2s;
&:hover{
border-color: #000;
}
&:not(:has(input:checked)){
cursor: pointer;
}
&:has(input:checked){
box-shadow: 0 0 0 1px #000;
border-color: #000;
}
}
}
@media (min-width: 979px){
.product__select_sizes{
clip-path: inset(0 0 100% 0);
transition: all 0.2s;
position: absolute;
top: calc(100%);
padding-top: 1rem;
}
.product:hover .product__select_sizes{
clip-path: inset(0 0 0 0);
}
.idm__hotspot .swiper-wrapper:has(.product:hover .product__select_sizes){
z-index: 51!important;
}
}
/* Ogolne */
.idm__hotspot{
.product__name{
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: var(--hotspot-name-clamp, 999);
overflow: hidden;
}
}