/* Baner z kategoriami akcesoriów - Style CSS wzorowane na sekcji opon */
/* Autor: Autovo.pl */

:root {
    --section-bg: #f5f5f5;
    --tile-img-h: 230px;
    --col-pad: 15px;
}

.akcesoria-banner-section {
    background: var(--section-bg); /* zgodne z modułem referencyjnym */
    padding: 40px 0 0 0; /* dół 0 */
    margin: 0; /* dół 0 */
}

.akcesoria-banner-header {
    text-align: center;
    margin-bottom: 24px;
    position: relative;
}

.akcesoria-main-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin: 0 0 15px 0;
    line-height: 1.2;
}

.akcesoria-main-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0 auto;
    line-height: 1.5;
}

/* Strzałki obok tytułu, z białym tłem */
.akcesoria-banner-header .tvcmsnew-next-pre-btn {
    position: absolute;
    top: -0.5rem; /* idealne wyrównanie z tytułem */
    right: 0;
    display: flex;
    gap: 8px; /* większy odstęp między strzałkami */
    padding: 0;
    margin-left: 20px; /* odstęp od tekstu */
}

/* Tło na całym przycisku (prev/next), nie tylko na kontenerze */
.akcesoria-banner-header .tvcmsnew-next-pre-btn .tvcmsnext-btn,
.akcesoria-banner-header .tvcmsnew-next-pre-btn .tvcmsprev-btn {
    background-color: #ffffff;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.akcesoria-banner-header .tvcmsnew-next-pre-btn .tvcmsnext-btn i,
.akcesoria-banner-header .tvcmsnew-next-pre-btn .tvcmsprev-btn i {
    color: #333;
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Aktywne przyciski strzałek - czerwone tło jak w innych modułach */
.akcesoria-banner-header .tvcmsnew-next-pre-btn .tvcmsnext-btn:hover,
.akcesoria-banner-header .tvcmsnew-next-pre-btn .tvcmsprev-btn:hover {
    background-color: #d21717; /* czerwone tło na hover */
}

.akcesoria-banner-header .tvcmsnew-next-pre-btn .tvcmsnext-btn:hover i,
.akcesoria-banner-header .tvcmsnew-next-pre-btn .tvcmsprev-btn:hover i {
    color: #ffffff; /* białe ikony na czerwonym tle */
}

.akcesoria-carousel-wrapper { 
    position: relative; 
}

.akcesoria-carousel { 
    display: flex; 
    flex-wrap: nowrap; /* karuzela w jednym rzędzie */
    overflow-x: auto; /* przewijanie poziome */
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding-bottom: 12px;
    margin: 0 -15px; /* kompensacja wewnętrznych paddingów kolumn jak w referencji */
}

/* ukrycie paska przewijania tam, gdzie to możliwe */
.akcesoria-carousel::-webkit-scrollbar { height: 0; }
/* usunięto scrollbar-width (ostrzeżenia wsparcia) */

/* Kolumny jak w module referencyjnym: padding w kolumnie, bez marginesów, border-box */
.akcesoria-slide {
    flex: 0 0 25%;
    max-width: 25%;
    padding: 0 var(--col-pad); /* równe odstępy od boków */
    box-sizing: border-box;
    margin: 0; /* brak marginesów aby 4 mieściły się idealnie */
}

@media (max-width: 1200px) {
    .akcesoria-slide { flex: 0 0 33.333%; max-width: 33.333%; }
}

@media (max-width: 992px) {
    .akcesoria-slide { flex: 0 0 50%; max-width: 50%; }
}

@media (max-width: 576px) {
    .akcesoria-slide { flex: 0 0 100%; max-width: 100%; }
}

.akcesoria-slide { 
    margin-bottom: 30px;
}

.akcesoria-tile {
    background: #fff;
    border-radius: 3px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.akcesoria-image {
    overflow: hidden;
    position: relative;
    display: block;
    height: var(--tile-img-h); /* stała wysokość jak w bloku referencyjnym */
    cursor: pointer;
}

.akcesoria-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.akcesoria-image::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    pointer-events: none;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.18); /* wewnętrzny cień nad obrazkiem */
}

.akcesoria-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #dc3545, #c82333);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.akcesoria-placeholder i {
    font-size: 48px;
}

.akcesoria-body {
    padding: 20px 40px; /* jak w module tvcmscategorychainslider */
    display: flex;
    flex-direction: column;
    flex: 1;
}

.akcesoria-title {
    font-size: 18px;
    font-weight: 600;
    color: #222222;
    margin: 0 0 15px 0;
    text-align: left;
    padding: 0;
}

.akcesoria-list {
    list-style: none;
    padding: 0;
    margin: 0 0 auto 0;
}

.akcesoria-list li {
    width: 100%;
    padding-bottom: 12px;
    padding-left: 15px;
    color: #222222;
    font-size: 16px;
    line-height: 16px;
    font-weight: 500;
    position: relative;
}

.akcesoria-list li:after {
    position: absolute;
    font-family: 'Material Icons';
    content: '\e315';
    font-size: 21px;
    left: -7px;
    color: #333333;
    top: 0%;
}

.akcesoria-list li:hover,
.akcesoria-list li:hover:after {
    color: #d21717;
    cursor: pointer;
}

.akcesoria-bullet { display: none; }

.akcesoria-desc {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 auto 0;
}

.akcesoria-btn {
    margin-top: 10px;
    width: 100%;
    cursor: pointer;
}

/* Nawigacja karuzeli */
.akcesoria-nav { position: absolute; top: 50%; transform: translateY(-50%); border: 0; background: rgba(255,255,255,.95); box-shadow: 0 2px 8px rgba(0,0,0,.2); width: 44px; height: 44px; border-radius: 50%; display:flex; align-items:center; justify-content:center; cursor:pointer; z-index: 2; display: none; }
.akcesoria-nav--prev { left: -10px; }
.akcesoria-nav--next { right: -10px; }
.akcesoria-nav i { font-size: 20px; color: #333; }

/* Responsywność */
@media (max-width: 992px) {
}

@media (max-width: 768px) {
    .akcesoria-banner-section {
        padding: 30px 0;
        margin: 20px 0;
    }
    
    .akcesoria-banner-header {
        margin-bottom: 30px;
    }
    
    .akcesoria-image {
        height: 180px;
    }
    
    .akcesoria-body {
        padding: 20px;
    }
    
    .akcesoria-title {
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .akcesoria-banner-section {
        padding: 20px 0;
        margin: 15px 0;
    }
    
    .akcesoria-body {
        padding: 15px;
    }
    
    .akcesoria-title {
        font-size: 16px;
    }
    
    .akcesoria-list li {
        font-size: 13px;
    }
}

/* Animacje */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.akcesoria-banner-section {
    animation: fadeInUp 0.6s ease-out;
}

.akcesoria-tile {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}
.akcesoria-grid > div:nth-child(1) .akcesoria-tile { animation-delay: 0.1s; }
.akcesoria-grid > div:nth-child(2) .akcesoria-tile { animation-delay: 0.2s; }
.akcesoria-grid > div:nth-child(3) .akcesoria-tile { animation-delay: 0.3s; }
.akcesoria-grid > div:nth-child(4) .akcesoria-tile { animation-delay: 0.4s; }
.akcesoria-grid > div:nth-child(5) .akcesoria-tile { animation-delay: 0.5s; }
