* {
    font-family:"Agency FB","Bziba";
    box-sizing: border-box;
}
@font-face {
    font-family: 'Bziba';
    src: url('Bziba.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}


html, body {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
    margin: 0;
    padding: 0;
    /*height: 100%;*/
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;  /* مطمئن شو height محدود نیست */
    min-height: 100vh;
}

body {
    background-image: url("Images/nasty.webp");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    filter: brightness(90%);
    min-height: 100vh;
    /*flex-direction: column;*/
    grid-template-rows: auto 1fr auto;

}
main{
    flex-grow: 1;
}
.logo {
    position: absolute;
    top: 25px;
    left:30px;
    width:90px;

}
.footer-bottom .enamad {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}
#zarinpal{
    position: absolute;
    right: 150px;
    top: 50%;
    transform: translateY(-50%)

}


.Menu {
    display: flex;
    direction: rtl;
    justify-content: flex-start;
    position: fixed;
    top: 10px;
    right: 0;
    font-size: 30px;
    list-style: none ;
    gap: 15px;


}


.Menu a {
    text-decoration: none;
    color: #FFBE42;
    padding: 10px 20px;
    display: block;
    font-size: 20px;
}

a:hover {
    color: gray;
}



.box {
    top: 20px;
    left: 20px;
    width: 450px;
    height: 550px;
    background-color: #FFBE42;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    z-index: 10;
}

.box img {
    width: 90%;
    height: 380px;
    object-fit: cover;
    padding-top: 10px;
}
.article a {
    color: #0066cc;
    text-decoration: none;
    font-weight: bold;
}
.articleContainer a:hover,
.articleContainer a:focus {
    color: #003366; /* آبی تیره‌تر برای تاکید */
    outline: 2px solid #003366; /* مشخص شدن فوکوس برای صفحه‌خوان‌ها و کیبورد */
    outline-offset: 2px;
}

.box .discount {
    color: red;
    font-size: 20px;
    font-weight: bold;
    margin: 20px 0;
}

.box .price {
    font-size: 25px;
    color: #333;
    margin-left: 160px;
    text-decoration: line-through;
}

.box .discounted-price {
    font-size: 35px;
    margin-left: 160px;
    margin-top:-5px;
    color: green;
    font-weight: bold;
}


.box .actions {
    display: flex;
    justify-content: space-around;
    padding: 10px;
}

.box .actions button {
    background-color: black;
    color: white;
    border: none;
    padding: 10px 50px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    margin-left: 160px;
}

.box .actions button:hover {
    background-color: gray;
}
.background-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.info-box {
    flex: 1;
    background-color: #fff;
    padding: 10px;
    border-radius: 18px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    direction: rtl;
}

.info-box h1 {
    font-size: 30px;
    margin-bottom: 20px;
    color: #333;
}

.info-columns {
    display: flex;
    gap:20px;
    flex-wrap: wrap;
}

.column {
    flex: 1;
    min-width: 220px;
}

.column p {
    margin-bottom: 5px;
    font-size: 18px;
    line-height: 1;
    color: #444;
    font-weight: bold;
}
.background-container {
    position: relative;
    background-color: white;
    /*height: 570px;*/
    width:85%;
    margin-top: 120px;
    margin-left: 100px;
    border-radius: 10px;
    padding: 20px;
}
.sale{
    position: absolute;
    top: 350px;
    left:12px;
    width:200px;
    z-index:10;
}

.twice{
    display: flex;
    flex-direction: row-reverse;
}
.twice .swiper-wrapper {
    display: flex;
    flex-wrap: nowrap; /* پیش فرض swiper */
}
.chart{
    flex: 1;

}

.footer {
    width: 100%;
    /*margin: 0;*/
    padding: 0;
    box-sizing: border-box;
    overflow-x: hidden;
    margin-top: auto;
}
h2 {
    margin-bottom: 40px;
}
.notice{
    color: red ;;
    direction: rtl ;
    text-align: center ;
    font-size:25px ;
    width: 100% ;
    margin: 0;
    padding: 5px 0;
}


.swiper {
    flex: 1;
    width: 60%;
    max-width: 600px;
    margin-top: 80px;
    margin-bottom: 30px !important;
    margin-right: 80px !important;
}

/* -------------------- Swiper Slide -------------------- */
.swiper-slide {
    display: flex;
    height: auto; /* بهتر از ارتفاع ثابت */
    overflow: hidden;
}

/* -------------------- Testimonial Card -------------------- */
.testimonial-card {
    background-color: gray;
    opacity: 0.9;
    border-radius: 18px;
    padding: 30px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    max-width: 800px;
    height: auto;
    overflow: visible;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-right: 33px;
}

/* -------------------- Testimonial Text -------------------- */
.testimonial-text {
    flex: 2;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    border-radius: 12px;
    background-color: #fff;
    min-width: 370px;
    max-width: 600px;
    min-height: 150px;
    max-height: 220px;
    overflow: visible;
    padding: 1px 15px 1px 15px;
}


.testimonial-text p {
    font-size: 18px;
    line-height: 1.3;
    margin-bottom:10px;
    text-overflow: ellipsis;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* ✅ نمایش فقط ۳ خط */
    -webkit-box-orient: vertical;
}

.testimonial-author {
    font-weight: bold;
    align-self: flex-end;
}

.testimonial-img {
    flex: 1;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: 20px;
}

.testimonial-img img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    cursor: grab;
}
.chart{
    position: absolute;
    width: 400px;
    height: 250px;
    margin-bottom: -50px;
    margin-left: 140px;
    margin-top: 55px;
}
.article{
    color: black;
    font-size: 25px;
    direction: rtl;
}
.articleContainer {
    background-color: white;
    padding: 50px 200px; /* بالا/پایین 20px، چپ/راست 40px */
    line-height: 1.6;
    width: 85%;
    margin: 20px auto 100px auto; /* بالا - وسط - پایین - وسط */
    border-radius: 18px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    direction: rtl;
}

