/* Slideshow container */
.no-transition {
  transition: none !important;
}
.slideshow-container {
    top: 0;
    max-width: 1500px;
    height: 375px;
    position: relative;
    margin-top: 50px;

}

.slider {
    width: 100%;
    position: absolute;
    height: 100%;
    overflow: hidden;
    box-shadow: 40px rgba(0, 0, 0, 0.8);
    z-index: 900;
    background-color: var(--head-foot);
    border-radius: 25px;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    transform: scale(1.1);
    transition: transform 0.5s ease-in-out;
}

.caption {
    position: absolute;
    width: 100%;
    right: 80%;
    top: -100%;
    color: #ffff00;
    font-weight: 500;
    font-size: 50px;
    text-transform: uppercase;
    Letter-spacing: 4px;
    Line-height: 50px;
    transition: 0.9s;
}

.caption span {
    display: block;
    text-transform: initial;
    font-size: 30px;
    font-weight: 300;
    color: #fff;
    line-height: 15px;
}

.dots {
    width: 100%;
    position: absolute;
    bottom: 5%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dots label {
    width: 15px;
    height: 15px;
    margin: 0 10px;
    border-radius: 50%;
    opacity: 0.3;
    cursor: pointer;
    transition: 0.2s ease-in-out;
    background: #fff;
}

.dots label:hover {
    opacity: 0.7;
}

.radio {
    display: none;
}

.dots label.active {
    background-color: yellow;
    /* رنگ دایره‌های dots */
}

/* نمایش اسلاید انتخاب شده */
#radio-1:checked~#slide-1,
#radio-2:checked~#slide-2,
#radio-3:checked~#slide-3,
#radio-4:checked~#slide-4 {
    opacity: 1;
}

#radio-1:checked~#slide-1 img,
#radio-2:checked~#slide-2 img,
#radio-3:checked~#slide-3 img,
#radio-4:checked~#slide-4 img {
    transform: scale(1);
    /* بازگشت به مقیاس اصلی */
}

#radio-1:checked~#slide-1 .caption,
#radio-2:checked~#slide-2 .caption,
#radio-3:checked~#slide-3 .caption,
#radio-4:checked~#slide-4 .caption {
    opacity: 1;
    top: 20%;
    font-size: 50px;
}

#radio-1:checked~.dots #label-1,
#radio-2:checked~.dots #label-2,
#radio-3:checked~.dots #label-3,
#radio-4:checked~.dots #label-4 {
    background-color: #ffeb3b;
    opacity: 1;
}

.group1 {
    height: fit-content;
    max-width: 1500px;
    overflow: hidden;
    border-radius: 20px;
    margin-top: 10px;
    background-color: #acffbe;
}

.group1 ul {
    display: flex;
    justify-content: space-between;

}

.group1 img {
    height: 130px;
    border-radius: 50%;
    margin: 20px;

}

.group1 ul li {
    list-style: none;
}

.group1 ul li:hover {
    transform: scale(1.05);
    cursor: pointer;
    border: 3px solid #002aff;
    transition: transform 0.8s linear;
}

.group1 h6 {
    font-size: 20px;
    text-align: center;
    margin-top: 10px;
    word-spacing: 2px;
    font-style: oblique;
    font-weight: 100;
    margin-bottom: 30px;
    color: #3b3838ea;


}

.group1-item {
    width: fit-content;
    margin: 10px;
    height: fit-content;
    border-radius: 25%;
    background-color: var(--secondary);
    box-shadow: 0px 0px 100px 100px rgba(47, 47, 47, 0.1);

}

/* شروع اسلایدر */
.nproduct,
.list-wrapper {
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    margin: 10px;
    border: solid 1px var(--accent);
    border-radius: 20px;
    margin-top: 20px;
    min-height: 550px;

}

.list-wrapper {
    background-color: #fff;
}

.nproduct.new{
    background-color: #ff0000;
}
.nproduct.pustomu , .nproduct.bhdashti{
    background-color: #f6eeee47;
}


.newproduct {
    display: flex;
    justify-content: space-between;
    border-radius: 20px;
    margin: 10px;
    align-items: center;
    height: 70px;
}

.newproduct p:nth-child(1) {
    font-size: 1.5rem;
    padding: 10px;

}

