/* Subcategories - Desktop */
.subcategories-desktop {
    margin: 0 0 16px 0;
    padding: 0;
    background: #fff;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.subcategories-scroll-wrapper {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 0;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db #f3f4f6;
    scroll-behavior: smooth;
    max-width: 100%;
}

.subcategories-scroll-wrapper::-webkit-scrollbar {
    height: 6px;
}

.subcategories-scroll-wrapper::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.subcategories-scroll-wrapper::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.subcategories-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.subcat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #1f2937;
    min-width: 110px;
    max-width: 110px;
    flex-shrink: 0;
    transition: all 0.2s ease;
    padding: 4px;
    border-radius: 8px;
}

.subcat-item:hover {
    background: #f9fafb;
    transform: translateY(-2px);
}

.subcat-image {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e5e7eb;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 8px;
}

.subcat-item:hover .subcat-image {
    border-color: #3b82f6;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.2);
}

.subcat-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.subcat-image svg {
    color: #9ca3af;
    flex-shrink: 0;
}

.subcat-name {
    font-size: 0.8125rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    max-width: 100%;
    min-height: 28px;
    color: #374151;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.subcat-item:hover .subcat-name {
    color: #3b82f6;
}

/* Subcategories - Mobile */
.mobile-subcategories-wrapper {
    margin-top: 12px;
    padding: 0;
}

.mobile-subcategories-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.mobile-subcategories-scroll::-webkit-scrollbar {
    display: none;
}

.mobile-subcat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #1f2937;
    min-width: 85px;
    max-width: 85px;
    flex-shrink: 0;
    padding: 2px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.mobile-subcat-item:active {
    background: #f3f4f6;
}

.mobile-subcat-image {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    padding: 6px;
}

.mobile-subcat-item:active .mobile-subcat-image {
    border-color: #3b82f6;
    transform: scale(0.95);
}

.mobile-subcat-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mobile-subcat-image svg {
    color: #9ca3af;
    flex-shrink: 0;
}

.mobile-subcat-name {
    font-size: 0.6875rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.15;
    max-width: 100%;
    min-height: 24px;
    color: #374151;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* RTL Support */
.rtl-content .subcategories-scroll-wrapper,
.rtl-content .mobile-subcategories-scroll {
    direction: rtl;
}

