:root {
    --background: 240 4.8% 95.9%;
    --text: 240 10% 3.9%;
    --warning: 0 72% 51%;
    --success: 142 71% 45%;
    --success-secondary: 160 84% 39%;
    --muted: 0 0% 100%;
    --border: 240 5.9% 90%;
    --primary: 199 89% 50%;
    --primary-btn: 198 93% 45%;
    --secondary: 240 6% 90%;
    --ring: 240 10% 3.9%;
    --radius: 0.5rem;
}

.dark {
    --background: 240 10% 3.9%;
    --text: 0 0% 98%;
    --warning: 0 84% 60%;
    --success: 142 69% 58%;
    --success-secondary: 161 94% 30%;
    --muted: 270 4% 10%;
    --border: 240 3.7% 15.9%;
    --primary: 198 93% 57%;
    --primary-btn: 198 93% 38%;
    --secondary: 240 4% 16%;
    --ring: 240 4.9% 83.9%;
}

input {

&
:-webkit-autofill,

&
:-webkit-autofill:hover {
    -webkit-text-fill-color: hsl(var(--text));
    -webkit-box-shadow: 0 0 0 40rem hsl(var(--muted)) inset,
    0 0 0 1px hsl(var(--muted)) inset;
}

&
:-webkit-autofill:focus {
    -webkit-text-fill-color: hsl(var(--text));
    -webkit-box-shadow: 0 0 0 40rem hsl(var(--muted)) inset,
    0 0 0 1px hsl(var(--muted)) inset;
}

}

::selection {
    background: #8884;
}

::-webkit-scrollbar {
    width: .34rem;
    height: .5rem
}

::-webkit-scrollbar-track {
    background-color: hsl(var(--muted)) !important
}

::-webkit-scrollbar-thumb {
    border-radius: calc(var(--radius) - 4px);
    background-color: hsl(var(--secondary)) !important
}


html {
    scrollbar-color: hsl(215.4 16.3% 46.9% / .3)
}

html.dark {
    scrollbar-color: hsl(215.4 16.3% 56.9% / .3)
}


::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}

::view-transition-old(root) {
    z-index: 1;
}

::view-transition-new(root) {
    z-index: 2147483646;
}

.dark::view-transition-old(root) {
    z-index: 2147483646;
}

.dark::view-transition-new(root) {
    z-index: 1;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button,
input[type="number"] {
    -webkit-appearance: none;
    margin: 0;
    -moz-appearance: textfield !important;
}


.scroll-lock {
    overflow-y: scroll;
    position: fixed;
    width: 100%;
    top: var(--window-scroll-top);
}

:root {
    overflow-y: scroll;
}

* {
    border-color: hsl(var(--border));
}

body {
    background-color: hsl(var(--background));
    color: hsl(var(--text));
}

@media only screen and (min-width: 1024px) {

    .border-gradient::before {
        background: radial-gradient(
                300px circle at var(--x) var(--y),
                hsl(var(--primary)) 0,
                transparent 100%
        );
    }

}


.swiper-button-prev,
.swiper-button-next {
    background-color: #09090b;
    color: #ffffff;
}


.swiper-button-prev,
.swiper-button-next {
    width: 40px;
    height: 40px;

}

.swiper .swiper-pagination-bullet,
.swiper .swiper-pagination-bullet-active {
    background-color: black; /* bg-black */
    transition: all 0.3s; /* transition-all duration-300 */
    height: 0.375rem; /* h-1.5 (1.5 * 0.25rem) */
    width: 0.375rem; /* w-1.5 (1.5 * 0.25rem) */
}

.swiper .swiper-pagination-bullet-active {
    width: 1.25rem; /* w-5 (5 * 0.25rem) */
    border-radius: 0.5rem; /* rounded-lg */
    background-color: hsl(var(--primary)); /* bg-primary (replace #primary with the actual color value) */
}

/* برای صفحه سبد خرید */
body.cart-page .ad-banner {
    display: none;
}

.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #3b82f6;
    color: white;
    font-size: 10px;
    font-weight: bold;
    border-radius: 50%;
    padding: 3px 6px;
    min-width: 18px;
    text-align: center;
    line-height: 1;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}


.image-box {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 1rem !important;
    margin-bottom: 15px;
    width: 100% !important;
}