.newproduct p:nth-child(3),
.list-wrapper .newproduct a {
    background-color: #19f541;
    font-size: 1rem;
    cursor: pointer;
    margin-left: 30px;
    text-align: center;
    padding: 20px;
    border-radius: 20px;
    position: relative;
}

.line {
    flex-grow: 1;
    height: 2px;
    background-color: rgb(124, 124, 124);
    margin: 0 20px;

}

.wrapper,
.cat-list {
    max-width: 1500px;
    width: 100%;
    position: relative;
    padding: 0;
    margin: 10;
    display: flex;
    overflow: hidden;
    height: auto;
}


.wrapper span:active,
.card__action span:active,
.list-wrapper .arrow:active {
    transform: translateY(-55%) scale(0.85);
}

.wrapper span:first-child {
    left: 10px;
}


.wrapper .carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding: 0 16px 20px;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.carousel .card,
.slide-item {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    flex: 0 0 calc(16.666% - 20px);
    margin: 0 8px;
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 240px;
    max-width: 280px;
    height: 450px;
    /* ⬅️ ارتفاع ثابت برای پر کردن فضا */
    padding: 16px;
}

.carousel .card a,
.slide-item a {
    width: 100%;
    height: 100%;
    color: #000;
}

.carousel .card .img-ratio {
    width: 100%;
    position: relative;
    padding-top: calc(2 / 3 * 100%);
    overflow: hidden;
}


.carousel .card img,
.slide-item img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    margin-bottom: 16px;
}

.cardheader {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    margin-bottom: 12px;
}

.cardtitle {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.4;
    text-align: right;
    direction: rtl;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    min-height: 3.2em;
}

.card hr {
    width: 90%;
    border: 1px solid #9a9a9a;
}

.cardprice {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    margin-top: auto;
    padding-top: 12px;

}

.discount-button {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 5;
}

.discount-button button {
    background: #ff5722;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 6px 10px;
    font-size: 0.9rem;
    font-weight: bold;
}

.discount-percentage {
    position: absolute;
    top: 200px;
    left: 16px;
    background: #4CAF50;
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: bold;
    z-index: 5;
}

.carousel::-webkit-scrollbar {
    display: none;
}

.carousel.no-transition {
    scroll-behavior: auto;
}

.carousel :where(.card, .img) {
    display: flex;
    justify-content: center;
    align-items: center;
}

.cardprice h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #d32f2f;
    margin: 0;
    direction: rtr;
    text-align: left;
}

.carousel .card h3,
.carousel {
    margin-right: 10px;
    flex-direction: row;
    white-space: nowrap;
    direction: rtl;

}

.carousel .card span {
    color: #6A6D78;
    font-size: 1.31rem;
}

.carousel .card strike,
.cardprice strike {
    font-size: 1.1rem;
    color: #777;
    text-decoration: line-through;
    margin-top: 10px;

}

.out-of-stock {
    color: #999 !important;
    font-size: 1.3rem !important;
    font-weight: 700;
}

.hidden {
    display: none !important;
}

.wrapper .sleft,
.wrapper .sright,
.list-wrapper .arrow {
    top: 50%;
    height: 50px;
    width: 50px;
    cursor: pointer;
    font-size: 2rem;
    position: absolute;
    text-align: center;
    background: #ffffff;
    border-radius: 50%;
    transform: translateY(-100%);
    transition: transform 0.1s linear;
    z-index: 900;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wrapper .sleft:hover,
.wrapper .sright:hover,
.list-wrapper .arrow:hover {
    background: #e2e5e7;
}

.card__action {
    color: white;
    padding: 10px 15px;
    margin-bottom: 10px;
    text-align: center;
    position: absolute;
    display: block;
    font-size: 16px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.5s ease;
    top: 10%;
    left: -60%;
    opacity: 1;

}

.card:hover .card__action,
.slide-item:hover .card__action {
    opacity: 1;
    left: 10%;
    transition: all 0.5s ease 0s;
}

.card:hover .card__action .icon,
.slide-item:hover .card__action .icon {
    border: 3px solid #002aff;
    cursor: pointer;
}

.card__action .icon {
    background: #ffeeeecc;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.add-to-cart {
    border: none;
    border-radius: 50%;
}

/* پایان اسلایدر */
.group2 {
    height: fit-content;
    display: flex;
    border-radius: 25px;
    justify-content: space-evenly;
    margin: 10px;
    margin-top: 20px;

}

.group2 div {
    margin: 15;
}

.group2 img {
    border-radius: 50px;
    height: 100%;
    width: 100%;
    cursor: pointer;
}



.group3 {
    background-color: #2196F3;
    margin-top: 20px;
}

.grid-group3 {
    display: grid;
    grid-gap: 10px;
    padding: 10px;
    grid-template-columns: auto auto auto;
    grid-template-rows: auto auto auto;
}

.grid-group3 .item {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.8);
    text-align: center;
    padding: 20px 0;
    font-size: 30px;
    cursor: pointer;
}

