
@media (max-width: 768px) {
  .product-box {
    height: auto; /* ✅ در موبایل هم باکس کش بیاد */
  }

  .product-box .product-image {
    aspect-ratio: 1 / 1;
    height: auto;
  }

  .product-box .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}


    .cart-button {
        position: relative;
    }

    .cart-count {
        position: absolute;
        top: -5px;
        right: -5px;
        background-color: blue;
        color: white;
        border-radius: 50%;
        padding: 2px 6px;
        font-size: 12px;
        line-height: 1;
        min-width: 18px;
        text-align: center;
    }
        .child-categories {
            border-right: 1px dashed #ddd;
            margin-right: 10px;
            padding-right: 10px;
        }
        .toggle-children {
            background: none;
            border: none;
            cursor: pointer;
            padding: 0;
            font-size: 14px;
        }
        .level-one {
            top: 100%; /* مطمئن شو منو دقیقا چسبیده به دکمه است */
            margin-top: 0;
            position: absolute;
            right: 0;
            z-index: 999;
        }

        .level-one li {
            position: relative;
        }

        .level-two,
        .level-three {
            position: absolute;
            top: 0;
            right: 100%; /* برای راست‌چین */
            margin-top: 0;
            display: none;
            z-index: 999;
        }

        li:hover > .level-two,
        li:hover > .level-three {
            display: block;
        }
        /* پالت رنگی آبی */
        :root {
            --primary-blue: #1e88e5;
            --dark-blue: #0d47a1;
            --light-blue: #bbdefb;
            --soft-blue: #e3f2fd;
            --accent-blue: #42a5f5;
        }

        /* گرادیان آبی برای متن */
        .text-gradient-blue {
            background: linear-gradient(45deg, var(--dark-blue) 0%, var(--primary-blue) 100%);
            -webkit-background-clip: text;
            color: transparent;
        }

        /* استایل شعار */
        .salyemo-slogan-blue {
             display: flex !important; /* نمایش در همه حالت‌ها */
            align-items: center;
            background: var(--soft-blue);
            border: 1px solid var(--light-blue);
            border-radius: 50px;
            padding: 4px 12px;
            margin-left: 15px;
        }
        .salyemo-slogan-blue span {
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
    margin-right: 8px;
}

