.categories{
    width: 100%;
    margin: 0 auto;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px 20px;
}
.category{
    width: 100%;
    background: var(--darkened-bg);
    color: var(--body-fg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
}
.category.dropdown {
    overflow: hidden;
}
.category-header{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 30px;
    text-decoration: none;
    flex: 1;
    position: relative;
}

.category-header::after {
    content: '›';
    font-size: 24px;
    transition: transform 0.3s ease;
    transform: rotate(0deg);
    position: absolute;
    right: 10px;
}

.category.dropdown.active .category-header::after {
    transform: rotate(90deg);
}

.category-header .img-cont{
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100px;
    height: 100px;
}

.category-header .img-cont img{
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
}

.subcategory-list{
    height: 0;
    overflow: hidden;
    transition: height 0.4s ease;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 8px;
}

.subcategory-list > *:first-child{
    padding-top: 20px;
}

.item-header{
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
}

.item-header .item-header-current,
.item-header a{
    padding: 15px 20px;
    display: flex;
    align-items: center;
    color: inherit;
    text-decoration: none;
    background: var(--darkened-bg);
    border-bottom: 1px solid var(--border-color);
    flex: 0;
    white-space: nowrap;
}
.item-header a:hover{
    background: var(--body-fg);
    color: var(--body-bg);
}
.item-header .item-header-current{
    border: 1px solid var(--border-color);
    border-bottom-width: 0px;
    background: var(--body-bg);
}
.item-header-after{
    display: block;
    height: 100%;
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

@media screen and (max-width: 970px) {
    .item-header{
        flex-wrap: wrap;
    }
    .item-header span,
    .item-header a{
        word-wrap: normal;
        white-space: normal;
        height: 100%;
    }
}

.items-grid {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
}

.item {
    position: relative;
    min-width: 190px;
    width: 250px;
    height: auto;
    padding: 15px;
    flex: 1;
    max-width: calc(33%);
    background-color: var(--darkened-bg);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: opacity 0.2s ease;
}

.item:hover{
    opacity: 0.85;
}

@media screen and (max-width: 970px) {
    .items-grid {
        max-width: 100%;
        flex-wrap: wrap;
        justify-content: center;
    }
    .item {
        min-width: 250px;
        max-width: 390px;
    }
}

.item .img-cont{
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100%;
    height: 200px;
}

.item .img-cont img{
    min-width: 100%;
    min-height: 100%;
    object-fit: contain;
}

.item-price {
    font-size: 30px;
    color: var(--body-fg);
    white-space: nowrap;
    margin-bottom: -8px;
}

.item-price[data-discount]::after{
    content: attr(data-discount);
    color: red;
    font-size: 30px;
    font-weight: 300;
    padding-left: 10px;
}

.item-price span {
    font-size: 20px;
}

.item-promo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.item-price-initial {
    font-size: 26px;
    text-decoration: line-through;
    color: var(--body-fg);
}

.item-tag-promo-verbose {
    border-radius: 7px;
    padding: 5px;
    background: var(--primary);
    color: var(--primary-fg);
}

#articles {
    text-align: center;
    position: relative;
}
#articles .title{
    text-decoration: none;
}

#articles .small-button {
    background-color: var(--body-bg);
}

.swiper {
    margin: 50px;
    width: 100%;
    height: auto;
}

.article-slide {
    max-width: 400px;
    height: auto;
    max-height: 270px;
    padding: 10px;
    background: var(--darkened-bg);
    border-radius: 10px;
    text-decoration: none;
    color: var(--body-fg);
    display: flex !important;
    flex-direction: column;
    margin-bottom: 40px;
    border: 2px solid var(--darkened-bg);
    transition: all 0.2s ease;
    overflow: hidden;
}

.article-slide:hover {
    border: 2px solid var(--primary);
    transition: all 0.2s ease;
}

.article-slide-image {
    width: 100%;
    height: auto;
    flex: 1;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    margin-bottom: 10px;
}

.article-slide-image img {
    width: 100%;
    height: auto;
}

.article-slide-title {
    display: block;
    flex-shrink: 0;
    text-align: left;
}

.artical-info{
    flex-shrink: 0;
    width: auto;
    height: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 0 10px 0;
}

.artical-info .info-item{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    font-size: 16px;
}

.artical-info .info-item .material-symbols-outlined{
    font-size: 20px;
}

.article-slide p {
    width: 100%;
    flex: 1;
    overflow: hidden;
    text-align: left;
    position: relative;
    border-radius: 0 0 5px 5px;
}
.article-slide p::after{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, var(--darkened-bg) 0%, rgba(255,255,255,0) 100%);
}

.autoplay-progress {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 10;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--swiper-theme-color);
}

.autoplay-progress svg {
    --progress: 0;
    position: absolute;
    left: 0;
    top: 0px;
    z-index: 10;
    width: 100%;
    height: 100%;
    stroke-width: 4px;
    stroke: var(--swiper-theme-color);
    fill: none;
    stroke-dashoffset: calc(125.6 * (1 - var(--progress)));
    stroke-dasharray: 125.6;
    transform: rotate(-90deg);
}

.swiper-horizontal>.swiper-pagination-bullets,
.swiper-pagination-bullets.swiper-pagination-horizontal,
.swiper-pagination-custom,
.swiper-pagination-fraction {
    bottom: var(--swiper-pagination-bottom, 8px);
    top: var(--swiper-pagination-top, auto);
    left: 0;
    width: 100%;
}