/* آیکون‌های علاقه‌مندی / مقایسه کنار سبد هدر */

.hamta-header-lists {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-inline-end: 4px;
    position: relative;
    z-index: 5;
    flex: 0 0 auto;
    flex-shrink: 0;
    max-width: none;
    vertical-align: middle;
}

.hamta-header-lists[hidden] {
    display: none !important;
}

.hamta-header-lists__slot {
    position: relative;
    flex: 0 0 auto;
}

.hamta-header-lists__btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    padding: 0;
    flex: 0 0 auto;
}

.hamta-header-lists__btn i {
    font-size: 16px;
    line-height: 1;
}

#hamta-header-wishlist-btn {
    color: #e11d48;
}

#hamta-header-compare-btn {
    color: #2563eb;
}

.hamta-header-lists__count {
    position: absolute;
    top: -4px;
    inset-inline-start: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.hamta-header-lists__panel {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    width: min(86vw, 300px);
    max-height: min(70vh, 420px);
    overflow: auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
    padding: 10px;
    z-index: 10080;
}

.hamta-header-lists__panel[hidden],
.hamta-header-lists__panel:not(.is-open) {
    display: none !important;
}

.hamta-header-lists__panel-head {
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
    padding: 2px 4px;
}

.hamta-header-lists__empty {
    margin: 0;
    padding: 14px 8px;
    text-align: center;
    color: #64748b;
    font-size: 12px;
}

.hamta-header-lists__items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hamta-header-lists__item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border-radius: 10px;
    background: #f8fafc;
}

.hamta-header-lists__link {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.hamta-header-lists__thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    background: #e2e8f0;
    flex-shrink: 0;
    display: grid;
    place-items: center;
}

.hamta-header-lists__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hamta-header-lists__ph {
    color: #94a3b8;
    font-size: 14px;
}

.hamta-header-lists__title {
    font-size: 12px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hamta-header-lists__remove {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.hamta-header-lists__remove:hover {
    color: #e11d48;
    background: rgba(225, 29, 72, 0.08);
}

.hamta-header-lists__panel-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.hamta-header-lists__cta,
.hamta-header-lists__clear {
    flex: 1;
    min-height: 36px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
}

.hamta-header-lists__cta {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.hamta-header-lists__clear {
    background: #fff;
    color: #64748b;
    border-color: #e2e8f0;
}

/* ریبون پایین مقایسه — حذف کامل */
.hamta-compare-bar,
#hamta-compare-bar {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
}

@media (max-width: 991.98px) {
    .hamta-header-lists__btn {
        width: 36px;
        height: 36px;
    }

    .hamta-header-lists__panel {
        position: fixed !important;
        top: calc(56px + env(safe-area-inset-top, 0px) + 8px);
        right: 12px;
        left: 12px;
        inset-inline: 12px;
        width: auto;
        max-width: none;
        z-index: 10080;
    }
}

/* هم‌تراز با سبد در هدر — یک ردیف بدون wrap */
#hpb-site-header .hamta-mini-cart,
#hpb-site-header .hamta-header-lists {
    vertical-align: middle;
    flex-shrink: 0;
}

#hpb-site-header .hpb-lb-cell:has(.hamta-mini-cart),
#hpb-site-header .hamta-dynamic-slot:has(.hamta-mini-cart),
#hpb-site-header .hamta-header-tools {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap !important;
    max-width: none;
}

#hpb-site-header .hamta-header-tools {
    flex: 0 0 auto;
}
