UNPKG

pkg-components

Version:
275 lines (246 loc) 6.54 kB
.productCardWrapper { width: 122px; border-radius: 8px; height: 250px; box-shadow: var(--box-shadow-sm); cursor: pointer; display: flex; flex-direction: column; position: relative; transition: .5s cubic-bezier(0.175, 0.885, 0.32, 1.275); } .product-card-content { position: relative; display: flex; flex-direction: column; align-items: flex-start; grid-gap: 6px; gap: 6px; text-decoration: none; z-index: var(--z-index-5); height: inherit; } .product-card-image__container { position: relative; background-size: cover; background-position: center; width: 122px; height: 100px; align-items: center; justify-content: center; display: flex; } .wrapper-image { height: 100%; overflow: hidden; } .product-card-image { width: 100%; height: 100%; object-fit: cover; } .product-card-image__overlay { position: absolute; inset: 0; background: rgb(0 0 0 / 7%); height: 100px; width: 122px; } .product-card__description { display: -webkit-box; /* Para soportar line clamp */ -webkit-line-clamp: 2; /* Limita a 2 líneas */ overflow: hidden; /* Oculta el texto adicional */ text-overflow: ellipsis; /* Agrega "..." al final del texto truncado */ color: var(--color-text-gray-light); font-size: var(--font-size-xs); font-weight: var(--font-weight-normal); line-height: var(--line-height-xs); margin-bottom: 10px; width: 100%; max-height: calc(2 * var(--line-height-xs)); /* Limita a 2 líneas */ padding: 0 5px; /* Agrega un pequeño margen interno para evitar desbordes */ display: ruby-text; -webkit-box-orient: vertical; order: 5; } .product-card__title { -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: var(--color-text-gray-light); display: flex; font-size: .875rem; font-weight: var(--font-weight-normal); line-height: var(--line-height-xs); max-height: calc(2 * var(--line-height-xs)); overflow: hidden; text-overflow: ellipsis; display: ruby-text; width: 100%; } .product-card__price { color: var(--color-neutral-gray-dark); font-size: var(--font-size-xs); font-weight: bold; line-height: var(--line-height-xs); } .stock_container { display: flex; justify-content: center; position: absolute; top: 75px; z-index: var(--z-index-50); align-items: center; background-color: var(--color-base-white); border-top-left-radius: 8px; border-top-right-radius: 8px; height: 25px; width: 100%; transition: all 0.2s ease-in-out; } .quantity_container { display: flex; justify-content: flex-end; position: absolute; right: 5px; top: 60px; z-index: var(--z-index-50); } .dots_sub_items { align-items: center; background-color: var(--color-base-transparent); cursor: pointer; display: flex; justify-content: center; } .card_sub_items { -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; text-overflow: ellipsis; color: var(--color-neutral-gray-silver); font-size: var(--font-size-xs); font-weight: var(--font-weight-light); margin-top: 5px; justify-content: flex-start; align-items: flex-start; } .container_free { display: flex; justify-content: space-between; width: 100%; height: 30px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .productCardWrapperFree { position: absolute; top: 10px; width: 99%; padding: 3px 0; display: flex; justify-content: center; background-color: var(--color-feedback-success-dark); border-radius: 5px 5px 0 0; cursor: pointer; user-select: none; transition: top 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); opacity: 0; } .product-card:hover .productCardWrapperFree { top: -20px; opacity: 1; } .suggestion { position: absolute; bottom: 0; width: 50%; height: var(--spacing-3xl); padding: 3px 0; display: flex; justify-content: center; align-items: center; background-color: var(--color-feedback-success-dark); border-radius: 5px; cursor: pointer; user-select: none; opacity: 0; left: 0; transition: opacity 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); z-index: var(--z-index-5); overflow: hidden; } .suggestion button { background-color: var(--color-base-transparent); padding: 0; cursor: pointer; } .product-card_action_free { position: absolute; bottom: 40px; right: -5px; } .product_slide_action_bottom { position: absolute; bottom: 0; width: 50%; height: var(--spacing-3xl); padding: 3px 0; right: 0; display: flex; justify-content: center; align-items: center; background-color: var(--color-primary-pink-light); border-radius: 5px; cursor: pointer; user-select: none; opacity: 0; z-index: var(--z-index-10); transition: opacity 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); } .product_slide_action_bottom button { background-color: var(--color-base-transparent); padding: 0; cursor: pointer; } .product:hover .product_slide_action_bottom, .product:hover .suggestion { bottom: -35px; opacity: 1; } .productCard_info_slider { align-items: center; background-color: var(--color-background-gray); border-radius: 5px; bottom: 20px; box-shadow: var(--box-shadow-xs); cursor: pointer; display: flex; height: var(--spacing-3xl); justify-content: center; opacity: 0; padding: 3px 0; padding: 5px; position: absolute; right: -15px; transition: opacity 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; width: 30px; width: 30px; border-radius: 50px; bottom: 0; z-index: -1; } .product:hover .productCard_info_slider { opacity: 1; bottom: 0px; }