chanded categorycarousel to caotegoryslider
This commit is contained in:
151
src/components/CategoryCarousel/CategorySlider.module.scss
Normal file
151
src/components/CategoryCarousel/CategorySlider.module.scss
Normal file
@@ -0,0 +1,151 @@
|
||||
.wrapper {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
margin: 20px 0 24px 0;
|
||||
}
|
||||
|
||||
/* ── Swiper overrides ── */
|
||||
.swiper {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
padding: 4px 2px 8px 2px !important;
|
||||
|
||||
:global(.swiper-button-disabled) {
|
||||
opacity: 0.3;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
.slide {
|
||||
width: 200px !important;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/* ── Card ── */
|
||||
.card {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 12px;
|
||||
background: #f5f5f5;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
transition: box-shadow 0.2s ease, transform 0.2s ease;
|
||||
|
||||
&:hover {
|
||||
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
|
||||
transform: translateY(-2px);
|
||||
border: 1px solid #d24141;
|
||||
|
||||
.imgWrap img {
|
||||
transform: scale(1.04);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ── Image area ── */
|
||||
.imgWrap {
|
||||
width: 100%;
|
||||
// aspect-ratio: 4 / 3;
|
||||
overflow: hidden;
|
||||
background: #ebebeb;
|
||||
flex-shrink: 0;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
transition: transform 0.3s ease;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
.placeholder {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: linear-gradient(135deg, #e0e0e0 0%, #d0d0d0 100%);
|
||||
}
|
||||
|
||||
/* ── Name label — sabit yükseklik ── */
|
||||
.name {
|
||||
padding: 10px 12px 12px 12px;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #222;
|
||||
text-align: center;
|
||||
line-height: 1.4;
|
||||
background: #fff;
|
||||
/* 2 satır = 2 × 13px × 1.4 + padding = ~60px — tüm kartlar eşit */
|
||||
min-height: 60px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* ── Arrow buttons ── */
|
||||
.arrow {
|
||||
position: absolute;
|
||||
flex: 0 0 auto;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 50%;
|
||||
border: 1px solid #ddd;
|
||||
background: #fff;
|
||||
font-size: 22px;
|
||||
line-height: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
color: #444;
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
|
||||
transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
|
||||
padding: 0;
|
||||
z-index: 1;
|
||||
|
||||
&:hover {
|
||||
background: #d24141;
|
||||
border-color: #d24141;
|
||||
color: #fff;
|
||||
box-shadow: 0 2px 8px rgba(210, 65, 65, 0.35);
|
||||
}
|
||||
|
||||
&.prev {
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
&.next {
|
||||
margin-left: 4px;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* ── Responsive ── */
|
||||
@media (max-width: 768px) {
|
||||
.arrow {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.slide {
|
||||
width: 140px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.slide {
|
||||
width: 120px !important;
|
||||
}
|
||||
|
||||
.card {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.name {
|
||||
font-size: 12px;
|
||||
padding: 8px 8px 10px 8px;
|
||||
min-height: 52px;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user