@keyframes shake {
    0% { transform: translate(0px, 0px); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(2px, -2px); }
    60% { transform: translate(-2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0px, 0px); }
}

.cart-shake {
    animation: shake 0.5s ease;
}
.cart-wrapper {
    position: relative;
    display: inline-block;
}
.cart-wrapper :hover{


}
a {
    position: relative;
    display: inline-block;
}

#cart-count {
    position: absolute;
    top: 18px;
    right: 66px;
    background: #FF3B3B;
    color: white;
    font-size: 12px;
    font-weight: bold;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    text-align: center;
    line-height: 18px;
    pointer-events: none;
}

.footer-top {
    background-color: #FFBE42;
    padding: 40px 0;
    text-align: center;
}

.social-icons {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-icons li {
    display: inline-block;
}

.social-icons a {
    font-size: 24px;
    color: black;
    text-decoration: none;
}

.social-icons a:hover {
    color: white;
}

.footer-bottom {
    background-color: black;
    color: #FFBE42;
    text-align: center;
    padding: 20px 10px;
    position: relative;
}

.logo-text h2 {
    margin: 0;
    font-size: 36px;
    color: #FFBE42;
}

.logo-text span {
    display: block;
    font-size: 16px;
    margin-top: 5px;
}

.links a {
    color: #FFBE42;
    text-decoration: none;
    margin: 0 5px;
}

.links a:hover {
    text-decoration: underline;
}


/*!*responsive*!*/
@media screen and (max-width: 768px) {
    nav {
        position: relative;
    }

    .hamburger {
        display:block;
        position: absolute;
        top:33px;
        right: 20px;
        font-size: 28px;
        color: #fff;
        cursor: pointer;
        z-index: 1001;
    }

    .Menu {
        display: none;
        flex-direction: column;
        background-color: #111;
        width: 100%;
        position: absolute;
        top: -190px;
        right: -30px;
        z-index: 1000;
    }

    .Menu.active {
        display: flex;
    }

    .Menu a {
        display: block;
        padding: 12px 20px;
        text-align: center;
        color: white;
        text-decoration: none;
        border-bottom: 1px solid #333;
        font-size: 16px;
    }

    .Menu a:hover {
        background-color: #222;
    }
}
@media screen and (max-width: 768px) {
    .logo {
        width: 40px;
        top: 10px;
        left: 10px;
    }
}
@media screen and (max-width: 768px) {
    .background-container{
        width: 100%;
        margin-left: auto;
        border-radius: 0;
    }
}
@media screen and (max-width: 768px) {
    .info-box{
        width: 100%;
        margin-left: auto;
        display: flex;
        flex-direction: column !important;

    }

    .column {
        width: 100%;
        text-align: center;
        margin-bottom: 20px;
    }

    .info-box h1 {
        text-align: center;
    }

    .notice {
        text-align: center;
    }
    .box .discounted-price{
        font-size: 30px;
    }
    .column p {
        font-size: 22px;
    }
    .box .actions button {
        background-color: black;
        color: white;
        border: none;
        padding: 15px 40px;
        border-radius: 4px;
        cursor: pointer;
        font-size: 18px;
        margin-left: 160px;
    }
}


@media (max-width: 768px) {
    .swiper {
        width: 100% !important;
        margin: 20px auto !important;
    }

    .testimonial-card {
        margin-right: 0;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        margin-top: 50px;
    }

    .testimonial-text {
        min-width: auto;
        width: 100%;
        max-width: 100%;
    }

    .testimonial-img {
        display: none; /* تصویر پروفایل حذف بشه روی موبایل */
    }
}

@media screen and (max-width: 768px) {
    .Menu.active {
        display: flex;
        margin-top: 225px;
        margin-right: 30px;

    }
}

@media screen and (max-width: 768px) {
    .footer-bottom {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-bottom .enamad {
        position: static; /* لغو absolute */
        transform: none;
        margin-top: 10px; /* فاصله از لینک‌ها */
    }
}
@media screen and (max-width: 768px) {
    .footer-bottom {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* لوگوها بیاد اول */
    .footer-bottom .trust-logos {
        order: -1; /* بیار بالا */
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 10px;
        margin-bottom: 10px; /* فاصله از اجزای بعدی */
    }

    .footer-bottom .trust-logos .enamad,
    .footer-bottom .trust-logos #zarinpal {
        position: static;
        transform: none;
        margin: 0;
        max-width: 120px;
    }
}

@media screen and (max-width: 768px) {
    .article{
        color: black;
        font-size:20px;
        direction: rtl;
    }
    .articleContainer {
        background-color: white;
        padding: 7px 20px;
        line-height: 1.6;
        margin-top:0;
        margin-bottom: 100px;
    }
}

/* وقتی روی گوشی (عرض کمتر از 768px) باز بشه */
@media (max-width: 768px) {
    .mz-academy {
        font-size: 20px;
    }
}
@media screen and (max-width: 768px) {

    /* تغییر چینش از ردیفی به ستونی */
    .twice {
        flex-direction: column !important;
        align-items: center;
    }

    /* چارت */
    .chart {
        position: relative !important; /* لغو absolute */
        width: 100% !important;
        max-width: 400px;
        margin: 0 auto 30px auto; /* فاصله با اسلایدر */
    }

    /* اسلایدر نظرات */
    .swiper {
        width: 100% !important;
        margin: 0 auto 30px auto !important;
    }

    /* مقاله */
    .articleContainer {
        width: 100%;
        margin: 0 auto 100px auto;
    }
}
