/* ─── شبکه‌های اجتماعی — رنگ واقعی برند + tooltip ─── */
.social-links.social-links-branded {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 20px;
}

.social-links-branded .social-btn {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 24px;
    color: #fff !important;
    background: #888;
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        filter 0.22s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.social-links-branded .social-btn i {
    color: #fff !important;
    opacity: 1;
    filter: none;
}

.social-links-branded .social-btn::after {
    content: attr(data-label);
    position: absolute;
    bottom: calc(100% + 8px);
    right: 50%;
    transform: translateX(50%) translateY(6px);
    padding: 6px 12px;
    border-radius: 8px;
    background: #1a1a1a;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 5;
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.social-links-branded .social-btn:hover::after,
.social-links-branded .social-btn:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(50%) translateY(0);
}

.social-links-branded .social-btn:hover,
.social-links-branded .social-btn:focus-visible {
    transform: translateY(-5px) scale(1.08);
    filter: brightness(1.08);
    outline: none;
}

.social-links-branded .social-btn:active {
    transform: translateY(-2px) scale(1.02);
}

/* اینستاگرام — گرادیان رسمی */
.social-links-branded .social-btn.social-instagram {
    background: linear-gradient(
        45deg,
        #f58529 0%,
        #dd2a7b 45%,
        #8134af 70%,
        #515bd4 100%
    ) !important;
    box-shadow: 0 4px 18px rgba(221, 42, 123, 0.45);
}

.social-links-branded .social-btn.social-instagram:hover {
    box-shadow: 0 8px 28px rgba(221, 42, 123, 0.55);
}

/* تلگرام */
.social-links-branded .social-btn.social-telegram {
    background: #229ed9 !important;
    box-shadow: 0 4px 18px rgba(34, 158, 217, 0.45);
}

.social-links-branded .social-btn.social-telegram:hover {
    box-shadow: 0 8px 28px rgba(34, 158, 217, 0.55);
}

/* واتساپ */
.social-links-branded .social-btn.social-whatsapp {
    background: #25d366 !important;
    box-shadow: 0 4px 18px rgba(37, 211, 102, 0.45);
}

.social-links-branded .social-btn.social-whatsapp:hover {
    box-shadow: 0 8px 28px rgba(37, 211, 102, 0.55);
}

/* بله */
.social-links-branded .social-btn.social-bale {
    background: #2ecc71 !important;
    box-shadow: 0 4px 18px rgba(46, 204, 113, 0.45);
}

.social-links-branded .social-btn.social-bale:hover {
    box-shadow: 0 8px 28px rgba(46, 204, 113, 0.55);
}

.social-links-branded .social-btn.social-bale svg {
    width: 28px;
    height: 28px;
    display: block;
}

.social-links-branded .social-btn.social-bale svg path {
    fill: #fff !important;
}

/* روبیکا — لوگوی رنگی شش‌ضلعی روی پس‌زمینه سفید */
.social-links-branded .social-btn.social-rubika {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.social-links-branded .social-btn.social-rubika:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
    border-color: rgba(0, 0, 0, 0.12);
}

.social-links-branded .social-btn.social-rubika svg,
.social-links-branded .social-btn.social-rubika img {
    width: 30px;
    height: 30px;
    display: block;
    object-fit: contain;
}

/* ─── هاب زیردسته ─── */
.category-hub-section {
    padding: 24px 0 32px;
    background: var(--bg);
}

.category-hub-intro {
    text-align: center;
    margin-bottom: 28px;
}

.category-hub-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0 0 8px;
}

.category-hub-title .hub-title-en {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-light);
    margin-top: 6px;
    letter-spacing: 0.04em;
}

.category-hub-lead {
    color: var(--text-light);
    margin: 0;
}

/* ردیف کارت‌های ریز — دسترسی سریع به همهٔ زیردسته‌ها */
.category-hub-chips-scroll {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 28px;
    padding: 4px 8px 12px;
}

.category-hub-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    max-width: 140px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 2px solid var(--border);
    background: var(--bg);
    text-decoration: none;
    color: inherit;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.category-hub-chip:hover,
.category-hub-chip:focus-visible {
    transform: translateY(-3px);
    border-color: var(--accent);
    background: var(--bg-secondary);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    outline: none;
}

.chip-label-fa {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    line-height: 1.35;
}

.chip-label-en {
    font-size: 0.65rem;
    color: var(--text-light);
    margin-top: 3px;
    letter-spacing: 0.02em;
}

/* هر ستون: کارت ریز بالای کارت بزرگ */
.category-hub-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-hub-chip--above {
    width: 100%;
    max-width: none;
    min-width: 0;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 8px;
    padding: 8px 12px;
}

.category-hub-chip--above .chip-label-fa {
    font-size: 0.88rem;
}

.category-hub-chip--above .chip-label-en {
    margin-top: 0;
    font-size: 0.68rem;
}

/* کارت‌های بزرگ حذف شده — فقط دکمه‌های ریز نمایش داده می‌شوند */
.category-hub-grid,
.category-hub-item,
.category-hub-card {
    display: none !important;
}

