﻿.tooltip-text {
    position: absolute;
    top: calc(100% + 5px); /* دقیقاً بالای دکمه */
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 14px;
    display: none;
    max-width: 250px;
    text-align: center;
    white-space: normal;
}

    .tooltip-text::after {
        content: "";
        position: absolute;
        top: -5px;
        left: 50%;
        transform: translateX(-50%);
        border-width: 6px;
        border-style: solid;
        border-color: transparent transparent #333 transparent;
    }




.search-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 300px; /* محدود کردن عرض در دسکتاپ */
    margin: auto;
}

@media (max-width: 600px) {
    .search-panel {
        max-width: 100%; /* در موبایل، تمام عرض صفحه */
    }
}

.color-picker {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
}

@media (max-width: 768px) {
    #toggleFilter {
        font-size: 12px; /* کاهش اندازه فونت در موبایل */
        width: 100px; /* کاهش عرض دکمه */
      
    }
}

.toggle-btn {

    padding: 8px;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-weight: bold;
}

.toggle-section {
    display: none;
    margin-top: 8px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}
@media (max-width: 992px) {
    .color-picker {
        grid-template-columns: repeat(8, 1fr);
        gap: 2px; /* فاصله کمتر در تبلت */
    }
}

@media (max-width: 600px) {
    .color-picker {
        grid-template-columns: repeat(8, 1fr);
        gap: 2px; /* کاهش فاصله در موبایل */
    }
}
.size-picker div {
    display: flex;
    align-items: center;
    gap: 6px;
}
.size-picker {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    font-size: 16px; /* اندازه پیش‌فرض */
    font-weight: bold;
}

@media (max-width: 992px) {
    .size-picker {
        grid-template-columns: repeat(2, 1fr);
        font-size: 16px; /* در نمایش متوسط، فونت کمی بزرگ‌تر شود */
    }
}

.size-picker input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}


@media (max-width: 600px) {
    .size-picker {
        grid-template-columns: repeat(2, 1fr);
        font-weight: normal;
    }
}
/*.color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}*/

.color {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    border: 2px solid #ccc;
    position: relative;
    transition: transform 0.2s;
}

    .color.selected::after {
        content: "✔";
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 16px;
        color: white;
        font-weight: bold;
    }

    /* تنظیم تیک مشکی برای رنگ سفید */
    /*.color.selected[style*="background-color: #ffffff"]::after {
        color: black;
    }*/

    /* تنظیم تیک سفید برای سایر رنگ‌ها */
    /*.color.selected:not([style*="background-color: #ffffff"])::after {
        color: white;
    }*/
    /* تیک مشکی برای رنگ‌های خیلی روشن */
    .color.selected[style*="background-color: #ffffff"]::after,
    .color.selected[style*="background-color: #FFFAFA"]::after, /* استخوانی */
    .color.selected[style*="background-color: #FFFFF0"]::after { /* کرم */
        color: black;
    }

    /* تیک سفید برای سایر رنگ‌ها */
    .color.selected::after {
        content: "✔";
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 16px;
        font-weight: bold;
        color: white;
    }


input[type="text"] {
    text-align: center;
    direction: ltr;
    font-size: 18px;
    font-weight: bold;
}

/* دکمه بستن فقط با آیکون */

/* فیلد عددی با جداسازی سه‌رقمی */
input[type="number"] {
    text-align: center;
    direction: ltr;
}

#filterBox {
    position: fixed;
    right: -400px; /* عرض جدید */
    top: 0;
    width: 400px; /* عرض بیشتر */
    height: 100vh;
    background: #f8f9fa;
    padding: 15px;
    border-left: 2px solid #ddd;
    transition: right 0.3s ease-in-out;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

    #filterBox.open {
        right: 0;
    }

/* در موبایل، عرض کمتر */
@media (max-width: 768px) {
    #filterBox {
        width: 80%;
        font-size:12px;
        right: -100%;
    }
}

