html, body {
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
    position: relative;
}

 .row, .col, [class*="col-"] {
    max-width: 100%;
    overflow-x: visible;
}

img, video, iframe, table {
    max-width: 100%;
    height: auto;
}


.container-header{
    background-color: transparent;
}

.container-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background 0.4s ease;
}

.container-header.scrolled {
    /*background: rgba(0,0,0,0.7);*/
    background: rgba(81, 81, 81, 0.8);

    transition: 2s;
}

.container-header.scrolled::before {
    content: "";
    position: absolute;
    inset: 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: -1;
    width: 100%;
    max-width: 1100px;
    border-radius: 9999px;
}





















.article-section{
    background-image: none;
    background-color: transparent;
}

.poster a img {
    width: 100%;
    display: block;
    object-fit: cover;
    border-radius: 15px;
    aspect-ratio: 16 / 9;
    padding: 4px;
    border: 2px solid #1E6F5C;
}










.article-card {
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.article-card p {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* حداکثر 3 خط */
    -webkit-box-orient: vertical;
}



/*اسکرول*/
.scroll-container {
    position: relative;
}


.scroll-btn {
    position: absolute;
    top: 60%;
    transform: translateY(-50%);
    z-index: 10;
    background-color: transparent;
    color: #1E6F5C;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    width: 30px;
    height: 30px;
}

.left-btn { left: 0; }
.right-btn { right: 0; }

.scroll-btn {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}
.scroll-container:hover .scroll-btn {
    opacity: 1;
    pointer-events: auto;
}
@media (max-width: 768px) {
    .scroll-btn {
        display: none;
    }
}
/* ---------- Swiper ---------- */

.swiper{
    width:100%;
    overflow:hidden;
}

.swiper-wrapper{
    align-items:stretch;

}

.swiper-slide{
    height:auto;
    display:flex;
    justify-content:center;
}

.swiper-slide .product{
    width:100%;
}

/*slider*/
body{
    overflow-x: hidden;
}

.slider{
    position: relative;
    margin: 15px auto;
    aspect-ratio: 16 / 9;
    max-height: 80vh;
    /*overflow: hidden;*/
}
.item-slider{
    position: absolute;
    inset: 0 0 0 0;
    /*overflow: hidden;*/
    opacity: 0;
    transition: 0.5s;
}
.item-slider img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    object-position: center;

}


.item-slider.active{
    opacity: 1;
    /*z-index: 10;*/
}





.thumbnail {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 11;
    display: flex;
    gap: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}
.thumbnail::-webkit-scrollbar{
    width: 0;
}
/*.thumbnail-item{*/
/*    width: 150px;*/
/*    height: 150px;*/
/*    filter: brightness(0.5);*/
/*    transition: .5s;*/
/*    flex-shrink: 0;*/
/*    transform-style: preserve-3d;*/

/*}*/
.thumbnail-item {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
    border: 2px solid transparent;
}
/*.thumbnail {*/
/*    perspective: 1000px;*/
/*    !*overflow: visible;*!*/
/*}*/
.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/*.thumbnail-item.active {*/
/*    opacity: 1;*/
/*    border-color: white;*/
/*    transform: scale(1.1);*/
/*}*/

/*.thumbnail-item img{*/
/*    width: 100%;*/
/*    height: 100%;*/
/*    object-fit: cover;*/
/*    border-radius: 10px;*/
/*}*/
.thumbnail-item.active{
    filter: brightness(1.5);
    transform: scale(1.1) translateZ(20px)  ;

    z-index: 10;
    /*box-shadow: 0 10px 20px rgba(0,0,0,0.5);*/

}
.thumbnail-item:not(.active) {
    transform: scale(0.8) translateZ(0);
}



@media (max-width: 1100px){
    .slider{
        margin: 5px;
        margin-bottom: 90px;
    }

    .thumbnail {
        width: 80%;
        bottom: -80px;
        gap: 8px;
        padding: 8px;
        justify-content: center;
        flex-wrap: wrap;
    }

    .thumbnail-item {
        width: 70px;
        height: 55px;
    }
}

@media (max-width: 576px){
    .slider{
        max-height: 55vh;
    }

    .thumbnail {
        width: 90%;
        justify-content: center;
        flex-wrap: wrap;
        bottom: -70px;
    }

    .thumbnail-item {
        width: 50px;
        height: 40px;
    }
}
















/*brand*/
.container-brand{
    position: relative;
    background-color: #1E6F5C;
    height: 130px;
    margin-bottom: 100px;
    border-radius: 15px;

}