.grid-group3 .item a {
    display: flex;
    align-items: center;


}

.item img {
    margin: 5px;
    height: 50px;
    background-color: #48f321;
    width: 50px;
}

.item h6 {
    margin: 5px
}

.group4 {
    height: fit-content;
    display: grid;
    border-radius: 25px;
    grid-template-columns: auto auto auto;
    grid-gap: 10px;
    justify-content: stretch;
    padding: 10;
    margin-top: 20px;



}



.group4 img {
    border-radius: 50px;
    cursor: pointer;
    width: 100%;
    height: 100%;
}




/* پیام */

#message-container {
    width: 400px;
    position: fixed;
    z-index: 1200;
    top: 20px;
    right: 20px;
    justify-content: center;
    align-items: center;
    background: #11ff19;
    color: rgb(0, 0, 0);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-family: Tahoma, Arial, sans-serif;
    direction: rtl;
}

.alert {
    padding: 15px;
    margin: 10px 0;
    border: 1px solid transparent;
    border-radius: 5px;
    position: relative;
    display: inline-block;
    width: 100%;
    transition: opacity 0.7s ease;
}

.alert-info {
    color: #000000;
    font-size: 1.2rem;
}

.close {
    position: absolute;
    top: -25px;
    left: -20px;
    cursor: pointer;
    font-weight: bold;
    color: #000000;

}

/*  */

.cat-list::-webkit-scrollbar {
    display: none;
}

.cat-list.dragging {
    cursor: default;
    scroll-behavior: auto;
}

.list-wrapper {
    position: relative;
    width: 100%;
}



.button--previous {
    left: 1.5rem;
    transform: translateY(-100%);
}

.button--next {
    right: 1.5rem;
    transform: translateY(-100%);
}

.hidden {
    opacity: 0.3;
    pointer-events: none;
    display: none;
}

.line1,
.line2 {
    display: none;
}
.no-transition {
  transition: none !important;
}
@media screen and (max-width: 1023px) {
.list-wrapper .dragging .slide-item a {
  pointer-events: none;
}

/* جلوگیری از highlight لمسی */
.slide-item a {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

/* اجازه اسکرول افقی */
.carousel-list {
  touch-action: pan-x;
}

    .card__action {


        left: 0;

    }

    .newproduct p:nth-child(1) {
        font-size: 1.2rem;

    }

    .newproduct p:nth-child(3),
    .list-wrapper .newproduct a {
        padding: 12px;
        font-size: 0.9rem;
        margin-left: 8px;
        border-radius: 13px;
    }

    .line1,
    .line2 {
        display: block;
        font-size: 1.2rem;
    }

    .line0 {
        display: none;

    }

    .slideshow-container {

        max-width: 100vw;
        aspect-ratio: 16/9;
        height: auto;
        margin-top: 5px;
    }

    .slider {

        border-radius: 15px;
    }

    .caption {
        right: 8%;
        top: 8% !important;
        font-size: 1.5rem !important;

    }

    .dots label {
        width: 8px;
        height: 8px;

    }

    .slide img {

        object-fit: cover;
    }

    #message-container {
        width: 30vw !important;
    }

    .nproduct,
    .list-wrapper {
        margin: 5px 2px;
        border-radius: 12px;
        margin-top: 0;
        min-height: 50vh;
    }

    .wrapper .sleft,
    .wrapper .sright,
    .list-wrapper .arrow {
        height: 35px;
        width: 35px;
        font-size: 1.5rem;
    }


}