Files
marketplaces/src/app/components/items-carousel/items-carousel.component.scss
2026-02-14 02:59:26 +04:00

374 lines
7.1 KiB
SCSS

.carousel-container {
width: 100%;
padding: 2rem 0;
max-width: 1400px;
margin: 0 auto;
font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
::ng-deep {
// PrimeNG carousel wrapper
.p-carousel {
.p-carousel-content {
display: flex;
flex-direction: row;
align-items: center;
gap: 1.5rem;
}
// Navigation buttons
.p-carousel-prev,
.p-carousel-next {
width: 3rem;
height: 3rem;
border-radius: 50%;
background: white;
border: 2px solid #d3dad9;
color: #1e3c38;
transition: all 0.3s ease;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
align-self: center;
z-index: 10;
flex-shrink: 0;
&:hover {
background: #f9fafb;
border-color: #d3dad9;
transform: scale(1.05);
}
&:not(:disabled):hover {
background: var(--primary-color, #497671);
border-color: var(--primary-color, #497671);
color: white;
}
}
// Items container
.p-carousel-items-container {
.p-carousel-items-content {
width: 100%;
.p-carousel-item {
padding: 0 0.5rem !important;
box-sizing: border-box;
}
}
}
// Add gap between items
.p-carousel-items-content .p-carousel-item-list {
display: flex;
}
.p-carousel-item {
flex-shrink: 0;
}
// Pagination dots
.p-carousel-indicator-list {
display: flex !important;
justify-content: center !important;
gap: 0.5rem !important;
padding: 1.5rem 0 !important;
margin: 0 !important;
list-style: none !important;
.p-carousel-indicator {
display: inline-block !important;
.p-carousel-indicator-button {
width: 12px !important;
height: 12px !important;
border-radius: 50% !important;
background-color: #d3dad9 !important;
border: 0 !important;
padding: 0 !important;
cursor: pointer !important;
transition: all 0.3s ease !important;
&:hover {
background-color: #a1b4b5 !important;
transform: scale(1.2);
}
}
&.p-carousel-indicator-active .p-carousel-indicator-button {
background-color: var(--primary-color, #497671) !important;
width: 32px !important;
border-radius: 6px !important;
}
}
}
}
}
}
.carousel-loading,
.carousel-empty {
text-align: center;
padding: 3rem 1rem;
color: #697777;
.spinner {
width: 40px;
height: 40px;
margin: 0 auto 1rem;
border: 4px solid #f3f3f3;
border-top: 4px solid var(--primary-color, #497671);
border-radius: 50%;
animation: spin 1s linear infinite;
}
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
// Item card styles
.item-card {
background: #ffffff;
border-radius: 13px;
border: 1px solid #d3dad9;
overflow: hidden;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
transition: box-shadow 0.3s ease, transform 0.3s ease;
position: relative;
height: 100%;
display: flex;
flex-direction: column;
width: calc(100% - 1rem) !important;
box-sizing: border-box;
margin: 0 auto;
&:hover {
box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
transform: translateY(-4px);
}
}
.item-link {
text-decoration: none;
color: inherit;
display: flex;
flex-direction: column;
flex: 1;
}
.item-image {
position: relative;
width: 100%;
height: 170px;
overflow: hidden;
background: #f5f3f9;
img {
width: 100%;
height: 100%;
object-fit: contain;
padding: 12px;
transition: transform 0.4s ease;
box-sizing: border-box;
}
.item-card:hover & img {
transform: scale(1.06);
}
}
.discount-badge {
position: absolute;
top: 10px;
left: 10px;
background: #ef4444;
color: white;
padding: 4px 10px;
border-radius: 20px;
font-family: "DM Sans", sans-serif;
font-size: 0.75rem;
font-weight: 700;
letter-spacing: 0.02em;
z-index: 2;
line-height: 1.3;
}
.item-details {
padding: 12px 14px 14px;
display: flex;
flex-direction: column;
gap: 6px;
flex: 1;
}
.item-name {
font-family: "DM Sans", sans-serif;
font-size: 0.8125rem;
font-weight: 600;
margin: 0;
line-height: 1.35;
min-height: 2.2em;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
color: #1e3c38;
transition: color 0.2s;
.item-card:hover & {
color: #497671;
}
}
.item-rating {
display: flex;
align-items: center;
gap: 4px;
font-family: "DM Sans", sans-serif;
font-size: 0.75rem;
svg {
flex-shrink: 0;
}
.rating-value {
font-weight: 600;
color: #1e3c38;
}
.rating-count {
color: #697777;
}
}
.item-price-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
margin-top: auto;
padding-top: 4px;
}
.item-price {
display: flex;
align-items: baseline;
gap: 6px;
flex-wrap: wrap;
flex: 1;
font-family: "DM Sans", sans-serif;
.current-price,
.discounted-price {
font-size: 0.9375rem;
font-weight: 700;
color: #1e3c38;
}
.discounted-price {
color: #ef4444;
}
.original-price {
font-size: 0.75rem;
color: #a1b4b5;
text-decoration: line-through;
}
}
.cart-icon-btn {
width: 36px;
height: 36px;
padding: 0;
background: #497671;
color: white;
border: none;
border-radius: 10px;
cursor: pointer;
transition: background 0.2s ease, transform 0.15s ease;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
svg {
display: block;
width: 18px;
height: 18px;
}
&:hover {
background: #3d635f;
transform: scale(1.08);
}
&:active {
transform: scale(0.95);
}
}
// Novo theme styles
.novo-theme {
::ng-deep {
.p-carousel {
.p-carousel-prev,
.p-carousel-next {
&:not(:disabled):hover {
background: var(--primary-color, #497671);
border-color: var(--primary-color, #497671);
}
}
.p-carousel-indicators {
.p-carousel-indicator.p-highlight button {
background: var(--primary-color, #497671);
}
}
}
}
.item-card {
border: 1px solid #e5e5e5;
}
.cart-icon-btn {
background: var(--primary-color, #497671);
&:hover {
background: var(--primary-hover, #3d635f);
}
}
}
// Responsive styles
@media (max-width: 968px) {
.carousel-container {
padding: 0 1rem;
}
.item-image {
height: 160px;
}
}
@media (max-width: 640px) {
.item-image {
height: 150px;
}
.item-details {
padding: 10px 12px 12px;
}
.item-name {
font-size: 0.8125rem;
}
.item-price {
.current-price,
.discounted-price {
font-size: 1rem;
}
}
}