@media (max-width: 767.98px) {
    .salyemo-slogan-blue {
        padding: 3px 8px;
        margin-left: 10px;
    }
    .salyemo-slogan-blue span {
        font-size: 12px;
    }
}
        .salyemo-slogan-blue:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(30, 136, 229, 0.3);
        }

        /* افکت رشد آبی */
        .hover-grow-blue {
            transition: all 0.3s ease;
        }
        .hover-grow-blue:hover {
            transform: scale(1.1);
            color: var(--dark-blue)!important;
        }

        /* رنگ‌های سفارشی */
        .text-blue { color: var(--primary-blue) }
        .bg-blue { background-color: var(--primary-blue) }
        .bg-soft-blue { background-color: var(--soft-blue) }
        .border-light-blue { border-color: var(--light-blue)!important }
        .text-dark-blue { color: var(--dark-blue) }
        /* کلاس‌های اصلی */
        .custom-modal-content {
            border-radius: 20px;
            overflow: hidden;
            border: none;
            direction: rtl;
            max-height: 90vh; /* اضافه شده */
            min-height: auto; /* تغییر از 100vh */
        }


        .modal-container {
            display: flex;
            flex-direction: column;
        }

        /* بخش لوگو */
        .modal-logo-side {
            background-color: #3580cb;
            padding: 2rem;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 200px;
        }

        .modal-logo {
            max-width: 250px;
            height: auto;
            transition: all 0.3s;
        }

        /* بخش فرم */
        .modal-form-side {
            direction: rtl !important;
            text-align: right !important;
            padding: 2rem;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        /* استایل‌های فرم */
        .form-control {
            border-radius: 12px;
            height: 48px;
            border: 1px solid #ddd;
            text-align: right; /* اضافه شده */
        }

        .btn-submit {
            background-color: #ff5722;
            color: white;
            border-radius: 12px;
            height: 48px;
            font-weight: 600;
            border: none;
        }

        /* تنظیمات دکمه بستن */
        .btn-close {
            margin-left: 0 !important;
            margin-right: auto !important;
        }

        /* تنظیمات کد OTP */
        .otp-container {
            direction: ltr; /* برای کدهای عددی بهتر است LTR باشد */
        }
        .otp-container .otp-input {
            text-align: center;
        }

        /* رسپانسیو برای دستگاه‌های بزرگ (lg به بالا) */
        @media (min-width: 992px) {
            .custom-modal-content {
                min-height: auto;
                max-height: 90vh;
                max-width: 800px; /* به دلخواه قابل تنظیم */
                margin: auto;
            }

            .modal-container {
                flex-direction: row;
                min-height: 500px; /* کمی کوچکتر از قبل */
            }

            .modal-logo-side {
                flex: 0 0 40%; /* کمی کوچکتر */
            }

            .modal-form-side {
                flex: 0 0 60%;
            }
        }

        /* رسپانسیو برای تبلت‌ها (md) */
        @media (min-width: 768px) and (max-width: 991px) {
            .modal-logo {
                max-width: 200px;
            }
        }

        /* رسپانسیو برای موبایل‌ها (sm به پایین) */
        @media (max-width: 767px) {
    .custom-modal-content {
        border-radius: 12px;
        height: auto;
        max-height: 90vh;
        overflow: hidden;
        margin: 1rem;
    }

    .modal-container {
        flex-direction: column;
        max-height: 90vh;
        overflow: hidden;
    }

    .modal-logo-side {
        padding: 1rem;
        min-height: 120px;
    }

    .modal-logo {
        max-width: 120px;
        height: auto;
    }

    .modal-form-side {
        flex: 1;
        overflow-y: auto;
        padding: 1rem;
        max-height: calc(90vh - 140px); /* تخمینی از ارتفاع لوگو + مارجین */
    }

    .btn-close {
        position: absolute;
        top: 10px;
        left: 10px;
        z-index: 10;
        transform: scale(0.9);
    }

    .form-control {
        height: 42px;
        font-size: 0.9rem;
    }

    .btn-submit {
        height: 42px;
        font-size: 0.95rem;
        border-radius: 10px;
    }
}


/* استایل های جدید */
.header-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.header-logo-container {
    flex-wrap: nowrap;
    min-width: 0;
    flex-shrink: 0;
}

.main-logo {
    width: 70px;
    height: auto;
    transition: all 0.3s ease;
}

.category-menu-container {
    flex: 1;
    min-width: 0;
}

.top-menu-menu {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.salyemo-slogan-blue {
    display: flex;
    align-items: center;
    background: var(--soft-blue);
    border: 1px solid var(--light-blue);
    border-radius: 50px;
    padding: 4px 12px;
    margin-left: 15px;
    white-space: nowrap;
}

/* تنظیمات برای 992px */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .salyemo-slogan-blue {
        padding: 4px 10px;
        margin-left: 10px;
    }
  
    .salyemo-slogan-blue span {
        font-size: 13px;
    }
    /* لوگو رو به نمایش برگردون و وسط‌چین کن اگه لازمه */
  .main-logo {
    display: block !important;
    max-width: 100px;
    margin: 0 auto; /* برای وسط‌چین کردن */
  }

  /* مخفی کردن منوی دسته‌بندی */
  .top-menu-menu,
  .category-menu-btn { /* اگر دکمه یا div جدا داره */
    display: none !important;
  }

  /* محدود کردن عرض جستجو */
  .search-box,
  .col-lg-6 {
    flex: 0 0 40% !important;
    max-width: 40% !important;
  }

  /* بهبود چیدمان اجزای هدر */
  .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
  }

  /* اطمینان از نمایش صحیح آیکون ورود/سبد خرید */
  .user-actions {
    display: flex;
    align-items: center;
  }
}
@media (min-width: 1200px) {
  .main-logo {
    max-width: 40px !important;  /* یا هر عدد دلخواه مثلا 200px */
    height: auto;
  }
}
/* شعار موبایل */
@media (max-width: 991.98px) {
    .salyemo-slogan-blue.w-100 {
        justify-content: center;
        margin: 10px auto 0;
        max-width: 100%;
        padding: 6px 12px;
    }

.salyemo-slogan-blue span {
    font-weight: bold;
    font-size: 14px;
    margin-right: 8px;
    color: var(--text-gradient-blue);
}
@media (min-width: 992px) and (max-width: 1199.98px) {
    .salyemo-slogan-blue {
        padding: 4px 10px;
        margin-left: 10px;
    }
    
    .salyemo-slogan-blue span {
        font-size: 13px;
    }
}
/* استایل‌های ریسپانسیو */
@media (max-width: 1199.98px) {
    .salyemo-slogan-blue.w-100 {
        display: flex !important;
        justify-content: center;
        margin: 10px auto 0;
        max-width: 100%;
        padding: 6px 12px;
    }
    .main-logo {
        width: 70px;
        height: auto;
    }
}

@media (max-width: 991.98px) {
    .salyemo-slogan-blue.w-100 {
        justify-content: center;
        margin: 10px auto 0;
        max-width: 100%;
    }
    .main-logo {
        width: 70px;
        height: auto;
    }
    
    /* مخفی کردن شعار دسکتاپ در موبایل */
    .salyemo-slogan-blue.d-none {
        display: none !important;
    }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
    .header-container {
        flex-direction: row;
        flex-wrap: nowrap;
    }
    
    .header-logo-container {
        min-width: auto;
        flex: 0 0 auto;
    }
    
    .main-logo {
        width: 50px;
        height: auto;
    }
    
    .col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    
    .salyemo-slogan-blue.d-none.d-lg-flex {
        display: none !important;
    }
    
    .order-2.order-lg-3 {
        order: 2 !important;
    }
}

@media (max-width: 575.98px) {
    .main-logo {
        width: 50px;
        height: auto;
    }
    .input-group select{
        max-height : 42px;
    }
    .input-group button{
        max-height:42px;
    }
    .salyemo-slogan-blue {
        min-width: max-content;
    }
}