/* Desktop / modal popular chips (Digikala-like) */
.desktop-search-popular {
    padding: 8px 4px 12px;
}

.desktop-search-popular__title {
    display: block;
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.8;
    color: #0c0c0c;
}

.desktop-search-popular__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.desktop-search-popular__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 8px 12px;
    border: 1px solid #e0e0e2;
    border-radius: 16px;
    background: #fff;
    color: #0c0c0c;
    text-decoration: none;
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    white-space: nowrap;
    cursor: pointer;
}

.desktop-search-popular__chip:hover {
    background: #fafafa;
    border-color: #c0c2c5;
}

.desktop-search-popular__chip-icon {
    display: inline-flex;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: #424750;
}

.desktop-search-popular__chip-icon svg {
    width: 16px;
    height: 16px;
    display: block;
    fill: currentColor;
}

.desktop-search-popular__chip-label {
    overflow: hidden;
    text-overflow: ellipsis;
}

.sm-empty {
    padding: 1.5rem 1rem;
    font-size: 12px;
    color: #6d6e71;
}

.sm-section-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    padding-bottom: 8px;
}

.sm-section-head span {
    display: flex;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.8;
    color: #0c0c0c;
}

.sm-section-head svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.sm-section-head--accent {
    margin-bottom: 0;
    padding-bottom: 8px;
}

.sm-section-head--accent span {
    padding-right: 4px;
}

.sm-queries {
    padding: 0.5rem 1rem 0;
}

.sm-query-link {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: #101010;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
}

.sm-query-link:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.sm-query-arrow {
    display: flex;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sm-query-arrow svg {
    width: 100%;
    height: 100%;
}

.sm-products {
    width: 100%;
    border-top: none;
    padding-top: 8px;
    margin-top: 4px;
}

.sm-products .sm-section-head {
    padding: 0 1rem 8px;
}

.sm-products-wrap {
    position: relative;
}

.sm-products-nav {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 32px;
    height: 32px;
    padding: 0;
    margin: 0;
    border: 1px solid #e0e0e2;
    border-radius: 50%;
    background: #fff;
    color: #424750;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.sm-products-nav--prev {
    right: 4px;
}

.sm-products-nav--next {
    left: 4px;
}

.sm-products-nav svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    display: block;
}

.sm-products-nav:disabled {
    display: none;
}

.sm-products-row {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 1rem 0.5rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    direction: rtl;
}

.sm-products-row::-webkit-scrollbar {
    display: none;
}

.sm-product-card {
    display: flex;
    box-sizing: border-box;
    width: 180px;
    min-width: 180px;
    max-width: 180px;
    height: 66px;
    min-height: 66px;
    max-height: 66px;
    flex: 0 0 180px;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: #fff;
}

.sm-product-img {
    position: relative;
    box-sizing: border-box;
    flex: 0 0 64px;
    width: 64px;
    min-width: 64px;
    max-width: 64px;
    height: 64px;
    min-height: 64px;
    max-height: 64px;
    flex-shrink: 0;
    overflow: hidden;
    background: #f8f8f8;
}

.sm-product-img img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
}

.sm-product-overlay {
    position: absolute;
    inset: 0;
    background: rgba(111, 115, 119, 0.07);
    pointer-events: none;
}

.sm-results > .sm-products:first-child {
    border-top: none;
    padding-top: 0;
}

.sm-product-title {
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 4px;
    font-size: 12px;
    line-height: 1.8;
    color: #212529;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sm-product-divider {
    display: block;
    width: 0;
    height: 12px;
    border-left: 1px solid #ddd;
    flex-shrink: 0;
    align-self: center;
}

.sm-cats,
.sm-brands {
    padding: 4px 1rem;
}

.sm-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sm-suggest-chip {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    margin: 0;
    padding: 0.25rem 0.5rem;
    border: 1px solid #e5e5e5;
    border-radius: 0.25rem;
    background-color: #fff;
    color: #81858b;
    font-size: 12px;
    font-weight: 400;
    line-height: 20px;
    text-decoration: none;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    transition: color .15s ease, border-color .15s ease;
}

.sm-suggest-chip:hover,
.sm-suggest-chip:focus {
    border-color: #dc3545;
    color: #dc3545;
    text-decoration: none;
}


.desktop-search-panel .sm-empty {
    font-size: 12px;
    padding: 1rem 0.25rem;
}

.desktop-search-panel .sm-section-head {
    padding-bottom: 8px;
}

.desktop-search-panel .sm-section-head span {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.8;
}

.desktop-search-panel .sm-section-head svg {
    width: 16px;
    height: 16px;
}

.desktop-search-panel .sm-products {
    border-top: none;
    padding-top: 8px;
    margin-top: 4px;
}

.desktop-search-panel .sm-products .sm-section-head {
    padding: 0 0 8px;
}

.desktop-search-panel .sm-products-wrap {
    position: relative;
}

@media (min-width: 992px) {
    .desktop-search-panel .sm-products-nav:not(:disabled) {
        display: flex;
    }
}

.desktop-search-panel .sm-products-row {
    gap: 8px;
    padding: 0 0 4px;
}

.desktop-search-panel .sm-product-card {
    width: 180px;
    min-width: 180px;
    max-width: 180px;
    height: 66px;
    min-height: 66px;
    max-height: 66px;
    flex: 0 0 180px;
}

.desktop-search-panel .sm-product-img {
    flex: 0 0 64px;
    width: 64px;
    min-width: 64px;
    max-width: 64px;
    height: 64px;
    min-height: 64px;
    max-height: 64px;
}

.desktop-search-panel .sm-product-title {
    font-size: 12px;
    line-height: 1.8;
    padding: 4px;
    margin: 0;
    flex: 1 1 0;
    min-width: 0;
}

.desktop-search-panel .sm-cats,
.desktop-search-panel .sm-brands {
    padding: 4px 0;
}

.desktop-search-panel .sm-chip-row {
    gap: 0.5rem;
}

.desktop-search-panel .sm-suggest-chip {
    font-size: 12px;
    line-height: 20px;
}