.brand-item {
    width: 120px;       /* اندازه دایو اصلی */
    height: 120px;
    /*transform: rotate(45deg); !* دایو میچرخد *!*/
    transform: rotate(0deg); /* شروع زاویه */
    transition: transform 2.5s ease-out; /* چرخش نرم */
    margin-right: 30px;
    margin-left: 30px;
    margin-top: 40px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    background-color:  #E8F5F1FF;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.1);

}


.img-wrapper {
    position: absolute;
    /*top: -25%;*/
    /*left: -25%;*/
    /*width: 200%;   !* بزرگتر از دایو برای پوشش کامل بعد از چرخش *!*/
    /*height: 200%;*/
    /*transform: rotate(-45deg); !* عکس صاف می‌شود *!*/
    transform: rotate(0deg); /* شروع زاویه */
    transition: transform 1s ease-out; /* چرخش نرم */
    /*display: flex;*/
    /*align-items: center;*/
    /*justify-content: center;*/
    object-fit: contain;
    /*width: 120px;       !* اندازه دایو اصلی *!*/
    /*height: 120px;*/

}
.img-wrapper img{
    object-fit: contain;
    width: 100px;       /* اندازه دایو اصلی */
    height: 100px;
}






@media (max-width: 576px) {
    .brand-item {
        width: 100px;
        height: 100px;
        margin-right: 15px;
        margin-left: 15px;
    }
}





.section-poster {
    position: relative;
    /*padding: 40px 10px;*/
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* خیلی مهم برای محدود کردن بلور داخل بخش */

}

/*.section-poster::before {*/
/*    content: "";*/
/*    position: absolute;*/
/*    top: 0;*/
/*    left: 0;*/
/*    width: 100%;*/
/*    height: 100%;*/
/*    background-image: url("../img/header.png"); !* همان تصویر *!*/
/*    background-size: cover;*/
/*    background-position: center;*/
/*    filter: blur(70px); !* میزان بلور *!*/
/*    z-index: 1; !* پشت تصویر اصلی *!*/
/*    aspect-ratio: 16 / 9;*/

/*}*/

.section-poster img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
    position: relative;
    z-index: 2; /* روی بک‌گراند بلور */
    /*box-shadow: 8px 8px rgba(0, 0, 0, 0.8);*/
}

.item-slider{
    position : absolute;
    inset : 0;
    opacity : 0;
    transition : 0.5s;
    pointer-events : none ;
    
}
.item-slider.active{
    opacity : 1;
    pointer-events : auto ;
    z-index: 10;
}

.erfan-idea{
    display: flex;
    justify-content: center;
    align-items: center;
}