.image-wrapper {
    border: 1px solid #ddd !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    overflow: hidden !important;
    background-color: #fff !important;
    padding: 0.5rem !important;
    box-sizing: border-box !important;
}

.image-frame {
    width: 100% !important;
    height: 120px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #fff !important;
}

.image-element {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    border-radius: 0.25rem !important;
}

.image-caption {
    font-size: 0.875rem !important;
    text-align: center !important;
    color: #4B5563 !important;
    margin-top: 0.5rem !important;
}

/* ریسپانسیو موبایل */
@media (max-width: 640px) {
    .image-box {
        grid-template-columns: repeat(3, 1fr) !important; /* سه ستون در موبایل */
    }

    .image-frame {
        height: 65px !important;
    }

    .image-caption {
        font-size: 0.75rem !important;
    }
}


.instagram-icon {
    background: linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7);
}

.telegram-icon {
    color: #0088cc !important; /* رنگ آبی تلگرام */
}


/*//////////////////////////////////*/
/* استایل برای کانتینر نوار زیرنویس */
.news-ticker-container {
    width: 100%;
background: linear-gradient(to right, #f2f1fb, #f4f3fd);
    color: black;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding-left: 30px;
    padding-right: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-top: 3px solid #6a5acd; /* خط بالا فیروزه‌ای ارغوانی */
}

/* استایل برای عنوان ثابت سمت راست */
.ticker-title-container {
    position: absolute;
    right: 0;
    padding: 12px 18px;
    background-color: #6a5acd; /* پس‌زمینه فیروزه‌ای ارغوانی */
    color: white;
    font-size: 18px;
    font-weight: 200;
    border-radius: 5px;
    z-index: 10;
}

/* تغییرات هنگام hover */
.ticker-title-container:hover {
    background-color: #483d8b; /* رنگ تیره‌تر برای عنوان در هنگام hover */
    transform: scale(1.05);
}

/* استایل برای حرکت متن */
.news-ticker {
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: scroll-right 40s linear infinite;
    padding-left: 30px;
    gap: 20px;
    font-weight: 200;
}

/* استایل برای متن لینک‌ها */
.news-ticker a {
    text-decoration: none;
    color: black;
    font-weight: 200;
    padding: 12px 20px;
    font-size: 16px;
    display: inline-block;
    transition: color 0.3s ease, transform 0.3s ease;
}

/* تغییر رنگ لینک‌ها هنگام hover */
.news-ticker a:hover {
    color: #483d8b; /* رنگ لینک‌ها هنگام hover */
    transform: translateY(-2px);
}

/* انیمیشن حرکت متن از چپ به راست */
@keyframes scroll-right {
    0% {
        transform: translateX(-80%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* استایل برای صفحات موبایل */
@media (max-width: 768px) {
    .news-ticker-container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .ticker-title-container {
        font-size: 14px;
        padding: 12px 10px;
    }

    .news-ticker a {
        font-size: 14px;
        padding: 10px 15px;
    }

    @keyframes scroll-right {
        0% {
            transform: translateX(-25%);
        }
        100% {
            transform: translateX(100%);
        }
    }
}


/*///////////////////////////////////*/
@media (max-width: 768px) {
    .amazing-banner-mobile {
        display: block !important;
    }
    .swiper-slide.amazing-banner {
        display: none !important;
    }
}



#sidebar {
    overflow-y: auto; /* فعال کردن اسکرول داخل سایدبار */
    max-height: 100vh; /* جلوگیری از خارج شدن از صفحه */
}



#toggle-description {
    cursor: pointer;
    color: #2563eb;
    font-weight: 600;
    padding: 6px 12px;
    border: 1px solid transparent;
    border-radius: 6px;
    transition: background-color 0.3s ease, color 0.3s ease;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

#toggle-description:hover {
    background-color: #2563eb;
    color: white;
}

#toggle-description::after {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.4s ease;
    margin-left: 4px;
    margin-top: 2px;
}

#toggle-description.expanded::after {
    transform: rotate(135deg);
}

#store-description {
    max-height: 150px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.5s ease;
}

/* گرادیان فید در پایین متن */
#store-description::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px; /* ارتفاع منطقه سایه */
    pointer-events: none; /* تا کلیک دکمه رو نپوشونه */
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
    transition: opacity 0.5s ease;
}

/* وقتی بازه، گرادیان حذف میشه */
#store-description.expanded::after {
    opacity: 0;
}