.category-hub-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.category-hub-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--accent);
}

.category-hub-image {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--bg);
}

.category-hub-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.category-hub-card:hover .category-hub-image img {
    transform: scale(1.06);
}

.category-hub-labels {
    padding: 14px 12px;
    text-align: center;
}

.hub-label-fa {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary);
}

.hub-label-en {
    display: block;
    font-size: 0.72rem;
    color: var(--text-light);
    margin-top: 4px;
    letter-spacing: 0.02em;
}

@media (max-width: 992px) {
    .category-hub-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .category-hub-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .category-hub-chips-scroll {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        padding-bottom: 14px;
        margin-bottom: 20px;
    }

    .category-hub-chip {
        flex: 0 0 auto;
        scroll-snap-align: start;
        min-width: 100px;
    }
}

/* ─── راهنمای سایز در صفحه اصلی ─── */
.size-guide-home {
    padding: 56px 0;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg) 100%);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.size-guide-home-header {
    text-align: center;
    margin-bottom: 28px;
}

.size-guide-home-header .title-en-block {
    font-size: 0.9rem;
    color: var(--text-light);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 4px 0 12px;
}

.size-guide-home-desc {
    color: var(--text-light);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.7;
}

.size-guide-table-wrap--home {
    max-width: 480px;
    margin: 0 auto 24px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

.size-guide-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg);
}

.size-guide-table th,
.size-guide-table td {
    padding: 12px 16px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.size-guide-table th {
    background: var(--accent);
    color: #111;
    font-weight: 800;
}

.size-guide-table tbody tr:hover {
    background: rgba(212, 175, 55, 0.08);
}

.size-guide-home-cta {
    text-align: center;
}

.size-guide-page-header {
    padding: 110px 0 40px;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg));
}

.size-guide-page-body {
    padding: 40px 0 60px;
}

/* ─── پنل جستجوی شیک ─── */
.search-panel-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(8, 10, 18, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.search-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-panel {
    position: relative;
    width: 100%;
    max-width: 640px;
    margin-top: 4vh;
    background: linear-gradient(165deg, #1a1d26 0%, #0f1117 55%, #1a1520 100%);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 24px;
    box-shadow:
        0 32px 80px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    overflow: hidden;
    transform: translateY(24px) scale(0.96);
    transition: transform 0.4s cubic-bezier(0.34, 1.4, 0.64, 1);
    color: #f3f4f6;
}

.search-panel-overlay.active .search-panel {
    transform: translateY(0) scale(1);
}

.search-panel-glow {
    position: absolute;
    top: -80px;
    right: -40px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.35), transparent 70%);
    pointer-events: none;
}

.search-panel-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 24px 24px 0;
    gap: 12px;
}

.search-panel-hero {
    flex: 1;
}

.search-sparkle {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #d4af37, #b8860b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #111;
    margin-bottom: 12px;
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.4);
    animation: searchPulse 2.5s ease-in-out infinite;
}

@keyframes searchPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 24px rgba(212, 175, 55, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 12px 32px rgba(212, 175, 55, 0.55); }
}

.search-panel-tagline {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0 0 4px;
    color: #fff;
}

.search-panel-tagline-en {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    letter-spacing: 0.06em;
}

.search-panel-close {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: background 0.2s;
}

.search-panel-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

.search-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 20px 0;
    padding: 4px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
}

.search-input-icon {
    color: #d4af37;
    font-size: 1rem;
}

.search-panel-header input {
    flex: 1;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 1rem;
    padding: 14px 0;
    font-family: inherit;
    outline: none;
}

.search-panel-header input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search-panel-hint {
    padding: 12px 24px 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-panel-hint i {
    color: #d4af37;
}

.search-panel-results {
    max-height: min(50vh, 400px);
    overflow-y: auto;
    padding: 16px 16px 24px;
    margin-top: 8px;
}

.search-welcome,
.search-empty {
    text-align: center;
    padding: 32px 16px;
    color: rgba(255, 255, 255, 0.5);
}

.search-welcome i,
.search-empty i {
    font-size: 2rem;
    color: #d4af37;
    margin-bottom: 12px;
    display: block;
    opacity: 0.8;
}

.search-loading {
    text-align: center;
    padding: 28px;
    color: rgba(255, 255, 255, 0.6);
}

.search-loading-ring {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(212, 175, 55, 0.2);
    border-top-color: #d4af37;
    border-radius: 50%;
    margin: 0 auto 12px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.search-result-row {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    text-align: right;
    font-family: inherit;
    color: #fff;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.search-result-row:hover {
    background: rgba(212, 175, 55, 0.12);
    border-color: rgba(212, 175, 55, 0.35);
    transform: translateX(-4px);
}

.search-result-row img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}

.search-result-row .search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-row .search-result-name {
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-row .search-result-price {
    font-size: 0.85rem;
    color: #d4af37;
    margin-top: 4px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