.erfan-idea i{
    font-size: 10rem;
    font-weight: bold;
    text-transform: uppercase;
    background-image: url("../img/q.WEBP");
    background-size: cover;
    background-clip: text;
    background-position: center;
    color: transparent;
    animation: animate 20s linear infinite;
    text-shadow: 10px 10px 20px rgba(0, 0, 0, 0.6);
    font-family: Serif;
}
@keyframes animate {
    to{
        background-position-x: -500px ;
    }
}
@media (max-width: 992px) {
    .erfan-idea i{
        font-size: 5rem;
    }
}
@media (max-width: 576px) {
    .erfan-idea i{
        font-size: 3.5rem;
    }
}
/*-----*/
.section-header-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header-box h3 {
    color: #1E6F5C;
    font-size: clamp(16px, 1.8vw, 25px);
    position: relative;
    /*background: #E8F5F1FF;*/
    background-image: linear-gradient(to right top,white,#E8F5F1FF);
    padding: 8px;
    border-radius: 0.75rem;
    right: 0;
   
}




.view-all {
    text-decoration: none;
    color: white;
    transition: 0.3s;
    font-size: clamp(12px, 1.3vw, 18px);

}

.view-all:hover {
    color: #28c7a9;
}
/*-----*/
.section-product-box {
    position: relative;
    z-index: 1;
}

.section-product-box::before {
    content: "";
    position: absolute;
    top: -20px;
    right: 0;
    width: 100%;
    height: 55%;
    background: #1E6F5C;
   
    
    z-index: -1;
    
}






.galery{
    /*min-height: 100vh;*/
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /*background: #1E6F5C;*/
    font-family: Arial, sans-serif;
    padding: 20px;
    touch-action: manipulation;
}
.grid-container{
    position: relative;
    container-type: inline-size;
    margin: 0 auto;
}
@media (max-width: 767px) {
    .grid-container{
        width: 100%;
        max-width: 95vmin;
        aspect-ratio: 1 / 1;
    }
    .galery{
        padding: 10px;
        justify-content: flex-start;
        /*padding-top: 15px;*/
    }
}
@media (min-width: 768px) {
    .grid-container{
        width: 70vmin;
        height: 70vmin;
        padding: 1rem 0 0 1rem;
    }
    .galery{
        justify-content: center;
    }
}
.grid-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.15);
    filter: blur(80px);
    border-radius: 0.75rem;
    transition: all 0.5s ease-in-out;
    transition-delay: 300ms;
    z-index: -1;
    pointer-events: none;
}
.grid-container:hover::before {
    background: rgba(255, 255, 255, 0.05);
}
/* گرید اصلی - 3 ستون در همه حال */
.main-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* همیشه 3 ستون */
    gap: 8px;
    height: 100%;
    width: 100%;
    position: relative;
    transition: all 0.5s ease-in-out;
}
@media (min-width: 768px) {
    .main-grid{
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}
.column {
    display: grid;
    gap: 8px;
    grid-template-rows: repeat(3, 1fr);
    transition: all 0.5s ease-in-out;
    min-height: 0;
}
@media (min-width: 768px) {
    .column {
        gap: 1rem;
    }
}
.grid-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    height: 100%;
    width: 100%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    touch-action: manipulation;
    background: #111;
}
@media (min-width: 768px) {
    .grid-item {
        border-radius: 0.75rem;
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
    }
}
.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease-in-out;
    display: block;
    pointer-events: none;
}
.main-grid:not(.click-active) .grid-item img {
    filter: blur(.2px) brightness(0.8) contrast(1.2) saturate(0.8);
    transform: scale(1);
}
.main-grid.click-active .grid-item img {
    filter: blur(1px) brightness(0.8) contrast(1.2) saturate(0.8);
    transform: scale(1);
}
.main-grid.click-active .grid-item.selected img {
    filter: blur(0) brightness(1) contrast(1.1) saturate(1);
    transform: scale(1.2);
}
@media (max-width: 767px) {
    .main-grid.column1-active {
        grid-template-columns: 2.5fr 1fr 1fr;
    }
    .main-grid.column2-active {
        grid-template-columns: 1fr 2.5fr 1fr;
    }
    .main-grid.column3-active {
        grid-template-columns: 1fr 1fr 2.5fr;
    }

    .column.row1-active {
        grid-template-rows: 2.5fr 1fr 1fr;
    }
    .column.row2-active {
        grid-template-rows: 1fr 2.5fr 1fr;
    }
    .column.row3-active {
        grid-template-rows: 1fr 1fr 2.5fr;
    }
}
@media (min-width: 768px) {
    .main-grid.column1-active {
        grid-template-columns: 2.5fr 1fr 1fr;
    }
    .main-grid.column2-active {
        grid-template-columns:  1fr 2.5fr 1fr;
    }
    .main-grid.column3-active {
        grid-template-columns:  1fr 1fr 2.5fr;
    }

    .column.row1-active {
        grid-template-rows: 2.5fr 1fr 1fr;
    }
    .column.row2-active {
        grid-template-rows:  1fr 2.5fr 1fr;
    }
    .column.row3-active {
        grid-template-rows:  1fr 1fr 2.5fr;
    }
}

/*category*/

.category-card{
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 22px;
    overflow: hidden;
    text-decoration: none;
    background: #ddd;
    transition: .45s ease;
}

.category-card img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .6s ease;
    z-index: 1;
}


.text{
    position:absolute;
    bottom:20px;
    left:0;
    width:100%;
    display:flex;
    justify-content:center;
    z-index:3;
}

.category-card .text h3{
    color: #fff;
    font-size: clamp(0.9rem, 1.5vw, 2rem);
    font-weight: 700;
    margin: 0;
    transition: .35s;
}




/* Hover */

.category-card:hover img{
    transform: scale(1.08);
}

.category-card:hover{
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,.18);
}



.category-card:hover .text{
    bottom: 24px;
}


.category-card::after{
    content:"";
    position:absolute;
    inset:0;
    background:linear-gradient(
            to top,
            rgba(0,0,0,.75) 5%,
            rgba(0,0,0,.25) 45%,
            rgba(0,0,0,0) 75%
    );
    z-index:2;
}