/* ============= استایل‌های عمومی قالب سملایت ============= */

/* Line clamp - در همه صفحات استفاده می‌شود */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-4 {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* انیمیشن marquee برای اسلایدر مشکی پایین */
.animate-infinite-x {
    animation: infinite-x 30s linear infinite;
}
@keyframes infinite-x {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.animate-paused {
    animation-play-state: paused;
}

/* اسکرول‌بار مخفی برای marquee */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* انیمیشن spinner */
.animate-spin {
    animation: samliteSpinner .8s linear infinite;
}
@keyframes samliteSpinner {
    to { transform: rotate(360deg); }
}

/* اسکرول‌بار زیبا برای dropdown جستجو */
#samlite-search-results::-webkit-scrollbar {
    width: 6px;
}
#samlite-search-results::-webkit-scrollbar-track {
    background: transparent;
}
#samlite-search-results::-webkit-scrollbar-thumb {
    background: #f4f4f4;
    border-radius: 9999px;
}
#samlite-search-results::-webkit-scrollbar-thumb:hover {
    background: #7300ff40;
}

/* ============= اینپوت جستجو (RTL + فوکوس) ============= */
.samlite-search-input {
    direction: rtl;
    text-align: right;
}
.samlite-search-input::placeholder {
    text-align: right;
    direction: rtl;
}
.samlite-search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}
.samlite-search-input:focus {
    direction: rtl;
    text-align: right;
}

/* ============= Dropdown جستجو - زیر اینپوت ============= */
#samlite-search-dropdown {
    animation: samliteSlideDown .25s ease-out;
    transform-origin: top right;
}
@keyframes samliteSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============= منوی سفارشی (Walker) ============= */
header nav ul,
#samlite-mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
header nav > ul {
    display: flex;
    align-items: center;
    gap: 4px;
}
header nav ul li {
    position: relative;
}
header nav ul li a {
    display: inline-block;
    padding: 8px 16px;
    color: #3a3a3a;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: color .2s;
    text-decoration: none;
}
header nav ul li a:hover,
header nav ul li.current-menu-item > a,
header nav ul li.current_page_item > a {
    color: #7300ff;
}
header nav ul li.current-menu-item > a::after,
header nav ul li.current_page_item > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: #7300ff;
    border-radius: 9999px;
}
header nav ul.sub-menu,
header nav ul.sub-menu ul {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px 5px rgba(0,0,0,.08);
    border: 1px solid #f4f4f4;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: all .2s;
    z-index: 50;
    padding: 8px 0;
}
header nav ul li:hover > ul.sub-menu {
    opacity: 1;
    visibility: visible;
}
header nav ul.sub-menu li {
    width: 100%;
}
header nav ul.sub-menu li a {
    display: block;
    width: 100%;
    padding: 10px 16px;
    border-radius: 0;
}
header nav ul.sub-menu li a:hover {
    background: #f9f5ff;
}

/* ============= آیتم‌های جستجو - RTL ============= */
.samlite-search-item {
    direction: rtl;
    text-align: right;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: all .2s;
}
.samlite-search-item:hover,
.samlite-search-active {
    background: linear-gradient(135deg, #f9f5ff 0%, #eee5ff 100%);
}

/* تگ‌های پیشنهاد جستجو */
.samlite-suggestion-tag {
    display: inline-block;
    background: #f4f4f4;
    color: #3a3a3a;
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 13px;
    text-decoration: none;
    transition: all .2s;
}
.samlite-suggestion-tag:hover {
    background: #7300ff;
    color: #fff;
    transform: translateY(-1px);
}

/* فوتر لینک جستجو */
.samlite-search-footer-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #7300ff;
    font-size: 13px;
    font-weight: 500;
    padding: 12px 0;
    border-radius: 16px;
    text-decoration: none;
    transition: all .2s;
}
.samlite-search-footer-link:hover {
    background: #f9f5ff;
}

/* انتخاب متن */
::selection {
    background: #7300ff;
    color: #fff;
}

/* اسکرول smooth */
html {
    scroll-behavior: smooth;
}

/* فونت پیش‌فرض */
body {
    font-family: 'Plus Jakarta Sans', 'Vazirmatn', system-ui, -apple-system, sans-serif;
}

/* استایل لوگوی سفارشی وردپرس */
.custom-logo,
.header-logo img,
.site-logo img {
    height: 36px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}
@media (min-width: 768px) {
    .custom-logo,
    .header-logo img,
    .site-logo img {
        height: 44px;
        max-width: 220px;
    }
}