#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    z-index: 9999;
    display: none;
}




#cuteKidLoading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #ffcccb, #ff9999);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    z-index: 9999;
    display: none;
}

.kid-animation {
    width: 100px;
    height: 100px;
    background: url('https://path-to-your-cute-kid-image.png') no-repeat center;
    background-size: cover;
    animation: bounce 1s infinite alternate, spin 3s infinite linear;
}

@keyframes bounce {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-20px);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
#movingObject::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 40%;
    width: 80%;
    height: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    transform: translateX(-50%);
    animation: shadowFloat 3s infinite alternate;
}

@keyframes shadowFloat {
    0% {
        opacity: 0.5;
        transform: scaleX(0.9);
    }

    100% {
        opacity: 0.2;
        transform: scaleX(1.1);
    }
}
.balloon {
    position: absolute;
    width: 40px;
    height: 60px;
    background: radial-gradient(circle, #ffcc00, #ff6600);
    border-radius: 50%;
    animation: balloonFloat 3s infinite ease-in-out, popBalloon 6s infinite alternate;
}

@keyframes balloonFloat {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-30px);
    }
}

@keyframes popBalloon {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0);
    }
}

.cloud {
    position: absolute;
    width: 120px;
    height: 80px;
    background: #fff;
    border-radius: 50%;
    animation: cloudDrift 6s infinite linear;
}

@keyframes cloudDrift {
    0% {
        left: 0;
        opacity: 0.8;
    }

    100% {
        left: 100%;
        opacity: 0.6;
    }
}

#mainDivTopTenID {
    min-height: 50vh; /* حداقل 50 درصد ارتفاع صفحه */
    display: flex;
    justify-content: center;
    align-items: center;
}

.empty-message {
    font-size: 18px;
    color: #888;
    text-align: center;
}


#movingObject {
    position: fixed;
    bottom: 50%;
    left: 50%;
    transform: translate(-50%, 50%);
    width: 400px;
    height: 400px;
    border-radius: 50%; /* گرد کردن لبه‌های تصویر */
    overflow: hidden; /* جلوگیری از بیرون زدن محتوا */
    /*animation: floatingAnimation 3s infinite ease-in-out;*/
    animation: floatingAnimation 3s infinite ease-in-out, glow 2s infinite alternate;
}
@keyframes glow {
    0% {
        filter: drop-shadow(0px 0px 5px #ff99cc);
    }

    50% {
        filter: drop-shadow(0px 0px 15px #ff66b2);
    }

    100% {
        filter: drop-shadow(0px 0px 5px #ff99cc);
    }
}



@keyframes floatingAnimation {
    0% {
        transform: translate(-50%, 50%) scale(1);
    }

    50% {
        transform: translate(-50%, 47%) scale(1.05) rotate(5deg);
    }

    100% {
        transform: translate(-50%, 50%) scale(1);
    }
}


@keyframes bounce {
    0% {
        transform: translate(-50%, 50%) scale(1);
    }

    100% {
        transform: translate(-50%, 45%) scale(1.1);
    }
}


@keyframes moveAcross {
    0% {
        left: 0;
        transform: rotate(0deg);
    }

    50% {
        left: 50%;
        transform: rotate(10deg);
    }

    100% {
        left: 100%;
        transform: rotate(0deg);
    }
}


/* استایل اوورلی برای تاریک کردن صفحه هنگام باز شدن فیلتر */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 999;
}

    .overlay.active {
        display: block;
    }

/* در حالت موبایل، عرض فیلتر باکس را تغییر دهیم */
.card-wrapper {
    width: 100%;
    max-width: 310px;
    min-width: 250px;
    flex-grow: 1;
    margin: 0 auto;
}

@media (max-width: 576px) {
    .card-wrapper {
        max-width: 80%; /* توی موبایل باریک‌تر بشه ولی وسط بمونه */
        margin: 0 auto;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .card-wrapper {
        max-width: 310px;
        margin: 0 auto;
    }
}
